# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit autotools multilib DESCRIPTION="Easy-to-use image and video I/O functions" HOMEPAGE="http://code.google.com/p/iulib/" SRC_URI="http://iulib.googlecode.com/files/${P}.tgz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="sdl" RDEPEND="sys-libs/zlib media-libs/libpng media-libs/jpeg media-libs/tiff sdl? ( media-libs/libsdl media-libs/sdl-gfx )" src_prepare() { # fix missing -I CPPFLAGS epatch "${FILESDIR}"/${P}-cppflags-includes.diff # build shared library epatch "${FILESDIR}"/${P}-build-shared.diff python genAM.py > Makefile.am || die 'genAM.py failed.' eautoreconf } src_configure() { econf $(use_with sdl SDL) } src_install() { emake DESTDIR="${D}" install-am || die 'emake install failed.' dodoc CHANGES README TODO || die 'dodoc failed.' # .la file was needed only to compile shared lib, strip it now rm "${D}"/usr/$(get_libdir)/libiulib.la || die 'rm failed.' }