4 # Date created: 12 Nov 2005
5 # Whom: Michael Johnson <ahze@FreeBSD.org>
9 # 4 column tabs prevent hair loss and tooth decay!
11 # bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users
12 # and porters to support any available gecko backend without needing to build
13 # many conditional tests. ${USE_GECKO} is the list of backends that your port
14 # can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend.
15 # Users set ${WITH_GECKO} to the list of gecko backends they want on their
18 .if defined(USE_GECKO)
19 .if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include)
20 Gecko_Pre_Include= bsd.gecko.mk
22 # This file contains some reusable components for mozilla ports. It's of
23 # use primarily to apps from the mozilla project itself (such as Firefox,
24 # Thunderbird, etc.), and probably won't be of use for gecko-based ports
25 # like epiphany, galeon, etc.
27 # You need to make sure to add USE_GECKO=gecko to for your port can uses
28 # one of these options below.
30 # Ports can use the following:
32 # USE_MOZILLA By default, it enables every system dependency
33 # listed in '_ALL_DEPENDS'. If your port doesn't
34 # need one of those then you can use '-' like
35 # 'USE_MOZILLA= -png -vpx' to subtract the
36 # dependencies. Experimental deps use '+' like
37 # 'USE_MOZILLA= +speex +theora'.
39 # MOZILLA_PLIST_DIRS List of directories to descend into when installing
40 # and creating the plist
42 # MOZ_PIS_SCRIPTS List of scripts residing in ${FILESDIR} to be
43 # filtered through MOZCONFIG_SED and installed along
44 # with our Pluggable Init Scripts (PIS)
46 # MOZ_SED_ARGS sed(1) commands through which MOZ_PIS_SCRIPTS are
47 # filtered. There is a default set defined here, so
48 # you probably want to add to MOZ_SED_ARGS rather
51 # MOZ_OPTIONS configure arguments (added to .mozconfig). If
52 # NOMOZCONFIG is defined, you probably want to set
53 # CONFIGURE_ARGS+=${MOZ_OPTIONS}
55 # MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If
56 # NOMOZCONFIG is defined, you probably want to set
57 # MAKE_ARGS+=${MOZ_MK_OPTIONS}
59 # MOZ_EXPORT Environment variables for the build process (added
60 # to .mozconfig). If NOMOZCONFIG is defined, you
61 # probably want to set MAKE_ENV+=${MOZ_EXPORT}
63 # MOZ_CHROME A variable for the --enable-chrome-format= in
64 # CONFIGURE_ARGS. The default is omni.
66 # MOZ_TOOLKIT A variable for the --enable-default-toolkit= in
67 # CONFIGURE_ARGS. The default is cairo-gtk2.
69 # PORT_MOZCONFIG Defaults to ${FILESDIR}/mozconfig.in, but can be
70 # set to a generic mozconfig included with the port
72 # NOMOZCONFIG Don't drop a customized .mozconfig into the build
73 # directory. Options will have to be specified in
74 # CONFIGURE_ARGS instead
77 MAINTAINER?= gecko@FreeBSD.org
80 MOZILLA_VER?= ${PORTVERSION}
81 MOZILLA_BIN?= ${PORTNAME}-bin
82 MOZILLA_EXEC_NAME?=${MOZILLA}
83 MOZ_RPATH?= ${MOZILLA}
84 USES+= cpe gmake iconv localbase perl5 pkgconfig \
85 python:2.7,build desktop-file-utils
88 USE_XORG= x11 xcomposite xdamage xext xfixes xrender xt
90 CONFIGURE_OUTSOURCE= yes
92 .if ${MOZILLA} != "libxul"
96 .if ${MOZILLA_VER:R:R} >= 49
97 USES+= compiler:c++14-lang
98 CPPFLAGS+= -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \
99 -D_DECLARE_C99_LDBL_MATH # XXX ports/193528
101 USES+= compiler:c++11-lang
104 .if ${MOZILLA_VER:R:R} >= 50
108 .if ${MOZILLA_VER:R:R} >= 56
110 BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>0:devel/llvm${MESA_LLVM_VER}
111 MOZ_EXPORT+= LLVM_CONFIG=llvm-config${MESA_LLVM_VER}
114 .if ${OPSYS} == FreeBSD && ${OSREL} == 11.1
120 PLISTF?= ${WRKDIR}/plist_files
122 MOZ_PIS_DIR?= lib/${MOZILLA}/init.d
124 PORT_MOZCONFIG?= ${FILESDIR}/mozconfig.in
125 MOZCONFIG?= ${WRKSRC}/.mozconfig
126 MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications
127 PKGINSTALL?= ${WRKDIR}/pkg-install
128 PKGDEINSTALL?= ${WRKDIR}/pkg-deinstall
129 PKGINSTALL_INC?= ${.CURDIR}/../../www/firefox/files/pkg-install.in
130 PKGDEINSTALL_INC?= ${.CURDIR}/../../www/firefox/files/pkg-deinstall.in
132 MOZ_PKGCONFIG_FILES?= ${MOZILLA}-gtkmozembed ${MOZILLA}-js \
133 ${MOZILLA}-xpcom ${MOZILLA}-plugin
135 MOZ_EXPORT+= ${CONFIGURE_ENV} \
136 RUSTFLAGS="${RUSTFLAGS}" \
138 MOZ_OPTIONS+= --prefix="${PREFIX}"
139 MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}"
141 LDFLAGS+= -Wl,--as-needed
143 # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk
144 .if ${ARCH} == amd64 || ${ARCH} == i386
145 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/}
147 RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/}
150 .if ${MOZILLA_VER:R:R} < 55 && ${OPSYS} == FreeBSD && ${OSVERSION} < 1200032
151 # use jemalloc 3.0.0 (4.0 for firefox 43+) API for stats/tuning
152 MOZ_EXPORT+= MOZ_JEMALLOC4=1
153 .if ${MOZILLA_VER:R:R} >= 48
154 MOZ_OPTIONS+= --enable-jemalloc=4
155 .elif ${OSVERSION} < 1100079
156 MOZ_OPTIONS+= --enable-jemalloc
157 .endif # Mozilla >= 48
158 .endif # Mozilla < 55
161 _ALL_DEPENDS= cairo event ffi graphite harfbuzz hunspell icu jpeg nspr nss png pixman soundtouch sqlite vpx
163 .if ${PORT_OPTIONS:MINTEGER_SAMPLES}
164 MOZ_EXPORT+= MOZ_INTEGER_SAMPLES=1
165 _ALL_DEPENDS+= tremor
167 _ALL_DEPENDS+= vorbis
170 .if ! ${PORT_OPTIONS:MBUNDLED_CAIRO}
171 cairo_BUILD_DEPENDS=cairo>=1.12.16_1,2:graphics/cairo
172 cairo_LIB_DEPENDS= libcairo.so:graphics/cairo
173 cairo_MOZ_OPTIONS= --enable-system-cairo
176 event_LIB_DEPENDS= libevent.so:devel/libevent
177 event_MOZ_OPTIONS= --with-system-libevent
179 ffi_LIB_DEPENDS= libffi.so:devel/libffi
180 ffi_MOZ_OPTIONS= --enable-system-ffi
182 .if exists(${FILESDIR}/patch-bug847568)
183 graphite_LIB_DEPENDS= libgraphite2.so:graphics/graphite2
184 graphite_MOZ_OPTIONS= --with-system-graphite2
186 harfbuzz_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz
187 harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz
190 hunspell_LIB_DEPENDS= libhunspell-1.6.so:textproc/hunspell
191 hunspell_MOZ_OPTIONS= --enable-system-hunspell
193 icu_LIB_DEPENDS= libicui18n.so:devel/icu
194 icu_MOZ_OPTIONS= --with-system-icu --with-intl-api
196 -jpeg_BUILD_DEPENDS=yasm:devel/yasm
197 # XXX Remove files/patch-ijg-libjpeg once -turbo is default
199 jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE}
201 nspr_LIB_DEPENDS= libnspr4.so:devel/nspr
202 nspr_MOZ_OPTIONS= --with-system-nspr
204 nss_LIB_DEPENDS= libnss3.so:security/nss
205 nss_MOZ_OPTIONS= --with-system-nss
207 pixman_LIB_DEPENDS= libpixman-1.so:x11/pixman
208 pixman_MOZ_OPTIONS= --enable-system-pixman
210 png_LIB_DEPENDS= libpng.so:graphics/png
211 png_MOZ_OPTIONS= --with-system-png=${LOCALBASE}
213 .if exists(${FILESDIR}/patch-z-bug517422)
214 soundtouch_LIB_DEPENDS= libSoundTouch.so:audio/soundtouch
215 soundtouch_MOZ_OPTIONS= --with-system-soundtouch
218 sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3
219 sqlite_MOZ_OPTIONS= --enable-system-sqlite
221 .if exists(${FILESDIR}/patch-z-bug517422)
222 # XXX disabled: update to 1.2.x or review backported fixes
223 theora_LIB_DEPENDS= libtheora.so:multimedia/libtheora
224 theora_MOZ_OPTIONS= --with-system-theora
226 tremor_LIB_DEPENDS= libogg.so:audio/libogg libvorbisidec.so:audio/libtremor
227 tremor_MOZ_OPTIONS= --with-system-tremor --with-system-ogg
229 vorbis_LIB_DEPENDS= libogg.so:audio/libogg libvorbis.so:audio/libvorbis
230 vorbis_MOZ_OPTIONS= --with-system-vorbis --with-system-ogg
233 -vpx_BUILD_DEPENDS= yasm:devel/yasm
234 vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx
235 vpx_MOZ_OPTIONS= --with-system-libvpx
237 .for use in ${USE_MOZILLA}
238 ${use:S/-/_WITHOUT_/}= ${TRUE}
241 LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \
242 libfreetype.so:print/freetype2
244 .for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//}
245 .if !defined(_WITHOUT_${dep})
246 BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS}
247 LIB_DEPENDS+= ${${dep}_LIB_DEPENDS}
248 RUN_DEPENDS+= ${${dep}_RUN_DEPENDS}
249 USES+= ${${dep}_USES}
250 MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS}
252 BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS}
258 MOZ_TOOLKIT?= cairo-gtk3
259 MOZ_CHANNEL?= ${PKGNAMESUFFIX:Urelease:S/^-//}
261 --enable-chrome-format=${MOZ_CHROME} \
262 --enable-default-toolkit=${MOZ_TOOLKIT} \
263 --enable-update-channel=${MOZ_CHANNEL} \
268 MOZ_OPTIONS+= --with-system-zlib \
271 # API keys from www/chromium
272 # http://www.chromium.org/developers/how-tos/api-keys
273 # Note: these are for FreeBSD use ONLY. For your own distribution,
274 # please get your own set of keys.
275 MOZ_EXPORT+= MOZ_GOOGLE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8
277 .if ${PORT_OPTIONS:MGTK2}
278 MOZ_TOOLKIT= cairo-gtk2
281 .if ${MOZ_TOOLKIT:Mcairo-gtk3}
282 BUILD_DEPENDS+= gtk3>=3.14.6:x11-toolkits/gtk30
283 USE_GNOME+= gdkpixbuf2 gtk20 gtk30
284 .else # gtk2, cairo-gtk2
285 USE_GNOME+= gdkpixbuf2 gtk20
288 .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
290 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}"
291 MOZ_OPTIONS+= --enable-optimize
293 MOZ_OPTIONS+= --disable-optimize
294 . if ${MOZILLA_VER:R:R} >= 56
295 . if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
296 # ld 2.17 barfs on Stylo built with -C opt-level=0
298 LDFLAGS+= -B${LOCALBASE}/bin
303 .if ${PORT_OPTIONS:MCANBERRA}
304 RUN_DEPENDS+= libcanberra>0:audio/libcanberra
307 .if ${PORT_OPTIONS:MDBUS}
308 BUILD_DEPENDS+= libnotify>0:devel/libnotify
309 LIB_DEPENDS+= libdbus-1.so:devel/dbus \
310 libdbus-glib-1.so:devel/dbus-glib \
311 libstartup-notification-1.so:x11/startup-notification
312 MOZ_OPTIONS+= --enable-startup-notification
314 MOZ_OPTIONS+= --disable-dbus
317 .if ${PORT_OPTIONS:MFFMPEG}
318 # dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
319 RUN_DEPENDS+= ffmpeg>=0.8,1:multimedia/ffmpeg
322 .if ${MOZILLA_VER:R:R} < 46
323 MOZ_OPTIONS+= --disable-gstreamer
326 .if ${PORT_OPTIONS:MGCONF}
328 MOZ_OPTIONS+= --enable-gconf
330 MOZ_OPTIONS+= --disable-gconf
333 .if ${PORT_OPTIONS:MLIBPROXY}
334 LIB_DEPENDS+= libproxy.so:net/libproxy
335 MOZ_OPTIONS+= --enable-libproxy
337 MOZ_OPTIONS+= --disable-libproxy
340 .if ${PORT_OPTIONS:MALSA}
341 LIB_DEPENDS+= libasound.so:audio/alsa-lib
342 RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
343 RUN_DEPENDS+= alsa-lib>=1.1.1_1:audio/alsa-lib
344 MOZ_OPTIONS+= --enable-alsa
347 .if ${PORT_OPTIONS:MJACK}
348 BUILD_DEPENDS+= ${LOCALBASE}/include/jack/jack.h:audio/jack
349 MOZ_OPTIONS+= --enable-jack
352 .if ${PORT_OPTIONS:MPULSEAUDIO}
353 BUILD_DEPENDS+= ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
354 MOZ_OPTIONS+= --enable-pulseaudio
356 MOZ_OPTIONS+= --disable-pulseaudio
359 .if ${PORT_OPTIONS:MSNDIO}
360 LIB_DEPENDS+= libsndio.so:audio/sndio
362 @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \
363 ${MOZSRC}/media/libcubeb/src/moz.build \
364 ${MOZSRC}/toolkit/library/moz.build
365 . for tests in tests gtest
366 @if [ -f "${MOZSRC}/media/libcubeb/${tests}/moz.build" ]; then \
367 ${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \
368 ${MOZSRC}/media/libcubeb/${tests}/moz.build; \
371 @if [ -f "${MOZSRC}/media/webrtc/trunk/webrtc/build/common.gypi" ]; then \
372 ${REINPLACE_CMD} -e 's|OS==\"openbsd\"|OS==\"${OPSYS:tl}\"|g' \
373 ${MOZSRC}/media/webrtc/trunk/webrtc/build/common.gypi; \
375 @if [ -f "${MOZSRC}/media/webrtc/signaling/test/common.build" ]; then \
376 ${ECHO_CMD} "OS_LIBS += ['sndio']" >> \
377 ${MOZSRC}/media/webrtc/signaling/test/common.build; \
381 .if ${PORT_OPTIONS:MRUST} || ${MOZILLA_VER:R:R} >= 54
382 BUILD_DEPENDS+= ${RUST_PORT:T}>=1.21.0:${RUST_PORT}
383 RUST_PORT?= lang/rust
384 . if ${MOZILLA_VER:R:R} < 54
385 MOZ_OPTIONS+= --enable-rust
388 MOZ_OPTIONS+= --disable-rust
391 .if ${PORT_OPTIONS:MDEBUG}
392 MOZ_OPTIONS+= --enable-debug --disable-release
393 STRIP= # ports/184285
395 MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release
396 . if ${MOZILLA_VER:R:R} >= 56 && (${ARCH:Maarch64} || ${MACHINE_CPU:Msse2})
397 MOZ_OPTIONS+= --enable-rust-simd
401 .if ${PORT_OPTIONS:MDTRACE}
402 MOZ_OPTIONS+= --enable-dtrace \
404 . if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100061
409 MOZ_OPTIONS+= --disable-dtrace
412 .if ${PORT_OPTIONS:MPROFILE}
413 MOZ_OPTIONS+= --enable-profiling
416 MOZ_OPTIONS+= --disable-profiling
419 .if ${PORT_OPTIONS:MTEST}
420 USE_XORG+= xscrnsaver
421 MOZ_OPTIONS+= --enable-tests
423 MOZ_OPTIONS+= --disable-tests
426 .if !defined(STRIP) || ${STRIP} == ""
427 MOZ_OPTIONS+= --disable-strip --disable-install-strip
429 MOZ_OPTIONS+= --enable-strip --enable-install-strip
432 # _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be
433 # used in .mozconfig. And client.mk automatically uses -jN where N
434 # is what multiprocessing.cpu_count() returns.
435 .if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
438 .if defined(MAKE_JOBS_NUMBER)
439 MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER}
442 .if defined(MOZ_MAKE_FLAGS)
443 MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}"
446 MOZ_SED_ARGS+= -e's|@CPPFLAGS@|${CPPFLAGS}|g' \
447 -e 's|@CFLAGS@|${CFLAGS}|g' \
448 -e 's|@LDFLAGS@|${LDFLAGS}|g' \
449 -e 's|@LIBS@|${LIBS}|g' \
450 -e 's|@LOCALBASE@|${LOCALBASE}|g' \
451 -e 's|@PERL@|${PERL}|g' \
452 -e 's|@MOZDIR@|${PREFIX}/lib/${MOZILLA}|g' \
453 -e 's|%%PREFIX%%|${PREFIX}|g' \
454 -e 's|%%CFLAGS%%|${CFLAGS}|g' \
455 -e 's|%%LDFLAGS%%|${LDFLAGS}|g' \
456 -e 's|%%LIBS%%|${LIBS}|g' \
457 -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
458 -e 's|%%PERL%%|${PERL}|g' \
459 -e 's|%%MOZILLA%%|${MOZILLA}|g' \
460 -e 's|%%MOZILLA_BIN%%|${MOZILLA_BIN}|g' \
461 -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g'
462 MOZCONFIG_SED?= ${SED} ${MOZ_SED_ARGS}
465 . if ${USE_MOZILLA:M-nss}
466 USE_BINUTILS= # intel-gcm.s
467 CFLAGS+= -B${LOCALBASE}/bin
468 LDFLAGS+= -B${LOCALBASE}/bin
470 .elif ${ARCH:Mpowerpc*}
471 . if ${ARCH} == "powerpc64"
472 MOZ_EXPORT+= UNAME_m="${ARCH}"
473 CFLAGS+= -mminimal-toc
475 .elif ${ARCH} == "sparc64"
476 # Work around miscompilation/mislinkage of the sCanonicalVTable hacks.
477 MOZ_OPTIONS+= --disable-v1-string-abi
480 .else # bsd.port.post.mk
482 post-patch: gecko-post-patch gecko-moz-pis-patch
485 .if exists(${PKGINSTALL_INC})
486 @${MOZCONFIG_SED} < ${PKGINSTALL_INC} > ${PKGINSTALL}
488 .if exists(${PKGDEINSTALL_INC})
489 @${MOZCONFIG_SED} < ${PKGDEINSTALL_INC} > ${PKGDEINSTALL}
492 .if !defined(NOMOZCONFIG)
493 @if [ -e ${PORT_MOZCONFIG} ] ; then \
494 ${MOZCONFIG_SED} < ${PORT_MOZCONFIG} >> ${MOZCONFIG} ; \
496 .for arg in ${MOZ_OPTIONS}
497 @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG}
499 .for arg in ${MOZ_MK_OPTIONS}
500 @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG}
502 .for var in ${MOZ_EXPORT}
503 @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG}
505 .endif # .if !defined(NOMOZCONFIG)
506 .if exists(${MOZSRC}/build/unix/mozilla-config.in)
507 @${REINPLACE_CMD} -e 's/%{idldir}/%idldir%/g ; \
508 s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \
509 s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \
510 ${MOZSRC}/build/unix/mozilla-config.in
512 .if ${USE_MOZILLA:M-nspr}
513 @${ECHO_MSG} "===> Applying NSPR patches"
514 @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \
515 ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$i; \
518 .if ${USE_MOZILLA:M-nss}
519 @${ECHO_MSG} "===> Applying NSS patches"
520 @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \
521 ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \
525 ${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \
526 ${WRKSRC}/directory/c-sdk/configure \
527 ${MOZSRC}/security/coreconf/FreeBSD.mk \
528 ${MOZSRC}/js/src/Makefile.in \
529 ${MOZSRC}/js/src/configure \
530 ${MOZSRC}/configure \
531 ${WRKSRC}/configure; do \
532 if [ -f $$f ] ; then \
533 ${REINPLACE_CMD} -Ee 's|-lc_r|-pthread|g ; \
534 s|-l?pthread|-pthread|g ; \
535 s|echo aout|echo elf|g ; \
536 s|/usr/X11R6|${LOCALBASE}|g' \
540 @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \
541 ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \
542 ${WRKSRC}/config/baseconfig.mk; \
544 @${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \
545 ${MOZSRC}/config/baseconfig.mk
546 @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
547 s|%%LOCALBASE%%|${LOCALBASE}|g' \
548 ${MOZSRC}/build/unix/run-mozilla.sh
549 @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \
550 s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \
551 ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp
552 @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \
553 ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h
554 @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
555 -e 's|mozilla/plugins|browser_plugins|g' \
556 -e 's|share/mozilla/extensions|lib/xpi|g' \
557 ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \
558 ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp
559 @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
560 ${MOZSRC}/extensions/spellcheck/hunspell/*/mozHunspell.cpp
562 # handles mozilla pis scripts.
564 .for moz in ${MOZ_PIS_SCRIPTS}
565 @${MOZCONFIG_SED} < ${FILESDIR}/${moz} > ${WRKDIR}/${moz}
568 pre-install: gecko-moz-pis-pre-install
569 post-install-script: gecko-create-plist
574 .for dir in ${MOZILLA_PLIST_DIRS}
575 @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \
576 ${SED} -e 's|^|${dir}/|' >> ${PLISTF}
578 ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST}
580 gecko-moz-pis-pre-install:
581 .if defined(MOZ_PIS_SCRIPTS)
582 ${MKDIR} ${STAGEDIR}${PREFIX}/${MOZ_PIS_DIR}
583 .for moz in ${MOZ_PIS_SCRIPTS}
584 ${INSTALL_SCRIPT} ${WRKDIR}/${moz} ${STAGEDIR}${PREFIX}/${MOZ_PIS_DIR}
590 # HERE THERE BE TACOS -- adamw