# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 PYTHON_DEPEND="2:2.7" inherit eutils python git-2 DESCRIPTION="The Open Source Integration Platform for Numerical Simulation - KERNEL Component" HOMEPAGE="http://www.salome-platform.org" EGIT_REPO_URI="git://git.salome-platform.org/modules/kernel.git" SRC_URI="" IUSE="doc" LICENSE="GPL-2" KEYWORDS="~amd64 ~x86" SLOT="0" CMAKE_USE_DIR="${S}/build" RDEPEND=" >=dev-python/omniorbpy-3.4 >=net-misc/omniORB-4.1.4 >=dev-libs/boost-1.40.0 sci-libs/hdf5 dev-util/cppunit dev-python/numpy sys-cluster/openmpi" DEPEND="${RDEPEND} >=app-doc/doxygen-1.5.6 media-gfx/graphviz dev-python/docutils dev-lang/swig dev-libs/libxml2:2 >=dev-python/docutils-0.4" MODULE_NAME="KERNEL" S="${WORKDIR}/src${PV}/${MODULE_NAME}_SRC_${PV}" INSTALL_DIR="/opt/salome-${PV}/${MODULE_NAME}" KERNEL_ROOT_DIR="/opt/salome-${PV}/${MODULE_NAME}" src_unpack(){ mkdir -p ${S} git-2_src_unpack } src_prepare(){ mkdir -p build } src_configure() { local myconf="" cd build cmake .. \ -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ -DPYTHON_EXECUTABLE=/usr/bin/python2 \ -DSWIG_EXECUTABLE=/usr/bin/swig \ || die "econf failed" } src_compile(){ cd build make || die } src_install() { cd build MAKEOPTS="-j1" emake install || die "emake install failed" use amd64 && dosym ${INSTALL_DIR}/lib64 ${INSTALL_DIR}/lib 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$(python_get_version)/site-packages/salome" >> ./90${P} doenvd 90${P} use doc && dodoc AUTHORS ChangeLog INSTALL NEWS README README.FIRST.txt # Install icon and .desktop for menu entry doicon "${FILESDIR}"/${PN}.png make_desktop_entry runSalome Salome ${PN} "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 "" }