Added
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.2.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= 20210608 |
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> |