# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit distutils eutils flag-o-matic toolchain-funcs versionator python DESCRIPTION="SALOME : The Open Source Integration Platform for Numerical Simulation" HOMEPAGE="http://www.salome-platform.org" SRC_URI="salome3.2.6_SRC.tar.gz" LICENSE="GPL-2" KEYWORDS="amd64 x86" SLOT="3" IUSE="doc corba opengl openpbs mpi X debug" RDEPEND="doc? ( app-doc/doxygen media-gfx/graphviz ) opengl? ( virtual/opengl ) mpi? ( sys-cluster/mpich ) openpbs? ( sys-cluster/openpbs ) debug? ( dev-util/cppunit )" pkg_nofetch() { einfo "Please download ${SRC_URI} from ${HOMEPAGE} and move it to ${DISTDIR}" } # What is Med DEPEND="${RDEPEND} sys-devel/bison sys-devel/flex sci-libs/hdf5 >=dev-python/PyQt-3.13 >=dev-python/sip-4.1.3 >=dev-lang/python-2.3 dev-python/omniorbpy dev-python/numeric dev-python/docutils dev-lang/swig dev-libs/boost x11-libs/qwt >=x11-libs/qt-3.3.3 dev-lang/tk dev-lang/tcl >=sci-libs/vtk-5.0.0 net-misc/omniORB >=sci-libs/opencascade-6.1 sys-devel/autoconf sys-devel/automake sys-devel/libtool sci-misc/netgen " # lsf, tix, openpbs med MY_S="${WORKDIR}/salome${PV}_SRC/KERNEL_SRC_${PV}" KERNEL_ROOT_DIR="/usr" src_unpack() { unpack ${A} cd "${MY_S}"/.. } src_compile() { distutils_python_version cd "${MY_S}" ewarn "The 'threads' flag MUST be ON and boost (at least) must be rebuild with this flag on" ./clean_configure ./build_configure if use opengl && use !X; then ewarn "OpenGL functionnalities imply X support! Check your USE flags configuration." die fi local myconf="--with-tcl=/usr/lib/ --with-tk=/usr/lib/" if use X; then myconf="${myconf} --with-x --with-xmu-include=/usr/include --with-xmu-library=/usr/lib" if use opengl; then myconf="${myconf} --with-gl-include=/usr/include --with-gl-library=/usr/lib" else myconf="${myconf} --without-opengl" fi else myconf="${myconf} --without-x --without-gl --without-xmu" fi if use !debug; then myconf="${myconf} --disable-debug --enable-production --without-cppunit" else myconf="${myconf} --enable-debug" fi # if use !mpi; then # myconf="${myconf} --without-mpi --without-mpich" # fi # if use !openpbs; then # myconf="${myconf} --without-openpbs" # fi # CXXFLAGS are slightly modified to allow the compilation of # salome-kernel with OpenCascade and gcc-4.1.x if version_is_at_least "4.1" $(gcc-version) ; then append-flags -ffriend-injection -fpermissive fi econf ${myconf} || die "econf failed" emake || die "emake failed" } src_install() { cd ${MY_S} einstall || die "einstall failed" echo KERNEL_ROOT_DIR=${KERNEL_ROOT_DIR} > ./50${P} dodir /etc/env.d insinto /etc/env.d doins 50${P} }