summaryrefslogtreecommitdiff
path: root/sysutils/vobcopy
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2004-04-08 14:17:57 +0000
committerdrochner <drochner@pkgsrc.org>2004-04-08 14:17:57 +0000
commit529b54404d26e4be384422b473ae7bae4512cf94 (patch)
tree592514f0b4a8703739363bf81c0d084448ece70f /sysutils/vobcopy
parent7a87d554928a09bc60334c9ac7a5c1dc7a95bf32 (diff)
downloadpkgsrc-529b54404d26e4be384422b473ae7bae4512cf94.tar.gz
import vobcopy-0.5.13, a tool to copy DVD .vob files to harddisk
Diffstat (limited to 'sysutils/vobcopy')
-rw-r--r--sysutils/vobcopy/DESCR1
-rw-r--r--sysutils/vobcopy/Makefile20
-rw-r--r--sysutils/vobcopy/PLIST3
-rw-r--r--sysutils/vobcopy/distinfo6
-rw-r--r--sysutils/vobcopy/patches/patch-aa72
-rw-r--r--sysutils/vobcopy/patches/patch-ab13
6 files changed, 115 insertions, 0 deletions
diff --git a/sysutils/vobcopy/DESCR b/sysutils/vobcopy/DESCR
new file mode 100644
index 00000000000..6be5c02e06c
--- /dev/null
+++ b/sysutils/vobcopy/DESCR
@@ -0,0 +1 @@
+vobcopy copies DVD .vob files to harddisk.
diff --git a/sysutils/vobcopy/Makefile b/sysutils/vobcopy/Makefile
new file mode 100644
index 00000000000..91dc62dcc6b
--- /dev/null
+++ b/sysutils/vobcopy/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+#
+
+DISTNAME= vobcopy-0.5.13
+CATEGORIES= sysutils
+MASTER_SITES= http://lpn.rnbhq.org/download/
+
+MAINTAINER= packages@NetBSD.org
+HOMEPAGE= http://lpn.rnbhq.org/projects/c/c.shtml
+COMMENT= Copies DVD .vob files to harddisk
+
+ALL_TARGET= vobcopy
+USE_BUILDLINK2= yes
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/vobcopy ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/vobcopy.1 ${PREFIX}/man/man1
+
+.include "../../multimedia/libdvdread/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/vobcopy/PLIST b/sysutils/vobcopy/PLIST
new file mode 100644
index 00000000000..344c819bf5c
--- /dev/null
+++ b/sysutils/vobcopy/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+bin/vobcopy
+man/man1/vobcopy.1
diff --git a/sysutils/vobcopy/distinfo b/sysutils/vobcopy/distinfo
new file mode 100644
index 00000000000..aeceb06cf88
--- /dev/null
+++ b/sysutils/vobcopy/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+
+SHA1 (vobcopy-0.5.13.tar.gz) = dc1f931ed636f8583ddf438c4e195a0f8acec363
+Size (vobcopy-0.5.13.tar.gz) = 48423 bytes
+SHA1 (patch-aa) = 22ad0630c7ea9687125374c15f3fbab1e5227933
+SHA1 (patch-ab) = 80ddf043d98773b4cc7c6af9aaa2cadc11a1b291
diff --git a/sysutils/vobcopy/patches/patch-aa b/sysutils/vobcopy/patches/patch-aa
new file mode 100644
index 00000000000..c0a3c2de53d
--- /dev/null
+++ b/sysutils/vobcopy/patches/patch-aa
@@ -0,0 +1,72 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+
+--- dvd.c.orig 2004-02-26 02:14:15.000000000 +0100
++++ dvd.c 2004-02-26 12:36:40.000000000 +0100
+@@ -23,7 +23,7 @@
+ #include <unistd.h>
+ #include <ctype.h>
+ #include <sys/stat.h>
+-#if (defined(__unix__) || defined(unix)) && !defined(USG) || (defined(__APPLE__) && defined(__GNUC__))
++#if (defined(__unix__) || defined(unix)) && !defined(USG) || (defined(__APPLE__) && defined(__GNUC__)) || defined(__NetBSD__)
+ #include <sys/param.h>
+ #include <sys/mount.h>
+ #endif
+@@ -56,9 +56,10 @@
+ int filehandle = 0;
+ int i = 0, last = 0;
+ int bytes_read;
++ char help[2048];
+
+ /* open the device */
+- if ( !(filehandle = open(device, O_RDONLY)) )
++ if ( !(filehandle = open(device, O_RDONLY, 0)) )
+ {
+ /* open failed */
+ fprintf( stderr, "[Error] something wrong in dvd_name getting - please specify path as /cdrom or /dvd (mount point) or use -t\n");
+@@ -67,7 +68,7 @@
+ }
+
+ /* seek to title of first track, which is at (track_no * 32768) + 40 */
+- if ( 32808 != lseek( filehandle, 32808, SEEK_SET ) )
++ if ( 32768 != lseek( filehandle, 32768, SEEK_SET ) )
+ {
+ /* seek failed */
+ close( filehandle );
+@@ -77,13 +78,15 @@
+ }
+
+ /* read title */
+- if ( (bytes_read = read(filehandle, title, 32)) != 32)
++ if ( (bytes_read = read(filehandle, help, 2048)) != 2048)
+ {
+ close(filehandle);
+ fprintf( stderr, "[Error] something wrong in dvd_name getting - please specify path as /cdrom or /dvd (mount point) or use -t\n" );
+- fprintf(stderr, "[Error] only read %d bytes instead of 32\n", bytes_read);
++ fprintf(stderr, "[Error] only read %d bytes instead of 2048\n", bytes_read);
+ return -1;
+ }
++
++ memcpy(title, help + 40, 32);
+
+ /* make sure string is terminated */
+ title[32] = '\0';
+@@ -162,6 +165,9 @@
+ if( !strcmp( path, buf.f_mntonname ) )
+ {
+ mounted = TRUE;
++ strcpy(device, "/dev/r");
++ strcat(device, buf.f_mntfromname + 5);
++ return mounted;
+ }
+ }
+ else
+@@ -350,7 +356,8 @@
+ {
+ dvd_count++;
+ strcpy( path, mntbuf[i].f_mntonname );
+- strcpy( device, mntbuf[i].f_mntfromname );
++ strcpy(device, "/dev/r");
++ strcat(device, mntbuf[i].f_mntfromname + 5);
+ }
+ }
+ if(dvd_count == 0)
diff --git a/sysutils/vobcopy/patches/patch-ab b/sysutils/vobcopy/patches/patch-ab
new file mode 100644
index 00000000000..62422b864d4
--- /dev/null
+++ b/sysutils/vobcopy/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+
+--- vobcopy.c.orig 2003-09-02 12:53:29.000000000 +0200
++++ vobcopy.c 2003-09-02 12:54:40.000000000 +0200
+@@ -62,7 +62,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <dirent.h> /*for readdir*/
+-#if (defined(__unix__) || defined(unix)) && !defined(USG) || (defined(__APPLE__) && defined(__GNUC__))
++#if (defined(__unix__) || defined(unix)) && !defined(USG) || (defined(__APPLE__) && defined(__GNUC__)) || defined(__NetBSD__)
+ #include <sys/param.h>
+ #else
+ #include <sys/vfs.h>