SUMMARY="Checks and undeletes partitions and a signature based recovery tool" DESCRIPTION="TestDisk is powerful free data recovery software\! \ It was primarily designed to help recover lost partitions and/or \ make non-booting disks bootable again when these symptoms are caused \ by faulty software: certain types of viruses or human error \ (such as accidentally deleting a Partition Table). \ Partition table recovery using TestDisk is really easy. \ TestDisk features: - Fix partition table, recover deleted partition - Recover FAT32 boot sector from its backup - Rebuild FAT12/FAT16/FAT32 boot sector - Fix FAT tables - Rebuild NTFS boot sector - Recover NTFS boot sector from its backup - Fix MFT using MFT mirror - Locate ext2/ext3/ext4 Backup SuperBlock - Undelete files from FAT, exFAT, NTFS and ext2 filesystem - Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions. TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, \ TestDisk can be used to collect detailed information about a \ non-booting drive which can then be sent to a tech for further analysis. \ Those more familiar with such procedures should find TestDisk a handy \ tool in performing onsite recovery." HOMEPAGE="https://www.cgsecurity.org/wiki/TestDisk" COPYRIGHT="1998-2024 Christophe GRENIER" LICENSE="GNU GPL v2" REVISION="1" SOURCE_URI="https://www.cgsecurity.org/testdisk-${portVersion}.tar.bz2" CHECKSUM_SHA256="f8343be20cb4001c5d91a2e3bcd918398f00ae6d8310894a5a9f2feb813c283f" SOURCE_DIR="testdisk-${portVersion/\~wip/-WIP}" ADDITIONAL_FILES="qphotorec.rdef.in" PATCHES="testdisk-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" commandSuffix=$secondaryArchSuffix commandBinDir=$binDir if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= commandBinDir=$prefix/bin fi #TODO: require libntfs3g, reiserfs PROVIDES=" testdisk$secondaryArchSuffix = $portVersion cmd:fidentify$commandSuffix = $portVersion cmd:photorec$commandSuffix = $portVersion cmd:testdisk$commandSuffix = $portVersion " REQUIRES=" haiku$secondaryArchSuffix lib:libext2fs$secondaryArchSuffix lib:libiconv$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libncurses$secondaryArchSuffix lib:libuuid$secondaryArchSuffix >= 1.3 lib:libz$secondaryArchSuffix " PROVIDES_qt=" testdisk${secondaryArchSuffix}_qt = $portVersion cmd:qphotorec$commandSuffix = $portVersion " REQUIRES_qt=" haiku$secondaryArchSuffix testdisk$secondaryArchSuffix == $portVersion base lib:libext2fs$secondaryArchSuffix lib:libiconv$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libncurses$secondaryArchSuffix lib:libQt5Core$secondaryArchSuffix lib:libQt5Gui$secondaryArchSuffix lib:libQt5Widgets$secondaryArchSuffix lib:libuuid$secondaryArchSuffix lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libext2fs$secondaryArchSuffix devel:libiconv$secondaryArchSuffix devel:libintl$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libncurses$secondaryArchSuffix devel:libQt5Core$secondaryArchSuffix devel:libQt5Gui$secondaryArchSuffix devel:libQt5Widgets$secondaryArchSuffix devel:libuuid$secondaryArchSuffix >= 1.3 devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:aclocal cmd:autoconf cmd:automake cmd:gcc$secondaryArchSuffix cmd:gtk_update_icon_cache cmd:make cmd:lrelease$secondaryArchSuffix >= 5 cmd:pkg_config$secondaryArchSuffix " BUILD() { export CXXFLAGS="-O2 -std=c++11" autoreconf -fi LIBS="-lintl" \ runConfigure --omit-dirs binDir ./configure --bindir="$commandBinDir" \ --disable-stack-protector make $jobArgs } INSTALL() { make install mkdir -p $appsDir mv $commandBinDir/qphotorec $appsDir/QPhotoRec # cleanup XDG stuff we do not need rm -R $dataDir/applications rm -R $dataDir/icons local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2 | cut -d~ -f1`" local MINOR="0" local APP_NAME="QPhotoRec" local LONG_INFO="$SUMMARY" local APP_SIGNATURE="application/x-vnd.qphotorec" sed \ -e "s|@MAJOR@|$MAJOR|" \ -e "s|@MIDDLE@|$MIDDLE|" \ -e "s|@MINOR@|$MINOR|" \ -e "s|@LONG_INFO@|$LONG_INFO|" \ -e "s|@APP_NAME@|$APP_NAME|" \ -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ $portDir/additional-files/qphotorec.rdef.in > qphotorec.rdef addResourcesToBinaries qphotorec.rdef $appsDir/QPhotoRec addAppDeskbarSymlink $appsDir/QPhotoRec packageEntries qt \ $appsDir/QPhotoRec \ $manDir/*/qphotorec.* \ $manDir/*/*/qphotorec.* \ $dataDir/deskbar/menu/Applications/QPhotoRec } TEST() { make check }