Lines 1-74
Link Here
|
1 |
# Copyright 1999-2017 Gentoo Foundation |
1 |
# Copyright 1999-2018 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI=5 |
4 |
EAPI=6 |
5 |
|
5 |
|
6 |
AUTOTOOLS_AUTORECONF=1 |
6 |
COMMIT=37b48a9fd645d38ab50bb33066acdaf868529d95 |
7 |
|
7 |
inherit autotools flag-o-matic |
8 |
inherit autotools-utils eutils flag-o-matic |
|
|
9 |
|
8 |
|
10 |
DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool" |
9 |
DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool" |
11 |
HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk" |
10 |
HOMEPAGE="https://www.cgsecurity.org/wiki/TestDisk" |
12 |
SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2" |
11 |
SRC_URI="https://git.cgsecurity.org/cgit/${PN}/snapshot/${PN}-${COMMIT}.tar.gz -> ${P}.tar.gz" |
13 |
|
12 |
|
14 |
LICENSE="GPL-2" |
13 |
LICENSE="GPL-2" |
15 |
SLOT="0" |
14 |
SLOT="0" |
16 |
KEYWORDS="amd64 ~arm ~hppa ppc x86" |
15 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86" |
17 |
IUSE="ewf jpeg ntfs reiserfs static qt4" |
16 |
IUSE="ewf jpeg ntfs qt5 reiserfs static zlib" |
18 |
|
17 |
|
19 |
REQUIRED_USE="static? ( !qt4 )" |
18 |
REQUIRED_USE="static? ( !qt5 )" |
20 |
|
19 |
|
21 |
# WARNING: reiserfs support does NOT work with reiserfsprogs |
20 |
# WARNING: reiserfs support does NOT work with reiserfsprogs |
22 |
# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released). |
21 |
# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released). |
23 |
DEPEND=" |
22 |
COMMON_DEPEND=" |
24 |
static? ( |
23 |
static? ( |
25 |
sys-apps/util-linux[static-libs] |
24 |
sys-apps/util-linux[static-libs] |
26 |
>=sys-libs/ncurses-5.2:0[static-libs] |
25 |
sys-fs/e2fsprogs[static-libs] |
27 |
jpeg? ( virtual/jpeg:0[static-libs] ) |
26 |
sys-libs/ncurses:0[static-libs] |
28 |
ntfs? ( sys-fs/ntfs3g[static-libs] ) |
27 |
jpeg? ( virtual/jpeg:0[static-libs] ) |
29 |
reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8[static-libs] ) |
28 |
ntfs? ( sys-fs/ntfs3g[static-libs] ) |
30 |
>=sys-fs/e2fsprogs-1.35[static-libs] |
29 |
reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8[static-libs] ) |
31 |
sys-libs/zlib[static-libs] |
30 |
zlib? ( sys-libs/zlib[static-libs] ) |
32 |
!arm? ( ewf? ( app-forensics/libewf:=[static-libs] ) ) |
31 |
!arm? ( ewf? ( app-forensics/libewf:=[static-libs] ) ) |
33 |
) |
32 |
) |
34 |
!static? ( |
33 |
!static? ( |
35 |
sys-apps/util-linux |
34 |
sys-apps/util-linux |
36 |
>=sys-libs/ncurses-5.2:0= |
35 |
sys-fs/e2fsprogs |
37 |
jpeg? ( virtual/jpeg:0 ) |
36 |
sys-libs/ncurses:0= |
38 |
ntfs? ( sys-fs/ntfs3g ) |
37 |
jpeg? ( virtual/jpeg:0 ) |
39 |
reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 ) |
38 |
ntfs? ( sys-fs/ntfs3g ) |
40 |
>=sys-fs/e2fsprogs-1.35 |
39 |
qt5? ( |
41 |
sys-libs/zlib |
40 |
dev-qt/qtcore:5 |
42 |
!arm? ( ewf? ( app-forensics/libewf:= ) ) |
41 |
dev-qt/qtgui:5 |
43 |
qt4? ( dev-qt/qtgui:4 ) |
42 |
dev-qt/qtwidgets:5 |
44 |
)" |
43 |
) |
45 |
RDEPEND="!static? ( ${DEPEND} )" |
44 |
reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 ) |
|
|
45 |
zlib? ( sys-libs/zlib ) |
46 |
!arm? ( ewf? ( app-forensics/libewf:= ) ) |
47 |
) |
48 |
" |
49 |
DEPEND="${COMMON_DEPEND} |
50 |
qt5? ( dev-qt/linguist-tools:5 ) |
51 |
" |
52 |
RDEPEND="!static? ( ${COMMON_DEPEND} )" |
46 |
|
53 |
|
47 |
AUTOTOOLS_IN_SOURCE_BUILD=1 |
|
|
48 |
DOCS=( ) |
54 |
DOCS=( ) |
49 |
|
55 |
|
50 |
PATCHES=( "${FILESDIR}/${P}-qtbindir.patch" ) |
56 |
S="${WORKDIR}/${PN}-${COMMIT}" |
|
|
57 |
|
58 |
src_prepare() { |
59 |
default |
60 |
eautoreconf |
61 |
} |
51 |
|
62 |
|
52 |
src_configure() { |
63 |
src_configure() { |
53 |
local myconf |
64 |
local myeconfargs=( |
|
|
65 |
--enable-sudo |
66 |
$(use_with ewf) |
67 |
$(use_with jpeg) |
68 |
$(use_with ntfs) |
69 |
$(use_with ntfs ntfs3g) |
70 |
$(use_enable qt5 qt) |
71 |
$(use_with reiserfs) |
72 |
$(use_with zlib) |
73 |
) |
54 |
|
74 |
|
55 |
# this is static method is the same used by upstream for their 'static' make |
75 |
# this static method is the same used by upstream for their 'static' make |
56 |
# target, but better, as it doesn't break. |
76 |
# target, but better, as it doesn't break. |
57 |
use static && append-ldflags -static |
77 |
use static && append-ldflags -static |
58 |
|
78 |
|
59 |
# --with-foo are broken, any use of --with/--without disable the |
79 |
econf "${myeconfargs[@]}" |
60 |
# functionality. |
|
|
61 |
# The following variation must be used. |
62 |
use reiserfs || myconf+=" --without-reiserfs" |
63 |
use ntfs || myconf+=" --without-ntfs --without-ntfs3g" |
64 |
use jpeg || myconf+=" --without-jpeg" |
65 |
use ewf || myconf+=" --without-ewf" |
66 |
myconf+=$(usex qt4 " --enable-qt" " --disable-qt") |
67 |
|
68 |
econf \ |
69 |
--docdir "${ROOT}/usr/share/doc/${P}" \ |
70 |
--enable-sudo \ |
71 |
${myconf} |
72 |
|
80 |
|
73 |
# perform safety checks for NTFS, REISERFS and JPEG |
81 |
# perform safety checks for NTFS, REISERFS and JPEG |
74 |
if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then |
82 |
if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then |