# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Daniel Tourde, daniel.tourde@caelae.se DESCRIPTION="Software development platform including components for 3D surface and solid modeling, visualization, data exchange and rapid application development." HOMEPAGE="http://www.opencascade.org" SRC_URI="ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${P}.tar.bz2 ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${PN}-samples-java-${PV}.tar.bz2 ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${PN}-samples-qt-${PV}.tar.bz2 ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${PN}-tutorial-${PV}.tar.bz2" # The source code here is NOT in the same form than the one distributed on opencascade.org # The source available on opencascade.org requires a Java installation procedure that does not # always work on Gentoo. The source code can however be extracted 'by hand' using # 'java -cp ./Linux/setup.jar -DOS_NAME=Linux -Dtemp.dir=/some/big/dir/tmp run' # and removing 'by hand' all the existing Linux binaries. # The source code extracted using this method is available (for the time being) # on the FreeBSD ftp server. # An other possibility is to download the Salome binary for linux (500Mb...) # and to extract the source code for OpenCascade from there. # # In any case, none of these solutions are really satisfactory. A better method should # be found LICENSE="Open CASCADE Technology Public License" SLOT="6" KEYWORDS="~amd64 x86" IUSE="doc tcl tk java qt3 fltk stlport" DEPEND="java? ( =virtual/jdk ) tcl? ( >=dev-lang/tcl-8.4 ) tk? ( >=dev-lang/tk-8.4 ) qt3? ( =x11-libs/qt-3* ) doc? ( app-doc/doxygen ) fltk? ( x11-libs/fltk ) >=dev-tcltk/itk-3.2 >=dev-tcltk/tix-8.1 stlport? ( dev-libs/STLport ) sys-devel/autoconf sys-devel/automake sys-devel/libtool" src_unpack() { unpack ${A} cd ${S}/ros dosed "s:/usr/ports/cad/opencascade/:/var/tmp/portage/:g" ./env.ksh || die "dosed env.ksh failed" less env.ksh if use tcl; then local tcl_version tcl_version=$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/') fi if use tk; then local tk_version tk_version=$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/') fi } src_compile() { cd ${S}/ros chmod u+x configure bash env.ksh aclocal || die "aclocal failed" autoheader || die "autoheader failed" automake -a -c -f libtoolize --force --copy || die "libtoolize failed" autoconf || die "autoconf failed" local myconf="--with-gl-include=/usr/include --with-gl-library=/usr/lib --with-xmu-include=/usr/include/X11 --with-xmu-library=/usr/lib --disable-debug --enable-production" local itk_version local tix_version if use tcl; then myconf="${myconf} --with-tcl=/usr/lib/" else myconf="${myconf} --without-tcl" fi if use tk; then myconf="${myconf} --with-tk=/usr/lib/" else myconf="${myconf} --without-tk" fi if use stlport; then # myconf="${myconf} --with-stlport-library=/usr/lib/ --with-stlport-libname=stlport_gcc --with-stlport-include=/usr/include/stlport" # To specify everything seems to screw up the configuration process regarding the setting # up of CXXFLAGS myconf="${myconf} --with-stlport-libname=stlport_gcc" else myconf="${myconf} --without-stlport" fi econf \ $(use_with java) \ $(use_with qt3) \ $(use_with fltk) \ ${myconf} || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodir /etc/env.d echo "CASROOT=\"/opt/OpenCASCADE6.1/ros\"" > ${D}/etc/env.d/50opencascade61 }