View | Details | Raw Unified | Return to bug 251117 | Differences between
and this patch

Collapse All | Expand All

(-)b/head/www/palemoon/Makefile (+187 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	palemoon
4
# UXP_VERSION below *MUST BE UPDATED* according to DISTVERSION (see recorded
5
# commit of the 'platform' git sub-module and corresponding release in
6
# UXP/releases; see MASTER_SITES for base URLs).
7
DISTVERSION=	29.1.1
8
CATEGORIES=	www
9
MASTER_SITES=	https://repo.palemoon.org/MoonchildProductions/Pale-Moon/archive/:palemoon \
10
		https://repo.palemoon.org/MoonchildProductions/UXP/archive/:uxp
11
DISTFILES=	${DISTVERSION}_Release.tar.gz:palemoon \
12
		RELBASE_${UXP_VERSION}.tar.gz:uxp
13
DIST_SUBDIR=	MoonchildProductions
14
15
MAINTAINER=	olce.freebsd.ports@certner.fr
16
COMMENT=	Open-source web browser
17
18
LICENSE=	MPL20 MISC
19
LICENSE_COMB=	multi
20
LICENSE_NAME_MISC=	Miscellaneous free and open-source licenses
21
LICENSE_FILE=	${WRKSRC}/LICENSE
22
LICENSE_FILE_MISC=	${WRKSRC}/platform/toolkit/content/license.html
23
LICENSE_PERMS_MISC=	dist-mirror pkg-mirror auto-accept
24
25
# Not sure about the real status of ARM, but only ARM packages of old versions of
26
# PM are available in some Linux distros.
27
ONLY_FOR_ARCHS=	amd64 i386
28
ONLY_FOR_ARCHS_REASON=Upstream only cares about i386/amd64
29
30
# Common deps & build options
31
BUILD_DEPENDS=	autoconf-2.13:devel/autoconf213 \
32
		yasm:devel/yasm \
33
		zip:archivers/zip \
34
35
LIB_DEPENDS=	libdbus-1.so:devel/dbus \
36
		libdbus-glib-1.so:devel/dbus-glib \
37
		libfontconfig.so:x11-fonts/fontconfig \
38
		libfreetype.so:print/freetype2
39
40
USES=		pkgconfig perl5 gmake gnome xorg desktop-file-utils
41
USE_PERL5=	build
42
# XXX
43
# GTK3 support currently needs gtk20 and gconf2 to pass old-configure (and
44
# maybe more).
45
# See also: https://repo.palemoon.org/MoonchildProductions/UXP/issues/1638.
46
USE_GNOME=	cairo gdkpixbuf2 glib20 pango \
47
		gtk30 gtk20:build gconf2:build
48
USE_XORG=	xt x11 xcb xext xrender
49
50
# We require GCC (see also GCC_DEFAULT below), but we need to make sure that
51
# there are no runtime dependencies to libstdc++, i.e., that libc++'s headers
52
# and libraries are used during compilation and link.
53
USES+=		compiler:gcc-c++11-lib
54
55
# Put this here pending creation of USES=gtar
56
BUILD_DEPENDS+=	gtar:archivers/gtar
57
BINARY_ALIAS+=	tar=${LOCALBASE}/bin/gtar
58
59
BUILD_DEPENDS+=	tauthon:lang/tauthon
60
BINARY_ALIAS+=	python=${LOCALBASE}/bin/tauthon \
61
		python2=${LOCALBASE}/bin/tauthon \
62
		python2.7=${LOCALBASE}/bin/tauthon
63
64
BUNDLE_LIBS=	yes
65
66
## Options
67
68
# Official branding is enabled in compliance with Pale Moon's redistribution
69
# license (see https://www.palemoon.org/redist.shtml), point 8b, as explicitly
70
# confirmed by the owner (Moonchild; see
71
# https://forum.palemoon.org/viewtopic.php?f=5&t=25625), provided options are
72
# not modified beyond what is necessary to get a stable build on FreeBSD. So DO
73
# NOT CHANGE default options without the maintainer's approval.
74
75
OPTIONS_SINGLE+=	SOUND
76
OPTIONS_SINGLE_SOUND=	ALSA PULSEAUDIO
77
OPTIONS_DEFAULT+=	ALSA
78
79
OPTIONS_DEFINE+=	SYNC
80
OPTIONS_DEFAULT+=	SYNC
81
82
OPTIONS_DEFINE+=	SYSTEM_MALLOC
83
84
ALSA_BUILD_DEPENDS=	${PREFIX}/include/alsa/asoundlib.h:audio/alsa-lib
85
ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
86
PULSEAUDIO_BUILD_DEPENDS=${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
87
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
88
89
SYNC_DESC=		Pale Moon Sync service (see https://www.palemoon.org/sync/)
90
91
SYSTEM_MALLOC_DESC=	Use system's jemalloc instead of bundled one
92
93
.include <bsd.port.pre.mk>
94
95
# We require GCC, and even a specific version of it. 10 is the last version I
96
# tested and validated, and the last version endorsed upstream. It is also the
97
# current default in ports, a nice conjunction that cannot always be
98
# maintained. Version bumps *MUST* be validated by the maintainer (after
99
# thorough testing, and following upstream's recommendations).
100
GCC_DEFAULT=	10
101
102
## Vars and targets
103
104
UXP_VERSION=	20210330
105
106
WRKSRC=		${WRKDIR}/pale-moon
107
108
DOT_MOZCONFIG=	${WRKSRC}/.mozconfig
109
PM_BUILD_DIR=	${WRKSRC}/pmbuild
110
111
PALEMOON_DESKTOP=${WRKSRC}/palemoon/branding/official/palemoon.desktop
112
113
# Extract only -O options
114
PM_OPTIMIZE=${CFLAGS:M-O*}
115
116
.for VAR in PM_BUILD_DIR PM_OPTIMIZE
117
PM_MOZCONFIG_REINPLACE_ARGS+=-e 's!%%${VAR}%%!${${VAR}}!'
118
.endfor
119
120
# Taken from bsd.gecko.mk. See comment there.
121
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
122
MAKE_JOBS_NUMBER=	1
123
.endif
124
.if defined(MAKE_JOBS_NUMBER)
125
MOZ_MAKE_FLAGS+=	-j${MAKE_JOBS_NUMBER}
126
.endif
127
128
post-extract:
129
	${RMDIR} ${WRKSRC}/platform
130
	${RLN} ${WRKDIR}/uxp ${WRKSRC}/platform
131
132
# Prepare '.mozconfig' for 'configure'
133
pre-configure:
134
	${CP} ${FILESDIR}/dot.mozconfig ${DOT_MOZCONFIG}
135
	${REINPLACE_CMD} ${PM_MOZCONFIG_REINPLACE_ARGS} ${DOT_MOZCONFIG}
136
.if ${PORT_OPTIONS:MALSA}
137
	${ECHO_CMD} ac_add_options --enable-alsa >> ${DOT_MOZCONFIG}
138
	${ECHO_CMD} ac_add_options --disable-pulseaudio >> ${DOT_MOZCONFIG}
139
.endif
140
.if ! ${PORT_OPTIONS:MSYNC}
141
	${ECHO_CMD} ac_add_options --disable-sync >> ${DOT_MOZCONFIG}
142
.endif
143
.if ${PORT_OPTIONS:MSYSTEM_MALLOC}
144
	${ECHO_CMD} ac_add_options --disable-jemalloc >> ${DOT_MOZCONFIG}
145
.else
146
	${ECHO_CMD} ac_add_options --enable-jemalloc >> ${DOT_MOZCONFIG}
147
.endif
148
.if defined(MOZ_MAKE_FLAGS)
149
	${ECHO_CMD} mk_add_options MOZ_MAKE_FLAGS=${MOZ_MAKE_FLAGS:Q} \
150
		>> ${DOT_MOZCONFIG}
151
.endif
152
# Add build variables
153
.for VAR in CPP CXXCPP CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS \
154
	LD AS AR RANLIB OBJDUMP NM
155
.if defined(${VAR})
156
# Remove -rpath options to GCC's directory, we don't need them (no dependencies
157
# on libs compiled with gfortran, see
158
# https://wiki.freebsd.org/libgcc%20problem) and we don't want them (triggering
159
# a link to a different libgcc_s depending on whether GCC is installed at
160
# runtime).
161
	${ECHO_CMD} export ${VAR}=\"${${VAR}:N*-rpath*lib/gcc*}\" >> ${DOT_MOZCONFIG}
162
.endif
163
.endfor
164
165
# Running 'mach configure' separately is "strongly discouraged" (see Mozilla's
166
# doc on build options configuration). But this does not seem relevant to Pale
167
# Moon.
168
do-configure:
169
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach configure
170
171
do-build:
172
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach build
173
# Going through the package route (the only one documented upstream)
174
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach package
175
176
do-install:
177
	${TAR} -C ${STAGEDIR}${PREFIX}/lib \
178
		-xf ${PM_BUILD_DIR:Q}/dist/palemoon*.tar* \
179
		palemoon
180
	${RLN}  ${STAGEDIR}${PREFIX}/lib/palemoon/palemoon \
181
		${STAGEDIR}${PREFIX}/bin/palemoon
182
	${INSTALL_DATA} ${PALEMOON_DESKTOP} \
183
		${STAGEDIR}${PREFIX}/share/applications/palemoon.desktop
184
	${RLN}  ${STAGEDIR}${PREFIX}/lib/palemoon/browser/icons/mozicon128.png \
185
		${STAGEDIR}${PREFIX}/share/pixmaps/palemoon.png
186
187
.include <bsd.port.mk>
(-)b/head/www/palemoon/distinfo (+5 lines)
Line 0 Link Here
1
TIMESTAMP = 1617707312
2
SHA256 (MoonchildProductions/29.1.1_Release.tar.gz) = 06805818ac990e11a44de2a334523784a44ff4f6a4d698847d92e080eb953536
3
SIZE (MoonchildProductions/29.1.1_Release.tar.gz) = 8535221
4
SHA256 (MoonchildProductions/RELBASE_20210330.tar.gz) = b74728c28126c7f47a4dda9575b38fd2fba5e6f61dd03ac3bba150c156e6ad3a
5
SIZE (MoonchildProductions/RELBASE_20210330.tar.gz) = 275682214
(-)b/head/www/palemoon/files/dot.mozconfig (+31 lines)
Line 0 Link Here
1
# Standard build options for Pale Moon
2
# See http://developer.palemoon.org/build/linux/
3
4
# The 'configure' ports step replaces %%VAR%% with content of Makefile's VAR
5
# and appends lines to this file.
6
7
mk_add_options MOZ_OBJDIR=%%PM_BUILD_DIR%%
8
9
ac_add_options --enable-application=palemoon
10
ac_add_options --enable-optimize="-w %%PM_OPTIMIZE%%"
11
ac_add_options --enable-default-toolkit=cairo-gtk3
12
ac_add_options --enable-strip
13
ac_add_options --enable-devtools
14
ac_add_options --disable-eme
15
ac_add_options --disable-webrtc
16
ac_add_options --disable-gamepad
17
ac_add_options --disable-tests
18
ac_add_options --disable-debug
19
ac_add_options --disable-necko-wifi
20
ac_add_options --disable-updater
21
ac_add_options --with-pthreads
22
ac_add_options --enable-phoenix-extensions
23
24
ac_add_options --enable-official-branding
25
export MOZILLA_OFFICIAL=1
26
27
# Don't bother compressing, mach's package is just intermediate file
28
export MOZ_PKG_FORMAT=TAR
29
30
# Below this line, build options depending on port options, as well as make and
31
# build flags, will be appended.
(-)b/head/www/palemoon/files/patch-platform_old-configure.in (+11 lines)
Line 0 Link Here
1
--- platform/old-configure.in.orig	2021-02-05 18:43:01 UTC
2
+++ platform/old-configure.in
3
@@ -5554,7 +5554,7 @@ ac_configure_args="$_SUBDIR_CONFIG_ARGS"
4
 
5
 # --with-system-nspr will have been converted into the relevant $NSPR_CFLAGS
6
 # and $NSPR_LIBS.
7
-ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr\S* *//'`"
8
+ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr[^[:space:]]* *//'`"
9
 
10
 if test "$_INTL_API" = no; then
11
     ac_configure_args="$ac_configure_args --without-intl-api"
(-)b/head/www/palemoon/files/patch-platform_python_mozbuild_mozbuild_configure_____init____.py (+14 lines)
Line 0 Link Here
1
--- platform/python/mozbuild/mozbuild/configure/__init__.py.orig	2021-02-05 18:43:01 UTC
2
+++ platform/python/mozbuild/mozbuild/configure/__init__.py
3
@@ -192,8 +192,9 @@ class ConfigureSandbox(dict):
4
         b: __builtins__[b]
5
         for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len',
6
                   'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr',
7
-                  'hasattr', 'enumerate', 'range', 'zip')
8
-    }, __import__=forbidden_import, str=unicode)
9
+                  'hasattr', 'enumerate', 'range', 'zip', '__build_class__')
10
+        if b in __builtins__},
11
+    __import__=forbidden_import, str=unicode)
12
 
13
     # Expose a limited set of functions from os.path
14
     OS = ReadOnlyNamespace(path=ReadOnlyNamespace(**{
(-)b/head/www/palemoon/files/patch-platform_python_mozbuild_mozbuild_frontend_sandbox.py (+14 lines)
Line 0 Link Here
1
--- platform/python/mozbuild/mozbuild/frontend/sandbox.py.orig	2021-02-05 18:43:01 UTC
2
+++ platform/python/mozbuild/mozbuild/frontend/sandbox.py
3
@@ -115,7 +115,10 @@ class Sandbox(dict):
4
     def __init__(self, context, builtins=None, finder=default_finder):
5
         """Initialize a Sandbox ready for execution.
6
         """
7
-        self._builtins = builtins or self.BUILTINS
8
+        self._builtins = ReadOnlyDict(
9
+            (builtins or self.BUILTINS).viewitems() |
10
+            {b: __builtins__[b] for b in ('__build_class__',)
11
+             if b in __builtins__}.viewitems())
12
         dict.__setitem__(self, '__builtins__', self._builtins)
13
 
14
         assert isinstance(self._builtins, ReadOnlyDict)
(-)b/head/www/palemoon/files/patch-platform_python_virtualenv_site.py (+33 lines)
Line 0 Link Here
1
--- platform/python/virtualenv/site.py.orig	2021-02-05 18:43:01 UTC
2
+++ platform/python/virtualenv/site.py
3
@@ -233,10 +233,10 @@ def addsitepackages(known_paths, sys_prefix=sys.prefix
4
             elif os.sep == '/':
5
                 sitedirs = [os.path.join(prefix,
6
                                          "lib",
7
-                                         "python" + sys.version[:3],
8
+                                         "tauthon" + sys.version[:3],
9
                                          "site-packages"),
10
                             os.path.join(prefix, "lib", "site-python"),
11
-                            os.path.join(prefix, "python" + sys.version[:3], "lib-dynload")]
12
+                            os.path.join(prefix, "tauthon" + sys.version[:3], "lib-dynload")]
13
                 lib64_dir = os.path.join(prefix, "lib64", "python" + sys.version[:3], "site-packages")
14
                 if (os.path.exists(lib64_dir) and
15
                     os.path.realpath(lib64_dir) not in [os.path.realpath(p) for p in sitedirs]):
16
@@ -583,7 +583,7 @@ def virtual_install_main_packages():
17
     elif sys.platform == 'win32' and os.sep == '\\':
18
         paths = [os.path.join(sys.real_prefix, 'Lib'), os.path.join(sys.real_prefix, 'DLLs')]
19
     else:
20
-        paths = [os.path.join(sys.real_prefix, 'lib', 'python'+sys.version[:3])]
21
+        paths = [os.path.join(sys.real_prefix, 'lib', 'tauthon'+sys.version[:3])]
22
         hardcoded_relative_dirs = paths[:] # for the special 'darwin' case below
23
         lib64_path = os.path.join(sys.real_prefix, 'lib64', 'python'+sys.version[:3])
24
         if os.path.exists(lib64_path):
25
@@ -602,7 +602,7 @@ def virtual_install_main_packages():
26
             # This is a non-multiarch aware Python.  Fallback to the old way.
27
             arch = sys.platform
28
         plat_path = os.path.join(sys.real_prefix, 'lib',
29
-                                 'python'+sys.version[:3],
30
+                                 'tauthon'+sys.version[:3],
31
                                  'plat-%s' % arch)
32
         if os.path.exists(plat_path):
33
             paths.append(plat_path)
(-)b/head/www/palemoon/files/patch-platform_python_virtualenv_virtualenv.py (+20 lines)
Line 0 Link Here
1
--- platform/python/virtualenv/virtualenv.py.orig	2021-02-05 18:43:01 UTC
2
+++ platform/python/virtualenv/virtualenv.py
3
@@ -49,7 +49,7 @@ try:
4
 except NameError:
5
     basestring = str
6
 
7
-py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1])
8
+py_version = 'tauthon%s.%s' % (sys.version_info[0], sys.version_info[1])
9
 
10
 is_jython = sys.platform.startswith('java')
11
 is_pypy = hasattr(sys, 'pypy_version_info')
12
@@ -131,6 +131,8 @@ if majver == 2:
13
         REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc'])
14
     if minver >= 7:
15
         REQUIRED_MODULES.extend(['_weakrefset'])
16
+    if minver >= 8:
17
+        REQUIRED_MODULES.extend(['_oserror'])
18
     if is_msys2:
19
         REQUIRED_MODULES.extend(['functools'])
20
 elif majver == 3:
(-)b/head/www/palemoon/pkg-descr (+17 lines)
Line 0 Link Here
1
Pale Moon(TM) offers you a browsing experience in a browser completely built
2
from its own, independently developed source that has been forked off from
3
Firefox/Mozilla code a number of years ago, with carefully selected features
4
and optimizations to improve the browser's stability and user experience, while
5
offering full customization and a growing collection of extensions and themes
6
to make the browser truly your own.
7
8
Some of the main features:
9
- Based on the Unified XUL Platform (UXP) containing our own optimized layout
10
  and rendering engine (Goanna).
11
- Safe: Forked from mature Mozilla code and regularly updated with the latest
12
  security patches.
13
- Secure: Additional security features and security-aware development
14
- Zero ads; no telemetry, spyware or data gathering
15
- Familiar, efficient, fully customizable interface
16
17
WWW: https://www.palemoon.org/
(-)b/head/www/palemoon/pkg-plist (+57 lines)
Line 0 Link Here
1
bin/palemoon
2
lib/palemoon/application.ini
3
lib/palemoon/browser/blocklist.xml
4
lib/palemoon/browser/chrome.manifest
5
lib/palemoon/browser/chrome/icons/default/default16.png
6
lib/palemoon/browser/chrome/icons/default/default32.png
7
lib/palemoon/browser/chrome/icons/default/default48.png
8
lib/palemoon/browser/components/components.manifest
9
lib/palemoon/browser/components/libbrowsercomps.so
10
lib/palemoon/browser/defaults/profile/chrome/userChrome-example.css
11
lib/palemoon/browser/defaults/profile/chrome/userContent-example.css
12
lib/palemoon/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
13
lib/palemoon/browser/icons/mozicon128.png
14
lib/palemoon/browser/palemoon.res
15
lib/palemoon/browser/searchplugins/bing.xml
16
lib/palemoon/browser/searchplugins/duckduckgo-palemoon.xml
17
lib/palemoon/browser/searchplugins/ecosia.xml
18
lib/palemoon/browser/searchplugins/ekoru.xml
19
lib/palemoon/browser/searchplugins/twitter.xml
20
lib/palemoon/browser/searchplugins/wikipedia.xml
21
lib/palemoon/browser/searchplugins/yahoo.xml
22
lib/palemoon/browser/ua-update.json
23
lib/palemoon/chrome.manifest
24
lib/palemoon/defaults/pref/channel-prefs.js
25
lib/palemoon/dependentlibs.list
26
lib/palemoon/dictionaries/en-US.aff
27
lib/palemoon/dictionaries/en-US.dic
28
lib/palemoon/gtk2/libmozgtk.so
29
lib/palemoon/icudt58l.dat
30
lib/palemoon/libfreebl3.chk
31
lib/palemoon/libfreebl3.so
32
lib/palemoon/liblgpllibs.so
33
lib/palemoon/libmozavcodec.so
34
lib/palemoon/libmozavutil.so
35
lib/palemoon/libmozgtk.so
36
lib/palemoon/libmozsqlite3.so
37
lib/palemoon/libnspr4.so
38
lib/palemoon/libnss3.so
39
lib/palemoon/libnssckbi.so
40
lib/palemoon/libnssutil3.so
41
lib/palemoon/libplc4.so
42
lib/palemoon/libplds4.so
43
lib/palemoon/libsmime3.so
44
lib/palemoon/libsoftokn3.chk
45
lib/palemoon/libsoftokn3.so
46
lib/palemoon/libssl3.so
47
lib/palemoon/libxul.so
48
lib/palemoon/palemoon
49
lib/palemoon/palemoon-bin
50
lib/palemoon/palemoon.res
51
lib/palemoon/platform.ini
52
lib/palemoon/plugin-container
53
lib/palemoon/precomplete
54
lib/palemoon/removed-files
55
lib/palemoon/run-mozilla.sh
56
share/applications/palemoon.desktop
57
share/pixmaps/palemoon.png

Return to bug 251117