Package Details: insight-toolkit 5.4.0-1

Git Clone URL: https://aur.archlinux.org/insight-toolkit.git (read-only, click to copy)
Package Base: insight-toolkit
Description: Cross-platform system that provides developers with an extensive suite of software tools for image analysis
Upstream URL: https://itk.org/
Licenses: Apache-2.0
Submitter: joelsc
Maintainer: FabioLolix
Last Packager: FabioLolix
Votes: 38
Popularity: 0.100348
First Submitted: 2008-11-16 19:36 (UTC)
Last Updated: 2024-08-24 21:51 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 Next › Last »

crmullins commented on 2022-08-14 20:29 (UTC)

Sorry this fell off my radar. I'm running into some issues testing entshuld's contribution, but will update this today if I'm able to get it built and packaged.

entshuld commented on 2022-01-27 03:25 (UTC) (edited on 2022-01-28 05:19 (UTC) by entshuld)

I have some amendments to share

  • 1. Allow Python wrappers independent of locale.
  • 2. ```makepkg -C``` exists to clean if the user so wishes
  • 3. use pkgname and pkgver instead of InsightToolkit

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,19 +23,56 @@ optdepends=('python2: build python wrapping'
             'clang: for swig'
        'castxml-git: for ITK')
 makedepends=('cmake' 'git')
-source=("https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${pkgver}/InsightToolkit-${pkgver}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${pkgver}/InsightToolkit-${pkgver}.tar.gz")
 sha512sums=('6786e39cdf3d0c3a31abd1e23481e30f6dc9dac189ffe372dde3db688f2f57686a8beb321778327e1ff683ed844d41f1dee937b0ba542b2365e2195dfca398c7')
+provides=(python-itk=${pkgver})
+conflicts=(python-itk)
+options=(!emptydirs)

-_usepython=false
+safe_flags="-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS"
+safe_flags+=" -fcf-protection -fno-plt"
+safe_flags+=" -fstack-clash-protection -Wformat"
+safe_flags+=" -Werror=format-security"
+generic_flags="-pipe -fno-plt -fPIC -fopenmp"
+generic_flags+=" -march=native"
+generic_flags+=" -mtune=native ${safe_flags}"
+opt_flags="${generic_flags} -O3"
+generic_flags="${generic_flags} -O2"
+
+export COPTFLAGS="${opt_flags}"
+export CXXOPTFLAGS="$COPTFLAGS"
+export FOPTFLAGS="$COPTFLAGS"
+export CPPFLAGS="$generic_flags"
+export CXXFLAGS="$CPPFLAGS"
+export CFLAGS="$generic_flags"
+export FFLAGS="$generic_flags"
+export FCFLAGS="$generic_flags"
+export F90FLAGS="$generic_flags"
+export F77FLAGS="$generic_flags"
+
+export LANG=C
+export OMPI_MCA_opal_cuda_support=0
+export OMPI_MCA_mpi_oversubscribe=0
+
+_usepython=true
+# https://github.com/InsightSoftwareConsortium/ITK/search?q=typeinfo&type=issues
+# https://insightsoftwareconsortium.atlassian.net/browse/ITK-3538?focusedCommentId=27765&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-27765
+# from here: https://github.com/InsightSoftwareConsortium/ITK/issues/1701#issuecomment-598311460
+export LC_ALL=C LANG=C LANGUAGE=C
+
+prepare() {
+  cd "$srcdir"
+  [[ -d InsightToolkit-"${pkgver}" ]] &&
+    mv InsightToolkit-"${pkgver}" "${pkgname}"-"${pkgver}"
+}

 build() {
   cd "$srcdir"
-  rm -rf build
-  mkdir build
-  cd build

-  cmake \
+  cmake -S "${srcdir}/${pkgname}-${pkgver}" \
+    -B "${srcdir}/${pkgname}-${pkgver}"/build \
     -DCMAKE_BUILD_TYPE:STRING=Release \
+    -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
     -DBUILD_TESTING:BOOL=OFF \
     -DBUILD_EXAMPLES:BOOL=OFF \
     -DBUILD_SHARED_LIBS:BOOL=ON \
@@ -56,16 +93,25 @@ build() {
     -DITK_USE_SYSTEM_EXPAT:BOOL=ON \
     -DITK_USE_SYSTEM_FFTW:BOOL=ON \
     -DITK_USE_SYSTEM_HDF5:BOOL=ON \
+    -DITK_USE_64BITS_IDS:BOOL=ON \
+    -DITK_LEGACY_REMOVE:BOOL=ON \
     -DModule_ITKIOMINC:BOOL=ON \
     -DModule_ITKIOTransformMINC:BOOL=ON \
-    -DModule_SimpleITKFilters:BOOL=ON \
-    ../InsightToolkit-${pkgver}
+    -DModule_SimpleITKFilters:BOOL=ON

-  make
+  # 4: to your liking
+  make -j4 -s -C "${srcdir}/${pkgname}-${pkgver}"/build
 }

 package() {
-  cd "$srcdir"/build
+  cd "${srcdir}/${pkgname}-${pkgver}"/build
+
+  make -C "${srcdir}"/"${pkgname}-${pkgver}"/build DESTDIR="${pkgdir}" install

-  make DESTDIR="${pkgdir}" install
+  # Based on AUR's itk-git package
+  # (quick fix for https://github.com/InsightSoftwareConsortium/ITK/issues/2960)
+  install -dm755 "${pkgdir}"/usr/lib
+  _pyver=$(python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))')
+  find "${pkgdir}" -type d -name "python${_pyver}" -print0 -quit | xargs -0 mv -vt "${pkgdir}/usr/lib"
+  python -O -m compileall "${pkgdir}/usr/lib"
 }

hottea commented on 2022-01-01 06:26 (UTC)

@m-pilia @crmullins Maybe merge insight-toolkit, itk, and python-itk, and keep only itk and python-itk? I currently maintain itk-git and python-itk-git here.

m-pilia commented on 2021-12-31 13:17 (UTC)

Hi @crmullins! I was wondering if we could improve a bit the Python distribution of ITK.

The current situation is: the Python wheels can be built from your PKGBUILD but are disabled by default and require manual intervention. There is also a separate package for the Python part only (python-itk, that I maintain) but it does not make sense to build the wheels separately from insight-toolkit, since it is a lot of duplicated build time. (context in this comment).

The best solution would be to turn insight-toolkit into a split package, so that it is possible to build both insight-toolkit and python-itk from the same PKGBUILD.

Hottea has kindly created a split PKGBUILD here. Could you consider updating this package to use Hottea's approach? (pushing the split package will require to delete python-itk first: feel free to nominate my package for deletion because of this reason).

buzo commented on 2021-06-17 13:18 (UTC)

Please add git to makedepends, otherwise it does not build (in a https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot).

MartinDiehl commented on 2021-04-10 12:07 (UTC)

could you please change the dependency from 'hdf5-cpp-fortran' to 'hdf5'? The special cpp/fortran versions doe not exist anymore.

m-pilia commented on 2021-04-03 21:47 (UTC)

Hi! Could you please add the SimpleITKFilters module to the package (CMake command line flag -DModule_SimpleITKFilters:BOOL=ON)? It is required to build simpleitk version >=2.0.

liamtimms commented on 2019-10-02 21:34 (UTC)

Hi, it would be great if you could add the Generic Label Interpolator flag to the build process: https://itk.org/Doxygen/html/group__GenericLabelInterpolator.html

This is necessary for ITK to be used by ANTs: https://github.com/ANTsX/ANTs/issues/817