Mon Mar 20 10:54:46 2017 UTC ()
reduce gtk2 include, move comment to options.mk


(szptvlfn)
diff -r1.89 -r1.90 pkgsrc/www/firefox/mozilla-common.mk
diff -r1.38 -r1.39 pkgsrc/www/firefox/options.mk

cvs diff -r1.89 -r1.90 pkgsrc/www/firefox/mozilla-common.mk (switch to unified diff)

--- pkgsrc/www/firefox/mozilla-common.mk 2017/03/07 20:45:43 1.89
+++ pkgsrc/www/firefox/mozilla-common.mk 2017/03/20 10:54:46 1.90
@@ -1,201 +1,198 @@ @@ -1,201 +1,198 @@
1# $NetBSD: mozilla-common.mk,v 1.89 2017/03/07 20:45:43 ryoon Exp $ 1# $NetBSD: mozilla-common.mk,v 1.90 2017/03/20 10:54:46 szptvlfn Exp $
2# 2#
3# common Makefile fragment for mozilla packages based on gecko 2.0. 3# common Makefile fragment for mozilla packages based on gecko 2.0.
4# 4#
5# used by www/firefox/Makefile 5# used by www/firefox/Makefile
6# used by www/seamonkey/Makefile 6# used by www/seamonkey/Makefile
7 7
8.include "../../mk/bsd.prefs.mk" 8.include "../../mk/bsd.prefs.mk"
9 9
10.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 10.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
11BUILD_DEPENDS+= yasm>=1.1:../../devel/yasm 11BUILD_DEPENDS+= yasm>=1.1:../../devel/yasm
12 12
13# Enable Google widevine CDM. This requires external libwidevinecdm.so. 13# Enable Google widevine CDM. This requires external libwidevinecdm.so.
14#CONFIGURE_ARGS+= --enable-eme=widevine 14#CONFIGURE_ARGS+= --enable-eme=widevine
15.endif 15.endif
16 16
17HAS_CONFIGURE= yes 17HAS_CONFIGURE= yes
18CONFIGURE_ARGS+= --prefix=${PREFIX} 18CONFIGURE_ARGS+= --prefix=${PREFIX}
19USE_TOOLS+= pkg-config perl gmake autoconf213 unzip zip 19USE_TOOLS+= pkg-config perl gmake autoconf213 unzip zip
20USE_LANGUAGES+= c99 c++ 20USE_LANGUAGES+= c99 c++
21UNLIMIT_RESOURCES+= datasize 21UNLIMIT_RESOURCES+= datasize
22 22
23test: 23test:
24 cd ${WRKSRC}/${OBJDIR}/dist/bin && \ 24 cd ${WRKSRC}/${OBJDIR}/dist/bin && \
25 ./run-mozilla.sh ${WRKSRC}/mach check-spidermonkey 25 ./run-mozilla.sh ${WRKSRC}/mach check-spidermonkey
26 26
27# tar(1) of OpenBSD 5.5 has no --exclude command line option. 27# tar(1) of OpenBSD 5.5 has no --exclude command line option.
28.if ${OPSYS} == "OpenBSD" 28.if ${OPSYS} == "OpenBSD"
29TOOLS_PLATFORM.tar= ${TOOLS_PATH.bsdtar} 29TOOLS_PLATFORM.tar= ${TOOLS_PATH.bsdtar}
30USE_TOOLS+= bsdtar 30USE_TOOLS+= bsdtar
31.endif 31.endif
32# GCC 4.6 is required to support nullptr. 32# GCC 4.6 is required to support nullptr.
33GCC_REQD+= 4.8 33GCC_REQD+= 4.8
34.if ${MACHINE_ARCH} == "i386" 34.if ${MACHINE_ARCH} == "i386"
35# Fix for PR pkg/48152. 35# Fix for PR pkg/48152.
36CXXFLAGS+= -march=i586 36CXXFLAGS+= -march=i586
37# This is required for SSE2 code under i386. 37# This is required for SSE2 code under i386.
38CXXFLAGS+= -mstackrealign 38CXXFLAGS+= -mstackrealign
39.endif 39.endif
40 40
41CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/libpkix/libpkix.sh 41CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/libpkix/libpkix.sh
42CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/multinit/multinit.sh 42CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/multinit/multinit.sh
43CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}js/src/tests/update-test262.sh 43CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}js/src/tests/update-test262.sh
44CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}intl/icu/source/configure 44CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}intl/icu/source/configure
45CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/components/loop/run-all-loop-tests.sh 45CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/components/loop/run-all-loop-tests.sh
46CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/extensions/loop/run-all-loop-tests.sh 46CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/extensions/loop/run-all-loop-tests.sh
47 47
48CONFIGURE_ARGS+= --enable-pie 48CONFIGURE_ARGS+= --enable-pie
49CONFIGURE_ARGS+= --disable-tests 49CONFIGURE_ARGS+= --disable-tests
50CONFIGURE_ARGS+= --with-pthreads 50CONFIGURE_ARGS+= --with-pthreads
51CONFIGURE_ARGS+= --enable-system-cairo 51CONFIGURE_ARGS+= --enable-system-cairo
52CONFIGURE_ARGS+= --enable-system-pixman 52CONFIGURE_ARGS+= --enable-system-pixman
53CONFIGURE_ARGS+= --with-system-libvpx 53CONFIGURE_ARGS+= --with-system-libvpx
54CONFIGURE_ARGS+= --enable-system-hunspell 54CONFIGURE_ARGS+= --enable-system-hunspell
55CONFIGURE_ARGS+= --enable-system-ffi 55CONFIGURE_ARGS+= --enable-system-ffi
56CONFIGURE_ARGS+= --with-system-icu 56CONFIGURE_ARGS+= --with-system-icu
57CONFIGURE_ARGS+= --with-system-nss 57CONFIGURE_ARGS+= --with-system-nss
58CONFIGURE_ARGS+= --with-system-nspr 58CONFIGURE_ARGS+= --with-system-nspr
59CONFIGURE_ARGS+= --with-system-jpeg 59CONFIGURE_ARGS+= --with-system-jpeg
60CONFIGURE_ARGS+= --with-system-zlib 60CONFIGURE_ARGS+= --with-system-zlib
61CONFIGURE_ARGS+= --with-system-bz2 61CONFIGURE_ARGS+= --with-system-bz2
62CONFIGURE_ARGS+= --with-system-libevent=${BUILDLINK_PREFIX.libevent} 62CONFIGURE_ARGS+= --with-system-libevent=${BUILDLINK_PREFIX.libevent}
63CONFIGURE_ARGS+= --disable-crashreporter 63CONFIGURE_ARGS+= --disable-crashreporter
64CONFIGURE_ARGS+= --disable-necko-wifi 64CONFIGURE_ARGS+= --disable-necko-wifi
65CONFIGURE_ARGS+= --enable-chrome-format=flat 65CONFIGURE_ARGS+= --enable-chrome-format=flat
66CONFIGURE_ARGS+= --disable-libjpeg-turbo 66CONFIGURE_ARGS+= --disable-libjpeg-turbo
67 67
68CONFIGURE_ARGS+= --disable-elf-hack 68CONFIGURE_ARGS+= --disable-elf-hack
69CONFIGURE_ARGS+= --disable-gconf 69CONFIGURE_ARGS+= --disable-gconf
70CONFIGURE_ARGS+= --enable-gio 70CONFIGURE_ARGS+= --enable-gio
71CONFIGURE_ARGS+= --enable-extensions=gio 71CONFIGURE_ARGS+= --enable-extensions=gio
72#CONFIGURE_ARGS+= --enable-readline 72#CONFIGURE_ARGS+= --enable-readline
73CONFIGURE_ARGS+= --enable-url-classifier 73CONFIGURE_ARGS+= --enable-url-classifier
74CONFIGURE_ARGS+= --disable-icf 74CONFIGURE_ARGS+= --disable-icf
75CONFIGURE_ARGS+= --disable-updater 75CONFIGURE_ARGS+= --disable-updater
76 76
77SUBST_CLASSES+= fix-paths 77SUBST_CLASSES+= fix-paths
78SUBST_STAGE.fix-paths= pre-configure 78SUBST_STAGE.fix-paths= pre-configure
79SUBST_MESSAGE.fix-paths= Fixing absolute paths. 79SUBST_MESSAGE.fix-paths= Fixing absolute paths.
80SUBST_FILES.fix-paths+= ${MOZILLA_DIR}xpcom/io/nsAppFileLocationProvider.cpp 80SUBST_FILES.fix-paths+= ${MOZILLA_DIR}xpcom/io/nsAppFileLocationProvider.cpp
81SUBST_SED.fix-paths+= -e 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g' 81SUBST_SED.fix-paths+= -e 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g'
82 82
83CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.guess 83CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.guess
84CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.guess 84CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.guess
85CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.guess 85CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.guess
86CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.guess 86CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.guess
87CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.sub 87CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.sub
88CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.sub 88CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.sub
89CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.sub 89CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.sub
90CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.sub 90CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.sub
91 91
92CONFIGURE_ENV+= CPP=${CPP} 92CONFIGURE_ENV+= CPP=${CPP}
93 93
94SUBST_CLASSES+= python 94SUBST_CLASSES+= python
95SUBST_STAGE.python= pre-configure 95SUBST_STAGE.python= pre-configure
96SUBST_MESSAGE.python= Fixing path to python. 96SUBST_MESSAGE.python= Fixing path to python.
97SUBST_FILES.python+= media/webrtc/trunk/build/common.gypi 97SUBST_FILES.python+= media/webrtc/trunk/build/common.gypi
98SUBST_SED.python+= -e 's,<!(python,<!(${PYTHONBIN},' 98SUBST_SED.python+= -e 's,<!(python,<!(${PYTHONBIN},'
99 99
100# Build outside ${WRKSRC} 100# Build outside ${WRKSRC}
101# Try to avoid conflict with config/makefiles/xpidl/Makefile.in 101# Try to avoid conflict with config/makefiles/xpidl/Makefile.in
102OBJDIR= ../build 102OBJDIR= ../build
103CONFIGURE_DIRS= ${OBJDIR} 103CONFIGURE_DIRS= ${OBJDIR}
104CONFIGURE_SCRIPT= ${WRKSRC}/configure 104CONFIGURE_SCRIPT= ${WRKSRC}/configure
105 105
106PLIST_VARS+= sps vorbis tremor glskia throwwrapper mozglue avx86 106PLIST_VARS+= sps vorbis tremor glskia throwwrapper mozglue avx86
107 107
108.include "../../mk/endian.mk" 108.include "../../mk/endian.mk"
109.if ${MACHINE_ENDIAN} == "little" 109.if ${MACHINE_ENDIAN} == "little"
110PLIST.glskia= yes 110PLIST.glskia= yes
111.endif 111.endif
112 112
113.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 113.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
114PLIST.avx86= yes # see media/libav/README_MOZILLA: only used on x86 114PLIST.avx86= yes # see media/libav/README_MOZILLA: only used on x86
115.endif 115.endif
116 116
117.if ${MACHINE_ARCH} != "sparc64" 117.if ${MACHINE_ARCH} != "sparc64"
118# For some reasons the configure test for GCC bug 26905 still triggers on 118# For some reasons the configure test for GCC bug 26905 still triggers on
119# sparc64, which makes mozilla skip the installation of a few wrapper headers. 119# sparc64, which makes mozilla skip the installation of a few wrapper headers.
120# Other archs end up with one additional file in the SDK headers 120# Other archs end up with one additional file in the SDK headers
121PLIST.throwwrapper= yes 121PLIST.throwwrapper= yes
122.endif 122.endif
123 123
124.if !empty(MACHINE_PLATFORM:S/i386/x86/:MLinux-*-x86*) 124.if !empty(MACHINE_PLATFORM:S/i386/x86/:MLinux-*-x86*)
125PLIST.sps= yes 125PLIST.sps= yes
126.endif 126.endif
127 127
128.if !empty(MACHINE_PLATFORM:MLinux-*-arm*) 128.if !empty(MACHINE_PLATFORM:MLinux-*-arm*)
129PLIST.tremor= yes 129PLIST.tremor= yes
130.else 130.else
131PLIST.vorbis= yes 131PLIST.vorbis= yes
132.endif 132.endif
133 133
134# See ${WRKSRC}/mozglue/build/moz.build: libmozglue is built and 134# See ${WRKSRC}/mozglue/build/moz.build: libmozglue is built and
135# installed as a shared library on these platforms. 135# installed as a shared library on these platforms.
136.if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" # or Android 136.if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" # or Android
137PLIST.mozglue= yes 137PLIST.mozglue= yes
138.endif 138.endif
139 139
140# See ${WRKSRC}/security/sandbox/mac/Sandbox.mm: On Darwin, sandboxing 140# See ${WRKSRC}/security/sandbox/mac/Sandbox.mm: On Darwin, sandboxing
141# support is only available when the toolkit is cairo-cocoa. 141# support is only available when the toolkit is cairo-cocoa.
142CONFIGURE_ARGS.Darwin+= --disable-sandbox 142CONFIGURE_ARGS.Darwin+= --disable-sandbox
143 143
144# See ${WRKSRC}/configure.in: It tries to use MacOS X 10.6 SDK by 144# See ${WRKSRC}/configure.in: It tries to use MacOS X 10.6 SDK by
145# default, which is not always possible. 145# default, which is not always possible.
146.if !empty(MACHINE_PLATFORM:MDarwin-8.*-*) 146.if !empty(MACHINE_PLATFORM:MDarwin-8.*-*)
147CONFIGURE_ARGS+= --enable-macos-target=10.4 147CONFIGURE_ARGS+= --enable-macos-target=10.4
148.elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*) 148.elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*)
149CONFIGURE_ARGS+= --enable-macos-target=10.5 149CONFIGURE_ARGS+= --enable-macos-target=10.5
150.endif 150.endif
151 151
152# Makefiles sometimes call "rm -f" without more arguments. Kludge around ... 152# Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
153.PHONY: create-rm-wrapper 153.PHONY: create-rm-wrapper
154pre-configure: create-rm-wrapper 154pre-configure: create-rm-wrapper
155create-rm-wrapper: 155create-rm-wrapper:
156 printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \ 156 printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
157 ${WRAPPER_DIR}/bin/rm 157 ${WRAPPER_DIR}/bin/rm
158 chmod +x ${WRAPPER_DIR}/bin/rm 158 chmod +x ${WRAPPER_DIR}/bin/rm
159 159
160# The configure test for __thread succeeds, but later we end up with: 160# The configure test for __thread succeeds, but later we end up with:
161# dist/bin/libxul.so: undefined reference to `__tls_get_addr' 161# dist/bin/libxul.so: undefined reference to `__tls_get_addr'
162CONFIGURE_ENV.NetBSD+= ac_cv_thread_keyword=no 162CONFIGURE_ENV.NetBSD+= ac_cv_thread_keyword=no
163 163
164.if ${OPSYS} == "SunOS" 164.if ${OPSYS} == "SunOS"
165# native libbz2.so hides BZ2_crc32Table 165# native libbz2.so hides BZ2_crc32Table
166PREFER.bzip2?= pkgsrc 166PREFER.bzip2?= pkgsrc
167.endif 167.endif
168 168
169.if ${OPSYS} == "OpenBSD" 169.if ${OPSYS} == "OpenBSD"
170PLIST_SUBST+= DLL_SUFFIX=".so.1.0" 170PLIST_SUBST+= DLL_SUFFIX=".so.1.0"
171.elif ${OPSYS} == "Darwin" 171.elif ${OPSYS} == "Darwin"
172PLIST_SUBST+= DLL_SUFFIX=".dylib" 172PLIST_SUBST+= DLL_SUFFIX=".dylib"
173.else 173.else
174PLIST_SUBST+= DLL_SUFFIX=".so" 174PLIST_SUBST+= DLL_SUFFIX=".so"
175.endif 175.endif
176 176
177.include "../../archivers/bzip2/buildlink3.mk" 177.include "../../archivers/bzip2/buildlink3.mk"
178BUILDLINK_API_DEPENDS.libevent+= libevent>=1.1 178BUILDLINK_API_DEPENDS.libevent+= libevent>=1.1
179.include "../../devel/libevent/buildlink3.mk" 179.include "../../devel/libevent/buildlink3.mk"
180.include "../../devel/libffi/buildlink3.mk" 180.include "../../devel/libffi/buildlink3.mk"
181BUILDLINK_API_DEPENDS.nspr+= nspr>=4.10.10 181BUILDLINK_API_DEPENDS.nspr+= nspr>=4.10.10
182.include "../../devel/nspr/buildlink3.mk" 182.include "../../devel/nspr/buildlink3.mk"
183.include "../../textproc/icu/buildlink3.mk" 183.include "../../textproc/icu/buildlink3.mk"
184BUILDLINK_API_DEPENDS.nss+= nss>=3.28.1 184BUILDLINK_API_DEPENDS.nss+= nss>=3.28.1
185.include "../../devel/nss/buildlink3.mk" 185.include "../../devel/nss/buildlink3.mk"
186.include "../../devel/zlib/buildlink3.mk" 186.include "../../devel/zlib/buildlink3.mk"
187.include "../../mk/jpeg.buildlink3.mk" 187.include "../../mk/jpeg.buildlink3.mk"
188.include "../../graphics/MesaLib/buildlink3.mk" 188.include "../../graphics/MesaLib/buildlink3.mk"
189BUILDLINK_API_DEPENDS.cairo+= cairo>=1.10.2nb4 189BUILDLINK_API_DEPENDS.cairo+= cairo>=1.10.2nb4
190.include "../../graphics/cairo/buildlink3.mk" 190.include "../../graphics/cairo/buildlink3.mk"
191BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0 191BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
192.include "../../multimedia/libvpx/buildlink3.mk" 192.include "../../multimedia/libvpx/buildlink3.mk"
193.include "../../net/libIDL/buildlink3.mk" 193.include "../../net/libIDL/buildlink3.mk"
194.include "../../textproc/hunspell/buildlink3.mk" 194.include "../../textproc/hunspell/buildlink3.mk"
195# gtk2 needed even if --enable-default-toolkit=cairo-gtk3 
196BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.18.3nb1 
197.include "../../x11/gtk2/buildlink3.mk" 
198.include "../../multimedia/ffmpeg3/buildlink3.mk" 195.include "../../multimedia/ffmpeg3/buildlink3.mk"
199.include "../../x11/libXt/buildlink3.mk" 196.include "../../x11/libXt/buildlink3.mk"
200BUILDLINK_API_DEPENDS.pixman+= pixman>=0.25.2 197BUILDLINK_API_DEPENDS.pixman+= pixman>=0.25.2
201.include "../../x11/pixman/buildlink3.mk" 198.include "../../x11/pixman/buildlink3.mk"

cvs diff -r1.38 -r1.39 pkgsrc/www/firefox/options.mk (switch to unified diff)

--- pkgsrc/www/firefox/options.mk 2017/03/07 20:45:43 1.38
+++ pkgsrc/www/firefox/options.mk 2017/03/20 10:54:46 1.39
@@ -1,125 +1,126 @@ @@ -1,125 +1,126 @@
1# $NetBSD: options.mk,v 1.38 2017/03/07 20:45:43 ryoon Exp $ 1# $NetBSD: options.mk,v 1.39 2017/03/20 10:54:46 szptvlfn Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.firefox 3PKG_OPTIONS_VAR= PKG_OPTIONS.firefox
4 4
5PKG_OPTIONS_REQUIRED_GROUPS= gtk 5PKG_OPTIONS_REQUIRED_GROUPS= gtk
6PKG_OPTIONS_GROUP.gtk= gtk2 gtk3 6PKG_OPTIONS_GROUP.gtk= gtk2 gtk3
7PKG_SUGGESTED_OPTIONS= gtk3 7PKG_SUGGESTED_OPTIONS= gtk3
8 8
9PKG_SUPPORTED_OPTIONS= official-mozilla-branding 9PKG_SUPPORTED_OPTIONS= official-mozilla-branding
10PKG_SUPPORTED_OPTIONS+= debug debug-info mozilla-jemalloc webrtc 10PKG_SUPPORTED_OPTIONS+= debug debug-info mozilla-jemalloc webrtc
11PKG_SUPPORTED_OPTIONS+= alsa oss pulseaudio dbus 11PKG_SUPPORTED_OPTIONS+= alsa oss pulseaudio dbus
12PLIST_VARS+= gnome jemalloc debug 12PLIST_VARS+= gnome jemalloc debug
13 13
14.if ${OPSYS} == "Linux" 14.if ${OPSYS} == "Linux"
15PKG_SUGGESTED_OPTIONS+= alsa mozilla-jemalloc dbus 15PKG_SUGGESTED_OPTIONS+= alsa mozilla-jemalloc dbus
16.elif ${OPSYS} == "NetBSD" 16.elif ${OPSYS} == "NetBSD"
17PKG_SUGGESTED_OPTIONS+= alsa dbus 17PKG_SUGGESTED_OPTIONS+= alsa dbus
18.elif ${OPSYS} == "FreeBSD" 18.elif ${OPSYS} == "FreeBSD"
19PKG_SUGGESTED_OPTIONS+= oss dbus 19PKG_SUGGESTED_OPTIONS+= oss dbus
20.elif ${OPSYS} == "DragonFly" 20.elif ${OPSYS} == "DragonFly"
21PKG_SUGGESTED_OPTIONS+= oss dbus 21PKG_SUGGESTED_OPTIONS+= oss dbus
22.else 22.else
23PKG_SUGGESTED_OPTIONS+= dbus pulseaudio 23PKG_SUGGESTED_OPTIONS+= dbus pulseaudio
24.endif 24.endif
25 25
26# On NetBSD/amd64 6.99.21 libxul.so is invalid when --enable-webrtc is set. 26# On NetBSD/amd64 6.99.21 libxul.so is invalid when --enable-webrtc is set.
27PKG_SUGGESTED_OPTIONS.Linux+= webrtc 27PKG_SUGGESTED_OPTIONS.Linux+= webrtc
28 28
29.include "../../mk/bsd.options.mk" 29.include "../../mk/bsd.options.mk"
30 30
31PLIST_VARS+= gtk3 31PLIST_VARS+= gtk3
32.if !empty(PKG_OPTIONS:Mgtk2) 32.if !empty(PKG_OPTIONS:Mgtk2)
33CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2 33CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
 34# gtk2 needed even if --enable-default-toolkit=cairo-gtk3
34BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.18.3nb1 35BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.18.3nb1
35.include "../../x11/gtk2/buildlink3.mk" 36.include "../../x11/gtk2/buildlink3.mk"
36.endif 37.endif
37 38
38# As of firefox-51 gtk2 is still pulled in implicitly 39# As of firefox-51 gtk2 is still pulled in implicitly
39.if !empty(PKG_OPTIONS:Mgtk3) 40.if !empty(PKG_OPTIONS:Mgtk3)
40CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk3 41CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk3
41.include "../../x11/gtk3/buildlink3.mk" 42.include "../../x11/gtk3/buildlink3.mk"
42PLIST.gtk3= yes 43PLIST.gtk3= yes
43.endif 44.endif
44 45
45.if !empty(PKG_OPTIONS:Malsa) 46.if !empty(PKG_OPTIONS:Malsa)
46CONFIGURE_ARGS+= --enable-alsa 47CONFIGURE_ARGS+= --enable-alsa
47.include "../../audio/alsa-lib/buildlink3.mk" 48.include "../../audio/alsa-lib/buildlink3.mk"
48.else 49.else
49CONFIGURE_ARGS+= --disable-alsa 50CONFIGURE_ARGS+= --disable-alsa
50.endif 51.endif
51 52
52.if !empty(PKG_OPTIONS:Moss) 53.if !empty(PKG_OPTIONS:Moss)
53CONFIGURE_ARGS+= --with-oss 54CONFIGURE_ARGS+= --with-oss
54.include "../../mk/oss.buildlink3.mk" 55.include "../../mk/oss.buildlink3.mk"
55.endif 56.endif
56 57
57.if !empty(PKG_OPTIONS:Mmozilla-jemalloc) 58.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
58PLIST.jemalloc= yes 59PLIST.jemalloc= yes
59CONFIGURE_ARGS+= --enable-jemalloc 60CONFIGURE_ARGS+= --enable-jemalloc
60CONFIGURE_ARGS+= --enable-replace-malloc 61CONFIGURE_ARGS+= --enable-replace-malloc
61.else 62.else
62CONFIGURE_ARGS+= --disable-jemalloc 63CONFIGURE_ARGS+= --disable-jemalloc
63.endif 64.endif
64 65
65.include "../../mk/compiler.mk" 66.include "../../mk/compiler.mk"
66.if !empty(PKGSRC_COMPILER:Mgcc) 67.if !empty(PKGSRC_COMPILER:Mgcc)
67.if ${CC_VERSION:S/gcc-//:S/.//g} >= 480 68.if ${CC_VERSION:S/gcc-//:S/.//g} >= 480
68# Modern gcc does not run any "tracking" passes when compiling with -O0, 69# Modern gcc does not run any "tracking" passes when compiling with -O0,
69# which makes the generated debug info mostly useless. So explicitly 70# which makes the generated debug info mostly useless. So explicitly
70# request them. 71# request them.
71O0TRACKING=-fvar-tracking-assignments -fvar-tracking 72O0TRACKING=-fvar-tracking-assignments -fvar-tracking
72.endif 73.endif
73.endif 74.endif
74 75
75.if !empty(PKG_OPTIONS:Mdebug) 76.if !empty(PKG_OPTIONS:Mdebug)
76CONFIGURE_ARGS+= --enable-debug="-g -O0 ${O0TRACKING}" 77CONFIGURE_ARGS+= --enable-debug="-g -O0 ${O0TRACKING}"
77CONFIGURE_ARGS+= --disable-optimize 78CONFIGURE_ARGS+= --disable-optimize
78CONFIGURE_ARGS+= --enable-debug-js-modules 79CONFIGURE_ARGS+= --enable-debug-js-modules
79CONFIGURE_ARGS+= --disable-install-strip 80CONFIGURE_ARGS+= --disable-install-strip
80PLIST.debug= yes 81PLIST.debug= yes
81.else 82.else
82.if !empty(PKG_OPTIONS:Mdebug-info) 83.if !empty(PKG_OPTIONS:Mdebug-info)
83CONFIGURE_ARGS+= --enable-debug-symbols 84CONFIGURE_ARGS+= --enable-debug-symbols
84CONFIGURE_ARGS+= --enable-optimize=-O0 85CONFIGURE_ARGS+= --enable-optimize=-O0
85.else 86.else
86CONFIGURE_ARGS+= --disable-debug-symbols 87CONFIGURE_ARGS+= --disable-debug-symbols
87.endif 88.endif
88CONFIGURE_ARGS+= --disable-debug 89CONFIGURE_ARGS+= --disable-debug
89CONFIGURE_ARGS+= --enable-optimize=-O2 90CONFIGURE_ARGS+= --enable-optimize=-O2
90CONFIGURE_ARGS+= --enable-install-strip 91CONFIGURE_ARGS+= --enable-install-strip
91.endif 92.endif
92 93
93.if !empty(PKG_OPTIONS:Mpulseaudio) 94.if !empty(PKG_OPTIONS:Mpulseaudio)
94.include "../../audio/pulseaudio/buildlink3.mk" 95.include "../../audio/pulseaudio/buildlink3.mk"
95CONFIGURE_ARGS+= --enable-pulseaudio 96CONFIGURE_ARGS+= --enable-pulseaudio
96.else 97.else
97CONFIGURE_ARGS+= --disable-pulseaudio 98CONFIGURE_ARGS+= --disable-pulseaudio
98.endif 99.endif
99 100
100.if !empty(PKG_OPTIONS:Mdbus) 101.if !empty(PKG_OPTIONS:Mdbus)
101.include "../../sysutils/dbus-glib/buildlink3.mk" 102.include "../../sysutils/dbus-glib/buildlink3.mk"
102CONFIGURE_ARGS+= --enable-dbus 103CONFIGURE_ARGS+= --enable-dbus
103.else 104.else
104CONFIGURE_ARGS+= --disable-dbus 105CONFIGURE_ARGS+= --disable-dbus
105.endif 106.endif
106 107
107PLIST_VARS+= branding nobranding 108PLIST_VARS+= branding nobranding
108.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding) 109.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
109CONFIGURE_ARGS+= --enable-official-branding 110CONFIGURE_ARGS+= --enable-official-branding
110LICENSE= mozilla-trademark-license 111LICENSE= mozilla-trademark-license
111RESTRICTED= Trademark holder prohibits distribution of modified versions. 112RESTRICTED= Trademark holder prohibits distribution of modified versions.
112NO_BIN_ON_CDROM= ${RESTRICTED} 113NO_BIN_ON_CDROM= ${RESTRICTED}
113NO_BIN_ON_FTP= ${RESTRICTED} 114NO_BIN_ON_FTP= ${RESTRICTED}
114PLIST.branding= yes 115PLIST.branding= yes
115.else 116.else
116PLIST.nobranding= yes 117PLIST.nobranding= yes
117.endif 118.endif
118 119
119PLIST_VARS+= webrtc 120PLIST_VARS+= webrtc
120.if !empty(PKG_OPTIONS:Mwebrtc) 121.if !empty(PKG_OPTIONS:Mwebrtc)
121.include "../../graphics/libv4l/buildlink3.mk" 122.include "../../graphics/libv4l/buildlink3.mk"
122CONFIGURE_ARGS+= --enable-webrtc 123CONFIGURE_ARGS+= --enable-webrtc
123.else 124.else
124CONFIGURE_ARGS+= --disable-webrtc 125CONFIGURE_ARGS+= --disable-webrtc
125.endif 126.endif