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> |