aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/lsdvd/1000-log-to-stderr.patch30
-rw-r--r--multimedia/lsdvd/lsdvd.SlackBuild17
-rw-r--r--multimedia/lsdvd/lsdvd.info6
3 files changed, 45 insertions, 8 deletions
diff --git a/multimedia/lsdvd/1000-log-to-stderr.patch b/multimedia/lsdvd/1000-log-to-stderr.patch
new file mode 100644
index 0000000000..f88890e0eb
--- /dev/null
+++ b/multimedia/lsdvd/1000-log-to-stderr.patch
@@ -0,0 +1,30 @@
+Description: Adjust use of libdvdread to log to stderr not stdout,
+ to avoid generating invalid json, xml, etc when not supporting encrypted DVD.
+Author: Petter Reinholdtsen <pere@hungry.com>
+Origin: commit:ceb584ef8e8c84e77b01bc2aab5d9cb912f2837e
+Forwarded: not-needed
+Last-Update: 2024-01-02
+---
+--- a/lsdvd.c
++++ b/lsdvd.c
+@@ -424,7 +424,19 @@ int main(int argc, char *argv[])
+ return 1;
+ }
+
+- dvd = DVDOpen(dvd_device);
++ /* Replacement logger to send output to stderr, ensuring
++ stdout is always understandable as xml, json, perl, python,
++ etc. Without this, the 'Encrypted DVD support unavailable'
++ message can show up in the generated files. */
++ void dvdlogger(void *, dvd_logger_level_t,
++ const char *fmt, va_list list)
++ {
++ fprintf(stderr, "libdvdread: ");
++ vfprintf(stderr, fmt, list);
++ fprintf(stderr, "\n");
++ }
++ dvd_logger_cb logcb = { dvdlogger };
++ dvd = DVDOpen2(NULL, &logcb, dvd_device);
+ if( !dvd ) {
+ fprintf( stderr, "Can't open disc %s!\n", dvd_device);
+ return 2;
diff --git a/multimedia/lsdvd/lsdvd.SlackBuild b/multimedia/lsdvd/lsdvd.SlackBuild
index e72f2caa01..d740b70bf2 100644
--- a/multimedia/lsdvd/lsdvd.SlackBuild
+++ b/multimedia/lsdvd/lsdvd.SlackBuild
@@ -6,13 +6,18 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20250125 bkw: update for 0.19.
+# I have no idea where Debian got the 0.19 sources (they list the SF
+# project as homepage, and it only goes to 0.17), but the fixes in 0.19
+# look useful. Include the stderr patch from them, too.
+
# 20230103 bkw: BUILD=2, remove useless INSTALL from doc dir.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lsdvd
-VERSION=${VERSION:-0.17}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.19}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -53,11 +58,13 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/${PRGNAM}_$VERSION.orig.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
- \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+patch -p1 < $CWD/1000-log-to-stderr.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/multimedia/lsdvd/lsdvd.info b/multimedia/lsdvd/lsdvd.info
index 8abfa26d91..222e9c2382 100644
--- a/multimedia/lsdvd/lsdvd.info
+++ b/multimedia/lsdvd/lsdvd.info
@@ -1,8 +1,8 @@
PRGNAM="lsdvd"
-VERSION="0.17"
+VERSION="0.19"
HOMEPAGE="https://sourceforge.net/projects/lsdvd/"
-DOWNLOAD="https://downloads.sourceforge.net/lsdvd/lsdvd-0.17.tar.gz"
-MD5SUM="32e63ff932ee2867e023ad3e74e14dcb"
+DOWNLOAD="http://deb.debian.org/debian/pool/main/l/lsdvd/lsdvd_0.19.orig.tar.gz"
+MD5SUM="2812e7c2924d27fe24b22cd3e1093b87"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""