dev-libs/glib: Stable for HPPA (bug #565086).
[gentoo.git] / dev-libs / glib / glib-1.2.10-r6.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 GNOME_TARBALL_SUFFIX="gz"
7 GNOME2_LA_PUNT="yes"
8
9 inherit autotools eutils gnome2 libtool flag-o-matic portability multilib-minimal
10
11 DESCRIPTION="The GLib library of C routines"
12 HOMEPAGE="http://www.gtk.org/"
13 SRC_URI="${SRC_URI}
14          mirror://gentoo/glib-1.2.10-r1-as-needed.patch.bz2
15 "
16
17 LICENSE="LGPL-2.1+"
18 SLOT="1"
19 KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
20 IUSE="hardened static-libs"
21
22 DEPEND=""
23 RDEPEND=""
24
25 MULTILIB_CHOST_TOOLS=(/usr/bin/glib-config)
26
27 src_prepare() {
28         epatch "${FILESDIR}"/${P}-automake.patch
29         epatch "${FILESDIR}"/${P}-m4.patch
30         epatch "${FILESDIR}"/${P}-configure-LANG.patch #133679
31
32         # Allow glib to build with gcc-3.4.x #47047
33         epatch "${FILESDIR}"/${P}-gcc34-fix.patch
34
35         # Fix for -Wl,--as-needed (bug #133818)
36         epatch "${DISTDIR}"/glib-1.2.10-r1-as-needed.patch.bz2
37
38         # build failure with automake-1.13
39         epatch "${FILESDIR}/${P}-automake-1.13.patch"
40
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
43
44         rm -f acinclude.m4 #168198
45
46         mv configure.in configure.ac || die
47
48         eautoreconf
49         elibtoolize
50         gnome2_src_prepare
51 }
52
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)
59         append-flags -fPIC
60
61         ECONF_SOURCE="${S}" \
62         gnome2_src_configure \
63                 --with-threads=posix \
64                 --enable-debug=yes \
65                 $(use_enable static-libs static)
66 }
67
68 multilib_src_install() {
69         gnome2_src_install
70
71         chmod 755 "${ED}"/usr/$(get_libdir)/libgmodule-1.2.so.* || die
72 }
73
74 multilib_src_install_all() {
75         einstalldocs
76         dohtml -r docs
77 }