# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="The BRL-CAD package is a powerful Constructive Solid Geometry (CSG) solid modeling system." HOMEPAGE="brlcad.org" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL LGPL GFDL BSD" SLOT="0" KEYWORDS="~x86" IUSE="java jove pic" DEPEND="virtual/x11 \ >=dev-lang/tcl-8.4 \ >=dev-lang/tk-8.4 \ media-libs/libpng \ sys-libs/zlib \ >=dev-tcltk/itk-3.1 \ >=dev-tcltk/itcl-3.1 \ >=dev-tcltk/iwidgets-4.0.0 \ jove? ( app-editors/jove ) \ java? ( virtual/jdk ) \ " src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${PF}-gentoo.diff } src_compile() { local myconf cd ${S} myconf="--exec-prefix=/usr/lib/brlcad --prefix=/usr/share/brlcad \ --bindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc/brlcad \ --libdir=/usr/lib" myconf="${myconf} --enable-regexp-build=no --enable-png-build=no \ --enable-zlib-build=no --enable-urt-build=no --enable-termlib-build=no \ --enable-tcl-build=no --enable-itcl-build=no --enable-iwidgets-build=no \ --enable-urt-build=yes" use java && einfo "Configuring with jdk support." && myconf="${myconf} --with-jdk=`java-config -O`" use jove && einfo "Configuring with jove support." && myconf="${myconf} --enable-jove" use pic && einfo "Configuring for pic code." && myconf="${myconf} --with-pic" BC_RETRY=no econf $myconf || die "econf failed" emake || die "emake failed" } src_install() { einfo install DESTDIR="${D}" emake install || die "emake install failed" einfo "Installing documentation" dodoc ${D}/usr/share/*.txt rm ${D}/usr/share/*.txt dodoc ${D}/usr/share/*.tr # wonder whot these are :) rm ${D}/usr/share/*.tr dodoc AUTHORS BUGS HACKING C* INSTALL NEWS README TODO einfo "Installing includes" mkdir -p ${D}/usr/include dosym /usr/share/brlcad/include/brlcad /usr/include/ einfo "Cleaning up the garbage" rm -rf ${D}/usr/lib/tk8.4 # strange rm -rf ${D}/usr/lib/tkConfig.sh rm -rf ${D}/usr/share/brlcad/lib rm -rf ${D}/usr/bin/*.sh # looks like these are crap rm ${D}/usr/share/README.* # briliance of packaging } pkg_postinst() { einfo postinst }