# 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="3D modeling & numerical simulation : MED Component" HOMEPAGE="http://www.salome-platform.org" SRC_URI="salome-3.2.6.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" 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 )" 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 net-misc/omniORB >=sci-libs/opencascade-6.1 sys-devel/autoconf sys-devel/automake sys-devel/libtool =sci-misc/salome-kernel-3.2.6 =sci-misc/salome-gui-3.2.6 sci-libs/med" RESTRICT="fetch" MODULE_NAME="VISU" MY_S="${WORKDIR}/src${PV}/${MODULE_NAME}_SRC_${PV}" INSTALL_DIR="/opt/salome-${PV}/${MODULE_NAME}" VISU_ROOT_DIR="/opt/salome-${PV}/${MODULE_NAME}" pkg_nofetch() { einfo "You have to download manually the source code. You can download it from :" einfo " http://www.salome-platform.org/download/dl326" einfo "" einfo "Put the archive in the \"/usr/portage/distfile\" directory and rename it \"salome-3.2.6.tar.gz\"" } src_unpack() { unpack ${A} cd ${MY_S} epatch ${FILESDIR}/salome-visu-3.2.6.patch epatch ${FILESDIR}/salome-visu_makefiles-3.2.6.patch } src_compile() { local myconf # 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 # If vtk-5.O is used, include directory is named vtk-5.0 and not vtk if has_version ">=sci-libs/vtk-5.0"; then einfo "vtk version 5 detected" append-flags -I/usr/include/vtk-5.0 else einfo "vtk version 4 or prior detected"; fi # Compiler and linker flags if use amd64 ; then append-flags -m64 fi cd "${MY_S}" rm -r -f autom4te.cache ewarn "The 'threads' flag MUST be ON and boost (at least) must be rebuild with this flag on" ./build_configure if use X; then myconf="${myconf} --with-x" if use opengl; then myconf="${myconf} --with-opengl" else myconf="${myconf} --without-opengl" fi else myconf="${myconf} --without-x" 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} --with-mpich" else myconf="${myconf} --without-mpi --without-mpich" fi if use !openpbs; then myconf="${myconf} --without-openpbs" fi econf --prefix=${INSTALL_DIR} --datadir=${INSTALL_DIR}/share/salome --docdir=${INSTALL_DIR}/share/doc/salome --infodir=${INSTALL_DIR}/share/info ${myconf} || die "configuration failed" MAKEOPTS="-j1" emake || die "Compilation failed" } src_install() { cd ${MY_S} emake prefix="${D}/${INSTALL_DIR}" docdir="${D}/${INSTALL_DIR}/share/doc/salome" infodir="${D}/${INSTALL_DIR}/share/info" datadir="${D}/${INSTALL_DIR}/share/salome" install || die "emake install failed" echo "${MODULE_NAME}_ROOT_DIR=${INSTALL_DIR}" > ./90${P} echo "LDPATH=${INSTALL_DIR}/lib/salome" >> ./90${P} echo "PATH=${INSTALL_DIR}/bin/salome" >> ./90${P} dodir /etc/env.d insinto /etc/env.d doins 90${P} rm adm_local/Makefile adm_local/unix/make_commence adm_local/unix/make_conclude adm_local/unix/make_omniorb insinto "${INSTALL_DIR}" doins -r adm_local }