libraries/vtk: Added Qt Support + Fix x86_64 cmake.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Youjie Zhou 2014-01-08 18:41:03 +07:00 committed by Erik Hanson
parent 73e9953a7e
commit 0f451ba10b
4 changed files with 1588 additions and 5 deletions

View file

@ -0,0 +1,36 @@
--- VTKConfig.cmake 2014-01-07 20:30:39.472055732 -0500
+++ ../lib64-fix-good/VTKConfig.cmake 2014-01-07 20:44:02.498085679 -0500
@@ -10,7 +10,7 @@
get_filename_component(VTK_INSTALL_PREFIX "${VTK_INSTALL_PREFIX}" PATH)
get_filename_component(VTK_INSTALL_PREFIX "${VTK_INSTALL_PREFIX}" PATH)
get_filename_component(VTK_INSTALL_PREFIX "${VTK_INSTALL_PREFIX}" PATH)
-set(VTK_MODULES_DIR "${VTK_INSTALL_PREFIX}/lib/cmake/vtk-6.0/Modules")
+set(VTK_MODULES_DIR "${VTK_INSTALL_PREFIX}/lib64/cmake/vtk-6.0/Modules")
# The C and C++ flags added by VTK to the cmake-configured flags.
SET(VTK_REQUIRED_C_FLAGS "")
@@ -25,7 +25,7 @@
SET(VTK_BUILD_VERSION "0")
# The location of the UseVTK.cmake file.
-SET(VTK_CMAKE_DIR "${VTK_INSTALL_PREFIX}/lib/cmake/vtk-6.0")
+SET(VTK_CMAKE_DIR "${VTK_INSTALL_PREFIX}/lib64/cmake/vtk-6.0")
SET(VTK_USE_FILE "${VTK_CMAKE_DIR}/UseVTK.cmake")
#-----------------------------------------------------------------------------
@@ -44,13 +44,13 @@
endforeach()
# Import VTK targets.
-set(VTK_CONFIG_TARGETS_FILE "${VTK_INSTALL_PREFIX}/lib/cmake/vtk-6.0/VTKTargets.cmake")
+set(VTK_CONFIG_TARGETS_FILE "${VTK_INSTALL_PREFIX}/lib64/cmake/vtk-6.0/VTKTargets.cmake")
if(NOT TARGET vtkCommonCore)
include("${VTK_CONFIG_TARGETS_FILE}")
endif()
# Load module interface macros.
-include("${VTK_INSTALL_PREFIX}/lib/cmake/vtk-6.0/vtkModuleAPI.cmake")
+include("${VTK_INSTALL_PREFIX}/lib64/cmake/vtk-6.0/vtkModuleAPI.cmake")
# Compute set of requested modules.
if(VTK_FIND_COMPONENTS)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
--- VTKTargets.cmake 2014-01-07 20:30:39.472055732 -0500
+++ ../lib64-fix-good/VTKTargets.cmake 2014-01-07 20:44:02.498085679 -0500
@@ -43,9 +43,9 @@
# Use original install prefix when loaded through a
# cross-prefix symbolic link such as /lib -> /usr/lib.
get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH)
-get_filename_component(_realOrig "/usr/lib/cmake/vtk-6.0" REALPATH)
+get_filename_component(_realOrig "/usr/lib64/cmake/vtk-6.0" REALPATH)
if(_realCurr STREQUAL _realOrig)
- set(_IMPORT_PREFIX "/usr/lib/cmake/vtk-6.0")
+ set(_IMPORT_PREFIX "/usr/lib64/cmake/vtk-6.0")
endif()
unset(_realOrig)
unset(_realCurr)

View file

@ -76,7 +76,10 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
-DCMAKE_BUILD_TYPE=Release \
-DVTK_Group_Qt=ON \
-DBUILD_SHARED_LIBS=ON ..
make
make install DESTDIR=$PKG
cd ..
@ -84,15 +87,18 @@ cd ..
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
# move lib/ to the proper location
# Move lib/ to the proper location
if [ "$ARCH" = "x86_64" ]; then
mv $PKG/usr/lib $PKG/usr/lib$LIBDIRSUFFIX
# We also need to patch lib/ strings to lib64/ in cmake files
cd $PKG/usr/lib$LIBDIRSUFFIX/cmake/$PRGNAM-*/
patch -p2 < $CWD/lib64-fix-patch/VTKConfig.diff
patch -p2 < $CWD/lib64-fix-patch/VTKTargets.diff
patch -p2 < $CWD/lib64-fix-patch/VTKTargets-release.diff
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
$TMP/$PKGNAM$VERSION/Examples \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install