# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" WX_GTK_VER="2.8" inherit autotools wxwidgets confutils multilib NICE_NAME="ZenLib" DESCRIPTION="${NICE_NAME} claims to be a \"Small C++ derivate class to have a simpler life\"" HOMEPAGE="http://sourceforge.net/projects/zenlib" SRC_URI="mirror://sourceforge/zenlib/${NICE_NAME}%20-%20Sources/${PV}/${PN}_${PV}.tar.bz2" S="${WORKDIR}/${NICE_NAME}/Project/GNU/Library" LICENSE="as-is ZLIB" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" IUSE="debug doc unicode wxwidgets" # needed at run-time RDEPEND="sys-libs/zlib wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )" # only needed at build-time: DEPEND="${RDEPEND} doc? ( app-doc/doxygen )" src_prepare() { eautoreconf } src_configure() { local myconf=" --disable-dependency-tracking \ --enable-shared \ --enable-static \ $(use_enable debug) \ $(use_enable unicode) \ $(use_with wxwidgets) \ $(use_with wxwidgets wx-gui)" econf ${myconf} || die "econf failed" } src_compile() { emake || die "emake failed" sed -i ${PN}-config -e "s:${S}:\${exec_prefix}/lib:" if use doc; then cd "${WORKDIR}"/${NICE_NAME}/Source/Doc doxygen Doxyfile fi } src_install() { cd "${S}" einstall || die "einstall failed" dobin ${PN}-config insinto /usr/$(get_abi_LIBDIR)/pkgconfig doins ${PN}.pc insinto /usr/include/${NICE_NAME} doins "${WORKDIR}"/${NICE_NAME}/Source/${NICE_NAME}/*.h for subinc in Base64 Format/Html Format/Http HTTP_Client; do insinto /usr/include/${NICE_NAME}/${subinc} doins "${WORKDIR}"/${NICE_NAME}/Source/${NICE_NAME}/${subinc}/*.h done dodoc "${WORKDIR}"/${NICE_NAME}/*.txt if use doc; then dohtml "${WORKDIR}"/${NICE_NAME}/Source/Doc/Documentation.html dohtml -r "${WORKDIR}"/${NICE_NAME}/Doc fi }