# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 S=${WORKDIR}/gCAD3D DESCRIPTION="A 3D CAD/CAM software for Linux." SRC_URI="http://www.cadcam.co.at/freiter/gCAD3D-${PV}.tar.gz" HOMEPAGE="http://www.cadcam.co.at/freiter/gCAD3D.htm" LICENSE="freedist" SLOT="0" KEYWORDS="~x86" DEPEND="virtual/opengl virtual/glu =x11-libs/gtkglarea-1.2.3* =x11-libs/gtk+-1.2* =dev-libs/glib-1.2*" # Need this for manual install below LIBPATH=/usr/lib/gCAD3D # Routines below modeled after RPM spec file in source package src_compile() { cd ${S} # Make wrapper script cat >gCAD3D.sh <<_GCAD3D_SH #!/bin/sh if [ ! -d "\$HOME/.gCAD3D" ]; then mkdir \$HOME/.gCAD3D fi cd \$HOME/.gCAD3D if [ ! -d tmp ]; then mkdir tmp cp -r $LIBPATH/tmp/* tmp/ fi if [ ! -d dat ]; then mkdir dat cp -r -s $LIBPATH/dat/* dat/ fi if [ ! -d xa ]; then ln -s $LIBPATH/xa xa fi if [ ! -d doc ]; then ln -s /usr/share/doc/$P/html doc fi gCAD3D.bin _GCAD3D_SH # Finished wrapper script } src_install () { cd ${S} # Library elements insinto $LIBPATH/dat doins dat/* insinto $LIBPATH/tmp doins tmp/* insinto $LIBPATH/xa doins xa/*.so xa/*.htm* # Executable and wrapper mv -v gCAD3D gCAD3D.bin dobin gCAD3D.bin mv -v gCAD3D.sh gCAD3D dobin gCAD3D # Docs dodoc doc/*.txt dohtml doc/*.htm }