1 |
commit: 358b5b2e29330305ba4c8bee1f072668877f2ab3 |
2 |
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 24 19:46:51 2019 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 24 20:17:43 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=358b5b2e |
7 |
|
8 |
app-forensics/sleuthkit: remove old 4.6.0 and 4.6.4 |
9 |
|
10 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
11 |
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org> |
12 |
|
13 |
app-forensics/sleuthkit/Manifest | 2 - |
14 |
.../sleuthkit-4.6.4-CVE-2018-19497-backport.patch | 83 ------- |
15 |
app-forensics/sleuthkit/sleuthkit-4.6.0.ebuild | 227 ------------------ |
16 |
app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild | 256 --------------------- |
17 |
4 files changed, 568 deletions(-) |
18 |
|
19 |
diff --git a/app-forensics/sleuthkit/Manifest b/app-forensics/sleuthkit/Manifest |
20 |
index 281da89a45b..d6e3eea75bc 100644 |
21 |
--- a/app-forensics/sleuthkit/Manifest |
22 |
+++ b/app-forensics/sleuthkit/Manifest |
23 |
@@ -1,7 +1,5 @@ |
24 |
DIST SparseBitSet-1.1.jar 23706 BLAKE2B 8623a723f11f97386a108c775fefddd324997b68bea7f7ade0581ec5800bfa8d32f699ab903ad66c631b7b5c69ba1ef377243653f5044f39234dac07543eb129 SHA512 cf75431c5f705961800ce5cbca2acb9b2459eaf98ec37b5ee21c5a90d204ffb466fa25457b0560fbb024489777efbea0276201024c7b1b2853124930ac490983 |
25 |
DIST libewf-20130128.tar.gz 1978794 BLAKE2B e5d2bd8f4a8b878e13536b89b032d8cee6982272065b2bf325f8a811dff258264118a79496912377337ceb9ad630138b6bedb89e3c3be89a5f6a6fea85ab586b SHA512 94cdd0c3f0d8f535f3462c5adba266302f9b129abacda077ed429fa38af6862fca5a90ba2e606b78607b509769305cc6134c483c7033c20e226596cca2d42b90 |
26 |
DIST sleuthkit-4.5.0.tar.gz 8611141 BLAKE2B a1ae66bfcb74ce1fec24f80dfe60cd68f1de53119331c38848f7f82de8052eda49d78fdea49e42ada5843094939ef212dece42a5ceb85931a79e02adccda30e6 SHA512 911890cacca739f121681514197104cb2dc3bd219f3e068c4ce61264498c56989359976fc75172e1f456c94e4e25c6206413b0234c36e55736a577b8e664e4b3 |
27 |
-DIST sleuthkit-4.6.0.tar.gz 8634432 BLAKE2B b45721cdee798d84f0caa0bfe38645346539bb497f5a492c72016a6b3b0246b362ecea676a7a0e788d66cc0dc32335e719912434bd61aa205b7d51b8d4bd7c14 SHA512 dbf880e8503dccb0a686f1d9658d56e9cb40f452127f9b713cf2a4941f4083fa1cf80a886994d58421307a679242cd4ee005b3e874cf429cfb140a597a0dc739 |
28 |
-DIST sleuthkit-4.6.4.tar.gz 8655341 BLAKE2B 9d8a2884d1c90e9be3104221c22fdc4346c8f288a13384ef8205cea46bbda2249691b548b7d19a1b34d6d0d1fc6d5390aa0fc8c8b28ea75b53de946b62c8e25c SHA512 0dd3fc3659fd6dee49ababd8033bcc5ce218c9154b61eb072a943e8d1a96fb04dcabc85124583bc69ad0ced2609fed11812164a3db6587446255a9c507f08762 |
29 |
DIST sleuthkit-4.6.5.tar.gz 8658866 BLAKE2B 29b75c96a14c5d42522e7116a80cc368c8097fa43af27c0e958215142d6ee61131c7b154fb876fa3ea9c727e8100de9bd703dfd8cef9ccce1f6602222c8470fa SHA512 ba21be166da1a7bdd197946722a1e0947f90bbb2c27d635cdfbcbc870aa42937fe6b42f432482f70a5e686942c8891d0367b5ce28615315d8905661e73aefe32 |
30 |
DIST sqlite-jdbc-3.8.11.jar 5131732 BLAKE2B 1a04fa9e9cb97fdddc19af2de9efa7b54c0b527642e6e325e31054e4e294e3bc6af00ea291087ed9dd26668d48dae356035fc85212c0eb81656550d552103ed0 SHA512 5f4705101992e8916e29742c560aef0d01eba9dc0d2d984b75a77e56be3c9fd20b284390fe8f9bb54bf9d1f8528c3413922684c446212ca8961ac731543fb179 |
31 |
|
32 |
diff --git a/app-forensics/sleuthkit/files/sleuthkit-4.6.4-CVE-2018-19497-backport.patch b/app-forensics/sleuthkit/files/sleuthkit-4.6.4-CVE-2018-19497-backport.patch |
33 |
deleted file mode 100644 |
34 |
index 3ed90477481..00000000000 |
35 |
--- a/app-forensics/sleuthkit/files/sleuthkit-4.6.4-CVE-2018-19497-backport.patch |
36 |
+++ /dev/null |
37 |
@@ -1,83 +0,0 @@ |
38 |
-From dd679ad1d855e7f69a887eb343bb53d49dc664e7 Mon Sep 17 00:00:00 2001 |
39 |
-From: Jordy Zomer <zome8499@××××××××××××××××××××.nl> |
40 |
-Date: Sat, 24 Nov 2018 12:19:38 +0100 |
41 |
-Subject: [PATCH 1/3] Fix CVE-2018-19497. |
42 |
- |
43 |
-An issue was discovered in The Sleuth Kit (TSK) through 4.6.4. |
44 |
-The "tsk_getu16(hfs->fs_info.endian, &rec_buf[rec_off2])" call in hfs_dir_open_meta_cb in |
45 |
-tsk/fs/hfs_dent.c does not properly check boundaries. This results in |
46 |
-a crash (SEGV on unknown address |
47 |
-READ memory access) |
48 |
-when reading too much in the destination buffer. |
49 |
---- |
50 |
- tsk/fs/hfs.c | 3 ++- |
51 |
- 1 file changed, 2 insertions(+), 1 deletion(-) |
52 |
- |
53 |
-diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c |
54 |
-index 00f1720b1b..0dec507165 100644 |
55 |
---- a/tsk/fs/hfs.c |
56 |
-+++ b/tsk/fs/hfs.c |
57 |
-@@ -956,7 +956,8 @@ hfs_cat_traverse(HFS_INFO * hfs, |
58 |
- key = (hfs_btree_key_cat *) & node[rec_off]; |
59 |
- |
60 |
- keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len); |
61 |
-- if ((keylen) > nodesize) { |
62 |
-+ |
63 |
-+ if (keylen > nodesize - rec_off) { |
64 |
- tsk_error_set_errno(TSK_ERR_FS_GENFS); |
65 |
- tsk_error_set_errstr |
66 |
- ("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %" |
67 |
- |
68 |
-From fb2bc0ad693db852fac1dcc77a072aeabe106ac8 Mon Sep 17 00:00:00 2001 |
69 |
-From: Jordy Zomer <zome8499@××××××××××××××××××××.nl> |
70 |
-Date: Sat, 24 Nov 2018 12:37:09 +0100 |
71 |
-Subject: [PATCH 2/3] fix length in printf of nodesize |
72 |
- |
73 |
-Also fix the length in printf next to comit dd679ad1d855e7f69a887eb343bb53d49dc664e7 |
74 |
---- |
75 |
- tsk/fs/hfs.c | 2 +- |
76 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
77 |
- |
78 |
-diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c |
79 |
-index 0dec507165..4f7c0679a8 100644 |
80 |
---- a/tsk/fs/hfs.c |
81 |
-+++ b/tsk/fs/hfs.c |
82 |
-@@ -961,7 +961,7 @@ hfs_cat_traverse(HFS_INFO * hfs, |
83 |
- tsk_error_set_errno(TSK_ERR_FS_GENFS); |
84 |
- tsk_error_set_errstr |
85 |
- ("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %" |
86 |
-- PRIu16 ")", rec, cur_node, keylen, nodesize); |
87 |
-+ PRIu16 ")", rec, cur_node, keylen, nodesize - rec_off); |
88 |
- free(node); |
89 |
- return 1; |
90 |
- } |
91 |
- |
92 |
-From 8242588f4354339d9cb1ad82622e7c16c55391c9 Mon Sep 17 00:00:00 2001 |
93 |
-From: Jordy Zomer <zome8499@××××××××××××××××××××.nl> |
94 |
-Date: Sat, 24 Nov 2018 12:47:23 +0100 |
95 |
-Subject: [PATCH 3/3] UPDATE on CVE-2018-19497. |
96 |
- |
97 |
-make it >= because if keylen == nodesize - rec_off it's already past it's destination. |
98 |
-Also fix the sprintf |
99 |
---- |
100 |
- tsk/fs/hfs.c | 4 ++-- |
101 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
102 |
- |
103 |
-diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c |
104 |
-index 4f7c0679a8..bb3819ada9 100644 |
105 |
---- a/tsk/fs/hfs.c |
106 |
-+++ b/tsk/fs/hfs.c |
107 |
-@@ -957,11 +957,11 @@ hfs_cat_traverse(HFS_INFO * hfs, |
108 |
- |
109 |
- keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len); |
110 |
- |
111 |
-- if (keylen > nodesize - rec_off) { |
112 |
-+ if (keylen >= nodesize - rec_off) { |
113 |
- tsk_error_set_errno(TSK_ERR_FS_GENFS); |
114 |
- tsk_error_set_errstr |
115 |
- ("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %" |
116 |
-- PRIu16 ")", rec, cur_node, keylen, nodesize - rec_off); |
117 |
-+ PRIu16 ")", rec, cur_node, keylen, (nodesize - rec_off)); |
118 |
- free(node); |
119 |
- return 1; |
120 |
- } |
121 |
|
122 |
diff --git a/app-forensics/sleuthkit/sleuthkit-4.6.0.ebuild b/app-forensics/sleuthkit/sleuthkit-4.6.0.ebuild |
123 |
deleted file mode 100644 |
124 |
index 94b34243548..00000000000 |
125 |
--- a/app-forensics/sleuthkit/sleuthkit-4.6.0.ebuild |
126 |
+++ /dev/null |
127 |
@@ -1,227 +0,0 @@ |
128 |
-# Copyright 1999-2018 Gentoo Authors |
129 |
-# Distributed under the terms of the GNU General Public License v2 |
130 |
- |
131 |
-EAPI=6 |
132 |
- |
133 |
-JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml" |
134 |
-inherit autotools java-pkg-opt-2 java-ant-2 |
135 |
- |
136 |
-DESCRIPTION="A collection of file system and media management forensic analysis tools" |
137 |
-HOMEPAGE="https://www.sleuthkit.org/sleuthkit/" |
138 |
-# TODO: sqlite-jdbc does not exist in the tree, we bundle it for now |
139 |
-# TODO: Upstream uses a very specific version of libewf which is not in |
140 |
-# the tree anymore. So we statically compile and link to sleuthkit. |
141 |
-# Hopefully upstream will figure something out in the future. |
142 |
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz |
143 |
- java? ( http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.8.11/sqlite-jdbc-3.8.11.jar ) |
144 |
- ewf? ( https://dev.gentoo.org/~gokturk/distfiles/app-forensics/libewf/libewf-20130128.tar.gz )" |
145 |
- |
146 |
-LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )" |
147 |
-SLOT="0/13" # subslot = major soname version |
148 |
-KEYWORDS="~amd64 ~hppa ~ppc ~x86" |
149 |
-IUSE="aff doc ewf java static-libs test +threads zlib" |
150 |
- |
151 |
-DEPEND=" |
152 |
- dev-db/sqlite:3 |
153 |
- dev-lang/perl:* |
154 |
- aff? ( app-forensics/afflib ) |
155 |
- ewf? ( sys-libs/zlib ) |
156 |
- java? ( |
157 |
- >=virtual/jdk-1.8:* |
158 |
- >=dev-java/c3p0-0.9.5:0 |
159 |
- >=dev-java/jdbc-postgresql-9.4:0 |
160 |
- ) |
161 |
- zlib? ( sys-libs/zlib ) |
162 |
-" |
163 |
-RDEPEND="${DEPEND} |
164 |
- java? ( >=virtual/jre-1.8:= ) |
165 |
-" |
166 |
-DEPEND="${DEPEND} |
167 |
- doc? ( app-doc/doxygen ) |
168 |
- test? ( >=dev-util/cppunit-1.2.1 ) |
169 |
-" |
170 |
- |
171 |
-PATCHES=( |
172 |
- "${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch |
173 |
-) |
174 |
- |
175 |
-src_unpack() { |
176 |
- local f |
177 |
- |
178 |
- unpack ${P}.tar.gz |
179 |
- |
180 |
- # Ick, the upstream is stuck at libewf-20130128 which is |
181 |
- # not even in the tree anymore. So we have to bundle it. |
182 |
- if use ewf; then |
183 |
- pushd "${T}" &>/dev/null || die |
184 |
- unpack libewf-20130128.tar.gz |
185 |
- export TSK_LIBEWF_SRCDIR="${T}"/libewf-20130128 |
186 |
- popd &>/dev/null || die |
187 |
- fi |
188 |
- |
189 |
- # Copy the jar files that don't exist in the tree yet |
190 |
- if use java; then |
191 |
- TSK_JAR_DIR="${S}/bindings/java/lib" |
192 |
- mkdir "${TSK_JAR_DIR}" || die |
193 |
- for f in ${A}; do |
194 |
- if [[ ${f} =~ .jar$ ]]; then |
195 |
- cp "${DISTDIR}"/"${f}" "${TSK_JAR_DIR}" || die |
196 |
- fi |
197 |
- done |
198 |
- export TSK_JAR_DIR |
199 |
- fi |
200 |
-} |
201 |
- |
202 |
-src_prepare() { |
203 |
- if use ewf; then |
204 |
- # Yeah, libewf-20130128 obviously doesn't just nicely compile |
205 |
- sed -e 's/LIBUNA_INLINE inline/LIBUNA_INLINE/' \ |
206 |
- -i "${TSK_LIBEWF_SRCDIR}"/libuna/libuna_inline.h || die |
207 |
- fi |
208 |
- |
209 |
- if use java; then |
210 |
- pushd "${S}"/bindings/java &>/dev/null || die |
211 |
- |
212 |
- # Prevent "make install" from installing |
213 |
- # jar files under /usr/share/java |
214 |
- # We'll use the java eclasses for this |
215 |
- sed -e '/^jar_DATA/ d;' -i Makefile.am || die |
216 |
- |
217 |
- # Disable dependency retrieval using ivy |
218 |
- # We will handle it ourselves |
219 |
- sed -e '/name="compile"/ s/, retrieve-deps//' \ |
220 |
- -e '/name="dist-/ s/, init-ivy//g' \ |
221 |
- -i build.xml || die |
222 |
- |
223 |
- java-pkg-opt-2_src_prepare |
224 |
- |
225 |
- popd &>/dev/null || die |
226 |
- fi |
227 |
- |
228 |
- # Override the doxygen output directories |
229 |
- if use doc; then |
230 |
- sed -e "/^OUTPUT_DIRECTORY/ s|=.*$|= ${T}/doc|" \ |
231 |
- -i tsk/docs/Doxyfile \ |
232 |
- -i bindings/java/doxygen/Doxyfile || die |
233 |
- fi |
234 |
- |
235 |
- # It's safe to call this even after java-pkg-opt-2_src_prepare |
236 |
- # because future calls to eapply_user do nothing and return 0 |
237 |
- default |
238 |
- |
239 |
- eautoreconf |
240 |
-} |
241 |
- |
242 |
-tsk_compile_libewf() { |
243 |
- local myeconfargs=( |
244 |
- --prefix=/ |
245 |
- --libdir=/lib |
246 |
- --enable-static |
247 |
- --disable-shared |
248 |
- --disable-winapi |
249 |
- --without-libbfio |
250 |
- --with-zlib |
251 |
- --without-bzip2 |
252 |
- --without-libhmac |
253 |
- --without-openssl |
254 |
- --without-libuuid |
255 |
- --without-libfuse |
256 |
- ) |
257 |
- # We want to contain our build flags |
258 |
- local CFLAGS="${CFLAGS}" |
259 |
- local LDFLAGS="${LDFLAGS}" |
260 |
- |
261 |
- pushd "${TSK_LIBEWF_SRCDIR}" &>/dev/null || die |
262 |
- |
263 |
- # Produce relocatable code |
264 |
- CFLAGS+=" -fPIC" |
265 |
- LDFLAGS+=" -fPIC" |
266 |
- econf "${myeconfargs[@]}" |
267 |
- |
268 |
- # Do not waste CPU cycles on building ewftools |
269 |
- sed -e '/ewftools/ d' -i Makefile || die |
270 |
- emake |
271 |
- |
272 |
- # Only install the headers and the library |
273 |
- emake -C libewf DESTDIR="${T}"/image install |
274 |
- emake -C include DESTDIR="${T}"/image install |
275 |
- |
276 |
- popd &>/dev/null || die |
277 |
-} |
278 |
- |
279 |
-src_configure() { |
280 |
- local myeconfargs=( |
281 |
- $(use_enable java) |
282 |
- $(use_enable static-libs static) |
283 |
- $(use_enable threads multithreading) |
284 |
- $(use_with aff afflib) |
285 |
- $(use_with ewf libewf) |
286 |
- $(use_with zlib) |
287 |
- ) |
288 |
- |
289 |
- use ewf && tsk_compile_libewf |
290 |
- myeconfargs+=( $(use_with ewf libewf "${T}"/image) ) |
291 |
- |
292 |
- if use java; then |
293 |
- pushd "${S}"/bindings/java &>/dev/null || die |
294 |
- java-ant-2_src_configure |
295 |
- popd &>/dev/null || die |
296 |
- fi |
297 |
- |
298 |
- econf "${myeconfargs[@]}" |
299 |
-} |
300 |
- |
301 |
-src_compile() { |
302 |
- # Create symlinks of jars for the required dependencies |
303 |
- if use java; then |
304 |
- pushd "${S}"/bindings/java &>/dev/null || die |
305 |
- |
306 |
- java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0 |
307 |
- java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql |
308 |
- |
309 |
- popd &>/dev/null || die |
310 |
- fi |
311 |
- |
312 |
- # Create the doc output dirs if requested |
313 |
- if use doc; then |
314 |
- mkdir -p "${T}"/doc/{api-docs,jni-docs} || die |
315 |
- fi |
316 |
- |
317 |
- emake all $(usex doc api-docs "") |
318 |
-} |
319 |
- |
320 |
-src_install() { |
321 |
- local f |
322 |
- |
323 |
- if use java; then |
324 |
- pushd "${S}"/bindings/java &>/dev/null || die |
325 |
- |
326 |
- java-pkg_dojar dist/${P}.jar |
327 |
- |
328 |
- # Install the bundled jar files |
329 |
- pushd "${TSK_JAR_DIR}" &>/dev/null || die |
330 |
- for f in *; do |
331 |
- # Skip the symlinks java-pkg_jar-from created |
332 |
- [[ -f ${f} ]] || continue |
333 |
- |
334 |
- # Strip the version numbers as per eclass recommendation |
335 |
- [[ ${f} =~ -([0-9].)+.jar$ ]] || continue |
336 |
- |
337 |
- java-pkg_newjar "${f}" "${f/${BASH_REMATCH[0]}/.jar}" |
338 |
- done |
339 |
- popd &>/dev/null || die |
340 |
- |
341 |
- popd &>/dev/null || die |
342 |
- fi |
343 |
- |
344 |
- default |
345 |
- |
346 |
- # It unconditionally builds both api and jni docs |
347 |
- # We install conditionally based on the provided use flags |
348 |
- if use doc; then |
349 |
- dodoc -r "${T}"/doc/api-docs |
350 |
- use java && dodoc -r "${T}"/doc/jni-docs |
351 |
- fi |
352 |
- |
353 |
- find "${D}" -name '*.la' -delete || die |
354 |
-} |
355 |
|
356 |
diff --git a/app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild b/app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild |
357 |
deleted file mode 100644 |
358 |
index 45b8e2dd049..00000000000 |
359 |
--- a/app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild |
360 |
+++ /dev/null |
361 |
@@ -1,256 +0,0 @@ |
362 |
-# Copyright 1999-2018 Gentoo Authors |
363 |
-# Distributed under the terms of the GNU General Public License v2 |
364 |
- |
365 |
-EAPI=6 |
366 |
- |
367 |
-JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml" |
368 |
-inherit autotools java-pkg-opt-2 java-ant-2 |
369 |
- |
370 |
-DESCRIPTION="A collection of file system and media management forensic analysis tools" |
371 |
-HOMEPAGE="https://www.sleuthkit.org/sleuthkit/" |
372 |
-# TODO: sqlite-jdbc does not exist in the tree, we bundle it for now |
373 |
-# TODO: Upstream uses a very specific version of libewf which is not in |
374 |
-# the tree anymore. So we statically compile and link to sleuthkit. |
375 |
-# Hopefully upstream will figure something out in the future. |
376 |
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz |
377 |
- java? ( |
378 |
- http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.8.11/sqlite-jdbc-3.8.11.jar |
379 |
- http://repo1.maven.org/maven2/com/zaxxer/SparseBitSet/1.1/SparseBitSet-1.1.jar |
380 |
- ) |
381 |
- ewf? ( https://dev.gentoo.org/~gokturk/distfiles/app-forensics/libewf/libewf-20130128.tar.gz )" |
382 |
- |
383 |
-LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )" |
384 |
-SLOT="0/13" # subslot = major soname version |
385 |
-KEYWORDS="~amd64 ~hppa ~ppc ~x86" |
386 |
-IUSE="aff doc ewf java postgres static-libs test +threads zlib" |
387 |
- |
388 |
-# Note: It is not possible to move the dep on dev-java/jdbc-postgresql |
389 |
-# inside a conditional postgres? block because java sources import |
390 |
-# org.postgres unconditionally as of writing this (version 4.6.4). The |
391 |
-# postgres USE flag will be used for the TSK postgresql support however. |
392 |
-DEPEND=" |
393 |
- dev-db/sqlite:3 |
394 |
- dev-lang/perl:* |
395 |
- aff? ( app-forensics/afflib ) |
396 |
- ewf? ( sys-libs/zlib ) |
397 |
- java? ( |
398 |
- >=virtual/jdk-1.8:* |
399 |
- >=dev-java/c3p0-0.9.5:0 |
400 |
- >=dev-java/jdbc-postgresql-9.4:0 |
401 |
- ) |
402 |
- postgres? ( dev-db/postgresql:= ) |
403 |
- zlib? ( sys-libs/zlib ) |
404 |
-" |
405 |
-# TODO: add support for not-in-tree libraries libvhdi and libvmdk |
406 |
-# libvhdi: https://github.com/libyal/libvhdi |
407 |
-# libvmdk: https://github.com/libyal/libvmdk |
408 |
-# DEPEND="${DEPEND} |
409 |
-# vhdi? ( dev-libs/libvhdi ) |
410 |
-# vmdk? ( dev-libs/libvmdk ) |
411 |
-# " |
412 |
- |
413 |
-RDEPEND="${DEPEND} |
414 |
- java? ( >=virtual/jre-1.8:= ) |
415 |
-" |
416 |
-DEPEND="${DEPEND} |
417 |
- doc? ( app-doc/doxygen ) |
418 |
- test? ( >=dev-util/cppunit-1.2.1 ) |
419 |
-" |
420 |
- |
421 |
-PATCHES=( |
422 |
- "${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch |
423 |
- "${FILESDIR}"/${PN}-4.6.4-default-jar-location-fix.patch |
424 |
- "${FILESDIR}"/${PN}-4.6.4-CVE-2018-19497-backport.patch |
425 |
-) |
426 |
- |
427 |
-src_unpack() { |
428 |
- local f |
429 |
- |
430 |
- unpack ${P}.tar.gz |
431 |
- |
432 |
- # Ick, the upstream is stuck at libewf-20130128 which is |
433 |
- # not even in the tree anymore. So we have to bundle it. |
434 |
- if use ewf; then |
435 |
- pushd "${T}" &>/dev/null || die |
436 |
- unpack libewf-20130128.tar.gz |
437 |
- export TSK_LIBEWF_SRCDIR="${T}"/libewf-20130128 |
438 |
- popd &>/dev/null || die |
439 |
- fi |
440 |
- |
441 |
- # Copy the jar files that don't exist in the tree yet |
442 |
- if use java; then |
443 |
- TSK_JAR_DIR="${T}/lib" |
444 |
- mkdir "${TSK_JAR_DIR}" || die |
445 |
- for f in ${A}; do |
446 |
- if [[ ${f} =~ .jar$ ]]; then |
447 |
- cp "${DISTDIR}"/"${f}" "${TSK_JAR_DIR}" || die |
448 |
- fi |
449 |
- done |
450 |
- export TSK_JAR_DIR |
451 |
- fi |
452 |
-} |
453 |
- |
454 |
-tsk_prepare_libewf() { |
455 |
- # Yeah, libewf-20130128 obviously doesn't just nicely compile |
456 |
- sed -e 's/LIBUNA_INLINE inline/LIBUNA_INLINE/' \ |
457 |
- -i "${TSK_LIBEWF_SRCDIR}"/libuna/libuna_inline.h || die |
458 |
-} |
459 |
- |
460 |
-src_prepare() { |
461 |
- use ewf && tsk_prepare_libewf |
462 |
- |
463 |
- if use java; then |
464 |
- pushd "${S}"/bindings/java &>/dev/null || die |
465 |
- |
466 |
- # Prevent "make install" from installing |
467 |
- # jar files under /usr/share/java |
468 |
- # We'll use the java eclasses for this |
469 |
- sed -e '/^jar_DATA/ d;' -i Makefile.am || die |
470 |
- |
471 |
- java-pkg-opt-2_src_prepare |
472 |
- |
473 |
- popd &>/dev/null || die |
474 |
- fi |
475 |
- |
476 |
- # Override the doxygen output directories |
477 |
- if use doc; then |
478 |
- sed -e "/^OUTPUT_DIRECTORY/ s|=.*$|= ${T}/doc|" \ |
479 |
- -i tsk/docs/Doxyfile \ |
480 |
- -i bindings/java/doxygen/Doxyfile || die |
481 |
- fi |
482 |
- |
483 |
- # It's safe to call this even after java-pkg-opt-2_src_prepare |
484 |
- # because future calls to eapply_user do nothing and return 0 |
485 |
- default |
486 |
- |
487 |
- eautoreconf |
488 |
-} |
489 |
- |
490 |
-tsk_compile_libewf() { |
491 |
- local myeconfargs=( |
492 |
- --prefix=/ |
493 |
- --libdir=/lib |
494 |
- --enable-static |
495 |
- --disable-shared |
496 |
- --disable-winapi |
497 |
- --without-libbfio |
498 |
- --with-zlib |
499 |
- --without-bzip2 |
500 |
- --without-libhmac |
501 |
- --without-openssl |
502 |
- --without-libuuid |
503 |
- --without-libfuse |
504 |
- ) |
505 |
- # We want to contain our build flags |
506 |
- local CFLAGS="${CFLAGS}" |
507 |
- local LDFLAGS="${LDFLAGS}" |
508 |
- |
509 |
- pushd "${TSK_LIBEWF_SRCDIR}" &>/dev/null || die |
510 |
- |
511 |
- # Produce relocatable code |
512 |
- CFLAGS+=" -fPIC" |
513 |
- LDFLAGS+=" -fPIC" |
514 |
- econf "${myeconfargs[@]}" |
515 |
- |
516 |
- # Do not waste CPU cycles on building ewftools |
517 |
- sed -e '/ewftools/ d' -i Makefile || die |
518 |
- emake |
519 |
- |
520 |
- # Only install the headers and the library |
521 |
- emake -C libewf DESTDIR="${T}"/image install |
522 |
- emake -C include DESTDIR="${T}"/image install |
523 |
- find "${T}"/image -name '*.la' -delete || die |
524 |
- |
525 |
- popd &>/dev/null || die |
526 |
-} |
527 |
- |
528 |
-src_configure() { |
529 |
- local myeconfargs=( |
530 |
- --enable-offline="${TSK_JAR_DIR}" |
531 |
- $(use_enable java) |
532 |
- $(use_enable static-libs static) |
533 |
- $(use_enable threads multithreading) |
534 |
- $(use_with aff afflib) |
535 |
- $(use_with zlib) |
536 |
- ) |
537 |
- # Workaround the automagic detection of postgresql |
538 |
- local -x ac_cv_lib_pq_PQlibVersion="$(usex postgres)" |
539 |
- # TODO: add support for non-existing libraries libvhdi and libvmdk |
540 |
- # myeconfargs+=( |
541 |
- # $(use_with vhdi libvhdi) |
542 |
- # $(use_with vmdk libvmdk) |
543 |
- # ) |
544 |
- myeconfargs+=( |
545 |
- --without-libvhdi |
546 |
- --without-libvmdk |
547 |
- ) |
548 |
- |
549 |
- use ewf && tsk_compile_libewf |
550 |
- myeconfargs+=( $(use_with ewf libewf "${T}"/image) ) |
551 |
- |
552 |
- if use java; then |
553 |
- pushd "${S}"/bindings/java &>/dev/null || die |
554 |
- java-ant-2_src_configure |
555 |
- popd &>/dev/null || die |
556 |
- fi |
557 |
- |
558 |
- econf "${myeconfargs[@]}" |
559 |
-} |
560 |
- |
561 |
-src_compile() { |
562 |
- # Give it an existing bogus ivy home #672220 |
563 |
- local -x IVY_HOME="${T}" |
564 |
- |
565 |
- # Create symlinks of jars for the required dependencies |
566 |
- if use java; then |
567 |
- pushd "${S}"/bindings/java &>/dev/null || die |
568 |
- |
569 |
- java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0 |
570 |
- java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql |
571 |
- |
572 |
- popd &>/dev/null || die |
573 |
- fi |
574 |
- |
575 |
- # Create the doc output dirs if requested |
576 |
- if use doc; then |
577 |
- mkdir -p "${T}"/doc/{api-docs,jni-docs} || die |
578 |
- fi |
579 |
- |
580 |
- emake all $(usex doc api-docs "") |
581 |
-} |
582 |
- |
583 |
-src_install() { |
584 |
- local f |
585 |
- |
586 |
- if use java; then |
587 |
- pushd "${S}"/bindings/java &>/dev/null || die |
588 |
- |
589 |
- java-pkg_newjar "dist/${P}.jar" "${PN}.jar" |
590 |
- |
591 |
- # Install the bundled jar files |
592 |
- pushd "${TSK_JAR_DIR}" &>/dev/null || die |
593 |
- for f in *; do |
594 |
- # Skip the symlinks java-pkg_jar-from created |
595 |
- [[ -f ${f} ]] || continue |
596 |
- |
597 |
- # Strip the version numbers as per eclass recommendation |
598 |
- [[ ${f} =~ -([0-9]+\.)+jar$ ]] || continue |
599 |
- |
600 |
- java-pkg_newjar "${f}" "${f/${BASH_REMATCH[0]}/.jar}" |
601 |
- done |
602 |
- popd &>/dev/null || die |
603 |
- |
604 |
- popd &>/dev/null || die |
605 |
- fi |
606 |
- |
607 |
- default |
608 |
- |
609 |
- # It unconditionally builds both api and jni docs |
610 |
- # We install conditionally based on the provided use flags |
611 |
- if use doc; then |
612 |
- dodoc -r "${T}"/doc/api-docs |
613 |
- use java && dodoc -r "${T}"/doc/jni-docs |
614 |
- fi |
615 |
- |
616 |
- find "${D}" -name '*.la' -delete || die |
617 |
-} |