# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit autotools 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} =sci-misc/salome-kernel-3.2.6 sci-libs/hdf5 " # lsf, tix, openpbs med MY_S="${WORKDIR}/salome${PV}_SRC/GUI_SRC_${PV}" append-ldflags -L${MY_S}/src/Qtx/.libs src_unpack() { unpack ${A} cd "${MY_S}"/.. # epatch "${FILESDIR}"/KERNEL-${PV}.patch epatch "${FILESDIR}"/GUI-${PV}.patch # epatch "${FILESDIR}"/GEOM-${PV}.patch # epatch "${FILESDIR}"/MED-${PV}.patch # epatch "${FILESDIR}"/NETGENPLUGIN-${PV}.patch # epatch "${FILESDIR}"/SMESH-${PV}.patch # epatch "${FILESDIR}"/SUPERV-${PV}.patch # epatch "${FILESDIR}"/VISU-${PV}.patch rm -r -f autom4te.cache } src_compile() { cd "${MY_S}" ewarn "The 'threads' flag MUST be ON and boost (at least) must be rebuild with this flag on" ./build_configure if use opengl && use !X; then ewarn "OpenGL functionnalities imply X support! Check your USE flags configuration." die fi local myconf="--with-kernel=${KERNEL_ROOT_DIR}" 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-gui 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" MAKEOPTS="-j1" emake || die "emake failed" } src_install() { cd ${MY_S} einstall || dies "einstall failed" }