# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools distutils eutils flag-o-matic toolchain-funcs versionator python multilib DESCRIPTION="SALOME : The Open Source Integration Platform for Numerical Simulation. KERNEL Component" HOMEPAGE="http://www.salome-platform.org" MODULE_NAME="KERNEL" SRC_URI="${MODULE_NAME}sourcesV${PV}.tar.gz" # NOTES # The Sourcecode for the Salome 5.1.2 has to be extracted from # the Salome 5.1.2 Installer # Instructions: # Download an InstallWizard*.tar.gz from http://www.salome-platform.org/download/dl512/ # (you have to register to download) # Theoretically it would be possible to use # http://files.opencascade.com/Salome/Salome5.1.2/src5.1.2.tar.gz # but you'd have to download the Installer anyway because of the new version of # opencascade required # unpack the InstallWizard*tar.gz and you'll find the sources in # -/InstallWizard*/Products/SOURCES # copy KERNELsourcesV5.1.2 to DISTDIR LICENSE="GPL-2" KEYWORDS="~amd64 ~x86" SLOT="0" #IUSE="debug doc mpi opengl openpbs" IUSE="debug doc mpi openpbs" RDEPEND="opengl? ( virtual/opengl ) mpi? ( sys-cluster/mpich2 ) debug? ( dev-util/cppunit ) openpbs? ( sys-cluster/torque ) >=dev-python/omniorbpy-3.3 >=net-misc/omniORB-4.1.3 dev-libs/boost >=dev-python/numeric-24.2 sci-libs/hdf5 " # Note that Corba is apparently not optional in this module DEPEND="${RDEPEND} >=app-doc/doxygen-1.5.6 media-gfx/graphviz dev-python/docutils dev-lang/swig dev-libs/libxml2 >=dev-python/docutils-0.4 " MY_S="${WORKDIR}/${MODULE_NAME}_SRC_${PV}" INSTALL_DIR="/opt/salome-${PV}/${MODULE_NAME}" KERNEL_ROOT_DIR="/opt/salome-${PV}/${MODULE_NAME}" export OPENPBS="/usr" src_unpack() { python_version distutils_python_version ewarn "Python 2.4 is highly recommended for Salome..." #Warn about mpi use flag for hdf5 if built_with_use sci-libs/hdf5 mpi ; then ewarn "mpi use flag enabled for sci-libs/hdf5, this may cause the build to fail for salome-kernel" fi unpack ${A} cd "${MY_S}" epatch "${FILESDIR}"/${P}-lib_location.patch ./clean_configure ./build_configure } src_compile() { cd "${MY_S}" local myconf="" # Specifying --without- for mpi / mpich / openpbs # has the same effect as turning it on # so we just ommit it if it's not required to turn it off if use mpi ; then myconf="${myconf} --with-mpi --with-mpich" fi if use openpbs ; then myconf="${myconf} --with-openpbs" fi # Configuration econf --prefix=${INSTALL_DIR} \ --docdir=${INSTALL_DIR}/share/doc/salome \ --infodir=${INSTALL_DIR}/share/info \ --datadir=${INSTALL_DIR}/share/salome \ --with-python-site=${INSTALL_DIR}/$(get_libdir)/python${PYVER}/site-packages/salome \ --with-python-site-exec=${INSTALL_DIR}/$(get_libdir)/python${PYVER}/site-packages/salome \ --enable-corba-gen \ ${myconf} \ $(use_enable debug ) \ $(use_enable !debug production ) \ $(use_with debug cppunit /usr ) \ || die "configuration failed" # Compilation emake || die "compilation failed" } src_install() { cd "${MY_S}" emake DESTDIR="${D}" install || die "emake install failed" if use amd64 ; then dosym ${INSTALL_DIR}/lib64 ${INSTALL_DIR}/lib fi echo "KERNEL_ROOT_DIR=${INSTALL_DIR}" > ./90${P} echo "LDPATH=${INSTALL_DIR}/$(get_libdir)/salome" >> ./90${P} echo "PATH=${INSTALL_DIR}/bin/salome" >> ./90${P} echo "PYTHONPATH=${INSTALL_DIR}/$(get_libdir)/python${PYVER}/site-packages/salome" >> ./90${P} doenvd 90${P} if use doc ; then dodoc AUTHORS ChangeLog INSTALL NEWS README README.FIRST.txt fi # Install icon and .desktop for menu entry doicon "${FILESDIR}"/${PN}.png make_desktop_entry runSalome Salome ${PN}.png "Science;Engineering" } pkg_postinst() { elog "Run \`env-update && source /etc/profile\`" elog "now to set up the correct paths." elog "" ewarn "note a small change to /etc/hosts may be required" ewarn "salome doesn't seem to recognise localhost within the hosts file" ewarn "a line such as" ewarn "127.0.0.1 name.domain name" ewarn "may be required within /etc/hosts" ewarn "" }