summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Mocciola2016-06-03 19:17:29 +0200
committerMichele Mocciola2016-06-03 19:17:29 +0200
commitfa50fd36dd7341dcd441b3a2a1a3e2164c5aebb2 (patch)
treec39239f937ba1b0c830bf160ef4a5ea4353ea740
parent3a8ffc5eab80051c6aa660189c352996797beec3 (diff)
downloadaur-fa50fd36dd7341dcd441b3a2a1a3e2164c5aebb2.tar.gz
Udpated to compile with archlinux current
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD28
-rw-r--r--salome-smesh.profile29
3 files changed, 46 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f85107f1aa2..e12389a4519 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Fri Jun 3 17:17:09 UTC 2016
pkgbase = salome-smesh
pkgdesc = Generic platform for Pre and Post-Processing for numerical simulation - SMESH Module
pkgver = 7.6.0
- pkgrel = 3
+ pkgrel = 4
url = http://www.salome-platform.org
arch = i686
arch = x86_64
@@ -15,7 +17,7 @@ pkgbase = salome-smesh
depends = salome-med>=7.6.0
depends = salome-med<7.7.0
source = salome-smesh.profile
- md5sums = 90ba130aca1a935a64f953fdadd23bc5
+ md5sums = d339c1021bc8797c7877581b75e5ef23
pkgname = salome-smesh
diff --git a/PKGBUILD b/PKGBUILD
index 596df6f910c..21a7e300ab6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=salome-smesh
pkgver=7.6.0
-pkgrel=3
+pkgrel=4
pkgdesc="Generic platform for Pre and Post-Processing for numerical simulation - SMESH Module"
url="http://www.salome-platform.org"
depends=('salome-geom>=7.6.0' 'salome-geom<7.7.0' 'salome-med>=7.6.0' 'salome-med<7.7.0')
@@ -14,7 +14,7 @@ license=('LGPL')
source=("salome-smesh.profile")
_source=smesh
-_installdir=/opt/salome/smesh
+_installdir=/opt/salome
_paraviewrootdir=/usr
_paraviewver=4.2
@@ -39,10 +39,10 @@ prepare() {
}
build() {
- source /etc/salome/profile.d/salome-kernel.sh
- source /etc/salome/profile.d/salome-gui.sh
- source /etc/salome/profile.d/salome-geom.sh
- source /etc/salome/profile.d/salome-med.sh
+ source /opt/salome/env.d/salome-kernel.sh
+ source /opt/salome/env.d/salome-gui.sh
+ source /opt/salome/env.d/salome-geom.sh
+ source /opt/salome/env.d/salome-med.sh
rm -rf "${srcdir}/${_source}/build"
mkdir -p "${srcdir}/${_source}/build"
@@ -50,6 +50,8 @@ build() {
cmake .. \
-DCMAKE_INSTALL_PREFIX=$_installdir \
+ -DCMAKE_CXX_STANDARD=98 \
+ -DHDF5_ROOT_DIR=/opt/hdf5-1.8 \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
-DVTK_DIR="${_paraviewrootdir}/lib/cmake/paraview-${_paraviewver}" \
-DSPHINX_EXECUTABLE=/usr/bin/sphinx-build2 \
@@ -64,13 +66,21 @@ package() {
make DESTDIR="${pkgdir}" install
+ for _FILE in `find -L ${pkgdir}${_installdir} -iname *.py`
+ do
+ sed -i -e "s|${srcdir}||" ${_FILE}
+ sed -i -e "s|${pkgdir}||" ${_FILE}
+ done
+
for _FILE in share/doc/salome/gui/SMESH/a-deflection1d.png share/doc/salome/gui/SMESH/automaticlength.png share/doc/salome/gui/SMESH/a-maxelarea.png share/doc/salome/gui/SMESH/failed_computation.png share/doc/salome/gui/SMESH/mesh_for_extr_along_path.png share/doc/salome/gui/SMESH/straight_before.png share/doc/salome/gui/SMESH/straight_after.png share/doc/salome/gui/SMESH/curvi_simple_before.png share/doc/salome/gui/SMESH/curvi_simple_after.png share/doc/salome/gui/SMESH/curvi_angles_after.png share/doc/salome/gui/SMESH/circle_simple_before.png share/doc/salome/gui/SMESH/circle_simple_after.png share/doc/salome/gui/SMESH/circle_angles_after.png share/doc/salome/gui/SMESH/length-crit.png share/doc/salome/gui/SMESH/a-maxelvolume.png share/doc/salome/gui/SMESH/meshtrianglemergeelem1.png share/doc/salome/gui/SMESH/mesh_cylinder_hexa.png
do
optipng -quiet -force -fix ${pkgdir}${_installdir}/${_FILE}
done
install -D -m755 "${srcdir}/${pkgname}.profile" \
- "${pkgdir}/etc/salome/profile.d/${pkgname}.sh"
-}
+ "${pkgdir}${_installdir}/env.d/${pkgname}.sh"
-md5sums=('90ba130aca1a935a64f953fdadd23bc5')
+ rm -f "${pkgdir}${_installdir}/bin/salome/VERSION"
+ rm -f "${pkgdir}${_installdir}/bin/salome/test/CTestTestfile.cmake"
+}
+md5sums=('d339c1021bc8797c7877581b75e5ef23')
diff --git a/salome-smesh.profile b/salome-smesh.profile
index 29f158552fe..f05b33f142d 100644
--- a/salome-smesh.profile
+++ b/salome-smesh.profile
@@ -1,15 +1,32 @@
-export SMESH_ROOT_DIR=/opt/salome/smesh
+# module var
+export SMESH_ROOT_DIR=/opt/salome
-_paraview_pythonpath="/usr/lib/paraview-4.2/site-packages/:/usr/lib/paraview-4.2/site-packages/vtk"
+# local vars
+_pythonver=2.7
+_paraviewver=4.2
+_smesh_path=$SMESH_ROOT_DIR/bin/salome
+_smesh_librarypath=$SMESH_ROOT_DIR/lib/salome
+_smesh_pythonpath=$SMESH_ROOT_DIR/lib/python${_pythonver}/site-packages/salome
+_paraview_pythonpath="/usr/lib/paraview-${_paraviewver}/site-packages/:/usr/lib/paraview-${_paraviewver}/site-packages/vtk"
+_paraview_librarypath="/usr/lib/paraview-${_paraviewver}"
+
+# PYTHONPATH
+if [[ $PYTHONPATH != *${_smesh_pythonpath}* ]]; then
+ export PYTHONPATH=${_smesh_pythonpath}:$PYTHONPATH
+fi
if [[ $PYTHONPATH != *${_paraview_pythonpath}* ]]; then
export PYTHONPATH=${_paraview_pythonpath}:$PYTHONPATH
fi
-export PYTHONPATH=$PYTHONPATH:$SMESH_ROOT_DIR/lib/python2.7/site-packages
-_paraview_librarypath="/usr/lib/paraview-4.2"
+# LD_LIBRARY_PATH
+if [[ $LD_LIBRARY_PATH != *${_smesh_librarypath}* ]]; then
+ export LD_LIBRARY_PATH=${_smesh_librarypath}:$LD_LIBRARY_PATH
+fi
if [[ $LD_LIBRARY_PATH != *${_paraview_librarypath}* ]]; then
export LD_LIBRARY_PATH=${_paraview_librarypath}:$LD_LIBRARY_PATH
fi
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SMESH_ROOT_DIR/lib/salome
-export PATH=$SMESH_ROOT_DIR/bin/salome:$PATH \ No newline at end of file
+# PATH
+if [[ $PATH != *${_smesh_path}* ]]; then
+ export PATH=${_smesh_path}:$PATH
+fi