# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils IUSE="doc debug examples" DESCRIPTION="Netxx is a C++ network programming library. It is designed to take the pain out of programming network communications applications. It does this by providing an easy to use and cross-platform interface. As a side effect, you get the safety of automatic resource management and smaller, simpler code." HOMEPAGE="http://pmade.org/software/netxx/" SRC_URI="http://pmade.org/software/netxx/download/netxx-0.4.2.tar.bz2" LICENSE="BSD-protection" SLOT="0" KEYWORDS="~x86" DEPEND="doc? ( app-doc/doxygen ) doc? ( app-text/docbook-xsl-stylesheets ) dev-util/boost-jam" BUILD_TARGET="release" if use debug; then BUILD_TARGET="debug" fi src_unpack() { unpack ${A} || die } src_compile() { epatch ${FILESDIR}/${PV}-gcc3.4.patch econf || die "./configure failed" jam --${BUILD_TARGET} || die if use doc; then einfo "Running doxygen..." cd ${S}/docs/doxygen doxygen doxyfile >/dev/null 2>&1 einfo "Running xsltproc on xml-files..." cd ${S}/docs/manual xsltproc --xinclude --stringparam base.dir manual/ http://docbook.sourceforge.net/release/xsl/1.66.1/html/chunk.xsl manual.xml fi } src_install() { dodoc INSTALL README docs/CREDITS docs/TODO docs/VERSION dolib ${S}/src/${BUILD_TARGET}/libnetxx.a dodir /usr/include cp -a ${S}/include/netxx ${D}/usr/include/ if use doc; then dohtml -r ${S}/docs/doxygen/html/* cp -av ${S}/docs/manual/manual ${D}/usr/share/doc/${PF}/ fi if use examples; then insinto /usr/share/${P}/examples doins examples/*.cxx examples/Jamfile examples/README examples/config.jam fi }