# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ S=${WORKDIR}/${PV} DESCRIPTION="The CLHEP project is intended to be a set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra" SRC_URI="http://wwwasd.web.cern.ch/wwwasd/lhc++/clhep/DISTRIBUTION/distributions/${P}.tgz" HOMEPAGE="http://proj-clhep.web.cern.ch/proj-clhep/index.html" SLOT="0" LICENSE="as-is, GPL-2, BSD, ... NIGHTMARE!" KEYWORDS="~x86" IUSE="doc" DEPEND="sys-devel/libtool >=sys-devel/autoconf-2.59 >=sys-devel/automake-1.9 >=dev-lang/perl-5.8.0 doc? ( >=app-doc/doxygen-1.4.2 )" src_compile() { cd ${S}/CLHEP ./configure \ --prefix=/usr \ --bindir=/usr/bin/CLHEP \ --libdir=/usr/lib/CLHEP \ --datadir=/usr/share/CLHEP \ --enable-exceptions \ --disable-dependency-tracking emake OPT="$CFLAGS" || die "make failed" if use doc; then emake docs OPT="$CFLAGS" || die "make docs failed" cp ${FILESDIR}/Doxyfile . doxygen || die "doygen failed" fi # make tests # make check || die "make check failed" } src_install() { cd ${S}/CLHEP make DESTDIR=${D} INSTALL="install" install || die "install failed" if use doc; then make DESTDIR=${D} INSTALL="install" install-docs || die "install docs failed" mkdir -p ${D}/usr/share/doc/clhep-${MY_VER} mv docs/html ${D}/usr/share/doc/clhep-${MY_VER}/. mv ${D}/usr/doc/* ${D}/usr/share/doc/clhep-${MY_VER}/. rmdir ${D}/usr/doc || die "failed to remove bad doc dir" fi dodoc INSTALL README echo 'ROOTPATH=/usr/bin/CLHEP' > 99clhep echo 'PATH=/usr/bin/CLHEP' >> 99clhep echo 'LDPATH=/usr/lib/CLHEP' >> 99clhep doenvd 99clhep mkdir -p ${D}/usr/share/CLHEP mv ${D}/usr/examples ${D}/usr/share/CLHEP/. mv ${D}/usr/data ${D}/usr/share/CLHEP/. }