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

Collapse All | Expand All

(-)b/www/palemoon/Makefile (+189 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	palemoon
4
DISTVERSION=	29.4.5.1
5
PORTREVISION=	0
6
CATEGORIES=	www
7
MASTER_SITES=	http://archive.palemoon.org/source/
8
DISTFILES=	palemoon-${DISTVERSION}.source.tar.xz
9
DIST_SUBDIR=	MoonchildProductions
10
11
MAINTAINER=	olce.freebsd.ports@certner.fr
12
COMMENT=	Open-source web browser
13
14
LICENSE=	MPL20 MISC
15
LICENSE_COMB=	multi
16
LICENSE_NAME_MISC=	Miscellaneous free and open-source licenses
17
LICENSE_FILE=	${WRKSRC}/LICENSE
18
LICENSE_FILE_MISC=	${WRKSRC}/platform/toolkit/content/license.html
19
LICENSE_PERMS_MISC=	dist-mirror pkg-mirror auto-accept
20
21
ONLY_FOR_ARCHS=	amd64 i386
22
ONLY_FOR_ARCHS_REASON=Upstream only cares about i386/amd64
23
24
# Common deps & build options
25
BUILD_DEPENDS=	autoconf-2.13:devel/autoconf213 \
26
		yasm:devel/yasm \
27
		zip:archivers/zip \
28
29
LIB_DEPENDS=	libdbus-1.so:devel/dbus \
30
		libdbus-glib-1.so:devel/dbus-glib \
31
		libfontconfig.so:x11-fonts/fontconfig \
32
		libfreetype.so:print/freetype2
33
34
USES=		pkgconfig perl5 gmake gnome xorg desktop-file-utils
35
USE_PERL5=	build
36
# XXX
37
# GTK3 support currently needs gtk20 and gconf2 to pass old-configure (and
38
# maybe more).
39
# See also: https://repo.palemoon.org/MoonchildProductions/UXP/issues/1638.
40
USE_GNOME=	cairo gdkpixbuf2 glib20 pango \
41
		gtk30 gtk20:build gconf2:build
42
USE_XORG=	xt x11 xcb xext xrender
43
44
# We require GCC, but we need to make sure that
45
# there are no runtime dependencies to libstdc++, i.e., that libc++'s headers
46
# and libraries are used during compilation and link.
47
USES+=		compiler:gcc-c++11-lib
48
49
# Not supported
50
NO_CCACHE=	t
51
52
# Put this here pending creation of USES=gtar
53
BUILD_DEPENDS+=	gtar:archivers/gtar
54
BINARY_ALIAS+=	tar=${LOCALBASE}/bin/gtar
55
56
USES+=		python:2.7,build
57
# BUILD_DEPENDS+=	tauthon:lang/tauthon
58
# BINARY_ALIAS+=	python=${LOCALBASE}/bin/tauthon \
59
# 		python2=${LOCALBASE}/bin/tauthon \
60
# 		python2.7=${LOCALBASE}/bin/tauthon
61
62
BUNDLE_LIBS=	yes
63
64
## Options
65
66
OPTIONS_DEFINE+=	OFFICIAL_BRANDING
67
68
OPTIONS_MULTI+=		SOUND
69
OPTIONS_MULTI_SOUND=	ALSA PULSEAUDIO SNDIO
70
OPTIONS_DEFAULT+=	ALSA
71
72
OPTIONS_DEFINE+=	SYNC
73
74
OPTIONS_DEFINE+=	SYSTEM_MALLOC
75
OPTIONS_DEFAULT+=	SYSTEM_MALLOC
76
77
ALSA_BUILD_DEPENDS=	${PREFIX}/include/alsa/asoundlib.h:audio/alsa-lib
78
ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
79
PULSEAUDIO_BUILD_DEPENDS=${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
80
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
81
SNDIO_BUILD_DEPENDS=	${PREFIX}/include/sndio.h:audio/sndio
82
SNDIO_LIB_DEPENDS=	libsndio.so:audio/sndio
83
84
OFFICIAL_BRANDING_DESC=	Use artwork trademarked by Moonchild Productions
85
86
SYNC_DESC=		Pale Moon Sync service (see https://www.palemoon.org/sync/)
87
88
SYSTEM_MALLOC_DESC=	Use system jemalloc instead of bundled one
89
90
.include <bsd.port.pre.mk>
91
92
## Vars and targets
93
94
WRKSRC=		${WRKDIR}/palemoon-source
95
96
DOT_MOZCONFIG=	${WRKSRC}/.mozconfig
97
PM_BUILD_DIR=	${WRKSRC}/pmbuild
98
99
# Extract only -O options
100
PM_OPTIMIZE=${CFLAGS:M-O*}
101
102
.if ${PORT_OPTIONS:MOFFICIAL_BRANDING}
103
PALEMOON_DESKTOP=${WRKSRC}/palemoon/branding/official/palemoon.desktop
104
PM_MOZCONFIG_REINPLACE_ARGS+=-e 's!^%%OFFICIAL_BRANDING%%!!'
105
RESTRICTED=Uses trademarked artwork not licensed for redistribution
106
.else
107
PALEMOON_DESKTOP=${WRKSRC}/palemoon/branding/unofficial/browser.desktop
108
PM_MOZCONFIG_REINPLACE_ARGS+=-e 's!^%%OFFICIAL_BRANDING%%.*!!'
109
.endif
110
111
.for VAR in PM_BUILD_DIR PM_OPTIMIZE
112
PM_MOZCONFIG_REINPLACE_ARGS+=-e 's!%%${VAR}%%!${${VAR}}!'
113
.endfor
114
115
# Taken from bsd.gecko.mk. See comment there.
116
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
117
MAKE_JOBS_NUMBER=	1
118
.endif
119
.if defined(MAKE_JOBS_NUMBER)
120
MOZ_MAKE_FLAGS+=	-j${MAKE_JOBS_NUMBER}
121
.endif
122
123
# Prepare '.mozconfig' for 'configure'
124
pre-configure:
125
	${CP} ${FILESDIR}/dot.mozconfig ${DOT_MOZCONFIG}
126
	${REINPLACE_CMD} ${PM_MOZCONFIG_REINPLACE_ARGS} ${DOT_MOZCONFIG}
127
.if ${PORT_OPTIONS:MALSA}
128
	${ECHO_CMD} ac_add_options --enable-alsa >> ${DOT_MOZCONFIG}
129
.else
130
	${ECHO_CMD} ac_add_options --disable-alsa >> ${DOT_MOZCONFIG}
131
.endif
132
.if ${PORT_OPTIONS:MSNDIO}
133
	${ECHO_CMD} ac_add_options --enable-sndio >> ${DOT_MOZCONFIG}
134
.else
135
	${ECHO_CMD} ac_add_options --disable-sndio >> ${DOT_MOZCONFIG}
136
.endif
137
.if ${PORT_OPTIONS:MPULSEAUDIO}
138
	${ECHO_CMD} ac_add_options --enable-pulseaudio >> ${DOT_MOZCONFIG}
139
.else
140
	${ECHO_CMD} ac_add_options --disable-pulseaudio >> ${DOT_MOZCONFIG}
141
.endif
142
.if ! ${PORT_OPTIONS:MSYNC}
143
	${ECHO_CMD} ac_add_options --disable-sync >> ${DOT_MOZCONFIG}
144
.endif
145
.if ${PORT_OPTIONS:MSYSTEM_MALLOC}
146
	${ECHO_CMD} ac_add_options --disable-jemalloc >> ${DOT_MOZCONFIG}
147
.else
148
	${ECHO_CMD} ac_add_options --enable-jemalloc >> ${DOT_MOZCONFIG}
149
.endif
150
.if defined(MOZ_MAKE_FLAGS)
151
	${ECHO_CMD} mk_add_options MOZ_MAKE_FLAGS=${MOZ_MAKE_FLAGS:Q} \
152
		>> ${DOT_MOZCONFIG}
153
.endif
154
# Add build variables
155
.for VAR in CPP CXXCPP CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS \
156
	LD AS AR RANLIB OBJDUMP NM
157
.if defined(${VAR})
158
# Remove -rpath options to GCC's directory, we don't need them (no dependencies
159
# on libs compiled with gfortran, see
160
# https://wiki.freebsd.org/libgcc%20problem) and we don't want them (triggering
161
# a link to a different libgcc_s depending on whether GCC is installed at
162
# runtime).
163
	${ECHO_CMD} export ${VAR}=\"${${VAR}:N*-rpath*lib/gcc*}\" >> ${DOT_MOZCONFIG}
164
.endif
165
.endfor
166
167
# Running 'mach configure' separately is "strongly discouraged" (see Mozilla's
168
# doc on build options configuration). But this does not seem relevant to Pale
169
# Moon.
170
do-configure:
171
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach configure
172
173
do-build:
174
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach build
175
# Going through the package route (the only one documented upstream)
176
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach package
177
178
do-install:
179
	${TAR} -C ${STAGEDIR}${PREFIX}/lib \
180
		-xf ${PM_BUILD_DIR:Q}/dist/palemoon*.tar* \
181
		palemoon
182
	${RLN}  ${STAGEDIR}${PREFIX}/lib/palemoon/palemoon \
183
		${STAGEDIR}${PREFIX}/bin/palemoon
184
	${INSTALL_DATA} ${PALEMOON_DESKTOP} \
185
		${STAGEDIR}${PREFIX}/share/applications/palemoon.desktop
186
	${RLN}  ${STAGEDIR}${PREFIX}/lib/palemoon/browser/icons/mozicon128.png \
187
		${STAGEDIR}${PREFIX}/share/pixmaps/palemoon.png
188
189
.include <bsd.port.post.mk>
(-)b/www/palemoon/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1648797148
2
SHA256 (MoonchildProductions/palemoon-29.4.5.1.source.tar.xz) = 1acc6f46f17ae1abe71cdc8083d85da17464d56d5ba88900bb5449fecb1be115
3
SIZE (MoonchildProductions/palemoon-29.4.5.1.source.tar.xz) = 201100164
(-)b/www/palemoon/files/dot.mozconfig (+31 lines)
Added 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 --enable-av1
15
ac_add_options --disable-eme
16
ac_add_options --disable-webrtc
17
ac_add_options --disable-gamepad
18
ac_add_options --disable-tests
19
ac_add_options --disable-debug
20
ac_add_options --disable-necko-wifi
21
ac_add_options --disable-updater
22
ac_add_options --with-pthreads
23
24
%%OFFICIAL_BRANDING%%ac_add_options --enable-official-branding
25
%%OFFICIAL_BRANDING%%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/www/palemoon/files/patch-mach (+60 lines)
Added Link Here
1
--- mach.orig	2021-11-10 12:12:26 UTC
2
+++ mach
3
@@ -15,28 +15,26 @@ MCP_XZ=`which xz 2>/dev/null`
4
 MCP_TAR_BASEDIR="s/^./$MCP_APP-source/"
5
 MCP_TAR_FILENAME="$MCP_APP-$MCP_VERSION.source.tar.xz"
6
 MCP_TAR_COMMAND="tar cfJv ../$MCP_TAR_FILENAME . --transform $MCP_TAR_BASEDIR --exclude-vcs --warning=no-file-changed"
7
-MCP_TAR_EXCLUDES=(
8
-  "$MCP_APP/branding/beta"
9
-  "$MCP_APP/branding/unstable"
10
-  "platform/db/mork"
11
-  "platform/docs"
12
-  "platform/ldap"
13
-  "platform/libs/gmp-clearkey"
14
-  "platform/mailnews"
15
-  "platform/python/psutil/*.so"
16
-  "platform/python/psutil/*.pyd"
17
-  "platform/python/psutil/build"
18
-  "platform/xulrunner"
19
-  ".mozconfig"
20
-  ".gitattributes"
21
-  ".gitignore"
22
-  ".gitmodules"
23
-  "*.pyc"
24
-  "*.pyo"
25
-  "*.rej"
26
-  "*.orig"
27
-  "*.source.tar.xz"
28
-)
29
+MCP_TAR_EXCLUDES="$MCP_APP/branding/beta \
30
+  $MCP_APP/branding/unstable \
31
+  platform/db/mork \
32
+  platform/docs \
33
+  platform/ldap \
34
+  platform/libs/gmp-clearkey \
35
+  platform/mailnews \
36
+  platform/python/psutil/*.so \
37
+  platform/python/psutil/*.pyd \
38
+  platform/python/psutil/build \
39
+  platform/xulrunner \
40
+  .mozconfig \
41
+  .gitattributes \
42
+  .gitignore \
43
+  .gitmodules \
44
+  *.pyc \
45
+  *.pyo \
46
+  *.rej \
47
+  *.orig \
48
+  *.source.tar.xz"
49
 
50
 if [ "$1" == "source" ]; then
51
   if [ -z "$MCP_XZ" ]; then
52
@@ -44,7 +42,7 @@ if [ "$1" == "source" ]; then
53
     exit 1
54
   fi
55
 
56
-  for _value in "${MCP_TAR_EXCLUDES[@]}"; do
57
+  for _value in ${MCP_TAR_EXCLUDES}; do
58
     MCP_TAR_COMMAND+=" --exclude=${_value}"
59
   done
60
 
(-)b/www/palemoon/files/patch-platform_ipc_chromium_src_base_string16.cc (+10 lines)
Added Link Here
1
--- platform/ipc/chromium/src/base/string16.cc.orig	2022-02-11 15:09:55 UTC
2
+++ platform/ipc/chromium/src/base/string16.cc
3
@@ -68,6 +68,6 @@ char16* c16memset(char16* s, char16 c, size_t n) {
4
 
5
 }  // namespace base
6
 
7
-template class std::basic_string<char16, base::string16_char_traits>;
8
+inline template class std::basic_string<char16, base::string16_char_traits>;
9
 
10
 #endif  // WCHAR_T_IS_UTF32
(-)b/www/palemoon/files/patch-platform_old-configure.in (+11 lines)
Added Link Here
1
--- platform/old-configure.in.orig	2021-11-08 19:27:52 UTC
2
+++ platform/old-configure.in
3
@@ -5305,7 +5305,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/www/palemoon/pkg-descr (+17 lines)
Added 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/www/palemoon/pkg-plist (+57 lines)
Added 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