dvdisaster: 0.79.10 -> 0.79.10-pl5, modernization, added matteo-pacini as maintainer (#435662)

Changed files
+67 -86
pkgs
-19
pkgs/by-name/dv/dvdisaster/dvdrom.patch
···
-
Author: Corey Wright <undefined@pobox.com>
-
Description: Adds support for DVD-ROM medium-type.
-
-
Index: dvdisaster/scsi-layer.c
-
===================================================================
-
--- dvdisaster.orig/scsi-layer.c 2012-03-06 11:10:17.147044691 +0900
-
+++ dvdisaster/scsi-layer.c 2012-03-06 11:10:30.927044292 +0900
-
@@ -913,6 +913,11 @@
-
break;
-
}
-
-
+ if(layer_type & 0x01)
-
+ { dh->typeDescr = g_strdup("DVD-ROM");
-
+ break;
-
+ }
-
+
-
if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
-
{ dh->typeDescr = g_strdup("DVD-ROM (fake)");
-
dh->subType = DVD;
-19
pkgs/by-name/dv/dvdisaster/encryption.patch
···
-
Author: n/a
-
Description: Disables to skip on encrypted disks (e.g. DVD with CSS-Encryption).
-
-
diff -Naur dvdisaster-0.79.5.orig/scsi-layer.c dvdisaster-0.79.5/scsi-layer.c
-
--- dvdisaster-0.79.5.orig/scsi-layer.c 2015-10-28 21:56:57.000000000 +0100
-
+++ dvdisaster-0.79.5/scsi-layer.c 2015-12-27 06:19:32.012253661 +0100
-
@@ -2712,12 +2712,6 @@
-
}
-
}
-
-
- if(dh->mainType == DVD && query_copyright(dh))
-
- { CloseImage(image);
-
- Stop(_("This software does not support encrypted media.\n"));
-
- return NULL;
-
- }
-
-
-
/* Create the bitmap of simulated defects */
-
-
if(Closure->simulateDefects)
-10
pkgs/by-name/dv/dvdisaster/gcc14-fix.patch
···
-
diff --git a/scripts/bash-based-configure b/scripts/bash-based-configure
-
--- a/scripts/bash-based-configure
-
+++ b/scripts/bash-based-configure
-
@@ -1364,6 +1364,7 @@ EOF
-
-
cat >conftest.c <<EOF
-
#include <glib.h>
-
+#include <stdio.h>
-
int main(int argc, char *argv[])
-
{ g_malloc(1024);
+22
pkgs/by-name/dv/dvdisaster/md5sum.patch
···
+
Just use md5sum
+
diff --git a/regtest/common.bash b/regtest/common.bash
+
index ce629ff..75abe54 100644
+
--- a/regtest/common.bash
+
+++ b/regtest/common.bash
+
@@ -33,15 +33,7 @@ TMPLOG="$LOGDIR/tmplog.txt"
+
+
UNAME="$(uname -s)"
+
+
-if [ "$UNAME" = Darwin ]; then
+
- MD5SUM="md5 -r"
+
-else
+
- MD5SUM=md5sum
+
-fi
+
-
+
-if ! $MD5SUM $RNDSEQ >/dev/null 2>&1; then
+
- MD5SUM=../simple-md5sum
+
-fi
+
+MD5SUM=md5sum
+
+
nbfailed=0
+
+45 -38
pkgs/by-name/dv/dvdisaster/package.nix
···
{
lib,
stdenv,
-
fetchurl,
+
fetchFromGitHub,
gettext,
pkg-config,
which,
glib,
-
gtk2,
-
enableSoftening ? true,
+
gtk3,
+
wrapGAppsHook3,
+
withGui ? true,
}:
-
stdenv.mkDerivation rec {
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "dvdisaster";
-
version = "0.79.10";
+
version = "0.79.10-pl5";
-
src = fetchurl {
-
url = "https://dvdisaster.jcea.es/downloads/${pname}-${version}.tar.bz2";
-
hash = "sha256-3Qqf9i8aSL9z2uJvm8P/QOPp83nODC3fyLL1iBIgf+g=";
+
src = fetchFromGitHub {
+
owner = "speed47";
+
repo = "dvdisaster";
+
tag = "v${finalAttrs.version}";
+
hash = "sha256-lWvZDB08lZb87l4oEbrdtc6Me4mWHiW3DFNXYoYR3a0=";
};
nativeBuildInputs = [
gettext
pkg-config
which
+
wrapGAppsHook3
];
+
buildInputs = [
glib
-
gtk2
+
]
+
++ lib.optionals withGui [
+
gtk3
];
-
patches = lib.optionals enableSoftening [
-
./encryption.patch
-
./dvdrom.patch
-
./gcc14-fix.patch
+
patches = [
+
./md5sum.patch
];
postPatch = ''
patchShebangs ./
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
-
substituteInPlace scripts/bash-based-configure \
-
--replace 'if (make -v | grep "GNU Make") > /dev/null 2>&1 ;' \
-
'if make -v | grep "GNU Make" > /dev/null 2>&1 ;'
'';
configureFlags = [
···
"--with-nls=yes"
"--with-embedded-src-path=no"
]
+
++ lib.optionals (!withGui) [
+
"--with-gui=no"
+
]
++ lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
-
# fatal error: inlined-icons.h: No such file or directory
-
enableParallelBuilding = false;
+
enableParallelBuilding = true;
doCheck = true;
checkPhase = ''
···
mkdir -p "$TMP"/{log,regtest}
substituteInPlace common.bash \
-
--replace /dev/shm "$TMP/log" \
-
--replace /var/tmp "$TMP"
+
--replace-fail /dev/shm "$TMP/log" \
+
--replace-fail /var/tmp "$TMP"
-
for test in *.bash; do
-
case "$test" in
-
common.bash)
-
echo "Skipping $test"
-
continue ;;
-
*)
-
echo "Running $test"
-
./"$test"
-
esac
-
done
+
./runtests.sh
popd
runHook postCheck
'';
-
postInstall = ''
+
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
rm -f $out/bin/dvdisaster-uninstall.sh
mkdir -pv $out/share/applications
cp contrib/dvdisaster.desktop $out/share/applications/
···
done
'';
-
meta = with lib; {
-
homepage = "https://dvdisaster.jcea.es/";
-
description = "Data loss/scratch/aging protection for CD/DVD media";
+
# Tests are heavily CPU-bound
+
requiredSystemFeatures = [ "big-parallel" ];
+
+
meta = {
+
homepage = "https://github.com/speed47/dvdisaster";
+
changelog = "https://github.com/speed47/dvdisaster/blob/v${finalAttrs.version}/CHANGELOG";
+
description = "Data loss/scratch/aging protection for CD/DVD media (unofficial version)";
longDescription = ''
Dvdisaster provides a margin of safety against data loss on CD and
DVD media caused by scratches or aging media. It creates error correction
data which is used to recover unreadable sectors if the disc becomes
damaged at a later time.
+
+
This version is built on top of the latest upstream version (2021),
+
it is backwards compatible with it, and adds a list of improvements,
+
such as BD-R support, CLI-only mode, and more.
'';
-
license = licenses.gpl3Plus;
-
platforms = platforms.linux;
-
maintainers = [ ];
+
license = lib.licenses.gpl3Plus;
+
platforms = lib.platforms.linux;
+
maintainers = [ lib.maintainers.matteopacini ];
mainProgram = "dvdisaster";
+
# Tests are not parallelized, and take a long time to run (1-3 hours, depending on CPU)
+
# Max observed time: ~4 hours on a "big-parallel" builder
+
timeout = 4 * 60 * 60;
};
-
}
+
})