diff options
author | c0bw3b <c0bw3b@users.noreply.github.com> | 2019-10-19 23:15:35 +0200 |
---|---|---|
committer | c0bw3b <c0bw3b@users.noreply.github.com> | 2019-10-22 20:57:50 +0200 |
commit | 845593d807a2560a05f9e4505e771fbfd8ba263c (patch) | |
tree | 96b02a637319176a105517aad29afbe916bb2a53 /pkgs/tools/cd-dvd/dvd+rw-tools | |
parent | 382ca30e76e960672fb15edf1192192361de3b42 (diff) |
dvdplusrwtools: revamp at 7.1
+ replace local patches with Gentoo ones
+ add meta.licenses
Diffstat (limited to 'pkgs/tools/cd-dvd/dvd+rw-tools')
6 files changed, 30 insertions, 166 deletions
diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix b/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix index 40ca08c92606..40925a14537a 100644 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix +++ b/pkgs/tools/cd-dvd/dvd+rw-tools/default.nix @@ -1,38 +1,41 @@ -{stdenv, fetchurl, cdrkit, m4}: +{ stdenv, fetchurl, fetchpatch, cdrtools, m4 }: -stdenv.mkDerivation { - name = "dvd+rw-tools-7.1"; +stdenv.mkDerivation rec { + pname = "dvd+rw-tools"; + version = "7.1"; src = fetchurl { - url = http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.1.tar.gz; + url = "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/${pname}-${version}.tar.gz"; sha256 = "1jkjvvnjcyxpql97xjjx0kwvy70kxpiznr2zpjy2hhci5s10zmpq"; }; - # Patches from Gentoo / Fedora - # https://bugs.gentoo.org/257360 - # https://bugzilla.redhat.com/show_bug.cgi?id=426068 - # https://bugzilla.redhat.com/show_bug.cgi?id=243036 - patches = [ - ./dvd+rw-tools-7.0-dvddl.patch - ./dvd+rw-tools-7.0-glibc2.6.90.patch - ./dvd+rw-tools-7.0-wctomb.patch - ./dvd+rw-tools-7.0-wexit.patch - ./dvd+rw-tools-7.1-layerbreaksetup.patch - ]; + # Patches from Gentoo + patches = [ ] + ++ builtins.map ({pfile, sha256}: fetchpatch { + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-cdr/dvd+rw-tools/files/${pfile}?id=b510df361241e8f16314b1f14642305f0111dac6"; + inherit sha256; + }) + [{ pfile = "dvd+rw-tools-7.0-dvddl-r1.patch"; sha256 = "12l33jq6405shfwdycrj52qmd07h5bsp1vjaddknfri456azjny5"; } + { pfile = "dvd+rw-tools-7.0-glibc2.6.90.patch"; sha256 = "1fb3gap2in782pa4164h1w0ha8ggsq3inissa1k0zn2p2r3rb5ln"; } + { pfile = "dvd+rw-tools-7.0-reload.patch"; sha256 = "12v2y2y6ci5hh6lbmsk97dzgznrm4bxwhc81mq684ix0qspb9mq4"; } + { pfile = "dvd+rw-tools-7.0-sysmacros.patch"; sha256 = "1rkb26cyhfxklkmna3l9b4797f6gzlxyqqin44jwnq3jmwfrs6v0"; } + { pfile = "dvd+rw-tools-7.0-wctomb-r1.patch"; sha256 = "1xg770l0b4bjn30y7nqg619v4m5ickcn2n8hv9k2an6r191daq58"; } + { pfile = "dvd+rw-tools-7.0-wexit.patch"; sha256 = "0sqzlkm19fmjx4lzxkxwn2ymrj9fq0zk0jkys3xm6xvd2ibb6kxl"; } + { pfile = "dvd+rw-tools-7.1-bluray_pow_freespace.patch"; sha256 = "0iscz8fs5002ymk6wl2fz4x06b7bdnc57rfz8kbv3216acqi5rv3"; } + { pfile = "dvd+rw-tools-7.1-bluray_srm+pow.patch"; sha256 = "0sy40m12w987i6g0cyxv8cfmab4vp7cd222lv05apknfi2y7smmw"; } + { pfile = "dvd+rw-tools-7.1-lastshort.patch"; sha256 = "01wspv70sil20khkg5kj086b1x8rrig4yhcq9s88bdjd42nv0vpx"; } + { pfile = "dvd+rw-tools-7.1-noevent.patch"; sha256 = "1kbmxpg15wci33f2h6pxxvf3qm0kpyzx9wj5a3l67sk34hvza3z6"; } + ]; - buildInputs = [cdrkit m4]; + nativeBuildInputs = [ m4 ]; + buildInputs = [ cdrtools ]; - preBuild = '' - makeFlags="prefix=$out" - ''; + makeFlags = [ "prefix=${placeholder "out"}" ]; - # Incompatibility with Linux 2.6.23 headers, see - # http://www.mail-archive.com/cdwrite@other.debian.org/msg11464.html - NIX_CFLAGS_COMPILE = "-DINT_MAX=__INT_MAX__"; - - meta = { - homepage = http://fy.chalmers.se/~appro/linux/DVD+RW/tools; - description = "Tools for burning DVDs"; - platforms = stdenv.lib.platforms.linux; + meta = with stdenv.lib; { + homepage = "http://fy.chalmers.se/~appro/linux/DVD+RW/tools"; + description = "Tools for mastering Blu-ray and DVD+-RW/+-R media"; + platforms = platforms.linux; + license = with licenses; [ gpl2 publicDomain ]; }; } diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-dvddl.patch b/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-dvddl.patch deleted file mode 100644 index c1c6fb3332a2..000000000000 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-dvddl.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ./growisofs_mmc.cpp.joe 2006-04-27 20:45:00.788446635 +0200 -+++ ./growisofs_mmc.cpp 2006-04-27 20:46:01.666824300 +0200 -@@ -1412,9 +1412,7 @@ - blocks += 15, blocks &= ~15; - - if (blocks <= split) -- fprintf (stderr,":-( more than 50%% of space will be *wasted*!\n" -- " use single layer media for this recording\n"), -- exit (FATAL_START(EMEDIUMTYPE)); -+ fprintf (stderr,":-? more than 50%% of space will be *wasted*!\n"); - - blocks /= 16; - blocks += 1; diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-glibc2.6.90.patch b/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-glibc2.6.90.patch deleted file mode 100644 index 49742d3c4db0..000000000000 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-glibc2.6.90.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up dvd+rw-tools-7.0/transport.hxx.glibc2.6.90 dvd+rw-tools-7.0/transport.hxx ---- dvd+rw-tools-7.0/transport.hxx.glibc2.6.90 2007-08-15 12:56:17.000000000 +0200 -+++ dvd+rw-tools-7.0/transport.hxx 2007-08-15 12:56:42.000000000 +0200 -@@ -11,6 +11,7 @@ - #include <stdlib.h> - #include <unistd.h> - #include <string.h> -+#include <limits.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-wctomb.patch b/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-wctomb.patch deleted file mode 100644 index 3d13fc8d273e..000000000000 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-wctomb.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./transport.hxx~ 2008-03-25 21:24:47.000000000 -0400 -+++ ./transport.hxx 2008-03-25 21:25:36.000000000 -0400 -@@ -116,7 +116,7 @@ - extern "C" char *plusminus_locale() - { static class __plusminus { - private: -- char str[4]; -+ char str[MB_LEN_MAX]; - public: - __plusminus() { setlocale(LC_CTYPE,ENV_LOCALE); - int l = wctomb(str,(wchar_t)(unsigned char)'±'); diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-wexit.patch b/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-wexit.patch deleted file mode 100644 index e7910cbdd7b8..000000000000 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.0-wexit.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dvd+rw-tools-7.0/dvd+rw-format.cpp.wexit 2007-06-21 12:42:30.000000000 +0200 -+++ dvd+rw-tools-7.0/dvd+rw-format.cpp 2007-06-21 12:44:13.000000000 +0200 -@@ -245,7 +245,7 @@ int main (int argc, char *argv[]) - alarm(1); - while ((waitpid(pid,&i,0) != pid) && !WIFEXITED(i)) ; - if (WEXITSTATUS(i) == 0) fprintf (stderr,"\n"); -- exit (0); -+ exit (WEXITSTATUS(i)); - } - #endif - diff --git a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.1-layerbreaksetup.patch b/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.1-layerbreaksetup.patch deleted file mode 100644 index 7636f8393df2..000000000000 --- a/pkgs/tools/cd-dvd/dvd+rw-tools/dvd+rw-tools-7.1-layerbreaksetup.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -ur dvd+rw-tools-7.1-orig/growisofs.c dvd+rw-tools-7.1/growisofs.c ---- dvd+rw-tools-7.1-orig/growisofs.c 2008-03-04 10:15:03.000000000 +0100 -+++ dvd+rw-tools-7.1/growisofs.c 2009-09-06 22:39:33.000000000 +0200 -@@ -535,7 +535,7 @@ - */ - int get_mmc_profile (void *fd); - int plusminus_r_C_parm (void *fd,char *C_parm); --pwrite64_t poor_mans_setup (void *fd,off64_t leadout); -+pwrite64_t poor_mans_setup (void *fd,off64_t leadout,unsigned int lbreak); - char *plusminus_locale (); - int __1x (); - /* -@@ -2447,7 +2447,7 @@ - goto out; - } - if (!progress.final) progress.final = tracksize; -- tracksize = layer_break*CD_BLOCK*2; -+ //tracksize = layer_break*CD_BLOCK*2; - } - } - else if (capacity > outoff) -@@ -2648,7 +2648,7 @@ - * further details on poor_mans_setup - */ - pwrite64_method = poor_mans_setup (ioctl_handle, -- outoff+tracksize); -+ outoff+tracksize, (unsigned int)layer_break); - } - - if (!progress.final) -diff -ur dvd+rw-tools-7.1-orig/growisofs_mmc.cpp dvd+rw-tools-7.1/growisofs_mmc.cpp ---- dvd+rw-tools-7.1-orig/growisofs_mmc.cpp 2008-03-04 18:47:49.000000000 +0100 -+++ dvd+rw-tools-7.1/growisofs_mmc.cpp 2009-09-06 20:52:46.000000000 +0200 -@@ -1612,7 +1612,7 @@ - return 0; - } - --static void plus_r_dl_split (Scsi_Command &cmd,off64_t size) -+static void plus_r_dl_split (Scsi_Command &cmd,off64_t size,unsigned int lbreak) - { int err; - unsigned int blocks,split; - unsigned char dvd_20[4+8]; -@@ -1644,10 +1644,17 @@ - " use single layer media for this recording\n"), - exit (FATAL_START(EMEDIUMTYPE)); - -- blocks /= 16; -- blocks += 1; -- blocks /= 2; -- blocks *= 16; -+ if (lbreak) -+ { -+ blocks=lbreak; -+ } -+ else -+ { -+ blocks /= 16; -+ blocks += 1; -+ blocks /= 2; -+ blocks *= 16; -+ } - - fprintf (stderr,"%s: splitting layers at %u blocks\n", - ioctl_device,blocks); -@@ -2010,7 +2017,7 @@ - typedef ssize_t (*pwrite64_t)(int,const void *,size_t,off64_t); - - extern "C" --pwrite64_t poor_mans_setup (void *fd,off64_t leadout) -+pwrite64_t poor_mans_setup (void *fd,off64_t leadout,unsigned int lbreak) - { Scsi_Command cmd(ioctl_handle=fd); - int err,profile=mmc_profile&0xFFFF; - -@@ -2059,7 +2066,7 @@ - case 0x2B: // DVD+R Double Layer - plusminus_pages_setup(cmd,profile); - if (profile==0x2B && next_track==1 && dvd_compat && leadout) -- plus_r_dl_split (cmd,leadout); -+ plus_r_dl_split (cmd,leadout,lbreak); - atexit (plus_r_finalize); - if (next_wr_addr) - { atsignals (no_r_finalize); -diff -ur dvd+rw-tools-7.1-orig/transport.hxx dvd+rw-tools-7.1/transport.hxx ---- dvd+rw-tools-7.1-orig/transport.hxx 2008-03-01 11:34:43.000000000 +0100 -+++ dvd+rw-tools-7.1/transport.hxx 2009-09-06 20:53:53.000000000 +0200 -@@ -9,6 +9,7 @@ - #if defined(__unix) || defined(__unix__) - #include <stdio.h> - #include <stdlib.h> -+#include <limits.h> - #include <unistd.h> - #include <string.h> - #include <sys/types.h> |