| 1 |
# Copyright 1999-2011 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-gfx/nip2/nip2-7.24.2.ebuild,v 1.4 2011/09/14 09:01:32 pva Exp $ |
| 4 |
|
| 5 |
EAPI=2 |
| 6 |
inherit eutils autotools fdo-mime gnome2-utils versionator |
| 7 |
|
| 8 |
MY_MAJ_VER=$(get_version_component_range 1-2) |
| 9 |
DESCRIPTION="VIPS Image Processing Graphical User Interface" |
| 10 |
SRC_URI="http://www.vips.ecs.soton.ac.uk/supported/${MY_MAJ_VER}/${P}.tar.gz" |
| 11 |
HOMEPAGE="http://vips.sourceforge.net" |
| 12 |
|
| 13 |
LICENSE="GPL-2" |
| 14 |
SLOT="0" |
| 15 |
KEYWORDS="amd64 x86" |
| 16 |
IUSE="fftw goffice gsl test" |
| 17 |
|
| 18 |
RDEPEND=">=dev-libs/glib-2.14:2 |
| 19 |
dev-libs/libxml2 |
| 20 |
x11-misc/xdg-utils |
| 21 |
>=media-libs/vips-${MY_MAJ_VER} |
| 22 |
>=x11-libs/gtk+-2.18:2 |
| 23 |
goffice? ( x11-libs/goffice:0.8 ) |
| 24 |
gsl? ( sci-libs/gsl ) |
| 25 |
fftw? ( sci-libs/fftw:3.0 )" |
| 26 |
DEPEND="${RDEPEND} |
| 27 |
sys-devel/bison |
| 28 |
sys-devel/flex |
| 29 |
test? ( media-libs/vips[jpeg,lcms,tiff] )" |
| 30 |
|
| 31 |
src_prepare() { |
| 32 |
epatch "${FILESDIR}"/${PN}-7.16.4-fftw3-build.patch |
| 33 |
eautoreconf |
| 34 |
} |
| 35 |
|
| 36 |
src_configure() { |
| 37 |
econf \ |
| 38 |
--disable-update-desktop \ |
| 39 |
$(use_with goffice libgoffice) \ |
| 40 |
$(use_with gsl) \ |
| 41 |
$(use_with fftw fftw3) |
| 42 |
} |
| 43 |
|
| 44 |
src_test() { |
| 45 |
if ! use gsl; then |
| 46 |
ewarn "Some tests require USE=gsl. Disabling test_math.ws tests." |
| 47 |
rm test/workspaces/test_math.ws |
| 48 |
fi |
| 49 |
make check || die |
| 50 |
} |
| 51 |
|
| 52 |
src_install() { |
| 53 |
emake DESTDIR="${D}" install || die |
| 54 |
dodoc AUTHORS ChangeLog NEWS README* || die |
| 55 |
insinto /usr/share/icons/hicolor/128x128/apps |
| 56 |
newins share/nip2/data/vips-128.png nip2.png || die |
| 57 |
|
| 58 |
mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF} || die |
| 59 |
rmdir "${D}"/usr/share/doc/${PN}/ || die |
| 60 |
dosym /usr/share/doc/${PF}/html /usr/share/doc/${PN}/ |
| 61 |
} |
| 62 |
|
| 63 |
pkg_preinst() { |
| 64 |
gnome2_icon_savelist |
| 65 |
} |
| 66 |
|
| 67 |
pkg_postinst() { |
| 68 |
fdo-mime_desktop_database_update |
| 69 |
fdo-mime_mime_database_update |
| 70 |
gnome2_icon_cache_update |
| 71 |
} |
| 72 |
|
| 73 |
pkg_postrm() { |
| 74 |
fdo-mime_desktop_database_update |
| 75 |
fdo-mime_mime_database_update |
| 76 |
gnome2_icon_cache_update |
| 77 |
} |