# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" PYTHON_DEPEND="python? 2" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.*" inherit distutils eutils toolchain-funcs DESCRIPTION="UPnP client library and a simple UPnP client" SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz" HOMEPAGE="http://miniupnp.free.fr/" LICENSE="BSD" KEYWORDS="~amd64 ~x86" SLOT="0" IUSE="python static-libs" src_prepare() { use python && distutils_src_prepare sed \ -e 's/^CFLAGS ?= -O -Wall /CFLAGS += /' \ -e "/INSTALLDIRLIB = \$(INSTALLPREFIX)/s#/lib#/$(get_libdir)#" \ -i Makefile if use !static-libs; then sed \ -e '/FILESTOINSTALL =/s/ $(LIBRARY)//' \ -e '/$(INSTALL) -m 644 $(LIBRARY) $(INSTALLDIRLIB)/d' \ -i Makefile fi } src_compile() { emake CC=$(tc-getCC) || die use python && distutils_src_compile } src_install() { emake PREFIX="${D}" install || die dodoc README Changelog.txt || die doman man3/* || die use python && distutils_src_install }