1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 GNOME_TARBALL_SUFFIX="gz"
9 inherit autotools eutils gnome2 libtool flag-o-matic portability multilib-minimal
11 DESCRIPTION="The GLib library of C routines"
12 HOMEPAGE="http://www.gtk.org/"
14 mirror://gentoo/glib-1.2.10-r1-as-needed.patch.bz2
19 KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
20 IUSE="hardened static-libs"
25 MULTILIB_CHOST_TOOLS=(/usr/bin/glib-config)
28 epatch "${FILESDIR}"/${P}-automake.patch
29 epatch "${FILESDIR}"/${P}-m4.patch
30 epatch "${FILESDIR}"/${P}-configure-LANG.patch #133679
32 # Allow glib to build with gcc-3.4.x #47047
33 epatch "${FILESDIR}"/${P}-gcc34-fix.patch
35 # Fix for -Wl,--as-needed (bug #133818)
36 epatch "${DISTDIR}"/glib-1.2.10-r1-as-needed.patch.bz2
38 # build failure with automake-1.13
39 epatch "${FILESDIR}/${P}-automake-1.13.patch"
41 use ppc64 && use hardened && replace-flags -O[2-3] -O1
42 sed -i "/libglib_la_LDFLAGS/i libglib_la_LIBADD = $(dlopen_lib)" Makefile.am || die
44 rm -f acinclude.m4 #168198
46 mv configure.in configure.ac || die
53 multilib_src_configure() {
54 # Bug 48839: pam fails to build on ia64
55 # The problem is that it attempts to link a shared object against
56 # libglib.a; this library needs to be built with -fPIC. Since
57 # this package doesn't contain any significant binaries, build the
58 # whole thing with -fPIC (23 Apr 2004 agriffis)
62 gnome2_src_configure \
63 --with-threads=posix \
65 $(use_enable static-libs static)
68 multilib_src_install() {
71 chmod 755 "${ED}"/usr/$(get_libdir)/libgmodule-1.2.so.* || die
74 multilib_src_install_all() {