summaryrefslogtreecommitdiff
path: root/sysutils/vobcopy/patches
diff options
context:
space:
mode:
authormartti <martti@pkgsrc.org>2005-12-27 10:19:16 +0000
committermartti <martti@pkgsrc.org>2005-12-27 10:19:16 +0000
commita5a351dc350f9bf11a5cff3473fc832787e8d4f1 (patch)
tree1d0ad950499de543d376ed051b64bde2c31c4200 /sysutils/vobcopy/patches
parent4a661d009c8552e08bbb5ba35936028e3a31baa3 (diff)
downloadpkgsrc-a5a351dc350f9bf11a5cff3473fc832787e8d4f1.tar.gz
Updated vobcopy to 0.5.14
0.5.14-rc1: lots of bug fixes for *bds, solaris and -tada- OSX! Quite some stuff should now work better on freebsd, openbsd and solaris since Takeshi Nakamura provided some patches. Also incorporated the fix the netbsd folks did when they incorporated 0.5.13 into their ports collection. AND it seems that OSX now works (besides fink, which provided vobcopy for quite some time already). What is needed is dlcompat IIRC. Thanks to all for their help! 0.5.14-test1: changed dvd name getting function to what Jim Hatfield found works for freebsd Davide has a dvd which has names like this: VTS_01_2.VOB;? A new routine tries to remove the ;?. On OSX, getopt.h doesn't get found. /usr/include/getopt.h should do it
Diffstat (limited to 'sysutils/vobcopy/patches')
-rw-r--r--sysutils/vobcopy/patches/patch-aa123
-rw-r--r--sysutils/vobcopy/patches/patch-ab89
2 files changed, 0 insertions, 212 deletions
diff --git a/sysutils/vobcopy/patches/patch-aa b/sysutils/vobcopy/patches/patch-aa
deleted file mode 100644
index ca20b8e93df..00000000000
--- a/sysutils/vobcopy/patches/patch-aa
+++ /dev/null
@@ -1,123 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2005/09/06 08:11:00 abs Exp $
-
---- dvd.c.orig 2004-03-26 19:53:10.000000000 +0100
-+++ dvd.c 2004-04-22 16:27:45.000000000 +0200
-@@ -23,9 +23,18 @@
- #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>
-+#define USE_GETMNTINFO
-+#if !defined(__NetBSD__) || (__NetBSD_Version__ < 299000900)
- #include <sys/mount.h>
-+#define USE_STATFS_FOR_DEV
-+#define GETMNTINFO_USES_STATFS
-+#else
-+#include <sys/statvfs.h>
-+#define USE_STATVFS_FOR_DEV
-+#define GETMNTINFO_USES_STATVFS
-+#endif
- #endif
- #include "vobcopy.h"
- #if (defined(__sun__))
-@@ -61,9 +70,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");
-@@ -72,7 +82,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 );
-@@ -82,13 +92,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';
-@@ -138,9 +150,12 @@
- char *k;
- bool mounted = FALSE;
- int mntcheck;
--#if ( defined( BSD ) && ( BSD >= 199306 ) ) || ( defined( __APPLE__ ) && defined( __GNUC__ ) )
-+#ifdef USE_STATFS_FOR_DEV
- struct statfs buf;
- #endif
-+#ifdef USE_STATVFS_FOR_DEV
-+ struct statvfs buf;
-+#endif
-
-
- /* the string should have no trailing / */
-@@ -166,12 +181,19 @@
- /*
- *look through /etc/mtab to see if it's actually mounted
- */
--#if ( defined( BSD ) && ( BSD >= 199306 ) ) || ( defined( __APPLE__ ) && defined( __GNUC__ ) )
-+#if defined(USE_STATFS_FOR_DEV) || defined(USE_STATVFS_FOR_DEV)
-+#ifdef USE_STATFS_FOR_DEV
- if( !statfs( path, &buf ) )
-+#else
-+ if( !statvfs( path, &buf ) )
-+#endif
- {
- if( !strcmp( path, buf.f_mntonname ) )
- {
- mounted = TRUE;
-+ strcpy(device, "/dev/r");
-+ strcat(device, buf.f_mntfromname + 5);
-+ return mounted;
- }
- }
- else
-@@ -366,9 +388,13 @@
- /* returns <0 if error */
- int get_device_oyo( char *path, char *device )
- { /*oyo*/
--#if (defined(BSD) && (BSD >= 199306)) || (defined(__APPLE__) && defined(__GNUC__))
-+#ifdef USE_GETMNTINFO
- int i, n, dvd_count = 0;
-+#ifdef GETMNTINFO_USES_STATFS
- struct statfs *mntbuf;
-+#else
-+ struct statvfs *mntbuf;
-+#endif
-
- if( ( n = getmntinfo( &mntbuf, MNT_WAIT ) ) > 0 )
- {
-@@ -378,7 +404,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
deleted file mode 100644
index a876bbb8519..00000000000
--- a/sysutils/vobcopy/patches/patch-ab
+++ /dev/null
@@ -1,89 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2005/09/06 08:11:00 abs Exp $
-
---- vobcopy.c.orig 2004-03-26 19:53:10.000000000 +0100
-+++ vobcopy.c 2004-04-22 15:54:46.000000000 +0200
-@@ -63,20 +63,22 @@
- #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>
- #endif
- #include <dvdread/dvd_reader.h>
- /* for solaris, but is also present in linux */
--#if (defined(BSD) && (BSD >= 199306)) ||(defined(__APPLE__) && defined(__GNUC__))
-+#if (defined(BSD) && (BSD >= 199306) && !defined(__NetBSD__)) ||(defined(__APPLE__) && defined(__GNUC__)) || (defined(__NetBSD__) && (__NetBSD_Version__ < 299000900))
- /* I don't know if *BSD have getopt-long... please tell me! */
- //#define HAVE_GETOPT_LONG
- #include <sys/mount.h>
-+#define USE_STATFS
- #else
- #if (defined(__linux__))
- #include <sys/statfs.h>
-+#define USE_STATFS
- #define HAVE_GETOPT_LONG
- #else
- #include <sys/statvfs.h>
-@@ -143,14 +145,6 @@
- bool quiet_flag = FALSE;
- struct stat buf;
-
-- /**
-- * This case here has to be examined for every system vobcopy shall run under
-- */
--#if defined( __linux__ ) || ( defined( BSD ) && ( BSD >= 199306 )) || (defined (__APPLE__) && defined(__GNUC__))
-- struct statfs buf1;
--#elif !defined(__sun__)
-- struct statvfs buf1;
--#endif
- dvd_reader_t *dvd = NULL;
- dvd_file_t *dvd_file;
- extern char *optarg;
-@@ -354,7 +348,7 @@
-
- #if defined( __USE_FILE_OFFSET64 ) || ( defined( BSD ) && ( BSD >= 199306 ) ) || (defined (__APPLE__) && defined(__GNUC__))
- case'l': /*large file output*/
-- max_filesize_in_blocks = 4500000000000000;
-+ max_filesize_in_blocks = 4500000000000000LL;
- /* 2^63 / 2048 (not exactly) */
- large_file_flag = TRUE;
- break;
-@@ -1702,7 +1696,7 @@
- off_t freespace_getter( char *path, int verbosity_level )
- {
-
--#if defined( __linux__ ) || ( defined( BSD ) && ( BSD >= 199306 ) ) || (defined (__APPLE__) && defined(__GNUC__))
-+#ifdef USE_STATFS
- struct statfs buf1;
- #else
- struct statvfs buf1;
-@@ -1710,7 +1704,7 @@
- /* ssize_t temp1, temp2; */
- long temp1, temp2;
- off_t sum;
--#if defined( __linux__ ) || ( defined( BSD ) && ( BSD >= 199306 ) ) || (defined (__APPLE__) && defined(__GNUC__))
-+#ifdef USE_STATFS
- statfs( path, &buf1 );
- if( verbosity_level >= 1 )
- fprintf( stderr, "Used the linux statfs\n" );
-@@ -1739,7 +1733,7 @@
- off_t usedspace_getter( char *path, int verbosity_level )
- {
-
--#if defined( __linux__ ) || ( defined( BSD ) && ( BSD >= 199306 ) ) || (defined (__APPLE__) && defined(__GNUC__))
-+#ifdef USE_STATFS
- struct statfs buf2;
- #else
- struct statvfs buf2;
-@@ -1747,7 +1741,7 @@
- /* ssize_t temp1, temp2; */
- long temp1, temp2;
- off_t sum;
--#if defined( __linux__ ) || ( defined( BSD ) && ( BSD >= 199306 ) ) || (defined (__APPLE__) && defined(__GNUC__))
-+#ifdef USE_STATFS
- statfs( path, &buf2 );
- if( verbosity_level >= 1 )
- fprintf( stderr, "Used the linux statfs\n" );