diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2009-03-06 05:18:15 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2009-03-06 05:18:15 +0000 |
commit | 759fcc30304357ef4a46b65a29b81bb2c70ff3c1 (patch) | |
tree | fe5ac54ab671036c0db62f9a2b1d3ef3e77b6554 /media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild | |
parent | Added ~mips to KEYWORDS (diff) | |
download | gentoo-2-759fcc30304357ef4a46b65a29b81bb2c70ff3c1.tar.gz gentoo-2-759fcc30304357ef4a46b65a29b81bb2c70ff3c1.tar.bz2 gentoo-2-759fcc30304357ef4a46b65a29b81bb2c70ff3c1.zip |
(non maintainer commit) don't run gdk-pixbuf-query-loaders if USE=-gtk because it is not guarenteed to be on the system
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild')
-rw-r--r-- | media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild b/media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild new file mode 100644 index 000000000000..35e6af9193b7 --- /dev/null +++ b/media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libwmf/libwmf-0.2.8.4-r2.ebuild,v 1.1 2009/03/06 05:18:15 darkside Exp $ + +inherit eutils autotools + +#The configure script finds the 5.50 ghostscript Fontmap file while run. +#This will probably work, especially since the real one (6.50) in this case +#is empty. However beware in case there is any trouble + +DESCRIPTION="library for converting WMF files" +HOMEPAGE="http://wvware.sourceforge.net/" +SRC_URI="mirror://sourceforge/wvware/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="X expat xml debug doc gtk gd" + +RDEPEND="virtual/ghostscript + xml? ( !expat? ( dev-libs/libxml2 ) ) + expat? ( dev-libs/expat ) + gd? ( media-libs/gd ) + >=media-libs/freetype-2.0.1 + sys-libs/zlib + media-libs/libpng + media-libs/jpeg + X? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + ) + gtk? ( >=x11-libs/gtk+-2.1.2 ) " +DEPEND="${RDEPEND} + dev-util/pkgconfig + X? ( + x11-libs/libXt + x11-libs/libXpm + )" +# plotutils are not really supported yet, so looks like that's it + +src_unpack() { + unpack ${A} + cd "${S}" + if ! use doc ; then + sed -e 's:doc::' -i Makefile.am + fi + if ! use gtk ; then + sed -e 's:@LIBWMF_GDK_PIXBUF_TRUE@:#:' -i src/Makefile.in + fi + epatch "${FILESDIR}"/${P}-intoverflow.patch + epatch "${FILESDIR}"/${P}-build.patch + + eautoreconf +} + +src_compile() { + if use expat && use xml ; then + elog "You can specify only one USE flag from expat and xml, to use expat" + elog "or libxml2, respectively." + elog + elog "You have both flags enabled, we will default to expat (like autocheck does)." + myconf="${myconf} --with-expat --without-libxml2" + else + myconf="${myconf} $(use_with expat) $(use_with xml libxml2)" + fi + + econf \ + $(use_enable debug) \ + $(use_with X x) \ + $(use_enable gd) \ + --with-sys-gd \ + ${myconf} \ + --with-gsfontdir=/usr/share/ghostscript/fonts \ + --with-fontdir=/usr/share/libwmf/fonts/ \ + --with-docdir=/usr/share/doc/${PF} \ + || die "./configure failed" + + emake || die +} + +src_install() { + make install DESTDIR="${D}" || die + dodoc README AUTHORS CREDITS ChangeLog NEWS TODO +} + +set_gtk_confdir() { + # An arch specific config directory is used on multilib systems + has_multilib_profile && GTK2_CONFDIR="${ROOT}etc/gtk-2.0/${CHOST}" + GTK2_CONFDIR="${GTK2_CONFDIR:-/etc/gtk-2.0}" +} + +pkg_postinst() { + if use gtk; then + set_gtk_confdir + gdk-pixbuf-query-loaders > "${GTK2_CONFDIR}/gdk-pixbuf.loaders" + fi +} + +pkg_postrm() { + if use gtk; then + set_gtk_confdir + gdk-pixbuf-query-loaders > "${GTK2_CONFDIR}/gdk-pixbuf.loaders" + fi +} |