aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/vobcopy
diff options
context:
space:
mode:
authorglarkin <glarkin@FreeBSD.org>2008-08-12 04:34:27 +0800
committerglarkin <glarkin@FreeBSD.org>2008-08-12 04:34:27 +0800
commitb7fdf8af4faad3810afe08a9da61f996b70f92b1 (patch)
treec9e8ed5b1eb4f696a443b96720af26eb1b9e98cb /sysutils/vobcopy
parent9bc17bc0e819d823b35c4adab23d83e86fb88329 (diff)
downloadfreebsd-ports-gnome-b7fdf8af4faad3810afe08a9da61f996b70f92b1.tar.gz
freebsd-ports-gnome-b7fdf8af4faad3810afe08a9da61f996b70f92b1.tar.zst
freebsd-ports-gnome-b7fdf8af4faad3810afe08a9da61f996b70f92b1.zip
- Fixed broken REINPLACE_CMD regexp in Makefile
- Fixed dvd.c patch file to support FreeBSD /etc/fstab delimiters and avoid core dump - Minor stylistic fixes in Makefile PR: ports/125579 Submitted by: Fabian Keil <fk@fabiankeil.de> Reviewed by: Josh Paetzel <josh@tcbug.org> (maintainer) Approved by: beech (mentor, implicit)
Diffstat (limited to 'sysutils/vobcopy')
-rw-r--r--sysutils/vobcopy/Makefile11
-rw-r--r--sysutils/vobcopy/files/patch-dvd.c23
-rw-r--r--sysutils/vobcopy/files/patch-vobcopy.h7
3 files changed, 30 insertions, 11 deletions
diff --git a/sysutils/vobcopy/Makefile b/sysutils/vobcopy/Makefile
index 00e8b9c5c51a..4e049ed0c51c 100644
--- a/sysutils/vobcopy/Makefile
+++ b/sysutils/vobcopy/Makefile
@@ -7,6 +7,7 @@
PORTNAME= vobcopy
PORTVERSION= 1.1.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://vobcopy.org/download/ \
CRITICAL
@@ -35,7 +36,7 @@ post-extract:
@${CHMOD} a+x ${WRKSRC}/${CONFIGURE_SCRIPT}
post-patch:
- @${REINPLACE_CMD} -E -e 's|(fopen\("/etc/)mtab|\1fstab|; \
+ @${REINPLACE_CMD} -E -e 's|(fopen\( *"/etc/)mtab|\1fstab|; \
s|iso9660|cd9660|' ${WRKSRC}/dvd.c
@${REINPLACE_CMD} -E -e 's|declare -i i=0||' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@@ -66,11 +67,11 @@ do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/vobcopy ${PREFIX}/bin/vobcopy
@${INSTALL_MAN} ${WRKSRC}/vobcopy.1${MAN1_SUFX} \
${MANPREFIX}/man/man1/vobcopy.1
+
+post-install:
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
-.for file in ${PORTDOCS}
- @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
-.endfor
+ @${INSTALL} -d ${DOCSDIR}
+ @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
.include <bsd.port.post.mk>
diff --git a/sysutils/vobcopy/files/patch-dvd.c b/sysutils/vobcopy/files/patch-dvd.c
index 55e4ab6fdffa..6ba35b812e29 100644
--- a/sysutils/vobcopy/files/patch-dvd.c
+++ b/sysutils/vobcopy/files/patch-dvd.c
@@ -1,6 +1,23 @@
---- dvd.c.orig Tue Dec 5 00:06:52 2006
-+++ dvd.c Tue Dec 5 00:09:54 2006
-@@ -637,21 +637,6 @@
+--- dvd.c.orig 2008-02-19 00:27:04.000000000 -0500
++++ dvd.c 2008-08-08 19:02:43.000000000 -0400
+@@ -510,7 +510,15 @@
+ */
+
+
+- k = strstr( tmp_bufferin, " " );
++ k = strpbrk( tmp_bufferin, " \t" );
++
++ /* Avoid a core dump by checking that the break token
++ was found */
++ if ( k == NULL )
++ {
++ fprintf(stderr, "[Error] Unable to parse the /etc/fstab file\n");
++ return -1;
++ }
+
+ /*traverse the gap*/
+
+@@ -646,21 +654,6 @@
return ( off_t ) vob_size;
}
diff --git a/sysutils/vobcopy/files/patch-vobcopy.h b/sysutils/vobcopy/files/patch-vobcopy.h
index ed98c43e3553..05694e51316f 100644
--- a/sysutils/vobcopy/files/patch-vobcopy.h
+++ b/sysutils/vobcopy/files/patch-vobcopy.h
@@ -1,5 +1,5 @@
--- vobcopy.h.orig 2008-04-13 14:01:03.000000000 +0000
-+++ vobcopy.h 2008-04-13 14:08:18.000000000 +0000
+--- vobcopy.h.orig 2008-02-19 06:27:04.000000000 +0100
++++ vobcopy.h 2008-07-03 17:04:11.890928512 +0200
@@ -58,7 +58,7 @@
/* ////////// *BSD ////////// */
#if ( defined( BSD ) && ( BSD >= 199306 ) )
@@ -9,7 +9,7 @@
( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) )
#include <sys/mount.h>
#define USE_STATFS 1
-@@ -87,12 +87,13 @@
+@@ -87,12 +87,14 @@
#define GETMNTINFO_USES_STATVFS
# endif
@@ -18,6 +18,7 @@
-# else
-
+#if defined(__FreeBSD__)
++#define USE_STATFS_FOR_DEV
+#include <sys/statvfs.h>
+#else
#include <sys/vfs.h>