Line 0
Link Here
|
|
|
1 |
--- src5.1.4/MED_SRC_5.1.4/adm_local/unix/config_files/check_metis.m4.orig 2009-09-27 22:35:51.014701709 +0200 |
Line 0
Link Here
|
|
|
1 |
--- src5.1.4/MED_SRC_5.1.4/adm_local/unix/config_files/check_scotch.m4.orig 2009-09-27 23:07:31.245061430 +0200 |
Line 0
Link Here
|
|
|
1 |
--- ./src5.1.4.orig/MED_SRC_5.1.4/src/INTERPOLATION/create_mesh_interpolation.c 2010-03-13 13:14:50.721209673 +0100 |
Line 0
Link Here
|
|
|
1 |
--- src5.1.4.orig/MED_SRC_5.1.4/src/MEDSPLITTER/MEDSPLITTER_SCOTCHGraph.cxx 2008-12-10 10:14:43.000000000 +0100 |
Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: $ |
4 |
|
5 |
EAPI=2 |
6 |
PYTHON_DEPEND="2:2.4" |
7 |
|
8 |
inherit eutils flag-o-matic python |
9 |
|
10 |
DESCRIPTION="SALOME : The Open Source Integration Platform for Numerical Simulation. MED Component" |
11 |
HOMEPAGE="http://www.salome-platform.org" |
12 |
SRC_URI="http://files.opencascade.com/Salome/Salome${PV}/src${PV}.tar.gz" |
13 |
|
14 |
LICENSE="GPL-2" |
15 |
KEYWORDS="~amd64 ~x86" |
16 |
SLOT="0" |
17 |
IUSE="debug doc mpi metis opengl scotch" |
18 |
|
19 |
RDEPEND="opengl? ( virtual/opengl ) |
20 |
mpi? ( || ( sys-cluster/openmpi[cxx] |
21 |
sys-cluster/mpich2[cxx] ) ) |
22 |
debug? ( dev-util/cppunit ) |
23 |
metis? ( >=sci-libs/metis-4.0 ) |
24 |
scotch? ( >=sci-libs/scotch-4.0 ) |
25 |
>=sci-misc/salome-kernel-${PV} |
26 |
>=sci-misc/salome-gui-${PV} |
27 |
>=x11-libs/qt-core-4.5.2 |
28 |
>=x11-libs/qt-gui-4.5.2 |
29 |
>=x11-libs/qt-opengl-4.5.2 |
30 |
>=dev-libs/boost-1.40.0 |
31 |
>=sci-libs/opencascade-6.3 |
32 |
>=sci-libs/med-2.3.5 |
33 |
>=sci-libs/vtk-5.0[python]" |
34 |
|
35 |
DEPEND="${RDEPEND} |
36 |
dev-lang/swig |
37 |
dev-libs/libxml2" |
38 |
|
39 |
MODULE_NAME="MED" |
40 |
S="${WORKDIR}/src${PV}/${MODULE_NAME}_SRC_${PV}" |
41 |
INSTALL_DIR="/opt/salome-${PV}/${MODULE_NAME}" |
42 |
MED_ROOT_DIR="/opt/salome-${PV}/${MODULE_NAME}" |
43 |
|
44 |
pkg_setup() { |
45 |
[[ $(python_get_version) > 2.4 ]] && \ |
46 |
ewarn "Python 2.4 is highly recommended for Salome..." |
47 |
python_set_active_version 2 |
48 |
append-ldflags $(no-as-needed) |
49 |
} |
50 |
|
51 |
src_prepare() { |
52 |
epatch "${FILESDIR}"/${P}-gcc.patch |
53 |
use mpi && epatch "${FILESDIR}"/${P}-mpi.patch |
54 |
use metis && epatch "${FILESDIR}"/${P}-check_metis.patch |
55 |
if use scotch; then |
56 |
epatch "${FILESDIR}"/${P}-check_scotch.patch |
57 |
epatch "${FILESDIR}"/${P}-scotch.patch |
58 |
fi |
59 |
use amd64 && epatch "${FILESDIR}"/${P}-med_int.patch |
60 |
|
61 |
rm -r -f autom4te.cache |
62 |
./clean_configure |
63 |
./build_configure |
64 |
} |
65 |
|
66 |
src_configure() { |
67 |
local myconf="" |
68 |
local vtk_suffix="" |
69 |
|
70 |
has_version ">=sci-libs/vtk-5.0" && vtk_suffix="-5.0" |
71 |
has_version ">=sci-libs/vtk-5.2" && vtk_suffix="-5.2" |
72 |
has_version ">=sci-libs/vtk-5.4" && vtk_suffix="-5.4" |
73 |
has_version ">=sci-libs/vtk-5.6" && vtk_suffix="-5.6" |
74 |
|
75 |
# --without-mpi does not disable mpi support, just omit it to disable |
76 |
if use mpi; then |
77 |
if has_version ">=sys-cluster/openmpi-1.2.9"; then |
78 |
myconf="${myconf} --with-mpi --with-openmpi" |
79 |
elif has_version ">=sys-cluster/mpich2-1.0.8"; then |
80 |
myconf="${myconf} --with-mpi --with-mpich" |
81 |
fi |
82 |
fi |
83 |
|
84 |
use amd64 && append-flags -DHAVE_F77INT64 |
85 |
|
86 |
econf --prefix=${INSTALL_DIR} \ |
87 |
--datadir=${INSTALL_DIR}/share/salome \ |
88 |
--docdir=${INSTALL_DIR}/doc/salome \ |
89 |
--infodir=${INSTALL_DIR}/share/info \ |
90 |
--libdir=${INSTALL_DIR}/$(get_libdir)/salome \ |
91 |
--with-python-site=${INSTALL_DIR}/$(get_libdir)/python$(python_get_version)/site-packages/salome \ |
92 |
--with-python-site-exec=${INSTALL_DIR}/$(get_libdir)/python$(python_get_version)/site-packages/salome \ |
93 |
--with-qt=/usr \ |
94 |
--with-vtk=${VTKHOME} \ |
95 |
--with-vtk-version=${vtk_suffix} \ |
96 |
${myconf} \ |
97 |
$(use_enable debug ) \ |
98 |
$(use_enable !debug production ) \ |
99 |
$(use_with debug cppunit_inc /usr/include/cppunit) \ |
100 |
$(use_with opengl opengl /usr) \ |
101 |
$(use_with metis metis /usr) \ |
102 |
$(use_with scotch scotch /usr) \ |
103 |
|| die "econf failed" |
104 |
} |
105 |
|
106 |
src_install() { |
107 |
emake DESTDIR="${D}" install || die "emake install failed" |
108 |
|
109 |
use amd64 && dosym ${INSTALL_DIR}/lib64 ${INSTALL_DIR}/lib |
110 |
|
111 |
echo "${MODULE_NAME}_ROOT_DIR=${INSTALL_DIR}" > ./90${P} |
112 |
echo "LDPATH=${INSTALL_DIR}/$(get_libdir)/salome" >> ./90${P} |
113 |
echo "PATH=${INSTALL_DIR}/bin/salome" >> ./90${P} |
114 |
echo "PYTHONPATH=${INSTALL_DIR}/$(get_libdir)/python$(python_get_version)/site-packages/salome" >> ./90${P} |
115 |
doenvd 90${P} |
116 |
rm adm_local/Makefile |
117 |
insinto "${INSTALL_DIR}" |
118 |
doins -r adm_local |
119 |
|
120 |
use doc && dodoc INSTALL README |
121 |
} |
122 |
|
123 |
pkg_postinst() { |
124 |
elog "Run \`env-update && source /etc/profile\`" |
125 |
elog "now to set up the correct paths." |
126 |
elog "" |
127 |
} |