Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/
Date: Sun, 28 Jul 2019 20:22:55
Message-Id: 1564345357.50dab61f330019e9173d8f24c424de5e12451831.leio@gentoo
1 commit: 50dab61f330019e9173d8f24c424de5e12451831
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 28 20:21:39 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 28 20:22:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50dab61f
7
8 dev-libs/glib: security cleanup
9
10 Bug: https://bugs.gentoo.org/690498
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
13
14 dev-libs/glib/glib-2.58.3.ebuild | 310 ---------------------------------------
15 1 file changed, 310 deletions(-)
16
17 diff --git a/dev-libs/glib/glib-2.58.3.ebuild b/dev-libs/glib/glib-2.58.3.ebuild
18 deleted file mode 100644
19 index c06063efcc3..00000000000
20 --- a/dev-libs/glib/glib-2.58.3.ebuild
21 +++ /dev/null
22 @@ -1,310 +0,0 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -EAPI=6
27 -PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
28 -GNOME2_EAUTORECONF=yes
29 -
30 -inherit autotools bash-completion-r1 epunt-cxx flag-o-matic gnome2 libtool linux-info \
31 - multilib multilib-minimal pax-utils python-any-r1 toolchain-funcs virtualx
32 -
33 -# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
34 -# adding new dependencies end up making stage3 to grow. Every addition needs
35 -# then to be think very closely.
36 -
37 -DESCRIPTION="The GLib library of C routines"
38 -HOMEPAGE="https://www.gtk.org/"
39 -SRC_URI="${SRC_URI}
40 - https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
41 -
42 -LICENSE="LGPL-2.1+"
43 -SLOT="2"
44 -IUSE="dbus debug fam gtk-doc kernel_linux +mime selinux static-libs systemtap test utils xattr"
45 -
46 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
47 -
48 -# Added util-linux multilib dependency to have libmount support (which
49 -# is always turned on on linux systems, unless explicitly disabled, but
50 -# this ebuild does not do that anyway) (bug #599586)
51 -
52 -RDEPEND="
53 - !<dev-util/gdbus-codegen-${PV}
54 - >=dev-libs/libpcre-8.31:3[${MULTILIB_USEDEP},static-libs?]
55 - >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
56 - >=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
57 - >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
58 - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
59 - kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
60 - selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
61 - xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
62 - fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
63 - utils? (
64 - >=dev-util/gdbus-codegen-${PV}
65 - virtual/libelf:0=
66 - )
67 -"
68 -DEPEND="${RDEPEND}
69 - app-text/docbook-xml-dtd:4.1.2
70 - app-text/docbook-xsl-stylesheets
71 - >=dev-libs/libxslt-1.0
72 - >=sys-devel/gettext-0.11
73 - gtk-doc? ( >=dev-util/gtk-doc-1.20 )
74 - systemtap? ( >=dev-util/systemtap-1.3 )
75 - ${PYTHON_DEPS}
76 - test? (
77 - sys-devel/gdb
78 - >=dev-util/gdbus-codegen-${PV}
79 - >=sys-apps/dbus-1.2.14 )
80 -"
81 -# configure.ac has gtk-doc-am stuff behind m4_ifdef, so we don't need a gtk-doc-am build dep
82 -
83 -# Migration of glib-genmarshal, glib-mkenums and gtester-report to a separate
84 -# python depending package, which can be buildtime depended in packages that
85 -# need these tools, without pulling in python at runtime.
86 -RDEPEND="${RDEPEND}
87 - >=dev-util/glib-utils-${PV}"
88 -PDEPEND="
89 - dbus? ( gnome-base/dconf )
90 - mime? ( x11-misc/shared-mime-info )
91 -"
92 -# shared-mime-info needed for gio/xdgmime, bug #409481
93 -# dconf is needed to be able to save settings, bug #498436
94 -
95 -MULTILIB_CHOST_TOOLS=(
96 - /usr/bin/gio-querymodules$(get_exeext)
97 -)
98 -
99 -pkg_setup() {
100 - if use kernel_linux ; then
101 - CONFIG_CHECK="~INOTIFY_USER"
102 - if use test ; then
103 - CONFIG_CHECK="~IPV6"
104 - WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
105 - fi
106 - linux-info_pkg_setup
107 - fi
108 - python-any-r1_pkg_setup
109 -}
110 -
111 -src_prepare() {
112 - # Prevent build failure in stage3 where pkgconfig is not available, bug #481056
113 - mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die
114 -
115 - if use test; then
116 - # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
117 - if ! has_version dev-util/desktop-file-utils ; then
118 - ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
119 - ewarn "think on installing it to get these tests run."
120 - sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
121 - sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
122 - fi
123 -
124 - # gdesktopappinfo requires existing terminal (gnome-terminal or any
125 - # other), falling back to xterm if one doesn't exist
126 - #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
127 - # ewarn "Some tests will be skipped due to missing terminal program"
128 - # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
129 - # Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready for backport (or in a bump) and file new issue if still fails
130 - sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
131 - # desktop-app-info/launch* might fail similarly
132 - sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
133 - #fi
134 -
135 - # https://bugzilla.gnome.org/show_bug.cgi?id=722604
136 - sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
137 - sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
138 -
139 - ewarn "Tests for search-utils have been skipped"
140 - sed -i -e "/search-utils/d" glib/tests/Makefile.am || die
141 - else
142 - # Don't build tests, also prevents extra deps, bug #512022
143 - sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
144 - fi
145 -
146 - # gdbus-codegen is a separate package
147 - eapply "${FILESDIR}"/${PN}-2.58.2-external-gdbus-codegen.patch
148 -
149 - # Tarball doesn't come with gtk-doc.make and we can't unconditionally depend on dev-util/gtk-doc due
150 - # to circular deps during bootstramp. If actually not building gtk-doc, an almost empty file will do
151 - # fine as well - this is also what upstream autogen.sh does if gtkdocize is not found. If gtk-doc is
152 - # installed, eautoreconf will call gtkdocize, which overwrites the empty gtk-doc.make with a full copy.
153 - cat > gtk-doc.make << EOF
154 -EXTRA_DIST =
155 -CLEANFILES =
156 -EOF
157 -
158 - gnome2_src_prepare
159 - epunt_cxx
160 -}
161 -
162 -multilib_src_configure() {
163 - # Avoid circular depend with dev-util/pkgconfig and
164 - # native builds (cross-compiles won't need pkg-config
165 - # in the target ROOT to work here)
166 - if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
167 - if has_version sys-apps/dbus; then
168 - export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
169 - export DBUS1_LIBS="-ldbus-1"
170 - fi
171 - export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
172 - export LIBFFI_LIBS="-lffi"
173 - export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
174 - export PCRE_LIBS="-lpcre"
175 - fi
176 -
177 - # These configure tests don't work when cross-compiling.
178 - if tc-is-cross-compiler ; then
179 - # https://bugzilla.gnome.org/show_bug.cgi?id=756473
180 - case ${CHOST} in
181 - hppa*|metag*) export glib_cv_stack_grows=yes ;;
182 - *) export glib_cv_stack_grows=no ;;
183 - esac
184 - # https://bugzilla.gnome.org/show_bug.cgi?id=756474
185 - export glib_cv_uscore=no
186 - # https://bugzilla.gnome.org/show_bug.cgi?id=756475
187 - export ac_cv_func_posix_get{pwuid,grgid}_r=yes
188 - fi
189 -
190 - local myconf
191 -
192 - case "${CHOST}" in
193 - *-mingw*) myconf="${myconf} --with-threads=win32" ;;
194 - *) myconf="${myconf} --with-threads=posix" ;;
195 - esac
196 -
197 - # libelf used only by the gresource bin
198 - ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
199 - $(usex debug --enable-debug=yes ' ') \
200 - $(use_enable xattr) \
201 - $(use_enable fam) \
202 - $(multilib_native_use_enable gtk-doc) \
203 - $(use_enable kernel_linux libmount) \
204 - $(use_enable selinux) \
205 - $(use_enable static-libs static) \
206 - $(use_enable systemtap dtrace) \
207 - $(use_enable systemtap systemtap) \
208 - $(multilib_native_use_enable utils libelf) \
209 - --with-python=${EPYTHON} \
210 - --disable-compile-warnings \
211 - --enable-man \
212 - --with-pcre=system \
213 - --with-xml-catalog="${EPREFIX}/etc/xml/catalog"
214 -
215 - if multilib_is_native_abi; then
216 - local d
217 - for d in glib gio gobject; do
218 - ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
219 - done
220 - fi
221 -}
222 -
223 -multilib_src_test() {
224 - export XDG_CONFIG_DIRS=/etc/xdg
225 - export XDG_DATA_DIRS=/usr/local/share:/usr/share
226 - export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
227 - export LC_TIME=C # bug #411967
228 - unset GSETTINGS_BACKEND # bug #596380
229 - python_setup
230 -
231 - # Related test is a bit nitpicking
232 - mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
233 - chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
234 -
235 - # Hardened: gdb needs this, bug #338891
236 - if host-is-pax ; then
237 - pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
238 - || die "Hardened adjustment failed"
239 - fi
240 -
241 - # Need X for dbus-launch session X11 initialization
242 - virtx emake check
243 -}
244 -
245 -multilib_src_install() {
246 - emake DESTDIR="${D}" completiondir="$(get_bashcompdir)" install
247 - keepdir /usr/$(get_libdir)/gio/modules
248 -}
249 -
250 -multilib_src_install_all() {
251 - einstalldocs
252 -
253 - # These are installed by dev-util/glib-utils
254 - # TODO: With patching we might be able to get rid of the python-any deps and removals, and test depend on glib-utils instead; revisit with meson
255 - rm "${ED}usr/bin/glib-genmarshal" || die
256 - rm "${ED}usr/share/man/man1/glib-genmarshal.1" || die
257 - rm "${ED}usr/bin/glib-mkenums" || die
258 - rm "${ED}usr/share/man/man1/glib-mkenums.1" || die
259 - rm "${ED}usr/bin/gtester-report" || die
260 - rm "${ED}usr/share/man/man1/gtester-report.1" || die
261 -
262 - # Do not install charset.alias even if generated, leave it to libiconv
263 - rm -f "${ED}/usr/$(get_libdir)/charset.alias"
264 -
265 - # Don't install gdb python macros, bug 291328
266 - rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
267 -
268 - # Completely useless with or without USE static-libs, people need to use pkg-config
269 - find "${ED}" -name '*.la' -delete || die
270 -}
271 -
272 -pkg_preinst() {
273 - gnome2_pkg_preinst
274 -
275 - # Make gschemas.compiled belong to glib alone
276 - local cache="usr/share/glib-2.0/schemas/gschemas.compiled"
277 -
278 - if [[ -e ${EROOT}${cache} ]]; then
279 - cp "${EROOT}"${cache} "${ED}"/${cache} || die
280 - else
281 - touch "${ED}"/${cache} || die
282 - fi
283 -
284 - multilib_pkg_preinst() {
285 - # Make giomodule.cache belong to glib alone
286 - local cache="usr/$(get_libdir)/gio/modules/giomodule.cache"
287 -
288 - if [[ -e ${EROOT}${cache} ]]; then
289 - cp "${EROOT}"${cache} "${ED}"/${cache} || die
290 - else
291 - touch "${ED}"/${cache} || die
292 - fi
293 - }
294 -
295 - # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
296 - # file due to inability to create it and GIO might not look at any of the modules there
297 - if ! tc-is-cross-compiler ; then
298 - multilib_foreach_abi multilib_pkg_preinst
299 - fi
300 -}
301 -
302 -pkg_postinst() {
303 - # force (re)generation of gschemas.compiled
304 - GNOME2_ECLASS_GLIB_SCHEMAS="force"
305 -
306 - gnome2_pkg_postinst
307 -
308 - multilib_pkg_postinst() {
309 - gnome2_giomodule_cache_update \
310 - || die "Update GIO modules cache failed (for ${ABI})"
311 - }
312 - if ! tc-is-cross-compiler ; then
313 - multilib_foreach_abi multilib_pkg_postinst
314 - else
315 - ewarn "Updating of GIO modules cache skipped due to cross-compilation."
316 - ewarn "You might want to run gio-querymodules manually on the target for"
317 - ewarn "your final image for performance reasons and re-run it when packages"
318 - ewarn "installing GIO modules get upgraded or added to the image."
319 - fi
320 -}
321 -
322 -pkg_postrm() {
323 - gnome2_pkg_postrm
324 -
325 - if [[ -z ${REPLACED_BY_VERSION} ]]; then
326 - multilib_pkg_postrm() {
327 - rm -f "${EROOT}"usr/$(get_libdir)/gio/modules/giomodule.cache
328 - }
329 - multilib_foreach_abi multilib_pkg_postrm
330 - rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled
331 - fi
332 -}