aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2005-12-13 02:34:48 +0800
committerlioux <lioux@FreeBSD.org>2005-12-13 02:34:48 +0800
commit69989fa480f192cb956e3b74f699753b3811f588 (patch)
tree9c8cfcb391555cf8b7b2112b9223d112d0269ca2
parentce6e7c7f35b606d143f78e29f31b95f823336f6b (diff)
downloadfreebsd-ports-gnome-69989fa480f192cb956e3b74f699753b3811f588.tar.gz
freebsd-ports-gnome-69989fa480f192cb956e3b74f699753b3811f588.tar.zst
freebsd-ports-gnome-69989fa480f192cb956e3b74f699753b3811f588.zip
1) Fix dvd information parsing by using the ports internally supplied
lsdvd-ls application instead of the port multimedia/lsdvd 2) Bump PORTREVISION due to [1] 3) Take over maintainership as per previous maintainer request: "I don't use it anymore" Approved by: Andreas Fehlner <fehlner@gmx.de> (previous maintainer)
-rw-r--r--multimedia/ldvd/Makefile19
-rw-r--r--multimedia/ldvd/files/patch-ldvd-ls.c34
2 files changed, 46 insertions, 7 deletions
diff --git a/multimedia/ldvd/Makefile b/multimedia/ldvd/Makefile
index f50e073e0f4e..9e445749d5a9 100644
--- a/multimedia/ldvd/Makefile
+++ b/multimedia/ldvd/Makefile
@@ -7,40 +7,45 @@
PORTNAME= ldvd
PORTVERSION= 2.0.1
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://ftp-master.debian-unofficial.org/contrib/vedran/ldvd/${PORTVERSION}/
-MAINTAINER= fehlner@gmx.de
+MAINTAINER= lioux@FreeBSD.org
COMMENT= Gui, which shall simplify shrinking a DVD-9 to a DVD-5
+BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Gtk.pm:${PORTSDIR}/x11-toolkits/p5-Gtk
+LIB_DEPENDS= dvdread.3:${PORTSDIR}/multimedia/libdvdread
RUN_DEPENDS= transcode:${PORTSDIR}/multimedia/transcode \
growisofs:${PORTSDIR}/sysutils/dvd+rw-tools \
mkisofs:${PORTSDIR}/sysutils/cdrtools \
ifo_dump:${PORTSDIR}/multimedia/ogle \
dvdauthor:${PORTSDIR}/multimedia/dvdauthor \
buffer:${PORTSDIR}/misc/buffer \
- lsdvd:${PORTSDIR}/multimedia/lsdvd \
mplex:${PORTSDIR}/multimedia/mjpegtools \
${SITE_PERL}/${PERL_ARCH}/Gtk.pm:${PORTSDIR}/x11-toolkits/p5-Gtk
-BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Gtk.pm:${PORTSDIR}/x11-toolkits/p5-Gtk
USE_BZIP2= yes
USE_PERL= yes
USE_REINPLACE= yes
-NO_BUILD= yes
DATA= de.lang en.lang
PORTDOCS= AUTHORS HISTORY README.de README.en
-PLIST_FILES= bin/ldvd etc/ldvd.conf.sample ${DATA:S|^|%%DATADIR%%/|}
+PLIST_FILES= bin/ldvd bin/ldvd-ls etc/ldvd.conf.sample \
+ ${DATA:S|^|%%DATADIR%%/|}
PLIST_DIRS= %%DATADIR%%
post-patch:
- @${REINPLACE_CMD} -e 's|ldvd-ls|lsdvd|g' \
- ${WRKSRC}/ldvd.conf ${WRKSRC}/ldvd
@${REINPLACE_CMD} -e 's|/usr/share/$$sh_name-$$version|${DATADIR}|g; \
s|/etc|${PREFIX}/etc|g' ${WRKSRC}/ldvd
+do-build:
+ @cd ${WRKSRC} && \
+ ${CC} ${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib \
+ -ldvdread ldvd-ls.c -o ldvd-ls
+
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/ldvd ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/ldvd-ls ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/ldvd.conf ${PREFIX}/etc/ldvd.conf.sample
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${DATA:S|^|${WRKSRC}/|} ${DATADIR}
diff --git a/multimedia/ldvd/files/patch-ldvd-ls.c b/multimedia/ldvd/files/patch-ldvd-ls.c
new file mode 100644
index 000000000000..002ca12bc748
--- /dev/null
+++ b/multimedia/ldvd/files/patch-ldvd-ls.c
@@ -0,0 +1,34 @@
+--- ldvd-ls.c.orig Thu Dec 8 22:09:02 2005
++++ ldvd-ls.c Thu Dec 8 22:51:43 2005
+@@ -155,18 +155,25 @@
+ return -1;
+ }
+
+- if ( fseek(filehandle, 32808, SEEK_SET )) {
++ if ( fseek(filehandle, 32768, SEEK_SET )) {
+ fclose(filehandle);
+ fprintf(stderr, "Couldn't seek in %s for title\n", dvd_device);
+ strcpy(title, "unknown");
+ return -1;
+ }
+
+- if ( 32 != (i = fread(title, 1, 32, filehandle)) ) {
+- fclose(filehandle);
+- fprintf(stderr, "Couldn't read enough bytes for title.\n");
+- strcpy(title, "unknown");
+- return -1;
++ {
++ #define DVD_SEC_SIZ 2048
++ char tempBuf[ DVD_SEC_SIZ ];
++
++ if ( DVD_SEC_SIZ != fread(tempBuf, 1, DVD_SEC_SIZ, filehandle) ) {
++ fclose(filehandle);
++ fprintf(stderr, "Couldn't read enough bytes for title.\n");
++ strcpy(title, "unknown");
++ return -1;
++ }
++ snprintf( title, 32, "%s", tempBuf + 40 );
++ i=32;
+ }
+
+ fclose (filehandle);