mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
academic/ITK: Fix build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
a00d12edde
commit
ec64bde850
2 changed files with 10 additions and 50 deletions
|
@ -29,7 +29,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
PRGNAM=ITK
|
||||
SRCNAM=InsightToolkit
|
||||
VERSION=${VERSION:-4.13.2}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -41,9 +41,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -82,50 +79,10 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
patch -p1 <<'endpatch'
|
||||
--- InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h.cp
|
||||
+++ InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h
|
||||
@@ -96,6 +96,39 @@
|
||||
# define VCL_GCC_81
|
||||
# else
|
||||
# define VCL_GCC_80
|
||||
+# endif
|
||||
+# elif (__GNUC__==9)
|
||||
+# define VCL_GCC_9
|
||||
+# if (__GNUC_MINOR__ > 2 )
|
||||
+# define VCL_GCC_93
|
||||
+# elif (__GNUC_MINOR__ > 1 )
|
||||
+# define VCL_GCC_92
|
||||
+# elif (__GNUC_MINOR__ > 0 )
|
||||
+# define VCL_GCC_91
|
||||
+# else
|
||||
+# define VCL_GCC_90
|
||||
+# endif
|
||||
+# elif (__GNUC__==10)
|
||||
+# define VCL_GCC_10
|
||||
+# if (__GNUC_MINOR__ > 2 )
|
||||
+# define VCL_GCC_103
|
||||
+# elif (__GNUC_MINOR__ > 1 )
|
||||
+# define VCL_GCC_102
|
||||
+# elif (__GNUC_MINOR__ > 0 )
|
||||
+# define VCL_GCC_101
|
||||
+# else
|
||||
+# define VCL_GCC_100
|
||||
+# endif
|
||||
+# elif (__GNUC__==11)
|
||||
+# define VCL_GCC_11
|
||||
+# if (__GNUC_MINOR__ > 2 )
|
||||
+# define VCL_GCC_113
|
||||
+# elif (__GNUC_MINOR__ > 1 )
|
||||
+# define VCL_GCC_112
|
||||
+# elif (__GNUC_MINOR__ > 0 )
|
||||
+# define VCL_GCC_111
|
||||
+# else
|
||||
+# define VCL_GCC_110
|
||||
# endif
|
||||
# else
|
||||
# error "Dunno about this gcc"
|
||||
endpatch
|
||||
# Do not fail on more recent versions of gcc
|
||||
sed -i 's,# error "Dunno about this gcc",# define VCL_GCC_80,' \
|
||||
"Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h"
|
||||
|
||||
|
||||
sed -i "s/lib\b/lib${LIBDIRSUFFIX}/" CMakeLists.txt
|
||||
sed -i "s|/opj_config.h|& \$\{CMAKE_CURRENT_BINARY_DIR\}/openjpeg_mangle.h|" \
|
||||
|
@ -135,12 +92,13 @@ mkdir -p build
|
|||
cd build
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$SLKCFLAGS -std=c++11" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DITK_FORBID_DOWNLOADS=ON \
|
||||
-DITK_WRAP_PYTHON=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DITK_USE_SYSTEM_LIBRARIES=ON \
|
||||
-DITK_USE_SYSTEM_DCMTK=ON \
|
||||
-DITK_USE_SYSTEM_DOUBLECONVERSION=ON \
|
||||
|
@ -151,6 +109,8 @@ cd build
|
|||
-DITK_USE_SYSTEM_PNG=ON \
|
||||
-DITK_USE_SYSTEM_TIFF=ON \
|
||||
-DITK_USE_SYSTEM_ZLIB=ON \
|
||||
-DModule_ITKIOMINC=ON \
|
||||
-DModule_ITKIOTransformMINC=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
make install DESTDIR=$PKG
|
||||
cd ..
|
||||
|
|
|
@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/InsightSoftwareConsortium/ITK/releases/download/v4.
|
|||
MD5SUM="d140ddabe22428e86bc5053e0d268872"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="double-conversion gtest hdf5"
|
||||
REQUIRES="double-conversion antlr4 hdf5"
|
||||
MAINTAINER="Benjamin Trigona-Harany"
|
||||
EMAIL="slackbuilds@jaxartes.net"
|
||||
|
|
Loading…
Reference in a new issue