summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2017-02-11 12:12:02 +0000
committerabs <abs@pkgsrc.org>2017-02-11 12:12:02 +0000
commit5361f7474810ec13b4310dea5a991d71c4c7cb5e (patch)
tree5b2d75f3a62cdf0493a083e00fec440ce4b509b8
parent8205a0e7cbd66711d5009c01c3d16e1e7a8b2130 (diff)
downloadpkgsrc-5361f7474810ec13b4310dea5a991d71c4c7cb5e.tar.gz
Add gtk3 (cairo-gtk3) option for firefox.
Default build is unchanged with gtk2 (cairo-gtk2)
-rw-r--r--www/firefox/PLIST4
-rw-r--r--www/firefox/mozilla-common.mk4
-rw-r--r--www/firefox/options.mk22
3 files changed, 26 insertions, 4 deletions
diff --git a/www/firefox/PLIST b/www/firefox/PLIST
index 900693cccf3..362056e80d1 100644
--- a/www/firefox/PLIST
+++ b/www/firefox/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.115 2017/01/25 13:24:51 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.116 2017/02/11 12:12:02 abs Exp $
bin/firefox
lib/firefox/application.ini
lib/firefox/browser/blocklist.xml
@@ -3397,6 +3397,7 @@ lib/firefox/firefox-bin
lib/firefox/gmp-clearkey/0.1/clearkey.info
lib/firefox/gmp-clearkey/0.1/libclearkey.so
lib/firefox/greprefs.js
+${PLIST.gtk3}lib/firefox/gtk2/libmozgtk.so
lib/firefox/hyphenation/hyph_af.dic
lib/firefox/hyphenation/hyph_bg.dic
lib/firefox/hyphenation/hyph_ca.dic
@@ -3434,6 +3435,7 @@ lib/firefox/hyphenation/hyph_sv.dic
lib/firefox/hyphenation/hyph_tr.dic
lib/firefox/hyphenation/hyph_uk.dic
lib/firefox/liblgpllibs.so
+${PLIST.gtk3}lib/firefox/libmozgtk.so
${PLIST.avx86}lib/firefox/libmozavcodec.so
${PLIST.avx86}lib/firefox/libmozavutil.so
lib/firefox/libmozsqlite3.so
diff --git a/www/firefox/mozilla-common.mk b/www/firefox/mozilla-common.mk
index 24e775d6b4f..f75aade1a59 100644
--- a/www/firefox/mozilla-common.mk
+++ b/www/firefox/mozilla-common.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.86 2017/01/27 01:36:21 maya Exp $
+# $NetBSD: mozilla-common.mk,v 1.87 2017/02/11 12:12:02 abs Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -48,7 +48,6 @@ CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/extensions/loop/run-all-loop-tests
CONFIGURE_ARGS+= --enable-pie
CONFIGURE_ARGS+= --disable-tests
CONFIGURE_ARGS+= --with-pthreads
-CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
CONFIGURE_ARGS+= --enable-system-cairo
CONFIGURE_ARGS+= --enable-system-pixman
CONFIGURE_ARGS+= --with-system-libvpx
@@ -205,6 +204,7 @@ BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
.include "../../multimedia/libvpx/buildlink3.mk"
.include "../../net/libIDL/buildlink3.mk"
.include "../../textproc/hunspell/buildlink3.mk"
+# gtk2 needed even if --enable-default-toolkit=cairo-gtk3
BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.18.3nb1
.include "../../x11/gtk2/buildlink3.mk"
.include "../../multimedia/ffmpeg3/buildlink3.mk"
diff --git a/www/firefox/options.mk b/www/firefox/options.mk
index c948f66b1da..cf310ddca1c 100644
--- a/www/firefox/options.mk
+++ b/www/firefox/options.mk
@@ -1,6 +1,11 @@
-# $NetBSD: options.mk,v 1.35 2017/02/04 11:14:27 maya Exp $
+# $NetBSD: options.mk,v 1.36 2017/02/11 12:12:02 abs Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.firefox
+
+PKG_OPTIONS_REQUIRED_GROUPS= gtk
+PKG_OPTIONS_GROUP.gtk= gtk2 gtk3
+PKG_SUGGESTED_OPTIONS= gtk2
+
PKG_SUPPORTED_OPTIONS= official-mozilla-branding
PKG_SUPPORTED_OPTIONS+= debug debug-info mozilla-jemalloc webrtc
PKG_SUPPORTED_OPTIONS+= alsa oss pulseaudio dbus
@@ -23,6 +28,21 @@ PKG_SUGGESTED_OPTIONS.Linux+= webrtc
.include "../../mk/bsd.options.mk"
+PLIST_VARS+= gtk3
+.if !empty(PKG_OPTIONS:Mgtk2)
+CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
+BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.18.3nb1
+.include "../../x11/gtk2/buildlink3.mk"
+PLIST.gtk3= no
+.endif
+
+# As of firefox-51 gtk2 is still pulled in implicitly
+.if !empty(PKG_OPTIONS:Mgtk3)
+CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk3
+.include "../../x11/gtk3/buildlink3.mk"
+PLIST.gtk3= yes
+.endif
+
.if !empty(PKG_OPTIONS:Malsa)
CONFIGURE_ARGS+= --enable-alsa
.include "../../audio/alsa-lib/buildlink3.mk"