Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: eclass/
Date: Mon, 28 Mar 2016 14:58:01
Message-Id: 1458316725.73b3f5a628ecd07aaf23b43695049d94598ee268.axs@gentoo
1 commit: 73b3f5a628ecd07aaf23b43695049d94598ee268
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 18 15:58:45 2016 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 18 15:58:45 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=73b3f5a6
7
8 mozconfig-v6.46.eclass adjustments
9
10 - dropped gstreamer options as it has been removed upstream
11 - added logic to support both gtk3-default and gtk2-default configurations:
12 - setting MOZCONFIG_OPTIONAL_GTK3 adds a 'gtk3' use flag which can be
13 enabled or disabled to control the use of cairo-gtk3 toolkit, and cairo-gtk2
14 is used otherwose
15 - setting MOZCONFIG_OPTIONAL_GTK2ONLY adds a 'force-gtk2' use flag which
16 can be enabled or disabled to control the use of cairo-gtk2 toolkit, and
17 cairo-gtk3 is used otherwise.
18
19 The primary reason for this is to make the gentoo gnome/gtk devs happy, as they don't like
20 gtk2/gtk3 use flags, and to better enforce the default in USE="-*" user profile situations.
21
22 eclass/mozconfig-v6.46.eclass | 58 +++++++++++++++++++++++++++----------------
23 1 file changed, 36 insertions(+), 22 deletions(-)
24
25 diff --git a/eclass/mozconfig-v6.46.eclass b/eclass/mozconfig-v6.46.eclass
26 index a25e5a5..9400121 100644
27 --- a/eclass/mozconfig-v6.46.eclass
28 +++ b/eclass/mozconfig-v6.46.eclass
29 @@ -59,6 +59,19 @@ inherit flag-o-matic toolchain-funcs mozcoreconf-v3
30 # Set the variable to "enabled" if the use flag should be enabled by default.
31 # Set the variable to any value if the use flag should exist but not be default-enabled.
32
33 +# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK2ONLY
34 +# @DESCRIPTION:
35 +# Set this variable before the inherit line, when an ebuild can provide
36 +# optional gtk2-only support via IUSE="force-gtk2".
37 +#
38 +# Note that this option conflicts directly with MOZCONFIG_OPTIONAL_GTK3, both
39 +# variables cannot be set at the same time and this variable will be ignored if
40 +# MOZCONFIG_OPTIONAL_GTK3 is set.
41 +#
42 +# Leave the variable UNSET if gtk2-only support should not be available.
43 +# Set the variable to "enabled" if the use flag should be enabled by default.
44 +# Set the variable to any value if the use flag should exist but not be default-enabled.
45 +
46 # @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5
47 # @DESCRIPTION:
48 # Set this variable before the inherit line, when an ebuild can provide
49 @@ -70,7 +83,7 @@ inherit flag-o-matic toolchain-funcs mozcoreconf-v3
50 # Set the variable to any value if the use flag should exist but not be default-enabled.
51
52 # use-flags common among all mozilla ebuilds
53 -IUSE="${IUSE} dbus debug ffmpeg +gstreamer gstreamer-0 +jemalloc3 neon pulseaudio selinux startup-notification system-cairo
54 +IUSE="${IUSE} dbus debug +ffmpeg +jemalloc3 neon pulseaudio selinux startup-notification system-cairo
55 system-icu system-jpeg system-libevent system-sqlite system-libvpx"
56
57 # some notes on deps:
58 @@ -98,16 +111,6 @@ RDEPEND=">=app-text/hunspell-1.2
59 >=sys-libs/zlib-1.2.3
60 >=virtual/libffi-3.0.10
61 ffmpeg? ( virtual/ffmpeg )
62 - gstreamer? (
63 - >=media-libs/gstreamer-1.4.5:1.0
64 - >=media-libs/gst-plugins-base-1.4.5:1.0
65 - >=media-libs/gst-plugins-good-1.4.5:1.0
66 - >=media-plugins/gst-plugins-libav-1.4.5:1.0
67 - )
68 - gstreamer-0? (
69 - >=media-libs/gstreamer-0.10.25:0.10
70 - media-plugins/gst-plugins-meta:0.10[ffmpeg]
71 - )
72 x11-libs/libX11
73 x11-libs/libXcomposite
74 x11-libs/libXdamage
75 @@ -124,6 +127,7 @@ RDEPEND=">=app-text/hunspell-1.2
76 "
77
78 if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then
79 + MOZCONFIG_OPTIONAL_GTK2ONLY=
80 if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then
81 IUSE+=" +gtk3"
82 else
83 @@ -131,6 +135,14 @@ if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then
84 fi
85 RDEPEND+="
86 gtk3? ( >=x11-libs/gtk+-3.4.0:3 )"
87 +elif [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then
88 + if [[ ${MOZCONFIG_OPTIONAL_GTK2ONLY} = "enabled" ]]; then
89 + IUSE+=" +force-gtk2"
90 + else
91 + IUSE+=" force-gtk2"
92 + fi
93 + RDEPEND+="
94 + !force-gtk2? ( >=x11-libs/gtk+-3.4.0:3 )"
95 fi
96 if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then
97 inherit qmake-utils
98 @@ -179,13 +191,17 @@ DEPEND="app-arch/zip
99 RDEPEND+="
100 selinux? ( sec-policy/selinux-mozilla )"
101
102 -# only one of gstreamer and gstreamer-0 can be enabled at a time, so set REQUIRED_USE to signify this
103 -REQUIRED_USE="?? ( gstreamer gstreamer-0 )"
104 +# ensure REQUIRED_USE is set just in case += fails otherwise
105 +: ${REQUIRED_USE:=""}
106
107 # only one of gtk3 or qt5 should be permitted to be selected, since only one will be used.
108 [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]] && [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]] && \
109 REQUIRED_USE+=" ?? ( gtk3 qt5 )"
110
111 +# only one of force-gtk2 or qt5 should be permitted to be selected, since only one will be used.
112 +[[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]] && [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]] && \
113 + REQUIRED_USE+=" ?? ( force-gtk2 qt5 )"
114 +
115 # @FUNCTION: mozconfig_config
116 # @DESCRIPTION:
117 # Set common configure options for mozilla packages.
118 @@ -280,6 +296,13 @@ mozconfig_config() {
119 toolkit_comment="gtk3 use flag"
120 fi
121 fi
122 + if [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then
123 + if ! use force-gtk2 ; then
124 + toolkit="cairo-gtk3"
125 + else
126 + toolkit_comment="force-gtk2 use flag"
127 + fi
128 + fi
129 if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then
130 if use qt5; then
131 toolkit="cairo-qt"
132 @@ -310,15 +333,6 @@ mozconfig_config() {
133 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
134
135 use ffmpeg || mozconfig_annotate '-ffmpeg' --disable-ffmpeg
136 - if use gstreamer ; then
137 - use ffmpeg && einfo "${PN} will not use ffmpeg unless gstreamer:1.0 is not available at runtime"
138 - mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0
139 - elif use gstreamer-0 ; then
140 - use ffmpeg && einfo "${PN} will not use ffmpeg unless gstreamer:0.10 is not available at runtime"
141 - mozconfig_annotate '+gstreamer-0' --enable-gstreamer=0.10
142 - else
143 - mozconfig_annotate '' --disable-gstreamer
144 - fi
145 mozconfig_use_enable pulseaudio
146
147 mozconfig_use_enable system-cairo