Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-dev:musl commit in: dev-libs/glib/
Date: Fri, 24 Jan 2014 17:57:02
Message-Id: 1390586217.7a9f788888d645b7c536d3a1b3970e31ca3b7969.blueness@gentoo
1 commit: 7a9f788888d645b7c536d3a1b3970e31ca3b7969
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 24 17:56:57 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 24 17:56:57 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=7a9f7888
7
8 dev-libs/glib: move portage.env CPPFLAGS to the ebuild
9
10 Package-Manager: portage-2.2.7
11 Manifest-Sign-Key: 0xF52D4BBA
12
13 ---
14 dev-libs/glib/glib-2.32.4-r99.ebuild | 238 -----------------------------------
15 dev-libs/glib/glib-2.36.4-r99.ebuild | 1 +
16 2 files changed, 1 insertion(+), 238 deletions(-)
17
18 diff --git a/dev-libs/glib/glib-2.32.4-r99.ebuild b/dev-libs/glib/glib-2.32.4-r99.ebuild
19 deleted file mode 100644
20 index 8e4bb81..0000000
21 --- a/dev-libs/glib/glib-2.32.4-r99.ebuild
22 +++ /dev/null
23 @@ -1,238 +0,0 @@
24 -# Copyright 1999-2013 Gentoo Foundation
25 -# Distributed under the terms of the GNU General Public License v2
26 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.32.4-r1.ebuild,v 1.13 2013/04/30 14:29:12 tetromino Exp $
27 -
28 -EAPI="4"
29 -PYTHON_DEPEND="utils? 2" # Avoid runtime dependency on python when USE=test
30 -
31 -inherit autotools gnome.org libtool eutils flag-o-matic gnome2-utils multilib pax-utils python toolchain-funcs virtualx linux-info
32 -
33 -DESCRIPTION="The GLib library of C routines"
34 -HOMEPAGE="http://www.gtk.org/"
35 -SRC_URI="${SRC_URI}
36 - http://dev.gentoo.org/~tetromino/distfiles/glib/${P}-AS_IF-patches.tar.xz
37 - http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf
38 -
39 -LICENSE="LGPL-2+"
40 -SLOT="2"
41 -IUSE="debug fam kernel_linux selinux static-libs systemtap test utils xattr"
42 -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
43 -
44 -RDEPEND="virtual/libiconv
45 - virtual/libffi
46 - sys-libs/zlib
47 - || (
48 - >=dev-libs/elfutils-0.142
49 - >=dev-libs/libelf-0.8.12 )
50 - xattr? ( sys-apps/attr )
51 - fam? ( virtual/fam )
52 - utils? ( >=dev-util/gdbus-codegen-${PV} )"
53 -DEPEND="${RDEPEND}
54 - >=sys-devel/gettext-0.11
55 - >=dev-util/gtk-doc-am-1.15
56 - systemtap? ( >=dev-util/systemtap-1.3 )
57 - test? (
58 - sys-devel/gdb
59 - =dev-lang/python-2*
60 - >=dev-util/gdbus-codegen-${PV}
61 - >=sys-apps/dbus-1.2.14 )
62 - !<dev-util/gtk-doc-1.15-r2"
63 -PDEPEND="x11-misc/shared-mime-info
64 - !<gnome-base/gvfs-1.6.4-r990"
65 -# shared-mime-info needed for gio/xdgmime, bug #409481
66 -# Earlier versions of gvfs do not work with glib
67 -
68 -pkg_setup() {
69 - # Needed for gio/tests/gdbus-testserver.py
70 - if use test ; then
71 - python_set_active_version 2
72 - python_pkg_setup
73 - fi
74 -
75 - if use kernel_linux ; then
76 - CONFIG_CHECK="~INOTIFY_USER"
77 - linux-info_pkg_setup
78 - fi
79 -}
80 -
81 -src_prepare() {
82 - epatch "${FILESDIR}"/${P}-CVE-2012-3524.patch
83 -
84 - mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
85 -
86 - # Fix gmodule issues on fbsd; bug #184301
87 - epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
88 -
89 - if ! use test; then
90 - # don't waste time building tests
91 - sed 's/^\(.*\SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i $(find . -name Makefile.am -o -name Makefile.in) || die
92 - else
93 - # Do not try to remove files on live filesystem, upstream bug #619274
94 - sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
95 - -i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
96 -
97 - # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
98 - if ! has_version dev-util/desktop-file-utils ; then
99 - ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
100 - ewarn "think on installing it to get these tests run."
101 - sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
102 - sed -i -e "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
103 - sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
104 - sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
105 - fi
106 -
107 - # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
108 - if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:2' ; then
109 - ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:2"
110 - ewarn "not being present on your system, think on installing them to get these tests run."
111 - sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
112 - sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
113 - sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
114 - sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
115 - sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
116 - sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
117 - sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
118 - # needed to prevent gdbus-threading from asserting
119 - ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
120 - fi
121 - fi
122 -
123 - # gdbus-codegen is a separate package
124 - epatch "${FILESDIR}/${PN}-2.31.x-external-gdbus-codegen.patch"
125 -
126 - # bashcomp goes in /usr/share/bash-completion
127 - epatch "${FILESDIR}/${PN}-2.32.4-bashcomp.patch"
128 -
129 - # AS_IF fixes from 2.33.x, needed for cross-compiling, bug #434770
130 - epatch ../AS_IF-patches/*.patch
131 -
132 - # https://bugzilla.gnome.org/show_bug.cgi?id=679306
133 - epatch "${FILESDIR}/${PN}-2.34.0-testsuite-skip-thread4.patch"
134 -
135 - # build failure with automake-1.13; fixed upstream in 2.36
136 - epatch "${FILESDIR}/${PN}-2.34.3-automake-1.13.patch"
137 -
138 - # We need fcntl.h on musl for loff_t
139 - epatch "${FILESDIR}/glib-2.32.4-always-include-fcntl.h-patch"
140 -
141 - epatch_user
142 -
143 - # disable pyc compiling
144 - use test && python_clean_py-compile_files
145 -
146 - # Needed for the punt-python-check patch, disabling timeout test
147 - # Also needed to prevent croscompile failures, see bug #267603
148 - # Also needed for the no-gdbus-codegen patch
149 - AT_M4DIR="${WORKDIR}" eautoreconf
150 -
151 - [[ ${CHOST} == *-freebsd* ]] && elibtoolize
152 -
153 - epunt_cxx
154 -}
155 -
156 -src_configure() {
157 - # Avoid circular depend with dev-util/pkgconfig and
158 - # native builds (cross-compiles won't need pkg-config
159 - # in the target ROOT to work here)
160 - if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
161 - if has_version sys-apps/dbus; then
162 - export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
163 - export DBUS1_LIBS="-ldbus-1"
164 - fi
165 - export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
166 - export LIBFFI_LIBS="-lffi"
167 - fi
168 -
169 - local myconf
170 -
171 - # Building with --disable-debug highly unrecommended. It will build glib in
172 - # an unusable form as it disables some commonly used API. Please do not
173 - # convert this to the use_enable form, as it results in a broken build.
174 - # -- compnerd (3/27/06)
175 - use debug && myconf="--enable-debug"
176 -
177 - # Always use internal libpcre, bug #254659
178 - econf ${myconf} \
179 - $(use_enable xattr) \
180 - $(use_enable fam) \
181 - $(use_enable selinux) \
182 - $(use_enable static-libs static) \
183 - $(use_enable systemtap dtrace) \
184 - $(use_enable systemtap systemtap) \
185 - --with-pcre=internal \
186 - --with-threads=posix
187 -}
188 -
189 -src_install() {
190 - local f
191 -
192 - # install-exec-hook substitutes ${PYTHON} in glib/gtester-report
193 - emake DESTDIR="${D}" PYTHON="${EPREFIX}/usr/bin/python2" install
194 -
195 - if ! use utils; then
196 - rm "${ED}usr/bin/gtester-report"
197 - fi
198 -
199 - # Do not install charset.alias even if generated, leave it to libiconv
200 - rm -f "${ED}/usr/lib/charset.alias"
201 -
202 - # Don't install gdb python macros, bug 291328
203 - rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
204 -
205 - dodoc AUTHORS ChangeLog* NEWS* README
206 -
207 - # Completely useless with or without USE static-libs, people need to use
208 - # pkg-config
209 - find "${D}" -name '*.la' -exec rm -f {} +
210 -}
211 -
212 -src_test() {
213 - gnome2_environment_reset
214 -
215 - unset DBUS_SESSION_BUS_ADDRESS
216 - export XDG_CONFIG_DIRS=/etc/xdg
217 - export XDG_DATA_DIRS=/usr/local/share:/usr/share
218 - export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
219 - unset GSETTINGS_BACKEND # bug 352451
220 - export LC_TIME=C # bug #411967
221 -
222 - # Related test is a bit nitpicking
223 - mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
224 - chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
225 -
226 - # Hardened: gdb needs this, bug #338891
227 - if host-is-pax ; then
228 - pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
229 - || die "Hardened adjustment failed"
230 - fi
231 -
232 - # Need X for dbus-launch session X11 initialization
233 - Xemake check
234 -}
235 -
236 -pkg_preinst() {
237 - # Only give the introspection message if:
238 - # * The user has gobject-introspection
239 - # * Has glib already installed
240 - # * Previous version was different from new version
241 - if has_version "dev-libs/gobject-introspection" && ! has_version "=${CATEGORY}/${PF}"; then
242 - ewarn "You must rebuild gobject-introspection so that the installed"
243 - ewarn "typelibs and girs are regenerated for the new APIs in glib"
244 - fi
245 -}
246 -
247 -pkg_postinst() {
248 - # Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
249 - if has_version dev-libs/dbus-glib; then
250 - ewarn "If you experience a breakage after updating dev-libs/glib try"
251 - ewarn "rebuilding dev-libs/dbus-glib"
252 - fi
253 -
254 - if has_version '<x11-libs/gtk+-3.0.12:3'; then
255 - # To have a clear upgrade path for gtk+-3.0.x users, have to resort to
256 - # a warning instead of a blocker
257 - ewarn
258 - ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes."
259 - ewarn "You should upgrade to a newer version of gtk+:3 immediately."
260 - fi
261 -}
262
263 diff --git a/dev-libs/glib/glib-2.36.4-r99.ebuild b/dev-libs/glib/glib-2.36.4-r99.ebuild
264 index d28f1e8..94d1920 100644
265 --- a/dev-libs/glib/glib-2.36.4-r99.ebuild
266 +++ b/dev-libs/glib/glib-2.36.4-r99.ebuild
267 @@ -152,6 +152,7 @@ src_prepare() {
268
269 # Support compilation in clang until upstream solves this, upstream bug #691608
270 append-flags -Wno-format-nonliteral
271 + append-cppflags -D_GNU_SOURCE
272
273 epatch_user