# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils autotools DESCRIPTION="The BRL-CAD package is a powerful Constructive Solid Geometry (CSG) solid modeling system." HOMEPAGE="http://brlcad.org/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="LGPL-2 BSD BDL" SLOT="0" KEYWORDS="~x86" IUSE="debug optimize disable-runtime-debug" DEPEND="dev-lang/tcl dev-lang/tk media-libs/libpng sys-libs/zlib dev-tcltk/itcl dev-tcltk/itk dev-tcltk/iwidgets media-libs/urt" RDEPEND="${DEPEND}" src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}"/brlcad-tcltk-man_install.patch sh autogen.sh } src_compile() { local myconf cd ${S} myconf="${myconf} --with-pic --prefix=/opt/brlcad/ \ --mandir=/opt/brlcad/man --infodir=/opt/brlcad/info \ --datadir=/opt/brlcad" use debug && myconf="${myconf} --enable-debug" || myconf="${myconf} --disable-debug" use optimize && myconf="${myconf} --enable-optimized" use disable-runtime-debug && myconf="${myconf} --disable-runtime-debug"|| myconf="${myconf} --enable-runtime-debug" econf $myconf || die "configure failed" emake || die "emake failed" } src_install() { einfo install DESTDIR="${D}" emake install || die "emake install failed" #Add the BRL-CAD bin dir to PATH: insinto /etc/env.d newenvd "${FILESDIR}"/brlcad.envd 99brlcad } pkg_postinst() { einfo "The standard starting point for BRL-CAD is the mged" einfo "command. Examples are available in /opt/brlcad/db." einfo "To run an example, try /opt/brlcad/bin /opt/brlcad/db/havoc.g" einfo "In the mged terminal window, type "draw havoc" to see" einfo "the wireframe in the visualization window." }