| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/x11-libs/gdk-pixbuf/gdk-pixbuf-2.26.4.ebuild,v 1.8 2012/10/28 15:30:44 armin76 Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
|
| 7 |
inherit eutils gnome.org multilib libtool
|
| 8 |
|
| 9 |
DESCRIPTION="Image loading library for GTK+"
|
| 10 |
HOMEPAGE="http://www.gtk.org/"
|
| 11 |
|
| 12 |
LICENSE="LGPL-2+"
|
| 13 |
SLOT="2"
|
| 14 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
| 15 |
IUSE="+X debug +introspection jpeg jpeg2k tiff test"
|
| 16 |
|
| 17 |
COMMON_DEPEND="
|
| 18 |
>=dev-libs/glib-2.34.0:2
|
| 19 |
>=media-libs/libpng-1.4:0
|
| 20 |
introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
|
| 21 |
jpeg? ( virtual/jpeg )
|
| 22 |
jpeg2k? ( media-libs/jasper )
|
| 23 |
tiff? ( >=media-libs/tiff-3.9.2:0 )
|
| 24 |
X? ( x11-libs/libX11 )"
|
| 25 |
DEPEND="${COMMON_DEPEND}
|
| 26 |
>=dev-util/gtk-doc-am-1.11
|
| 27 |
>=sys-devel/gettext-0.17
|
| 28 |
virtual/pkgconfig"
|
| 29 |
# librsvg blocker is for the new pixbuf loader API, you lose icons otherwise
|
| 30 |
RDEPEND="${COMMON_DEPEND}
|
| 31 |
!<gnome-base/gail-1000
|
| 32 |
!<gnome-base/librsvg-2.31.0
|
| 33 |
!<x11-libs/gtk+-2.21.3:2
|
| 34 |
!<x11-libs/gtk+-2.90.4:3"
|
| 35 |
|
| 36 |
src_prepare() {
|
| 37 |
# This will avoid polluting the pkg-config file with versioned libpng,
|
| 38 |
# which is causing problems with libpng14 -> libpng15 upgrade
|
| 39 |
# See upstream bug #667068
|
| 40 |
sed -e 's:libpng15:libpng libpng15:' \
|
| 41 |
-i configure || die
|
| 42 |
default
|
| 43 |
elibtoolize # for Darwin modules
|
| 44 |
}
|
| 45 |
|
| 46 |
src_configure() {
|
| 47 |
# png always on to display icons (foser)
|
| 48 |
local myconf="
|
| 49 |
$(use_with jpeg libjpeg)
|
| 50 |
$(use_with jpeg2k libjasper)
|
| 51 |
$(use_with tiff libtiff)
|
| 52 |
$(use_enable introspection)
|
| 53 |
$(use_with X x11)
|
| 54 |
--with-libpng"
|
| 55 |
|
| 56 |
# Passing --disable-debug is not recommended for production use
|
| 57 |
use debug && myconf="${myconf} --enable-debug=yes"
|
| 58 |
|
| 59 |
econf ${myconf}
|
| 60 |
}
|
| 61 |
|
| 62 |
src_install() {
|
| 63 |
default
|
| 64 |
dodoc AUTHORS NEWS* README*
|
| 65 |
|
| 66 |
# New library, remove .la files
|
| 67 |
prune_libtool_files --modules
|
| 68 |
}
|
| 69 |
|
| 70 |
pkg_postinst() {
|
| 71 |
# causes segfault if set, see bug 375615
|
| 72 |
unset __GL_NO_DSO_FINALIZER
|
| 73 |
|
| 74 |
tmp_file=$(mktemp -t tmp_gdk_pixbuf_ebuild.XXXXXXXXXX)
|
| 75 |
# be atomic!
|
| 76 |
gdk-pixbuf-query-loaders > "${tmp_file}"
|
| 77 |
if [ "${?}" = "0" ]; then
|
| 78 |
cat "${tmp_file}" > "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
| 79 |
else
|
| 80 |
ewarn "Cannot update loaders.cache, gdk-pixbuf-query-loaders failed to run"
|
| 81 |
fi
|
| 82 |
rm "${tmp_file}"
|
| 83 |
|
| 84 |
if [ -e "${EROOT}"usr/lib/gtk-2.0/2.*/loaders ]; then
|
| 85 |
elog "You need to rebuild ebuilds that installed into" "${EROOT}"usr/lib/gtk-2.0/2.*/loaders
|
| 86 |
elog "to do that you can use qfile from portage-utils:"
|
| 87 |
elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.*/loaders)"
|
| 88 |
fi
|
| 89 |
}
|