1 |
commit: 039697bf6b87b07578ac626d015e71bc38901722 |
2 |
Author: tharvik <tharvik <AT> users <DOT> noreply <DOT> github <DOT> com> |
3 |
AuthorDate: Sun Jun 18 22:31:57 2017 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 23 09:11:41 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=039697bf |
7 |
|
8 |
sci-libs/itk: bump to 4.12.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.1 |
11 |
Closes: https://github.com/gentoo/sci/pull/792 |
12 |
|
13 |
sci-libs/itk/itk-4.12.0.ebuild | 136 +++++++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 136 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/itk/itk-4.12.0.ebuild b/sci-libs/itk/itk-4.12.0.ebuild |
17 |
new file mode 100644 |
18 |
index 000000000..a9633748b |
19 |
--- /dev/null |
20 |
+++ b/sci-libs/itk/itk-4.12.0.ebuild |
21 |
@@ -0,0 +1,136 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python2_7 ) |
28 |
+ |
29 |
+inherit eutils toolchain-funcs cmake-utils python-single-r1 |
30 |
+ |
31 |
+MYPN=InsightToolkit |
32 |
+MYP=${MYPN}-${PV} |
33 |
+DOC_PV=4.5.0 |
34 |
+ |
35 |
+DESCRIPTION="NLM Insight Segmentation and Registration Toolkit" |
36 |
+HOMEPAGE="http://www.itk.org" |
37 |
+SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.xz |
38 |
+ doc? ( mirror://sourceforge/${PN}/Doxygen${MYPN}-${DOC_PV}.tar.gz )" |
39 |
+RESTRICT="primaryuri" |
40 |
+ |
41 |
+LICENSE="Apache-2.0" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
44 |
+IUSE="debug doc examples +fftw itkv3compat python review cpu_flags_x86_sse2 test vtkglue" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ dev-libs/double-conversion:0= |
48 |
+ media-libs/libpng:0= |
49 |
+ media-libs/tiff:0= |
50 |
+ sci-libs/dcmtk:0= |
51 |
+ sci-libs/hdf5:0=[cxx] |
52 |
+ sys-libs/zlib:0= |
53 |
+ virtual/jpeg:0= |
54 |
+ fftw? ( sci-libs/fftw:3.0= ) |
55 |
+ vtkglue? ( sci-libs/vtk:0=[python?] ) |
56 |
+" |
57 |
+DEPEND="${RDEPEND} |
58 |
+ python? ( |
59 |
+ ${PYTHON_DEPS} |
60 |
+ >=dev-lang/swig-2.0:0 |
61 |
+ >=dev-cpp/gccxml-0.9.0_pre20120309 |
62 |
+ ) |
63 |
+ doc? ( app-doc/doxygen ) |
64 |
+" |
65 |
+ |
66 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
67 |
+ |
68 |
+S="${WORKDIR}/${MYP}" |
69 |
+ |
70 |
+PATCHES=( |
71 |
+ "${FILESDIR}/nrrdio-linking.patch" |
72 |
+) |
73 |
+ |
74 |
+get_memory() { |
75 |
+ free --giga | grep Mem | cut -d ' ' -f 15 || die 'unable to get memory size' |
76 |
+} |
77 |
+ |
78 |
+src_configure() { |
79 |
+ sed -i \ |
80 |
+ -e '/find_package/d' \ |
81 |
+ Modules/ThirdParty/DoubleConversion/CMakeLists.txt || die |
82 |
+ |
83 |
+ local mycmakeargs=( |
84 |
+ -DBUILD_SHARED_LIBS=ON |
85 |
+ -DITK_USE_SYSTEM_DCMTK=ON |
86 |
+ -DITK_USE_SYSTEM_DOUBLECONVERSION=ON |
87 |
+ -DITK_USE_SYSTEM_HDF5=ON |
88 |
+ -DITK_USE_SYSTEM_JPEG=ON |
89 |
+ -DITK_USE_SYSTEM_PNG=ON |
90 |
+ -DITK_USE_SYSTEM_SWIG=ON |
91 |
+ -DITK_USE_SYSTEM_TIFF=ON |
92 |
+ -DITK_USE_SYSTEM_ZLIB=ON |
93 |
+ -DITK_BUILD_DEFAULT_MODULES=ON |
94 |
+ -DITK_COMPUTER_MEMORY_SIZE="$(get_memory)" |
95 |
+ -DITK_WRAP_JAVA=OFF |
96 |
+ -DITK_WRAP_TCL=OFF |
97 |
+ -DBUILD_TESTING=$(usex test) |
98 |
+ -DBUILD_EXAMPLES=$(usex examples) |
99 |
+ -DITK_USE_REVIEW=$(usex review) |
100 |
+ -DITKV3_COMPATIBILITY=$(usex itkv3compat) |
101 |
+ -DVNL_CONFIG_ENABLE_SSE2=$(usex cpu_flags_x86_sse2) |
102 |
+ ) |
103 |
+ if use fftw; then |
104 |
+ mycmakeargs+=( |
105 |
+ -DUSE_FFTWD=ON |
106 |
+ -DUSE_FFTWF=ON |
107 |
+ -DUSE_SYSTEM_FFTW=ON |
108 |
+ -DITK_USE_SYSTEM_FFTW=ON |
109 |
+ -DITK_WRAPPING=ON |
110 |
+ -DITK_WRAP_double=ON |
111 |
+ -DITK_WRAP_vector_double=ON |
112 |
+ -DITK_WRAP_covariant_vector_double=ON |
113 |
+ -DITK_WRAP_complex_double=ON |
114 |
+ ) |
115 |
+ fi |
116 |
+ if use vtkglue; then |
117 |
+ mycmakeargs+=( |
118 |
+ -DModule_ITKVtkGlue=ON |
119 |
+ ) |
120 |
+ fi |
121 |
+ mycmakeargs+=( |
122 |
+ -DITK_WRAP_PYTHON=$(usex python ON OFF) |
123 |
+ ) |
124 |
+ |
125 |
+ cmake-utils_src_configure |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ cmake-utils_src_install |
130 |
+ |
131 |
+ if use examples; then |
132 |
+ insinto /usr/share/doc/${PF}/examples |
133 |
+ docompress -x /usr/share/doc/${PF}/examples |
134 |
+ doins -r "${S}"/Examples/* |
135 |
+ fi |
136 |
+ |
137 |
+ echo "ITK_DATA_ROOT=${EROOT%/}/usr/share/${PN}/data" > ${T}/40${PN} |
138 |
+ local ldpath="${EROOT%/}/usr/$(get_libdir)/InsightToolkit" |
139 |
+ if use python; then |
140 |
+ echo "PYTHONPATH=${EROOT%/}/usr/$(get_libdir)/InsightToolkit/WrapITK/Python" >> "${T}"/40${PN} |
141 |
+ ldpath="${ldpath}:${EROOT%/}/usr/$(get_libdir)/InsightToolkit/WrapITK/lib" |
142 |
+ fi |
143 |
+ echo "LDPATH=${ldpath}" >> "${T}"/40${PN} |
144 |
+ doenvd "${T}"/40${PN} |
145 |
+ |
146 |
+ if use doc; then |
147 |
+ insinto /usr/share/doc/${PF}/api-docs |
148 |
+ cd "${WORKDIR}"/html |
149 |
+ rm *.md5 || die "Failed to remove superfluous hashes" |
150 |
+ einfo "Installing API docs. This may take some time." |
151 |
+ insinto /usr/share/doc/${PF}/api-docs |
152 |
+ doins -r * |
153 |
+ fi |
154 |
+ |
155 |
+ mv "${D}/usr/lib" "${D}/usr/$(get_libdir)" || \ |
156 |
+ die 'unable to fix libdir' |
157 |
+} |