aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenard Spencer <lenardrspencer@gmail.com>2020-04-10 10:02:38 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-10 10:05:41 +0700
commita12618cee86affbb592795671404804ba2909ae7 (patch)
tree7739278ed71600444afad89993a062967846c7bb
parent06a103a47aaf9e2b4934ceb7d283fb67ca7613a7 (diff)
multimedia/dvdbackup: Fix build on -current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--multimedia/dvdbackup/README15
-rw-r--r--multimedia/dvdbackup/dvdbackup.SlackBuild22
-rw-r--r--multimedia/dvdbackup/dvdbackup.info4
-rw-r--r--multimedia/dvdbackup/patches/dvdbackup-build-with-new-libdvdread.patch102
-rw-r--r--multimedia/dvdbackup/patches/dvdbackup_no-convert-title.patch26
5 files changed, 164 insertions, 5 deletions
diff --git a/multimedia/dvdbackup/README b/multimedia/dvdbackup/README
index 48ef05de8db66..1e9c1fd8cf06d 100644
--- a/multimedia/dvdbackup/README
+++ b/multimedia/dvdbackup/README
@@ -1,4 +1,17 @@
dvdbackup is a tool to backup video DVDs from the command line.
It has the advantages of being small, fast, and easy to use.
-libdvdcss is optional but most likely desired.
+By default, dvdbackup reformats the DVD title by replacing the
+underscores with spaces and converting to "Proper Case".
+To turn this "feature" off and retain the original VOLUME_ID
+formatting, pass CLOBBER="no" to the script.
+
+For those who wish to test this on current (15.0 EXPERIMENTAL),
+pass CURRENT="yes" to the script. Just bear in mind that
+functions -M, (mirror entire disc), -T (mirror titleset)
+and -F (main feature) are nonfunctional ATM under current.
+
+NOTE: Copyright laws vary from nation to nation, so bear in mind
+that this program is only intended for personal backups.
+
+libdvdcss is is an optional runtime dependency.
diff --git a/multimedia/dvdbackup/dvdbackup.SlackBuild b/multimedia/dvdbackup/dvdbackup.SlackBuild
index ab324bce25dfe..8ada2fb78ee8d 100644
--- a/multimedia/dvdbackup/dvdbackup.SlackBuild
+++ b/multimedia/dvdbackup/dvdbackup.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for dvdbackup
# Copyright 2013 John Vogel Corning, New York US
+# Copyright 2017 Lenard Spencer <lspencer31_at_cfl_dot_rr_dot_com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,12 +25,12 @@
PRGNAM=dvdbackup
VERSION=${VERSION:-0.4.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i686 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -54,6 +55,8 @@ else
LIBDIRSUFFIX=""
fi
+CURRENT=${CURRENT:-"no"}
+
set -e
rm -rf $PKG
@@ -69,10 +72,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Patch to not clobber the DVD title
+if [ {$CLOBBER:-"yes"} == "no" ]; then
+ patch -p1 < $CWD/patches/dvdbackup_no-convert-title.patch
+fi
+
# Patches from lauchpad bazaar repo.
patch -p0 < $CWD/patches/do_not_treat_automake_warnings_as_errors.patch
patch -p0 < $CWD/patches/remove_PATH_MAX_limitation.patch
+# Patch for the new libdvdread
+if [ "$CURRENT" = "yes" ]; then
+ patch -p1 < $CWD/patches/dvdbackup-build-with-new-libdvdread.patch
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -98,6 +111,11 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+if [ "$CURRENT" = "yes" ]; then
+ # Don't ship .la files:
+ rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+fi
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/multimedia/dvdbackup/dvdbackup.info b/multimedia/dvdbackup/dvdbackup.info
index 90f9497b1032a..1964b5027479d 100644
--- a/multimedia/dvdbackup/dvdbackup.info
+++ b/multimedia/dvdbackup/dvdbackup.info
@@ -6,5 +6,5 @@ MD5SUM="fd9189149ec88520e0ceba8d17520fbb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="John Vogel"
-EMAIL="jvogel4@stny.rr.com"
+MAINTAINER="Lenard Spencer"
+EMAIL="lenardrspencer@gmail.com"
diff --git a/multimedia/dvdbackup/patches/dvdbackup-build-with-new-libdvdread.patch b/multimedia/dvdbackup/patches/dvdbackup-build-with-new-libdvdread.patch
new file mode 100644
index 0000000000000..dc30d2c31e1e4
--- /dev/null
+++ b/multimedia/dvdbackup/patches/dvdbackup-build-with-new-libdvdread.patch
@@ -0,0 +1,102 @@
+diff -Naur dvdbackup-0.4.2/src/dvdbackup.c dvdbackup-0.4.2.new/src/dvdbackup.c
+--- dvdbackup-0.4.2/src/dvdbackup.c 2020-04-08 10:56:55.630771977 -0400
++++ dvdbackup-0.4.2.new/src/dvdbackup.c 2020-04-08 11:38:48.851465230 -0400
+@@ -1180,7 +1180,7 @@
+ int size;
+
+ /* DVD handler */
+- ifo_handle_t* ifo_file = NULL;
++ dvd_file_t* ifo_file = NULL;
+
+
+ if (title_set_info->number_of_title_sets + 1 < title_set) {
+@@ -1245,7 +1245,7 @@
+ if ((streamout_ifo = open(targetname_ifo, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
+ fprintf(stderr, _("Error creating %s\n"), targetname_ifo);
+ perror(PACKAGE);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1257,7 +1257,7 @@
+ if ((streamout_bup = open(targetname_bup, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
+ fprintf(stderr, _("Error creating %s\n"), targetname_bup);
+ perror(PACKAGE);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1270,7 +1270,7 @@
+
+ if ((ifo_file = ifoOpen(dvd, title_set))== 0) {
+ fprintf(stderr, _("Failed opening IFO for title set %d\n"), title_set);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1279,11 +1279,11 @@
+ return 1;
+ }
+
+- size = DVDFileSize(ifo_file->file) * DVD_VIDEO_LB_LEN;
++ size = DVDFileSize(ifo_file) * DVD_VIDEO_LB_LEN;
+
+ if ((buffer = (unsigned char *)malloc(size * sizeof(unsigned char))) == NULL) {
+ perror(PACKAGE);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1292,11 +1292,11 @@
+ return 1;
+ }
+
+- DVDFileSeek(ifo_file->file, 0);
++ DVDFileSeek(ifo_file, 0);
+
+- if (DVDReadBytes(ifo_file->file,buffer,size) != size) {
++ if (DVDReadBytes(ifo_file,buffer,size) != size) {
+ fprintf(stderr, _("Error reading IFO for title set %d\n"), title_set);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1308,7 +1308,7 @@
+
+ if (write(streamout_ifo,buffer,size) != size) {
+ fprintf(stderr, _("Error writing %s\n"),targetname_ifo);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1319,7 +1319,7 @@
+
+ if (write(streamout_bup,buffer,size) != size) {
+ fprintf(stderr, _("Error writing %s\n"),targetname_bup);
+- ifoClose(ifo_file);
++ DVDCloseFile(ifo_file);
+ free(buffer);
+ free(targetname_ifo);
+ free(targetname_bup);
+@@ -1626,7 +1626,6 @@
+
+ title_set_info = DVDGetFileSet(_dvd);
+ if (!title_set_info) {
+- DVDClose(_dvd);
+ return(1);
+ }
+
+@@ -1653,7 +1652,6 @@
+ title_set_info = DVDGetFileSet(_dvd);
+
+ if (!title_set_info) {
+- DVDClose(_dvd);
+ return(1);
+ }
+
diff --git a/multimedia/dvdbackup/patches/dvdbackup_no-convert-title.patch b/multimedia/dvdbackup/patches/dvdbackup_no-convert-title.patch
new file mode 100644
index 0000000000000..aa515aad310e2
--- /dev/null
+++ b/multimedia/dvdbackup/patches/dvdbackup_no-convert-title.patch
@@ -0,0 +1,26 @@
+diff -Naur dvdbackup-0.4.2/src/dvdbackup.c dvdbackup-0.4.2.new/src/dvdbackup.c
+--- dvdbackup-0.4.2/src/dvdbackup.c 2012-06-23 21:10:29.000000000 -0400
++++ dvdbackup-0.4.2.new/src/dvdbackup.c 2020-01-19 10:13:23.689417434 -0500
+@@ -1326,22 +1326,6 @@
+ length--;
+ }
+
+- /* convert title to lower case and replace underscores with spaces */
+- for(i = 0; i < length; i++) {
+- word_length++;
+- if(word_length == 1) {
+- title[i] = toupper(title[i]);
+- } else {
+- title[i] = tolower(title[i]);
+- }
+- if(title[i] == '_') {
+- title[i] = ' ';
+- }
+- if(title[i] == ' ') {
+- word_length = 0;
+- }
+- }
+-
+ return(0);
+ }
+