1
0

Accepting request 351328 from home:tzotsos

Main dependency of OTB

OBS-URL: https://build.opensuse.org/request/show/351328
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/insighttoolkit?expand=0&rev=1
This commit is contained in:
Martin Pluskal 2015-12-30 12:32:33 +00:00 committed by Git OBS Bridge
commit 80cecb468a
7 changed files with 257 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8d5e3aea700588c60b01418c440b2d95b517ea18dd4c834c5164354e53596af
size 17400381

16
doubleconv.patch Normal file
View File

@ -0,0 +1,16 @@
Description: Upstream provides an option to build against
a system installed double conversion but it appears as
broken at least on Debian
Author: Mathieu Malaterre <malat@debian.org>
Bug-Debian: http://bugs.debian.org/733629
--- insighttoolkit4-4.5.0.orig/Modules/Core/Common/src/CMakeLists.txt
+++ insighttoolkit4-4.5.0/Modules/Core/Common/src/CMakeLists.txt
@@ -108,6 +108,7 @@ endif()
### generating libraries
add_library( ITKCommon ${ITK_LIBRARY_BUILD_TYPE} ${ITKCommon_SRCS})
+include_directories( /usr/include/double-conversion )
target_link_libraries(ITKCommon
itksys
ITKVNLInstantiation

24
insighttoolkit.changes Normal file
View File

@ -0,0 +1,24 @@
----------------------------------------------------------------------------
* Sat Dec 26 15:34:00 UTC 2015 Angelos Tzotsos <tzotsos@opensuse.org> - 4.8.2
- Update to 4.8.2
----------------------------------------------------------------------------
* Fri Aug 14 00:40:00 UTC 2015 Angelos Tzotsos <tzotsos@opensuse.org> - 4.7.2
- Update to 4.7.2
----------------------------------------------------------------------------
* Fri Feb 27 21:24:00 UTC 2015 Angelos Tzotsos <tzotsos@opensuse.org>
- Renamed package to insighttoolkit
----------------------------------------------------------------------------
* Wed Jan 14 01:14:00 UTC 2015 Angelos Tzotsos <tzotsos@opensuse.org> - 4.6.0
- Update to 4.6.0
----------------------------------------------------------------------------
* Sat Mar 01 23:03:00 UTC 2014 Angelos Tzotsos <tzotsos@opensuse.org> - 4.5.1
- Initial build

175
insighttoolkit.spec Normal file
View File

@ -0,0 +1,175 @@
#
# spec file for package insighttoolkit
#
# Copyright (c) 2015 Angelos Tzotsos <tzotsos@opensuse.org>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# norootforbuild
%define tarname InsightToolkit
Name: insighttoolkit
Version: 4.8.2
Release: 1
Summary: Insight Segmentation and Registration Toolkit
Group: Development/Libraries
License: Apache-2
URL: http://www.itk.org
Source0: %{tarname}-%{version}.tar.gz
Patch0: nrrdio-linking.patch
Patch1: doubleconv.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake >= 2.8.0
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: swig
BuildRequires: zlib-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: fftw3-devel
BuildRequires: fftw3-threads-devel
BuildRequires: dcmtk-devel
# BuildRequires: gdcm-devel
BuildRequires: hdf5-devel
BuildRequires: python-devel
BuildRequires: vtk-devel
BuildRequires: python-vtk
BuildRequires: libjpeg-devel
BuildRequires: libexpat-devel
BuildRequires: sed
BuildRequires: fdupes
%description
ITK is an open-source, cross-platform system that provides developers with an extensive suite of software tools for image analysis
%package devel
Summary: Development files for ITK
Group: Development/Libraries
Requires: lib%{name}4 = %{version}
Requires: zlib-devel
Requires: libpng-devel
Requires: libtiff-devel
Requires: fftw3-devel
Requires: fftw3-threads-devel
Requires: dcmtk-devel
Requires: hdf5-devel
Requires: vtk-devel
Requires: libjpeg-devel
Requires: libexpat-devel
Provides: lib%{name}-devel
%description devel
Development files for the ITK library. ITK is an open-source, cross-platform system that provides developers with an extensive suite of software tools for image analysis
%package -n lib%{name}4
Summary: ITK static libraries
Group: System/Libraries
%description -n lib%{name}4
Shared ITK library. ITK is an open-source, cross-platform system that provides developers with an extensive suite of software tools for image analysis.
%prep
%setup -q -n %{tarname}-%{version}
%patch0 -p1
%patch1 -p1
%build
cd ..
mkdir temp
cd temp
cmake -DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DUSE_FFTWF=ON \
-DITK_USE_FFTWD:BOOL=ON \
-DITK_USE_FFTWF:BOOL=ON \
-DITK_USE_SYSTEM_FFTW:BOOL=ON \
-DITK_USE_STRICT_CONCEPT_CHECKING:BOOL=ON \
-DITK_USE_SYSTEM_DOUBLECONVERSION:BOOL=OFF \
-DITK_USE_SYSTEM_DCMTK:BOOL=ON \
-DITK_USE_SYSTEM_GDCM:BOOL=OFF \
-DITK_USE_SYSTEM_HDF5:BOOL=ON \
-DITK_USE_SYSTEM_JPEG:BOOL=ON \
-DITK_USE_SYSTEM_PNG:BOOL=ON \
-DITK_USE_SYSTEM_TIFF:BOOL=ON \
-DITK_USE_SYSTEM_VXL:BOOL=OFF \
-DITK_USE_SYSTEM_ZLIB:BOOL=ON \
-DITK_USE_SYSTEM_GCCXML:BOOL=OFF \
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
-DITK_USE_SYSTEM_EXPAT:BOOL=ON \
-DModule_ITKDCMTK:BOOL=ON \
-DModule_ITKIOPhilipsREC:BOOL=OFF \
-DModule_ITKLevelSetsv4Visualization:BOOL=OFF \
-DModule_ITKReview:BOOL=OFF \
-DModule_ITKVideoBridgeOpenCV:BOOL=OFF \
-DModule_ITKVideoBridgeVXL:BOOL=OFF \
-DModule_ITKVtkGlue:BOOL=OFF \
-DModule_ITKDeprecated:BOOL=OFF \
-DITKV3_COMPATIBILITY:BOOL=ON \
-DVCL_INCLUDE_CXX_0X:BOOL=ON \
-DITK_WRAP_DIMS="2;3;4" \
-DITK_WRAP_double:BOOL=ON \
-DITK_WRAP_vector_double:BOOL=ON \
-DITK_WRAP_covariant_vector_double:BOOL=ON \
-DITK_WRAP_complex_double:BOOL=ON \
-DITK_WRAPPING:BOOL=OFF \
-DITK_WRAP_PYTHON:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_BUILD_TYPE:STRING="Release" ../%{tarname}-%{version}/
make VERBOSE=1 %{?_smp_mflags}
%install
cd ../temp
make install DESTDIR=%{buildroot}
%if "%{_lib}" == "lib64"
mkdir -p %{buildroot}/usr/lib64
mv %{buildroot}/usr/lib/* %{buildroot}/usr/lib64/
sed -i 's|/lib/|/lib64/|g' %{buildroot}/usr/lib64/cmake/ITK-4.8/ITKConfig.cmake
sed -i 's|/lib/|/lib64/|g' %{buildroot}/usr/lib64/cmake/ITK-4.8/ITKTargets.cmake
sed -i 's|/lib/|/lib64/|g' %{buildroot}/usr/lib64/cmake/ITK-4.8/ITKTargets-release.cmake
%endif
rm -rf %{buildroot}/usr/lib/debug
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%post -n lib%{name}4 -p /sbin/ldconfig
%postun -n lib%{name}4 -p /sbin/ldconfig
%files -n lib%{name}4
%defattr(644,root,root,755)
# %dir %{_libdir}/
%{_libdir}/*.so.1
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/cmake/
%{_bindir}/itkTestDriver
%{_datadir}/*
%changelog

15
nrrdio-linking.patch Normal file
View File

@ -0,0 +1,15 @@
Description: Link libITKNrrdIO with -lm (needed for sqrt)
Author: Steve Robbins <smr@debian.org>
Forwarded: no
--- insighttoolkit4-4.5.0.orig/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
+++ insighttoolkit4-4.5.0/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
@@ -64,7 +64,7 @@
ADD_DEFINITIONS(-DTEEM_ZLIB=1)
ADD_LIBRARY(ITKNrrdIO ${nrrdio_SRCS} )
-TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES})
+TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES} -lm)
IF(ITK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(ITKNrrdIO PROPERTIES ${ITK_LIBRARY_PROPERTIES})