# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PN=OpenThreads DESCRIPTION="Cross-platform, lightweight C++ thread API." SRC_URI="http://www.openscenegraph.org/downloads/dependencies/${MY_PN}-${PV}.zip" HOMEPAGE="http://www.openscenegraph.org/" SLOT="0" LICENSE="LGPL-2.1" KEYWORDS="~x86" IUSE="doc examples" DEPEND="app-arch/unzip doc? ( app-doc/doxygen )" S="${WORKDIR}/${MY_PN}" src_unpack() { unpack ${A} cd "${S}" # Fix obsolete use of head -1 sed -i 's/head -1/head -n 1/' Make/instrules sed -i 's/*.h$/*/' docs/doxyfile \ || die "sed (doxyfile) failed" sed -i "s:OPTF.*=.*:OPTF=\"${CXXFLAGS}\":" Make/makedefs \ || die "sed (CXXFLAGS) failed" } src_compile() { emake || die "emake failed" if use doc ; then cd docs doxygen -u doxyfile doxygen doxyfile fi } src_install() { make install INST_LOCATION="${D}"/usr || die "make install failed" use doc && dohtml docs/html/* if use examples ; then insinto ${ROOT}/usr/share/doc/${PF}/examples doins -r examples_src/* fi insinto ${ROOT}/usr/$(get_libdir)/pkgconfig doins ${S}/Make/${PN}.pc dodoc AUTHORS.txt ChangeLog README.txt }