aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2016-07-14 12:17:17 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-07-17 07:49:55 +0700
commitb23225c6b1039e1ec16ab3e4367b9f35e8fc0339 (patch)
tree977b019d056cd84b4654b4a6e97c8a6e9c598d9d /libraries
parente6b2c607c7aef73402759625daf757c8d2195be8 (diff)
libraries/VTK: Moved to /usr from /opt.
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/VTK/VTK.SlackBuild40
-rw-r--r--libraries/VTK/patch-gdal2.diff31
2 files changed, 54 insertions, 17 deletions
diff --git a/libraries/VTK/VTK.SlackBuild b/libraries/VTK/VTK.SlackBuild
index 1a1c905e7df6d..88497e9a2afa7 100644
--- a/libraries/VTK/VTK.SlackBuild
+++ b/libraries/VTK/VTK.SlackBuild
@@ -26,10 +26,11 @@
# 2014-02-16 Update to 6.1.0
# 2014-11-16 Support VTK features
# 2015-12-12 Update to 6.3.0, use external deps, move to /opt
+# 2016-07-14 Move back to /usr
PRGNAM=VTK
VERSION=${VERSION:-6.3.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -62,13 +63,13 @@ fi
# configure VTK features
# (defaults suitable for OpenCASCADE, it's the only SBo package that depends on VTK)
group_imaging="" ; [ "${IMAGING:-yes}" != "no" ] && group_imaging="-DVTK_Group_Imaging=true"
-group_mpi="" ; [ "${MPI:-no}" != "no" ] && group_mpi="-DVTK_Group_MPI=true"
-group_qt="" ; [ "${QT:-yes}" != "no" ] && group_qt="-DVTK_Group_Qt=true"
+group_mpi="" ; [ "${MPI:-no}" != "no" ] && group_mpi="-DVTK_Group_MPI=true"
+group_qt="" ; [ "${QT:-yes}" != "no" ] && group_qt="-DVTK_Group_Qt=true"
group_tk="" ; [ "${TK:-yes}" != "no" ] && group_tk="-DVTK_Group_Tk=true"
-group_views="" ; [ "${VIEWS:-no}" != "no" ] && group_views="-DVTK_Group_Views=true"
-group_web="" ; [ "${WEB:-no}" != "no" ] && group_web="-DVTK_Group_Web=true"
-wrap_python="" ; [ "${PYTHON:-yes}" != "no" ] && wrap_python="-DVTK_WRAP_PYTHON=true"
-wrap_java="" ; [ "${JAVA:-no}" != "no" ] && wrap_java="-DVTK_WRAP_JAVA=true"
+group_views="" ; [ "${VIEWS:-no}" != "no" ] && group_views="-DVTK_Group_Views=true"
+group_web="" ; [ "${WEB:-no}" != "no" ] && group_web="-DVTK_Group_Web=true"
+wrap_python="" ; [ "${PYTHON:-yes}" != "no" ] && wrap_python="-DVTK_WRAP_PYTHON=true"
+wrap_java="" ; [ "${JAVA:-no}" != "no" ] && wrap_java="-DVTK_WRAP_JAVA=true"
wrap_tcl="" ; [ "${TCL:-yes}" != "no" ] && wrap_tcl="-DVTK_WRAP_TCL=true"
set -e
@@ -88,9 +89,9 @@ find -L . \
# patch CMakefile first for lib64 issue
patch -p0 <$CWD/patch-handle-64bit.diff
+# patch for gdal-2.x (gdal is an optional dep) - thanks to Arch
+patch -p1 <$CWD/patch-gdal2.diff
-# -DCMAKE_INSTALL_PREFIX=/opt
-# Installing to /usr creates /usr/plugins, /usr/src/vtk, /usr/lib64/www :-(
# -DVTK_CUSTOM_LIBRARY_SUFFIX and -DVTK_INSTALL_INCLUDE_DIR
# See https://bugs.archlinux.org/task/43378?project=5&cat[0]=33&string=vtk
# -DVTK_USE_SYSTEM_*
@@ -104,11 +105,11 @@ cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/opt/$PRGNAM \
+ -DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DBUILD_SHARED_LIBS=ON \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
- -DVTK_INSTALL_INCLUDE_DIR:PATH=include \
+ -DVTK_INSTALL_INCLUDE_DIR:PATH=include/VTK \
$group_imaging \
$group_mpi \
$group_qt \
@@ -134,21 +135,26 @@ cd build
make install DESTDIR=$PKG
cd ..
-mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/
-mv \
- $PKG/opt/VTK/lib$LIBDIRSUFFIX/python2.7/site-packages/vtk \
- $PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/
-rm -rf $PKG/opt/VTK/lib$LIBDIRSUFFIX/python2.7
-
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/qt
+mv \
+ $PKG/usr/plugins/ \
+ $PKG/usr/lib${LIBDIRSUFFIX}/qt
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
CONTRIBUTING.md Copyright.txt README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
+mv \
+ $PKG/usr/share/doc/vtk-6.3/verdict/ \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -rf $PKG/usr/share/doc
+rm -rf $PKG/usr/share/cmake
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/libraries/VTK/patch-gdal2.diff b/libraries/VTK/patch-gdal2.diff
new file mode 100644
index 0000000000000..36c33ee14caf5
--- /dev/null
+++ b/libraries/VTK/patch-gdal2.diff
@@ -0,0 +1,31 @@
+diff --git a/IO/GDAL/vtkGDALVectorReader.cxx b/IO/GDAL/vtkGDALVectorReader.cxx
+index 86854a0..a0e234a 100644
+--- a/IO/GDAL/vtkGDALVectorReader.cxx
++++ b/IO/GDAL/vtkGDALVectorReader.cxx
+@@ -44,7 +44,7 @@ class vtkGDALVectorReader::Internal
+ public:
+ Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds )
+ {
+- this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
++ this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL );
+ if ( ! this->Source )
+ {
+ this->LastError = CPLGetLastErrorMsg();
+@@ -61,7 +61,7 @@ public:
+ {
+ if ( this->Source )
+ {
+- OGRDataSource::DestroyDataSource( this->Source );
++ GDALClose( (GDALDatasetH) this->Source );
+ }
+ }
+
+@@ -304,7 +304,7 @@ public:
+ return nCells;
+ }
+
+- OGRDataSource* Source;
++ GDALDataset* Source;
+ OGRSFDriver* Driver;
+ const char* LastError;
+ int LayerIdx;