summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/testdisk')
-rw-r--r--app-admin/testdisk/Manifest4
-rw-r--r--app-admin/testdisk/files/fix_rare_crash-6.14.patch227
-rw-r--r--app-admin/testdisk/files/install-gentoo.patch25
-rw-r--r--app-admin/testdisk/metadata.xml15
-rw-r--r--app-admin/testdisk/testdisk-6.12.ebuild59
-rw-r--r--app-admin/testdisk/testdisk-6.13.ebuild59
-rw-r--r--app-admin/testdisk/testdisk-6.14-r1.ebuild83
-rw-r--r--app-admin/testdisk/testdisk-6.14.ebuild60
-rw-r--r--app-admin/testdisk/testdisk-7.0-r1.ebuild78
-rw-r--r--app-admin/testdisk/testdisk-7.0-r2.ebuild82
-rw-r--r--app-admin/testdisk/testdisk-7.0.ebuild77
11 files changed, 769 insertions, 0 deletions
diff --git a/app-admin/testdisk/Manifest b/app-admin/testdisk/Manifest
new file mode 100644
index 000000000000..945fff01816f
--- /dev/null
+++ b/app-admin/testdisk/Manifest
@@ -0,0 +1,4 @@
+DIST testdisk-6.12.tar.bz2 554633 SHA256 bdfbe679146518a1321d64f512d6ec8980ac3a9f2296ef27a46c7743d0f9ea16 SHA512 5cd17d1ad851515dcd1f3ef5dfb7435aff2f89e2b0467e84552809d203688a47731e23a602dc10355861414eb2d8c6b9edd48225ccc6229ab59810803a59da4c WHIRLPOOL f667fa6e61990cd6c6532301e461fc1cdcd9303a96566cc501dc1945fd9328b234b8c3f5a760a839a9d4b026da29d03c3189fa9afc58b7f7efa6e96b15008a49
+DIST testdisk-6.13.tar.bz2 560696 SHA256 48275ccddfc9445b6c3e6e181728dae9e49bd25b824a6b5670d58f1f88cdf220 SHA512 30889b8afed5b0fac93ce028e8c95bfa3e14b72d39cc4f86659edcce0b8820c5ce0c2b7e1d09f23f0da977b5d1cb275551069a87b109d05538e63e9b76200442 WHIRLPOOL b9bcf93df5b42a26b4206969ee968122f194338a28c6a500e540e3cafec2ae84d0734624c58b3581fc9ac71f2ea1038f2997e3f91278d6eed18abf786cd31200
+DIST testdisk-6.14.tar.bz2 620077 SHA256 a597c3ebc375acdf0ff60f44ed8935a301132aae78ec00f64f091637d055326c SHA512 f479c7863e1a39bf747a0b73b37eba1016e4762373b9b68747fed6141aa8faa7703c89dddc975df18904759292cd7d333ca0619eacb3c1eea76790a917e95774 WHIRLPOOL def7c9506747c68e5fb786ab0725c8ca2e15ccd53fc7f336d77f72067a6a6094c716c57ec3652a8386bf176b40e2fb1504925c6734bc3037799a4bbef3c8e67d
+DIST testdisk-7.0.tar.bz2 676990 SHA256 00bb3b6b22e6aba88580eeb887037aef026968c21a87b5f906c6652cbee3442d SHA512 b1ebe1d2fca453660a17623b70c06e0195cb5f07056fb7bc683d575c034fb71dfb793582c804dcff0ca57789a6de84bbf13b1a554353811660996e42199102e2 WHIRLPOOL 9ef3ed733f13477435123089cbd6168c189591284aa72dc9636470b35a21a32222d6871916b43e3c2ba4ac6da85979d6ec249b22c2573b77db7b2bcc280b85f1
diff --git a/app-admin/testdisk/files/fix_rare_crash-6.14.patch b/app-admin/testdisk/files/fix_rare_crash-6.14.patch
new file mode 100644
index 000000000000..913be7e32ebd
--- /dev/null
+++ b/app-admin/testdisk/files/fix_rare_crash-6.14.patch
@@ -0,0 +1,227 @@
+From a2676d349a975a142f1119c0aecb435e1b0db8b8 Mon Sep 17 00:00:00 2001
+From: Christophe Grenier <grenier@cgsecurity.org>
+Date: Sat, 14 Jun 2014 12:08:59 +0200
+Subject: TestDisk: fix rare crash when listing NTFS directories
+
+
+diff --git a/src/ntfs_dir.c b/src/ntfs_dir.c
+index d416cea..b51c63d 100644
+--- a/src/ntfs_dir.c
++++ b/src/ntfs_dir.c
+@@ -167,7 +167,15 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
+ const MFT_REF mref, const unsigned dt_type)
+ {
+ int result = 0;
+- char *filename = (char *)calloc (1, MAX_PATH);
++ char *filename;
++ ntfs_inode *ni;
++ ntfs_attr_search_ctx *ctx_si = NULL;
++ file_info_t *new_file=NULL;
++ /* Keep FILE_NAME_WIN32 and FILE_NAME_POSIX */
++ if ((name_type & FILE_NAME_WIN32_AND_DOS) == FILE_NAME_DOS)
++ return 0;
++
++ filename = (char *)calloc (1, MAX_PATH);
+ if (!filename)
+ {
+ log_critical("ntfs_td_list_entry calloc failed\n");
+@@ -178,118 +186,111 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
+ if (ntfs_ucstoutf8(ls->cd, name, name_len, &filename, MAX_PATH) < 0 &&
+ ntfs_ucstombs (name, name_len, &filename, MAX_PATH) < 0) {
+ log_error("Cannot represent filename in current locale.\n");
+- goto free;
++ goto freefn;
+ }
+ #else
+ if (ntfs_ucstombs (name, name_len, &filename, MAX_PATH) < 0) {
+ log_error("Cannot represent filename in current locale.\n");
+- goto free;
++ goto freefn;
+ }
+ #endif
+
+ result = 0; /* These are successful */
+ if (MREF(mref) < FILE_first_user && filename[0] == '$') /* Hide system file */
+- goto free;
+- /* Keep FILE_NAME_WIN32 and FILE_NAME_POSIX */
+- if ((name_type & FILE_NAME_WIN32_AND_DOS) == FILE_NAME_DOS)
+- goto free;
+- {
+- ntfs_inode *ni;
+- ntfs_attr_search_ctx *ctx_si = NULL;
+- file_info_t *new_file=NULL;
++ goto freefn;
++ result = -1; /* Everything else is bad */
+
+- result = -1; /* Everything else is bad */
++ ni = ntfs_inode_open(ls->vol, mref);
++ if (!ni)
++ goto freefn;
++ new_file=(file_info_t*)MALLOC(sizeof(*new_file));
++ new_file->status=0;
++ new_file->st_ino=MREF(mref);
++ new_file->st_uid=0;
++ new_file->st_gid=0;
+
+- ni = ntfs_inode_open(ls->vol, mref);
+- if (!ni)
+- goto release;
+- new_file=(file_info_t*)MALLOC(sizeof(*new_file));
+- new_file->status=0;
+- td_list_add_tail(&new_file->list, &ls->dir_list->list);
+- new_file->st_ino=MREF(mref);
+- new_file->st_uid=0;
+- new_file->st_gid=0;
+-
+- ctx_si = ntfs_attr_get_search_ctx(ni, ni->mrec);
+- if (ctx_si)
++ ctx_si = ntfs_attr_get_search_ctx(ni, ni->mrec);
++ if (ctx_si)
++ {
++ if (ntfs_attr_lookup(AT_STANDARD_INFORMATION, AT_UNNAMED, 0, CASE_SENSITIVE, 0, NULL, 0, ctx_si)==0)
+ {
+- if (ntfs_attr_lookup(AT_STANDARD_INFORMATION, AT_UNNAMED, 0, CASE_SENSITIVE, 0, NULL, 0, ctx_si)==0)
++ const ATTR_RECORD *attr = ctx_si->attr;
++ const STANDARD_INFORMATION *si = (const STANDARD_INFORMATION*)((const char*)attr +
++ le16_to_cpu(attr->value_offset));
++ if(si)
+ {
+- const ATTR_RECORD *attr = ctx_si->attr;
+- const STANDARD_INFORMATION *si = (const STANDARD_INFORMATION*)((const char*)attr +
+- le16_to_cpu(attr->value_offset));
+- if(si)
+- {
+- new_file->td_atime=td_ntfs2utc(sle64_to_cpu(si->last_access_time));
+- new_file->td_mtime=td_ntfs2utc(sle64_to_cpu(si->last_data_change_time));
+- new_file->td_ctime=td_ntfs2utc(sle64_to_cpu(si->creation_time));
+- }
++ new_file->td_atime=td_ntfs2utc(sle64_to_cpu(si->last_access_time));
++ new_file->td_mtime=td_ntfs2utc(sle64_to_cpu(si->last_data_change_time));
++ new_file->td_ctime=td_ntfs2utc(sle64_to_cpu(si->creation_time));
+ }
+- ntfs_attr_put_search_ctx(ctx_si);
+ }
++ ntfs_attr_put_search_ctx(ctx_si);
++ }
++ {
++ ATTR_RECORD *rec;
++ int first=1;
++ ntfs_attr_search_ctx *ctx = NULL;
++ if (dt_type == NTFS_DT_DIR)
+ {
+- ATTR_RECORD *rec;
+- int first=1;
+- ntfs_attr_search_ctx *ctx = NULL;
+- if (dt_type == NTFS_DT_DIR)
++ new_file->name=strdup(filename);
++ new_file->st_mode = LINUX_S_IFDIR| LINUX_S_IRUGO | LINUX_S_IXUGO;
++ new_file->st_size=0;
++ td_list_add_tail(&new_file->list, &ls->dir_list->list);
++ first=0;
++ }
++ ctx = ntfs_attr_get_search_ctx(ni, ni->mrec);
++ /* A file has always an unnamed date stream and
++ * may have named alternate data streams (ADS) */
++ while((rec = find_attribute(AT_DATA, ctx)))
++ {
++ const s64 filesize = ntfs_get_attribute_value_length(ctx->attr);
++ if(rec->name_length &&
++ (ls->dir_data->param & FLAG_LIST_ADS)!=FLAG_LIST_ADS)
++ continue;
++ if(first==0)
+ {
+- new_file->name=strdup(filename);
+- new_file->st_mode = LINUX_S_IFDIR| LINUX_S_IRUGO | LINUX_S_IXUGO;
+- new_file->st_size=0;
+- td_list_add_tail(&new_file->list, &ls->dir_list->list);
+- first=0;
++ const file_info_t *old_file=new_file;
++ new_file=(file_info_t *)MALLOC(sizeof(*new_file));
++ memcpy(new_file, old_file, sizeof(*new_file));
+ }
+- ctx = ntfs_attr_get_search_ctx(ni, ni->mrec);
+- /* A file has always an unnamed date stream and
+- * may have named alternate data streams (ADS) */
+- while((rec = find_attribute(AT_DATA, ctx)))
++ new_file->st_mode = LINUX_S_IFREG | LINUX_S_IRUGO;
++ new_file->st_size=filesize;
++ if (rec->name_length)
+ {
+- const s64 filesize = ntfs_get_attribute_value_length(ctx->attr);
+- if(rec->name_length &&
+- (ls->dir_data->param & FLAG_LIST_ADS)!=FLAG_LIST_ADS)
+- continue;
+- if(first==0)
+- {
+- const file_info_t *old_file=new_file;
+- new_file=(file_info_t *)MALLOC(sizeof(*new_file));
+- memcpy(new_file, old_file, sizeof(*new_file));
+- }
+- new_file->st_mode = LINUX_S_IFREG | LINUX_S_IRUGO;
+- new_file->st_size=filesize;
+- if (rec->name_length)
++ char *stream_name=NULL;
++ new_file->status=FILE_STATUS_ADS;
++ new_file->name = (char *)MALLOC(MAX_PATH);
++ if (ntfs_ucstombs((ntfschar *) ((char *) rec + le16_to_cpu(rec->name_offset)),
++ rec->name_length, &stream_name, 0) < 0)
+ {
+- char *stream_name=NULL;
+- new_file->status=FILE_STATUS_ADS;
+- new_file->name = (char *)MALLOC(MAX_PATH);
+- if (ntfs_ucstombs((ntfschar *) ((char *) rec + le16_to_cpu(rec->name_offset)),
+- rec->name_length, &stream_name, 0) < 0)
+- {
+- log_error("ERROR: Cannot translate name into current locale.\n");
+- snprintf(new_file->name, MAX_PATH, "%s:???", filename);
+- }
+- else
+- {
+- snprintf(new_file->name, MAX_PATH, "%s:%s", filename, stream_name);
+- }
+- free(stream_name);
++ log_error("ERROR: Cannot translate name into current locale.\n");
++ snprintf(new_file->name, MAX_PATH, "%s:???", filename);
+ }
+ else
+ {
+- new_file->name=strdup(filename);
++ snprintf(new_file->name, MAX_PATH, "%s:%s", filename, stream_name);
+ }
+- td_list_add_tail(&new_file->list, &ls->dir_list->list);
+- first=0;
++ free(stream_name);
+ }
+- ntfs_attr_put_search_ctx(ctx);
++ else
++ {
++ new_file->name=strdup(filename);
++ }
++ td_list_add_tail(&new_file->list, &ls->dir_list->list);
++ first=0;
++ }
++ ntfs_attr_put_search_ctx(ctx);
++ if(first)
++ {
++ free(new_file);
+ }
+-
+- result = 0;
+-release:
+- /* close the inode. */
+- if (ni)
+- ntfs_inode_close(ni);
+ }
+-free:
++
++ result = 0;
++ /* close the inode. */
++ if (ni)
++ ntfs_inode_close(ni);
++freefn:
+ free (filename);
+ return result;
+ }
+--
+cgit v0.10.2
+
diff --git a/app-admin/testdisk/files/install-gentoo.patch b/app-admin/testdisk/files/install-gentoo.patch
new file mode 100644
index 000000000000..08a3944e68cc
--- /dev/null
+++ b/app-admin/testdisk/files/install-gentoo.patch
@@ -0,0 +1,25 @@
+--- Makefile.am-original 2015-04-20 11:31:03.000000000 -0600
++++ Makefile.am 2015-04-20 13:27:01.000000000 -0600
+@@ -1,9 +1,8 @@
+ SUBDIRS = icons man src
+
+-EXTRA_DIST = AUTHORS COPYING ChangeLog INFO INSTALL NEWS README THANKS compile.sh \
++EXTRA_DIST = compile.sh \
+ progsreiserfs-journal.patch progsreiserfs-file-read.patch \
+ darwin/readme_mac_powerpc.txt darwin/readme_mac_intel.txt \
+- documentation.html \
+ dos/readme.txt \
+ linux/testdisk.spec.in \
+ linux/qphotorec.desktop \
+@@ -24,9 +23,9 @@
+
+ AUTOMAKE_OPTIONS = gnits
+
++dist_doc_DATA = AUTHORS COPYING ChangeLog NEWS INFO INSTALL README THANKS documentation.html
++
+ install-data-hook:
+- $(mkinstalldirs) $(DESTDIR)$(docdir)
+- $(INSTALL_DATA) $(top_srcdir)/AUTHORS $(top_srcdir)/ChangeLog $(top_srcdir)/NEWS $(top_srcdir)/README $(top_srcdir)/THANKS $(top_srcdir)/documentation.html $(DESTDIR)$(docdir)
+ if USEQT
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/applications
+ $(INSTALL_DATA) $(top_srcdir)/linux/qphotorec.desktop $(DESTDIR)$(datadir)/applications
diff --git a/app-admin/testdisk/metadata.xml b/app-admin/testdisk/metadata.xml
new file mode 100644
index 000000000000..bcd5bf7763ec
--- /dev/null
+++ b/app-admin/testdisk/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>forensics</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+ <use>
+ <flag name='ntfs'>Include the ability to read NTFS filesystems</flag>
+ <flag name='reiserfs'>Include reiserfs reading ability</flag>
+ <flag name='ewf'>Include ewf library</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-admin/testdisk/testdisk-6.12.ebuild b/app-admin/testdisk/testdisk-6.12.ebuild
new file mode 100644
index 000000000000..5a3367634199
--- /dev/null
+++ b/app-admin/testdisk/testdisk-6.12.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="jpeg ntfs reiserfs static"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg )
+ ntfs? ( sys-fs/ntfs3g )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib"
+RDEPEND="!static? ( ${DEPEND} )"
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs"
+ use jpeg || myconf+=" --without-jpeg"
+
+ econf \
+ --docdir="${ED}/usr/share/doc/${PF}" \
+ --without-ewf \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}
diff --git a/app-admin/testdisk/testdisk-6.13.ebuild b/app-admin/testdisk/testdisk-6.13.ebuild
new file mode 100644
index 000000000000..fd2eafa57cff
--- /dev/null
+++ b/app-admin/testdisk/testdisk-6.13.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="jpeg ntfs reiserfs static"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg )
+ ntfs? ( sys-fs/ntfs3g )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib"
+RDEPEND="!static? ( ${DEPEND} )"
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs"
+ use jpeg || myconf+=" --without-jpeg"
+
+ econf \
+ --docdir="${ED}/usr/share/doc/${PF}" \
+ --without-ewf \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}
diff --git a/app-admin/testdisk/testdisk-6.14-r1.ebuild b/app-admin/testdisk/testdisk-6.14-r1.ebuild
new file mode 100644
index 000000000000..b38dab54651a
--- /dev/null
+++ b/app-admin/testdisk/testdisk-6.14-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~x86"
+IUSE="ewf jpeg ntfs reiserfs static qt4"
+
+REQUIRED_USE="static? ( !qt4 )"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ static? (
+ sys-apps/util-linux[static-libs]
+ >=sys-libs/ncurses-5.2[static-libs]
+ jpeg? ( virtual/jpeg:*[static-libs] )
+ ntfs? ( sys-fs/ntfs3g[static-libs] )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8[static-libs] )
+ >=sys-fs/e2fsprogs-1.35[static-libs]
+ sys-libs/zlib[static-libs]
+ !arm? ( ewf? ( app-forensics/libewf:*[static-libs] ) )
+ )
+ !static? (
+ sys-apps/util-linux
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg:* )
+ ntfs? ( sys-fs/ntfs3g )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib
+ !arm? ( ewf? ( app-forensics/libewf:* ) )
+ qt4? ( >=dev-qt/qtgui-4.0.1:* )
+ )"
+RDEPEND="!static? ( ${DEPEND} )"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+DOCS=( )
+PATCHES=( "${FILESDIR}/fix_rare_crash-6.14.patch" )
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs --without-ntfs3g"
+ use jpeg || myconf+=" --without-jpeg"
+ use ewf || myconf+=" --without-ewf"
+ myconf+=$(usex qt4 " --enable-qt" " --disable-qt")
+
+ econf \
+ --docdir "${ROOT}/usr/share/doc/${P}" \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}
diff --git a/app-admin/testdisk/testdisk-6.14.ebuild b/app-admin/testdisk/testdisk-6.14.ebuild
new file mode 100644
index 000000000000..425b384de7c4
--- /dev/null
+++ b/app-admin/testdisk/testdisk-6.14.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="jpeg ntfs reiserfs static"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ sys-apps/util-linux
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg:* )
+ ntfs? ( sys-fs/ntfs3g )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib"
+RDEPEND="!static? ( ${DEPEND} )"
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs"
+ use jpeg || myconf+=" --without-jpeg"
+
+ econf \
+ --docdir="${ED}/usr/share/doc/${PF}" \
+ --without-ewf \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}
diff --git a/app-admin/testdisk/testdisk-7.0-r1.ebuild b/app-admin/testdisk/testdisk-7.0-r1.ebuild
new file mode 100644
index 000000000000..6b9540c7d98a
--- /dev/null
+++ b/app-admin/testdisk/testdisk-7.0-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="jpeg ntfs reiserfs static"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ static? (
+ sys-apps/util-linux[static-libs]
+ >=sys-libs/ncurses-5.2[static-libs]
+ jpeg? ( virtual/jpeg:*[static-libs] )
+ ntfs? ( <=sys-fs/ntfs3g-2013.1.13[static-libs] )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8[static-libs] )
+ >=sys-fs/e2fsprogs-1.35[static-libs]
+ sys-libs/zlib[static-libs]
+ )
+ !static? (
+ sys-apps/util-linux
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg:* )
+ ntfs? ( <=sys-fs/ntfs3g-2013.1.13 )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib
+ )"
+RDEPEND="!static? ( ${DEPEND} )"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+DOCS=( )
+PATCHES=( "${FILESDIR}/install-gentoo.patch" )
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs --without-ntfs3g"
+ use jpeg || myconf+=" --without-jpeg"
+
+ econf \
+ --docdir "${ROOT}/usr/share/doc/${P}" \
+ --disable-qt \
+ --without-ewf \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}
diff --git a/app-admin/testdisk/testdisk-7.0-r2.ebuild b/app-admin/testdisk/testdisk-7.0-r2.ebuild
new file mode 100644
index 000000000000..4c8b40f5070c
--- /dev/null
+++ b/app-admin/testdisk/testdisk-7.0-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="ewf jpeg ntfs reiserfs static qt4"
+
+REQUIRED_USE="static? ( !qt4 )"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ static? (
+ sys-apps/util-linux[static-libs]
+ >=sys-libs/ncurses-5.2[static-libs]
+ jpeg? ( virtual/jpeg:*[static-libs] )
+ ntfs? ( sys-fs/ntfs3g[static-libs] )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8[static-libs] )
+ >=sys-fs/e2fsprogs-1.35[static-libs]
+ sys-libs/zlib[static-libs]
+ !arm? ( ewf? ( app-forensics/libewf:*[static-libs] ) )
+ )
+ !static? (
+ sys-apps/util-linux
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg:* )
+ ntfs? ( sys-fs/ntfs3g )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib
+ !arm? ( ewf? ( app-forensics/libewf:* ) )
+ qt4? ( >=dev-qt/qtgui-4.0.1:* )
+ )"
+RDEPEND="!static? ( ${DEPEND} )"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+DOCS=( )
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs --without-ntfs3g"
+ use jpeg || myconf+=" --without-jpeg"
+ use ewf || myconf+=" --without-ewf"
+ myconf+=$(usex qt4 " --enable-qt" " --disable-qt")
+
+ econf \
+ --docdir "${ROOT}/usr/share/doc/${P}" \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}
diff --git a/app-admin/testdisk/testdisk-7.0.ebuild b/app-admin/testdisk/testdisk-7.0.ebuild
new file mode 100644
index 000000000000..c2c69f965a42
--- /dev/null
+++ b/app-admin/testdisk/testdisk-7.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils eutils flag-o-matic
+
+DESCRIPTION="Checks and undeletes partitions + PhotoRec, signature based recovery tool"
+HOMEPAGE="http://www.cgsecurity.org/wiki/TestDisk"
+SRC_URI="http://www.cgsecurity.org/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="jpeg ntfs reiserfs static"
+
+# WARNING: reiserfs support does NOT work with reiserfsprogs
+# you MUST use progsreiserfs-0.3.1_rc8 (the last version ever released).
+DEPEND="
+ static? (
+ sys-apps/util-linux[static-libs]
+ >=sys-libs/ncurses-5.2[static-libs]
+ jpeg? ( virtual/jpeg:*[static-libs] )
+ ntfs? ( <=sys-fs/ntfs3g-2013.1.13[static-libs] )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8[static-libs] )
+ >=sys-fs/e2fsprogs-1.35[static-libs]
+ sys-libs/zlib[static-libs]
+ )
+ !static? (
+ sys-apps/util-linux
+ >=sys-libs/ncurses-5.2
+ jpeg? ( virtual/jpeg:* )
+ ntfs? ( <=sys-fs/ntfs3g-2013.1.13 )
+ reiserfs? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )
+ >=sys-fs/e2fsprogs-1.35
+ sys-libs/zlib
+ )"
+RDEPEND="!static? ( ${DEPEND} )"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+DOCS=( )
+PATCHES=( "${FILESDIR}/install-gentoo.patch" )
+
+src_configure() {
+ local myconf
+
+ # this is static method is the same used by upstream for their 'static' make
+ # target, but better, as it doesn't break.
+ use static && append-ldflags -static
+
+ # --with-foo are broken, any use of --with/--without disable the
+ # functionality.
+ # The following variation must be used.
+ use reiserfs || myconf+=" --without-reiserfs"
+ use ntfs || myconf+=" --without-ntfs --without-ntfs3g"
+ use jpeg || myconf+=" --without-jpeg"
+
+ econf \
+ --disable-qt \
+ --without-ewf \
+ --enable-sudo \
+ ${myconf}
+
+ # perform safety checks for NTFS, REISERFS and JPEG
+ if use ntfs && ! egrep -q '^#define HAVE_LIBNTFS(3G)? 1$' "${S}"/config.h ; then
+ die "Failed to find either NTFS or NTFS-3G library."
+ fi
+ if use reiserfs && egrep -q 'undef HAVE_LIBREISERFS\>' "${S}"/config.h ; then
+ die "Failed to find reiserfs library."
+ fi
+ if use jpeg && egrep -q 'undef HAVE_LIBJPEG\>' "${S}"/config.h ; then
+ die "Failed to find jpeg library."
+ fi
+}