dvdisaster: Apply debian's patches to allow ROM type and encrypted DVDs

+57 -5
+17 -5
pkgs/tools/cd-dvd/dvdisaster/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, which, gettext, intltool 2 2 , glib, gtk2 3 + , enableSoftening ? true 3 4 }: 4 5 5 6 stdenv.mkDerivation rec { ··· 9 10 url = "http://dvdisaster.net/downloads/${name}.tar.bz2"; 10 11 sha256 = "e9787dea39aeafa38b26604752561bc895083c17b588489d857ac05c58be196b"; 11 12 }; 13 + 14 + patches = stdenv.lib.optional enableSoftening [ 15 + ./encryption.patch 16 + ./dvdrom.patch 17 + ]; 12 18 13 19 postPatch = '' 14 20 patchShebangs ./ ··· 22 28 glib gtk2 23 29 ]; 24 30 25 - meta = { 31 + meta = with stdenv.lib; { 26 32 homepage = http://dvdisaster.net/; 27 - description = 28 - "Stores data on CD/DVD/BD in a way that it is fully recoverable even " + 29 - "after some read errors have developed"; 30 - license = stdenv.lib.licenses.gpl2; 33 + description = "data loss/scratch/aging protection for CD/DVD media"; 34 + longDescription = '' 35 + dvdisaster provides a margin of safety against data loss on CD and 36 + DVD media caused by scratches or aging media. It creates error correction 37 + data which is used to recover unreadable sectors if the disc becomes 38 + damaged at a later time. 39 + ''; 40 + license = licenses.gpl2; 41 + platforms = platforms.linux; 42 + maintainers = with maintainers; [ jgeerds ]; 31 43 }; 32 44 }
+19
pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch
··· 1 + Author: Corey Wright <undefined@pobox.com> 2 + Description: Adds support for DVD-ROM medium-type. 3 + 4 + Index: dvdisaster/scsi-layer.c 5 + =================================================================== 6 + --- dvdisaster.orig/scsi-layer.c 2012-03-06 11:10:17.147044691 +0900 7 + +++ dvdisaster/scsi-layer.c 2012-03-06 11:10:30.927044292 +0900 8 + @@ -913,6 +913,11 @@ 9 + break; 10 + } 11 + 12 + + if(layer_type & 0x01) 13 + + { dh->typeDescr = g_strdup("DVD-ROM"); 14 + + break; 15 + + } 16 + + 17 + if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */ 18 + { dh->typeDescr = g_strdup("DVD-ROM (fake)"); 19 + dh->subType = DVD;
+21
pkgs/tools/cd-dvd/dvdisaster/encryption.patch
··· 1 + Author: n/a 2 + Description: Disables to skip on encrypted disks (e.g. DVD with CSS-Encryption). 3 + 4 + Index: dvdisaster/scsi-layer.c 5 + =================================================================== 6 + --- dvdisaster.orig/scsi-layer.c 2012-04-08 21:51:10.995588783 +0900 7 + +++ dvdisaster/scsi-layer.c 2012-04-08 21:51:29.259678075 +0900 8 + @@ -2693,11 +2693,12 @@ 9 + return NULL; 10 + } 11 + } 12 + - 13 + +/* 14 + if(dh->mainType == DVD && query_copyright(dh)) 15 + { CloseDevice(dh); 16 + Stop(_("This software does not support encrypted media.\n")); 17 + } 18 + +*/ 19 + 20 + /* Create the bitmap of simulated defects */ 21 +