# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.2.2.ebuild,v 1.2 2007/10/25 14:41:50 corsair Exp $ inherit eutils DESCRIPTION="3D modeling & numerical simulation" HOMEPAGE="http://www.salome-platform.org" SRC_URI="salome-3.2.6.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="" DEPEND=">=dev-python/sip-4.7.1 sci-libs/vtk" RDEPEND="$DEPEND" RESTRICT="fetch" MODULE_NAME="GUI" 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 ${WORKDIR}/src${PV} epatch ${FILESDIR}/salome-gui-3.2.6.patch epatch ${FILESDIR}/salome-gui-vtk-5.0.patch } src_compile() { if has_version ">=sci-libs/vtk-5.0"; then einfo "vtk version 5 detected" export CPPFLAGS="-I/usr/include/vtk-5.0" export CFLAGS="${CPPFLAGS}" export CXXFLAGS="${CPPFLAGS}" else eerror "vtk not detected" die "vtk not detected" fi export CXXFLAGS="${CXXFLAGS} -ffriend-injection" for i in $FEATURES; do if [ "$i" = "sandbox" ]; then eerror "You must disable sandbox" eerror "You can do this with the following command line :" eerror " FEATURES=\"-sandbox\" emerge salome-gui" die "Sandbox activated" fi done; cd "${WORKDIR}/src${PV}/${MODULE_NAME}_SRC_${PV}" # Fix a bug # # There is a missing new line at the end of the file # "adm_local/unix/config_files/check_vtk.m4". echo -e "\n" >> adm_local/unix/config_files/check_vtk.m4 ./build_configure mkdir ../build cd ../build ../${MODULE_NAME}_SRC_${PV}/configure --prefix=/opt/salome-${PV}/${MODULE_NAME} || die "Erreur de configuration" # # make echo " enum MenuName { File = 1, View = 2, Edit = 3, Preferences = 4, Tools = 5, Window = 6, Help = 7 }; enum WindowType { WT_ObjectBrowser, WT_PyConsole, WT_LogWindow, WT_User }; enum PrefType { PT_Space, PT_Bool, PT_Color, PT_String, PT_Selector, PT_DblSpin, PT_IntSpin, PT_Double, PT_Integer, PT_GroupBox, PT_Font, PT_DirList, PT_File, PT_User };" > patch.h cat ${WORKDIR}/src${PV}/build/src/SALOME_PYQT/SalomePyQt/sipSalomePyQtcmodule.cc >> patch.h cp patch.h ${WORKDIR}/src${PV}/build/src/SALOME_PYQT/SalomePyQt/sipSalomePyQtcmodule.cc make || die "Erreur de compilation" } src_install() { cd ${WORKDIR}/src${PV}/build # # If sandbox is enabled, nor make install nor einstall work. # So, sandbox must be disabled # make install || die "Installation error" echo "${MODULE_NAME}_ROOT_DIR=/opt/salome-${PV}/${MODULE_NAME}" > /etc/env.d/90salome-gui }