diff options
author | Martino Pilia | 2021-04-04 00:33:47 +0200 |
---|---|---|
committer | Martino Pilia | 2021-04-05 13:12:29 +0200 |
commit | 362d92221ae23ac81784c05fea7fb4b7788d05a7 (patch) | |
tree | ed711a72eb1e97404c6adde9890a6ce03a5ad84b | |
parent | 355a67c89c16ef75cc933fed57ecfa40e3c932b3 (diff) | |
download | aur-362d92221ae23ac81784c05fea7fb4b7788d05a7.tar.gz |
Version 2.0.2
-rw-r--r-- | .SRCINFO | 58 | ||||
-rw-r--r-- | PKGBUILD | 244 |
2 files changed, 200 insertions, 102 deletions
@@ -1,6 +1,6 @@ pkgbase = simpleitk pkgdesc = A simplified layer built on top of ITK - pkgver = 1.2.4 + pkgver = 2.0.2 pkgrel = 1 url = http://www.simpleitk.org/ arch = x86_64 @@ -16,25 +16,51 @@ pkgbase = simpleitk makedepends = tcl makedepends = tk makedepends = java-environment - makedepends = lua51 + makedepends = lua53 makedepends = mono makedepends = r makedepends = ruby depends = gcc-libs - depends = insight-toolkit>=4.13 - optdepends = java-runtime: Java bindings - optdepends = lua51: Lua bindings - optdepends = mono: C# bindings - optdepends = python: Python bindings - optdepends = python-numpy: Python bindings - optdepends = r: R bindings - optdepends = ruby: Ruby bindings - optdepends = tcl: Tcl/TK bindings - optdepends = tk: Tcl/TK bindings - provides = python-simpleitk - conflicts = python-simpleitk - source = git+https://github.com/SimpleITK/SimpleITK#tag=v1.2.4 - md5sums = SKIP + depends = insight-toolkit>=5.1.2 + source = https://github.com/SimpleITK/SimpleITK/archive/refs/tags/v2.0.2.tar.gz + sha256sums = e052c250bde5232d1eea62ac79c6b8cc667e7fecc7c96d0997320659cc519ecf pkgname = simpleitk +pkgname = java-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = java-runtime + +pkgname = lua-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = lua53 + +pkgname = mono-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = mono + +pkgname = python-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = python + depends = python-numpy + +pkgname = r-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = r + +pkgname = ruby-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = ruby + +pkgname = tcl-simpleitk + depends = gcc-libs + depends = insight-toolkit>=5.1.2 + depends = tcl + depends = tk + @@ -1,111 +1,183 @@ # Maintainer of this PKGBUILD file: Martino Pilia <martino.pilia@gmail.com> # Contributor: Yen Chi Hsuan <yan12125 at gmail.com> +# shellcheck disable=SC2010 _pkgname=SimpleITK -pkgname=simpleitk -pkgver=1.2.4 +pkgbase=simpleitk +pkgname=( + 'simpleitk' + 'java-simpleitk' + 'lua-simpleitk' + 'mono-simpleitk' + 'python-simpleitk' + 'r-simpleitk' + 'ruby-simpleitk' + 'tcl-simpleitk' +) +pkgver=2.0.2 pkgrel=1 pkgdesc="A simplified layer built on top of ITK" arch=('x86_64') url="http://www.simpleitk.org/" license=('Apache') -provides=('python-simpleitk') -conflicts=('python-simpleitk') -depends=('gcc-libs' 'insight-toolkit>=4.13') +provides=() +conflicts=() +depends=('gcc-libs' 'insight-toolkit>=5.1.2') makedepends=( - 'cmake' - 'git' - 'openjpeg2' - 'python' - 'python-numpy' - 'python-pip' - 'python-virtualenv' - 'swig' - 'tcl' - 'tk' - 'java-environment' - 'lua51' - 'mono' - 'r' - 'ruby' -) -optdepends=( - 'java-runtime: Java bindings' - 'lua51: Lua bindings' - 'mono: C# bindings' - 'python: Python bindings' - 'python-numpy: Python bindings' - 'r: R bindings' - 'ruby: Ruby bindings' - 'tcl: Tcl/TK bindings' - 'tk: Tcl/TK bindings' + 'cmake' + 'git' + 'openjpeg2' + 'python' + 'python-numpy' + 'python-pip' + 'python-virtualenv' + 'swig' + 'tcl' + 'tk' + 'java-environment' + 'lua53' + 'mono' + 'r' + 'ruby' ) -source=("git+https://github.com/$_pkgname/$_pkgname#tag=v$pkgver") -md5sums=('SKIP') +optdepends=() +source=("https://github.com/SimpleITK/SimpleITK/archive/refs/tags/v${pkgver}.tar.gz") +sha256sums=('e052c250bde5232d1eea62ac79c6b8cc667e7fecc7c96d0997320659cc519ecf') +_lua53_version=$(pacman -Qi lua53 | grep '^Version' | grep -Eo '[0-9]\.[0-9]\.[0-9]') prepare() { - cd "$_pkgname" - rm -rf build - mkdir -p build - cd build - - _java_home=$(find '/usr/lib/jvm/' -name "$(archlinux-java get)") - _lua51_version=$(pacman -Qi lua51 | grep '^Version' | grep -Eo '[0-9]\.[0-9]\.[0-9]') - - JAVA_HOME=$_java_home \ - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_CXX_FLAGS:STRING="-std=c++14" \ - -DLUA_VERSION_STRING:STRING="$_lua51_version" \ - -DLUA_EXECUTABLE:FILEPATH="/usr/bin/lua5.1" \ - -DLUA_INCLUDE_DIR:FILEPATH="/usr/include/lua5.1" \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DBUILD_TESTING:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_DOXYGEN:BOOL=OFF \ - -DSimpleITK_PYTHON_WHEEL:BOOL=ON \ - -DWRAP_DEFAULT:BOOL=ON \ - -DWRAP_CSHARP:BOOL=ON \ - -DWRAP_JAVA:BOOL=ON \ - -DWRAP_LUA:BOOL=ON \ - -DWRAP_PYTHON:BOOL=ON \ - -DWRAP_R:BOOL=ON \ - -DWRAP_RUBY:BOOL=ON \ - -DWRAP_TCL:BOOL=ON \ - .. + cd "${srcdir}/${_pkgname}-${pkgver}" + rm -rf build + mkdir -p build + cd build + + # Check that the required ITK modules are present + local _itk + _itk=$(ls /usr/lib/cmake | grep -m1 ITK) + if [ "$(ls "/usr/include/$_itk" | grep 'SimpleITKFiltersExport.h')" == "" ]; + then + error "ITK must be built with -DModule_SimpleITKFilters:BOOL=ON" + exit 1 + fi + + + _java_home=$(find '/usr/lib/jvm/' -name "$(archlinux-java get)") + + JAVA_HOME=$_java_home \ + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_CXX_FLAGS:STRING="-std=c++14" \ + -DLUA_VERSION_STRING:STRING="$_lua53_version" \ + -DLUA_EXECUTABLE:FILEPATH="/usr/bin/lua5.3" \ + -DLUA_INCLUDE_DIR:FILEPATH="/usr/include/lua5.3" \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DBUILD_TESTING:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF \ + -DBUILD_DOXYGEN:BOOL=OFF \ + -DSimpleITK_PYTHON_WHEEL:BOOL=ON \ + -DSimpleITK_PYTHON_USE_VIRTUALENV:BOOL=ON \ + -DWRAP_DEFAULT:BOOL=ON \ + -DWRAP_CSHARP:BOOL=ON \ + -DWRAP_JAVA:BOOL=ON \ + -DWRAP_LUA:BOOL=ON \ + -DWRAP_PYTHON:BOOL=ON \ + -DWRAP_R:BOOL=ON \ + -DWRAP_RUBY:BOOL=ON \ + -DWRAP_TCL:BOOL=ON \ + .. } build() { - cd "$_pkgname/build" + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + make all + + LD_LIBRARY_PATH="${srcdir}/${_pkgname}-${pkgver}/build/lib" make PythonVirtualEnv dist +} + +package_simpleitk() { + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + make DESTDIR="$pkgdir/" install +} + +package_python-simpleitk() { + depends=('simpleitk' 'python' 'python-numpy') + + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + local _py_version + _py_version=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") - make all PythonVirtualEnv dist + PIP_CONFIG_FILE=/dev/null \ + pip install \ + --ignore-installed \ + --isolated \ + --no-deps \ + --root="$pkgdir" \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/Python/dist/$_pkgname-"*"-linux_$CARCH.whl" + + python -O -m compileall "${pkgdir}/usr/lib/python${_py_version}/site-packages/SimpleITK" +} + +package_lua-simpleitk() { + depends=('simpleitk' 'lua53') + + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + install -d -Dm755 "$pkgdir/usr/lib/lua/5.3/" + install -Dm755 \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/Lua/lib/$_pkgname.so" \ + "$pkgdir/usr/lib/lua/5.3/$_pkgname.so" } -package() { - _builddir="$srcdir/$_pkgname/build" +package_tcl-simpleitk() { + depends=('simpleitk' 'tcl' 'tk') + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + install -Dm755 \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/Tcl/bin/SimpleITKTclsh" \ + "$pkgdir/usr/bin/SimpleITKTclsh" +} - cd "$_builddir" +package_mono-simpleitk() { + depends=('simpleitk' 'mono') + cd "${srcdir}/${_pkgname}-${pkgver}/build" - make DESTDIR="$pkgdir/" install + install -Dm755 \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/CSharp/CSharpBinaries/libSimpleITKCSharpNative.so" \ + "$pkgdir/usr/lib/libSimpleITKCSharpNative.so" - PIP_CONFIG_FILE=/dev/null \ - pip install \ - --ignore-installed \ - --isolated \ - --no-deps \ - --root="$pkgdir" \ - "$_builddir/Wrapping/Python/dist/$_pkgname-"*"-linux_$CARCH.whl" - python -O -m compileall "${pkgdir}/usr/lib/python3.8/site-packages/SimpleITK" + install -Dm755 \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/CSharp/CSharpBinaries/SimpleITKCSharpManaged.dll"\ + "$pkgdir/usr/lib/SimpleITKCSharpManaged.dll" +} - install -d -Dm755 "$pkgdir/usr/lib/lua/5.1/" - install -Dm755 "$_builddir/Wrapping/Lua/lib/$_pkgname.so" "$pkgdir/usr/lib/lua/5.1/$_pkgname.so" - install -Dm755 "$_builddir/Wrapping/Tcl/bin/SimpleITKTclsh" "$pkgdir/usr/bin/SimpleITKTclsh" - install -Dm755 "$_builddir/Wrapping/CSharp/CSharpBinaries/libSimpleITKCSharpNative.so" "$pkgdir/usr/lib/libSimpleITKCSharpNative.so" - install -Dm755 "$_builddir/Wrapping/CSharp/CSharpBinaries/SimpleITKCSharpManaged.dll" "$pkgdir/usr/lib/SimpleITKCSharpManaged.dll" +package_r-simpleitk() { + depends=('simpleitk' 'r') + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + install -d -Dm755 "$pkgdir/usr/lib/R/library/" + + cp -dr --no-preserve=ownership \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/R/Packaging/$_pkgname" \ + "$pkgdir/usr/lib/R/library/" +} + +package_java-simpleitk() { + depends=('simpleitk' 'java-runtime') + cd "${srcdir}/${_pkgname}-${pkgver}/build" + + install -d -Dm755 "$pkgdir/usr/share/java/SimpleITK/" + + cp -dr --no-preserve=ownership \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/Java/dist/SimpleITK-$pkgver"*/* \ + "$pkgdir/usr/share/java/SimpleITK/" +} - install -d -Dm755 "$pkgdir/usr/lib/R/library/" - cp -dr --no-preserve=ownership "$_builddir/Wrapping/R/Packaging/$_pkgname" "$pkgdir/usr/lib/R/library/" +package_ruby-simpleitk() { + depends=('simpleitk' 'ruby') - install -d -Dm755 "$pkgdir/usr/share/java/SimpleITK/" - cp -dr --no-preserve=ownership "$_builddir/Wrapping/Java/dist/SimpleITK-$pkgver"*/* "$pkgdir/usr/share/java/SimpleITK/" + install -Dm755 \ + "${srcdir}/${_pkgname}-${pkgver}/build/Wrapping/Ruby/lib/simpleitk.so" \ + "$pkgdir/usr/lib/ruby/gems/${_lua53_version}/gems/ruby-simpleitk-${pkgver}/lib/simpleitk.so" } |