summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/palemoon/Makefile92
-rw-r--r--www/palemoon/distinfo2
-rw-r--r--www/palemoon/files/mozconfig34
-rw-r--r--www/palemoon/files/palemoon3
-rw-r--r--www/palemoon/patches/patch-client_mk16
-rw-r--r--www/palemoon/patches/patch-config_gcc-stl-wrapper_template_h74
-rw-r--r--www/palemoon/patches/patch-config_gcc_hidden_h17
-rw-r--r--www/palemoon/patches/patch-config_make-stl-wrappers_py25
-rw-r--r--www/palemoon/patches/patch-gfx_skia_generate_mozbuild_py47
-rw-r--r--www/palemoon/patches/patch-gfx_skia_trunk_src_opts_opts_check_x86_cpp85
-rw-r--r--www/palemoon/patches/patch-memory_mozalloc_mozalloc_h27
-rw-r--r--www/palemoon/patches/patch-xpcom_io_nsLocalFileUnix_cpp16
-rw-r--r--www/palemoon/pkg/DESCR9
-rw-r--r--www/palemoon/pkg/PLIST54
14 files changed, 501 insertions, 0 deletions
diff --git a/www/palemoon/Makefile b/www/palemoon/Makefile
new file mode 100644
index 0000000..56a5d62
--- /dev/null
+++ b/www/palemoon/Makefile
@@ -0,0 +1,92 @@
1# $OpenBSD$
2
3# Maybe i386 too, but has a hard requirement on SSE2 instructions.
4ONLY_FOR_ARCHS = amd64
5
6V = 27.7.2
7COMMENT = independent fork of Firefox with new layout engine
8DISTNAME = palemoon-${V}
9CATEGORIES = www x11
10
11GH_ACCOUNT = MoonchildProductions
12GH_PROJECT = Pale-Moon
13GH_TAGNAME = ${V}_Release
14
15SHARED_LIBS += browsercomps 1.0 # 1.0
16SHARED_LIBS += dbusservice 1.0 # 1.0
17SHARED_LIBS += mozgnome 1.0 # 1.0
18SHARED_LIBS += mozalloc 1.0 # 1.0
19SHARED_LIBS += mozjs 1.0 # 1.0
20SHARED_LIBS += mozsqlite3 1.0 # 1.0
21SHARED_LIBS += xul 1.0 # 1.0
22
23HOMEPAGE = https://www.palemoon.org/
24MAINTAINER = Brian Callahan <bcallah@openbsd.org>
25
26# MPL 2.0
27PERMIT_PACKAGE_CDROM = Yes
28
29WANTLIB += ${COMPILER_LIBCXX} X11 Xcomposite Xcursor Xdamage Xext
30WANTLIB += Xfixes Xi Xinerama Xrandr Xrender Xt atk-1.0 c cairo
31WANTLIB += dbus-1 dbus-glib-1 event fontconfig freetype gdk-x11-2.0
32WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gthread-2.0
33WANTLIB += gtk-x11-2.0 icudata icui18n icuuc intl jpeg m nspr4
34WANTLIB += nss3 nssutil3 pango-1.0 pangocairo-1.0 pangoft2-1.0
35WANTLIB += plc4 plds4 smime3 sndio ssl3 vpx z
36
37MODULES = lang/python
38MODPY_RUNDEP = No
39
40# XXX: ${MODGNU_AUTOCONF_DEPENDS} && AUTOCONF_VERSION=2.13 didn't work
41BUILD_DEPENDS = archivers/unzip \
42 archivers/zip \
43 devel/autoconf/2.13 \
44 devel/yasm
45
46LIB_DEPENDS = devel/nspr \
47 multimedia/libvpx \
48 textproc/icu4c \
49 security/nss \
50 x11/dbus-glib \
51 x11/gtk+2
52
53CONFIGURE_ARGS = --verbose
54
55USE_GMAKE = Yes
56
57SEPARATE_BUILD = Yes
58
59USE_WXNEEDED = Yes
60
61SUBST_VARS += V
62
63NO_TEST = Yes
64
65# Upstream build instructions say this is necessary.
66post-extract:
67 ${SUBST_CMD} -DWRKBUILD="${WRKBUILD}" -DCFLAGS="${CFLAGS}" \
68 -c -m 644 ${FILESDIR}/mozconfig ${WRKSRC}/.mozconfig
69
70# Build system can't find the compilers without this.
71pre-configure:
72 sed -i -e 's,$${CC},${WRKDIR}/bin/cc,g' \
73 -e 's,$${CXX},${WRKDIR}/bin/c++,g' \
74 ${WRKSRC}/client.mk
75
76do-build:
77 cd ${WRKSRC} && ./mach build
78
79do-install:
80 cd ${WRKSRC} && ./mach package
81 ${INSTALL_DATA_DIR} ${PREFIX}/lib/palemoon-${V}
82 cd ${WRKBUILD}/dist/palemoon && \
83 find * -type d -exec ${INSTALL_DATA_DIR} \
84 "${PREFIX}/lib/palemoon-${V}/{}" \;
85 cd ${WRKBUILD}/dist/palemoon && \
86 find * -type f -exec ${INSTALL_DATA} \
87 "{}" "${PREFIX}/lib/palemoon-${V}/{}" \;
88 ${INSTALL_PROGRAM} ${WRKBUILD}/dist/palemoon/palemoon{,-bin} \
89 ${PREFIX}/lib/palemoon-${V}
90 ${SUBST_CMD} -c -m 755 ${FILESDIR}/palemoon ${PREFIX}/bin/palemoon
91
92.include <bsd.port.mk>
diff --git a/www/palemoon/distinfo b/www/palemoon/distinfo
new file mode 100644
index 0000000..45b2aef
--- /dev/null
+++ b/www/palemoon/distinfo
@@ -0,0 +1,2 @@
1SHA256 (palemoon-27.7.2.tar.gz) = DeHR0xhdFHDuNHdKnwWLftkwdXszeIihMjzriLMYYMw=
2SIZE (palemoon-27.7.2.tar.gz) = 179831808
diff --git a/www/palemoon/files/mozconfig b/www/palemoon/files/mozconfig
new file mode 100644
index 0000000..48561de
--- /dev/null
+++ b/www/palemoon/files/mozconfig
@@ -0,0 +1,34 @@
1ac_add_options --enable-official-branding
2export MOZILLA_OFFICIAL=1
3
4mk_add_options MOZ_CO_PROJECT=browser
5ac_add_options --enable-application=browser
6
7mk_add_options MOZ_OBJDIR="${WRKBUILD}"
8
9ac_add_options --enable-optimize="${CFLAGS} -msse2 -mfpmath=sse -I${LOCALBASE}/include"
10ac_add_options --with-pthreads
11
12ac_add_options --disable-installer
13ac_add_options --disable-updater
14
15ac_add_options --enable-release
16ac_add_options --enable-devtools
17ac_add_options --enable-shared-js
18
19ac_add_options --enable-strip
20
21ac_add_options --x-libraries="${X11BASE}/lib"
22
23ac_add_options --with-system-jpeg="${LOCALBASE}"
24ac_add_options --with-system-zlib
25ac_add_options --with-system-bz2="${LOCALBASE}"
26ac_add_options --with-system-libevent
27ac_add_options --with-system-icu
28ac_add_options --with-system-webp="${LOCALBASE}"
29ac_add_options --with-system-sqlite="${LOCALBASE}"
30ac_add_options --with-system-ffi="${LOCALBASE}"
31ac_add_options --with-system-pixman
32ac_add_options --with-system-libvpx
33ac_add_options --with-system-nss
34ac_add_options --with-system-nspr
diff --git a/www/palemoon/files/palemoon b/www/palemoon/files/palemoon
new file mode 100644
index 0000000..e627024
--- /dev/null
+++ b/www/palemoon/files/palemoon
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3cd ${TRUEPREFIX}/lib/palemoon-${V} && ./palemoon
diff --git a/www/palemoon/patches/patch-client_mk b/www/palemoon/patches/patch-client_mk
new file mode 100644
index 0000000..132fd24
--- /dev/null
+++ b/www/palemoon/patches/patch-client_mk
@@ -0,0 +1,16 @@
1$OpenBSD$
2
3Need to be explicit with compilers.
4
5Index: client.mk
6--- client.mk.orig
7+++ client.mk
8@@ -320,6 +320,8 @@ CONFIG_STATUS_DEPS := \
9
10 CONFIGURE_ENV_ARGS += \
11 MAKE='$(MAKE)' \
12+ CC='${CC}' \
13+ CXX='${CXX}' \
14 $(NULL)
15
16 # configure uses the program name to determine @srcdir@. Calling it without
diff --git a/www/palemoon/patches/patch-config_gcc-stl-wrapper_template_h b/www/palemoon/patches/patch-config_gcc-stl-wrapper_template_h
new file mode 100644
index 0000000..b77e46f
--- /dev/null
+++ b/www/palemoon/patches/patch-config_gcc-stl-wrapper_template_h
@@ -0,0 +1,74 @@
1$OpenBSD$
2
3https://hg.mozilla.org/mozilla-central/rev/68da139d0866
4
5Index: config/gcc-stl-wrapper.template.h
6--- config/gcc-stl-wrapper.template.h.orig
7+++ config/gcc-stl-wrapper.template.h
8@@ -22,32 +22,6 @@
9 #define NOMINMAX 1
10 #endif
11
12-// Don't include mozalloc for cstdlib. See bug 1245076.
13-#ifndef moz_dont_include_mozalloc_for_cstdlib
14-# define moz_dont_include_mozalloc_for_cstdlib
15-#endif
16-#ifndef moz_dont_include_mozalloc_for_${HEADER}
17-// mozalloc.h wants <new>; break the cycle by always explicitly
18-// including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
19-//
20-// `#include_next' does not distinguish between <file> and "file"
21-// inclusion, nor does it check that the file you specify has the
22-// same name as the current file. It simply looks for the file
23-// named, starting with the directory in the search path after the
24-// one where the current file was found.
25-# include_next <new>
26-
27-// See if we're in code that can use mozalloc. NB: this duplicates
28-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
29-// can't build with that being included before base/basictypes.h.
30-# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
31-# include "mozilla/mozalloc.h"
32-# else
33-# error "STL code can only be used with infallible ::operator new()"
34-# endif
35-
36-#endif
37-
38 #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
39 // Enable checked iterators and other goodies
40 //
41@@ -58,9 +32,33 @@
42 // # define _GLIBCXX_DEBUG 1
43 #endif
44
45+// Don't include mozalloc for cstdlib. See bug 1245076.
46+#ifndef moz_dont_include_mozalloc_for_cstdlib
47+# define moz_dont_include_mozalloc_for_cstdlib
48+#endif
49+
50+// Include mozalloc after the STL header and all other headers it includes
51+// have been preprocessed.
52+#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \
53+ !defined(moz_dont_include_mozalloc_for_${HEADER})
54+# define MOZ_INCLUDE_MOZALLOC_H
55+# define MOZ_INCLUDE_H_FROM_${HEADER}
56+#endif
57+
58 #pragma GCC visibility push(default)
59 #include_next <${HEADER}>
60 #pragma GCC visibility pop
61+
62+#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
63+// See if we're in clode that can use mozalloc. NB: this duplicates
64+// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
65+// can't built with that being included before base/basictypes.h.
66+# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
67+# include "mozilla/mozalloc.h"
68+# else
69+# error "STL code can only be used with infallible ::operator new()"
70+# endif
71+#endif
72
73 // gcc calls a __throw_*() function from bits/functexcept.h when it
74 // wants to "throw an exception". functexcept exists nominally to
diff --git a/www/palemoon/patches/patch-config_gcc_hidden_h b/www/palemoon/patches/patch-config_gcc_hidden_h
new file mode 100644
index 0000000..3aebe31
--- /dev/null
+++ b/www/palemoon/patches/patch-config_gcc_hidden_h
@@ -0,0 +1,17 @@
1$OpenBSD$
2
3Maybe one day we'll run with a clang built binary.
4We'll need this when we do.
5
6Index: config/gcc_hidden.h
7--- config/gcc_hidden.h.orig
8+++ config/gcc_hidden.h
9@@ -2,5 +2,7 @@
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
12
13-/* Begin all files as hidden visibility */
14+/* Begin all files as hidden visibility, but only if using gcc */
15+#ifndef __llvm__
16 #pragma GCC visibility push(hidden)
17+#endif
diff --git a/www/palemoon/patches/patch-config_make-stl-wrappers_py b/www/palemoon/patches/patch-config_make-stl-wrappers_py
new file mode 100644
index 0000000..095406d
--- /dev/null
+++ b/www/palemoon/patches/patch-config_make-stl-wrappers_py
@@ -0,0 +1,25 @@
1$OpenBSD$
2
3https://hg.mozilla.org/mozilla-central/rev/68da139d0866
4
5Index: config/make-stl-wrappers.py
6--- config/make-stl-wrappers.py.orig
7+++ config/make-stl-wrappers.py
8@@ -30,7 +30,6 @@ def main(outdir, compiler, template_file, header_list_
9 os.mkdir(outdir)
10
11 template = open(template_file, 'r').read()
12- path_to_new = header_path('new', compiler)
13
14 for header in open(header_list_file, 'r'):
15 header = header.rstrip()
16@@ -40,8 +39,7 @@ def main(outdir, compiler, template_file, header_list_
17 path = header_path(header, compiler)
18 with FileAvoidWrite(os.path.join(outdir, header)) as f:
19 f.write(string.Template(template).substitute(HEADER=header,
20- HEADER_PATH=path,
21- NEW_HEADER_PATH=path_to_new))
22+ HEADER_PATH=path))
23
24
25 if __name__ == '__main__':
diff --git a/www/palemoon/patches/patch-gfx_skia_generate_mozbuild_py b/www/palemoon/patches/patch-gfx_skia_generate_mozbuild_py
new file mode 100644
index 0000000..5bed891
--- /dev/null
+++ b/www/palemoon/patches/patch-gfx_skia_generate_mozbuild_py
@@ -0,0 +1,47 @@
1$OpenBSD$
2
3Don't attempt SSSE3 or SSE4.
4
5Index: gfx/skia/generate_mozbuild.py
6--- gfx/skia/generate_mozbuild.py.orig
7+++ gfx/skia/generate_mozbuild.py
8@@ -37,7 +37,7 @@ if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_AR
9 'trunk/src/opts/memset32_neon.S',
10 ]
11
12-if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC'] and CONFIG['OS_ARCH'] != 'WINNT':
13+if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC'] and CONFIG['OS_ARCH'] == 'WINNT':
14 if CONFIG['CPU_ARCH'] == 'x86_64':
15 SOURCES += [
16 'trunk/src/opts/SkBlitRow_opts_SSE4_x64_asm.S',
17@@ -79,9 +79,6 @@ LOCAL_INCLUDES += [
18 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'qt', 'gonk', 'cocoa'):
19 DEFINES['SK_USE_POSIX_THREADS'] = 1
20
21-if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3']:
22- DEFINES['SK_BUILD_SSSE3'] = 1
23-
24 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk'):
25 DEFINES['SK_FONTHOST_CAIRO_STANDALONE'] = 0
26
27@@ -115,20 +112,15 @@ if CONFIG['_MSC_VER']:
28 if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC']:
29 SOURCES['trunk/src/opts/SkBitmapFilter_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
30 SOURCES['trunk/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
31- SOURCES['trunk/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-mssse3']
32 SOURCES['trunk/src/opts/SkBlitRect_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
33 SOURCES['trunk/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
34 SOURCES['trunk/src/opts/SkBlurImage_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
35- SOURCES['trunk/src/opts/SkBlurImage_opts_SSE4.cpp'].flags += ['-msse4.1']
36 SOURCES['trunk/src/opts/SkMorphology_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
37 SOURCES['trunk/src/opts/SkUtils_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
38 SOURCES['trunk/src/opts/SkXfermode_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
39 elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']:
40 DEFINES['__ARM_HAVE_OPTIONAL_NEON_SUPPORT'] = 1
41 DEFINES['USE_ANDROID_NDK_CPU_FEATURES'] = 0
42-elif CONFIG['CLANG_CL']:
43- SOURCES['trunk/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-mssse3']
44- SOURCES['trunk/src/opts/SkBlurImage_opts_SSE4.cpp'].flags += ['-msse4.1']
45
46 if CONFIG['GNU_CXX'] and CONFIG['CPU_ARCH'] == 'arm':
47 SOURCES['skia/src/opts/SkBlitRow_opts_arm.cpp'].flags += ['-fomit-frame-pointer']
diff --git a/www/palemoon/patches/patch-gfx_skia_trunk_src_opts_opts_check_x86_cpp b/www/palemoon/patches/patch-gfx_skia_trunk_src_opts_opts_check_x86_cpp
new file mode 100644
index 0000000..79bd7d4
--- /dev/null
+++ b/www/palemoon/patches/patch-gfx_skia_trunk_src_opts_opts_check_x86_cpp
@@ -0,0 +1,85 @@
1$OpenBSD$
2
3Index: gfx/skia/trunk/src/opts/opts_check_x86.cpp
4--- gfx/skia/trunk/src/opts/opts_check_x86.cpp.orig
5+++ gfx/skia/trunk/src/opts/opts_check_x86.cpp
6@@ -7,15 +7,12 @@
7
8 #include "SkBitmapFilter_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSE2.h"
10-#include "SkBitmapProcState_opts_SSSE3.h"
11 #include "SkBitmapScaler.h"
12 #include "SkBlitMask.h"
13 #include "SkBlitRect_opts_SSE2.h"
14 #include "SkBlitRow.h"
15 #include "SkBlitRow_opts_SSE2.h"
16-#include "SkBlitRow_opts_SSE4.h"
17 #include "SkBlurImage_opts_SSE2.h"
18-#include "SkBlurImage_opts_SSE4.h"
19 #include "SkMorphology_opts.h"
20 #include "SkMorphology_opts_SSE2.h"
21 #include "SkRTConf.h"
22@@ -145,25 +142,13 @@ void SkBitmapProcState::platformProcs() {
23
24 /* Check fSampleProc32 */
25 if (fSampleProc32 == S32_opaque_D32_filter_DX) {
26- if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
27- fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
28- } else {
29- fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
30- }
31+ fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
32 } else if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
33- if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
34- fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
35- }
36+ ;
37 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
38- if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
39- fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
40- } else {
41- fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
42- }
43+ fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
44 } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
45- if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
46- fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
47- }
48+ ;
49 }
50
51 /* Check fSampleProc16 */
52@@ -218,21 +203,7 @@ static SkBlitRow::Proc32 platform_32_procs_SSE2[] = {
53 S32A_Blend_BlitRow32_SSE2, // S32A_Blend,
54 };
55
56-#if defined(SK_ATT_ASM_SUPPORTED)
57-static SkBlitRow::Proc32 platform_32_procs_SSE4[] = {
58- NULL, // S32_Opaque,
59- S32_Blend_BlitRow32_SSE2, // S32_Blend,
60- S32A_Opaque_BlitRow32_SSE4_asm, // S32A_Opaque
61- S32A_Blend_BlitRow32_SSE2, // S32A_Blend,
62-};
63-#endif
64-
65 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) {
66-#if defined(SK_ATT_ASM_SUPPORTED)
67- if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) {
68- return platform_32_procs_SSE4[flags];
69- } else
70-#endif
71 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
72 return platform_32_procs_SSE2[flags];
73 } else {
74@@ -359,10 +330,7 @@ bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX
75 #ifdef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION
76 return false;
77 #else
78- if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) {
79- return SkBoxBlurGetPlatformProcs_SSE4(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX);
80- }
81- else if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
82+ if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
83 return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX);
84 }
85 return false;
diff --git a/www/palemoon/patches/patch-memory_mozalloc_mozalloc_h b/www/palemoon/patches/patch-memory_mozalloc_mozalloc_h
new file mode 100644
index 0000000..844b951
--- /dev/null
+++ b/www/palemoon/patches/patch-memory_mozalloc_mozalloc_h
@@ -0,0 +1,27 @@
1$OpenBSD$
2
3https://hg.mozilla.org/mozilla-central/rev/68da139d0866
4
5Index: memory/mozalloc/mozalloc.h
6--- memory/mozalloc/mozalloc.h.orig
7+++ memory/mozalloc/mozalloc.h
8@@ -12,10 +12,17 @@
9 * https://bugzilla.mozilla.org/show_bug.cgi?id=427099
10 */
11
12-#include <stdlib.h>
13-#include <string.h>
14 #if defined(__cplusplus)
15 # include <new>
16+// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the
17+// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code
18+// using things defined there. Specifically, with stdlib.h, the use of abs()
19+// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs()
20+# include <cstdlib>
21+# include <cstring>
22+#else
23+# include <stdlib.h>
24+# include <string.h>
25 #endif
26 #include "xpcom-config.h"
27
diff --git a/www/palemoon/patches/patch-xpcom_io_nsLocalFileUnix_cpp b/www/palemoon/patches/patch-xpcom_io_nsLocalFileUnix_cpp
new file mode 100644
index 0000000..ed9f47a
--- /dev/null
+++ b/www/palemoon/patches/patch-xpcom_io_nsLocalFileUnix_cpp
@@ -0,0 +1,16 @@
1$OpenBSD$
2
3Like Mac OS X, we also don't have this header.
4
5Index: xpcom/io/nsLocalFileUnix.cpp
6--- xpcom/io/nsLocalFileUnix.cpp.orig
7+++ xpcom/io/nsLocalFileUnix.cpp
8@@ -13,7 +13,7 @@
9
10 #include <sys/types.h>
11 #include <sys/stat.h>
12-#if !defined(XP_MACOSX)
13+#if 0
14 #include <sys/sysmacros.h> // No longer implicitly included in later glibc
15 #endif
16 #include <unistd.h>
diff --git a/www/palemoon/pkg/DESCR b/www/palemoon/pkg/DESCR
new file mode 100644
index 0000000..db9b72d
--- /dev/null
+++ b/www/palemoon/pkg/DESCR
@@ -0,0 +1,9 @@
1Pale Moon is an Open Source, Goanna-based web browser, focusing on
2efficiency and ease of use.
3
4Pale Moon offers you a browsing experience in a browser completely built
5from its own, independently developed source that has been forked off
6from Firefox/Mozilla code a number of years ago, with carefully selected
7features and optimizations to improve the browser's stability and user
8experience, while offering full customization and a growing collection
9of extensions and themes to make the browser truly your own.
diff --git a/www/palemoon/pkg/PLIST b/www/palemoon/pkg/PLIST
new file mode 100644
index 0000000..851ca35
--- /dev/null
+++ b/www/palemoon/pkg/PLIST
@@ -0,0 +1,54 @@
1@comment $OpenBSD$
2bin/palemoon
3lib/palemoon-${V}/
4lib/palemoon-${V}/application.ini
5lib/palemoon-${V}/browser/
6lib/palemoon-${V}/browser/blocklist.xml
7lib/palemoon-${V}/browser/chrome/
8lib/palemoon-${V}/browser/chrome.manifest
9lib/palemoon-${V}/browser/chrome/icons/
10lib/palemoon-${V}/browser/chrome/icons/default/
11lib/palemoon-${V}/browser/chrome/icons/default/default16.png
12lib/palemoon-${V}/browser/chrome/icons/default/default32.png
13lib/palemoon-${V}/browser/chrome/icons/default/default48.png
14lib/palemoon-${V}/browser/components/
15lib/palemoon-${V}/browser/components/components.manifest
16@lib lib/palemoon-${V}/browser/components/libbrowsercomps.so.${LIBbrowsercomps_VERSION}
17lib/palemoon-${V}/browser/extensions/
18lib/palemoon-${V}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
19lib/palemoon-${V}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
20lib/palemoon-${V}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
21lib/palemoon-${V}/browser/icons/
22lib/palemoon-${V}/browser/icons/mozicon128.png
23lib/palemoon-${V}/browser/omni.ja
24lib/palemoon-${V}/browser/searchplugins/
25lib/palemoon-${V}/browser/searchplugins/bing.xml
26lib/palemoon-${V}/browser/searchplugins/duckduckgo-palemoon.xml
27lib/palemoon-${V}/browser/searchplugins/ecosia.xml
28lib/palemoon-${V}/browser/searchplugins/twitter.xml
29lib/palemoon-${V}/browser/searchplugins/wikipedia.xml
30lib/palemoon-${V}/browser/searchplugins/yahoo.xml
31lib/palemoon-${V}/chrome.manifest
32lib/palemoon-${V}/components/
33lib/palemoon-${V}/components/components.manifest
34@lib lib/palemoon-${V}/components/libdbusservice.so.${LIBdbusservice_VERSION}
35@lib lib/palemoon-${V}/components/libmozgnome.so.${LIBmozgnome_VERSION}
36lib/palemoon-${V}/defaults/
37lib/palemoon-${V}/defaults/pref/
38lib/palemoon-${V}/defaults/pref/channel-prefs.js
39lib/palemoon-${V}/dependentlibs.list
40lib/palemoon-${V}/dictionaries/
41lib/palemoon-${V}/dictionaries/en-US.aff
42lib/palemoon-${V}/dictionaries/en-US.dic
43@lib lib/palemoon-${V}/libmozalloc.so.${LIBmozalloc_VERSION}
44@lib lib/palemoon-${V}/libmozjs.so.${LIBmozjs_VERSION}
45@lib lib/palemoon-${V}/libmozsqlite3.so.${LIBmozsqlite3_VERSION}
46@lib lib/palemoon-${V}/libxul.so.${LIBxul_VERSION}
47lib/palemoon-${V}/omni.ja
48@bin lib/palemoon-${V}/palemoon
49@bin lib/palemoon-${V}/palemoon-bin
50lib/palemoon-${V}/platform.ini
51lib/palemoon-${V}/plugin-container
52lib/palemoon-${V}/precomplete
53lib/palemoon-${V}/removed-files
54lib/palemoon-${V}/run-mozilla.sh