pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/vobcopy make this build after the statfs->sta...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1f4556bc6ccb
branches:  trunk
changeset: 473658:1f4556bc6ccb
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Thu Apr 22 15:28:47 2004 +0000

description:
make this build after the statfs->statvfs conversion

diffstat:

 sysutils/vobcopy/distinfo         |   6 +-
 sysutils/vobcopy/patches/patch-aa |  69 +++++++++++++++++++++++++++----
 sysutils/vobcopy/patches/patch-ab |  84 +++++++++++++++++++++++++++++++++++++-
 3 files changed, 143 insertions(+), 16 deletions(-)

diffs (222 lines):

diff -r 415a72fe2c11 -r 1f4556bc6ccb sysutils/vobcopy/distinfo
--- a/sysutils/vobcopy/distinfo Thu Apr 22 15:26:13 2004 +0000
+++ b/sysutils/vobcopy/distinfo Thu Apr 22 15:28:47 2004 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+$NetBSD: distinfo,v 1.2 2004/04/22 15:28:47 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
+SHA1 (patch-aa) = e4a137071c662752bcdbfcf4abd34b93dedd0fd6
+SHA1 (patch-ab) = d02f258a134e3ba77fac24d4f197e7f7fdd1e7a0
diff -r 415a72fe2c11 -r 1f4556bc6ccb sysutils/vobcopy/patches/patch-aa
--- a/sysutils/vobcopy/patches/patch-aa Thu Apr 22 15:26:13 2004 +0000
+++ b/sysutils/vobcopy/patches/patch-aa Thu Apr 22 15:28:47 2004 +0000
@@ -1,17 +1,28 @@
-$NetBSD: patch-aa,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+$NetBSD: patch-aa,v 1.2 2004/04/22 15:28:47 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 @@
+--- 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__ < 200040000)
  #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
-@@ -56,9 +56,10 @@
+ #include "vobcopy.h"
+ #if (defined(__sun__))
+@@ -61,9 +70,10 @@
    int  filehandle = 0;
    int  i = 0, last = 0;
    int  bytes_read;
@@ -23,7 +34,7 @@
    {
        /* 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 @@
+@@ -72,7 +82,7 @@
    }
    
    /* seek to title of first track, which is at (track_no * 32768) + 40 */
@@ -32,7 +43,7 @@
    {
        /* seek failed */
        close( filehandle );
-@@ -77,13 +78,15 @@
+@@ -82,13 +92,15 @@
    }
    
    /* read title */
@@ -50,7 +61,32 @@
    
    /* make sure string is terminated */
    title[32] = '\0';
-@@ -162,6 +165,9 @@
+@@ -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;
@@ -60,7 +96,22 @@
           }
        }
      else
-@@ -350,7 +356,8 @@
+@@ -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 );
diff -r 415a72fe2c11 -r 1f4556bc6ccb sysutils/vobcopy/patches/patch-ab
--- a/sysutils/vobcopy/patches/patch-ab Thu Apr 22 15:26:13 2004 +0000
+++ b/sysutils/vobcopy/patches/patch-ab Thu Apr 22 15:28:47 2004 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2004/04/08 14:17:57 drochner Exp $
+$NetBSD: patch-ab,v 1.2 2004/04/22 15:28:47 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 @@
+--- 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*/
@@ -11,3 +11,79 @@
  #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__ < 200040000))
+ /* 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" );



Home | Main Index | Thread Index | Old Index