aboutsummaryrefslogtreecommitdiff
path: root/multimedia/lsdvd
diff options
context:
space:
mode:
authorMichael Johnson <ahze@FreeBSD.org>2004-12-13 02:15:16 +0000
committerMichael Johnson <ahze@FreeBSD.org>2004-12-13 02:15:16 +0000
commitf636a19f37062d8e42fd239f80b250da691f1e90 (patch)
tree4ac678d47039e0a60e2bd5915e50a4753d9a5f34 /multimedia/lsdvd
parentb32865c70bdf0b565672fafbf64038c360506da1 (diff)
downloadports-f636a19f37062d8e42fd239f80b250da691f1e90.tar.gz
ports-f636a19f37062d8e42fd239f80b250da691f1e90.zip
- Fix lsdvd so it can print a DVD-title
- Skip configure/make and just use ${CC} in do-build: - Bump PORTREVISION Submitted by: Zahemszky G‡bor <Gabor@Zahemszky.HU>
Notes
Notes: svn path=/head/; revision=123877
Diffstat (limited to 'multimedia/lsdvd')
-rw-r--r--multimedia/lsdvd/Makefile12
-rw-r--r--multimedia/lsdvd/files/patch-lsdvd.c31
2 files changed, 41 insertions, 2 deletions
diff --git a/multimedia/lsdvd/Makefile b/multimedia/lsdvd/Makefile
index 296f8a7c66e6..d94778e21555 100644
--- a/multimedia/lsdvd/Makefile
+++ b/multimedia/lsdvd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= lsdvd
PORTVERSION= 0.10
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= acidrip
@@ -16,8 +17,6 @@ COMMENT= Print information about the contents and structure of a DVD
LIB_DEPENDS= dvdread.3:${PORTSDIR}/multimedia/libdvdread
-GNU_CONFIGURE= yes
-USE_GMAKE= yes
USE_REINPLACE= yes
PLIST_FILES= bin/lsdvd
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
@@ -46,4 +45,13 @@ post-patch:
@${REINPLACE_CMD} -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|' \
${WRKSRC}/lsdvd.c
+do-build:
+ cd ${WRKSRC} && \
+ ${CC} -DPACKAGE=\"${PORTNAME}\" -DVERSION=\"${PORTVERSION}\" \
+ -DHAVE_LIBDVDREAD=1 -I. -I${LOCALBASE}/include -L${LOCALBASE}/lib \
+ -ldvdread lsdvd.c -o lsdvd
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/lsdvd ${PREFIX}/bin
+
.include <bsd.port.post.mk>
diff --git a/multimedia/lsdvd/files/patch-lsdvd.c b/multimedia/lsdvd/files/patch-lsdvd.c
new file mode 100644
index 000000000000..2176ccf4c41f
--- /dev/null
+++ b/multimedia/lsdvd/files/patch-lsdvd.c
@@ -0,0 +1,31 @@
+--- lsdvd.c.orig Mon Sep 29 17:01:00 2003
++++ lsdvd.c Sun Dec 12 20:58:36 2004
+@@ -137,19 +137,26 @@
+ 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)) ) {
++{
++#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);
+