aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/vobcopy
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2006-01-10 08:54:23 +0800
committerlioux <lioux@FreeBSD.org>2006-01-10 08:54:23 +0800
commit8249bfa85d8e51e26a548a5ce1112c8bd18c292c (patch)
tree1e60005e1ade219547da8a0676310c54cdcfcf35 /sysutils/vobcopy
parent9ad6e558bc80f3cc611842731741f9f70af51e96 (diff)
downloadfreebsd-ports-gnome-8249bfa85d8e51e26a548a5ce1112c8bd18c292c.tar.gz
freebsd-ports-gnome-8249bfa85d8e51e26a548a5ce1112c8bd18c292c.tar.zst
freebsd-ports-gnome-8249bfa85d8e51e26a548a5ce1112c8bd18c292c.zip
o Fix build on FreeBSD 4.x branch
o Some code tidying up through better patching PR: 91485 Submitted by: Tod McQuillin <devin@spamcop.net>
Diffstat (limited to 'sysutils/vobcopy')
-rw-r--r--sysutils/vobcopy/Makefile5
-rw-r--r--sysutils/vobcopy/files/patch-vobcopy.c30
-rw-r--r--sysutils/vobcopy/files/patch-vobcopy.h39
3 files changed, 52 insertions, 22 deletions
diff --git a/sysutils/vobcopy/Makefile b/sysutils/vobcopy/Makefile
index 247eb260dfa5..922b86a5efd5 100644
--- a/sysutils/vobcopy/Makefile
+++ b/sysutils/vobcopy/Makefile
@@ -47,11 +47,6 @@ post-patch:
-e 's|-lgnugetopt||' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.endif
-
-.if ${OSVERSION} < 500000
- @${REINPLACE_CMD} -e 's|#include <stdint.h>||' \
- ${WRKSRC}/vobcopy.c
-.endif
# fix typo
@${REINPLACE_CMD} -E \
-e 's|FreeBSD_Version|FreeBSD_version|' \
diff --git a/sysutils/vobcopy/files/patch-vobcopy.c b/sysutils/vobcopy/files/patch-vobcopy.c
index 92b844b15974..bf0fe9e0d2ca 100644
--- a/sysutils/vobcopy/files/patch-vobcopy.c
+++ b/sysutils/vobcopy/files/patch-vobcopy.c
@@ -1,5 +1,5 @@
---- vobcopy.c.orig Fri Jan 6 23:49:40 2006
-+++ vobcopy.c Fri Jan 6 23:50:03 2006
+--- vobcopy.c.orig Wed Dec 7 21:31:56 2005
++++ vobcopy.c Sun Jan 8 10:47:02 2006
@@ -146,6 +146,8 @@
#endif
@@ -9,3 +9,29 @@
/*
* the getopt part (getting the options from command line)
+@@ -1695,8 +1697,12 @@
+ fprintf( stderr, "Used statvfs\n" );
+ #endif
+ temp1 = buf1.f_bavail;
++#ifdef USE_STATFS
++ temp2 = buf1.f_bsize;
++#else
+ /* On Solaris at least, f_bsize is not the actual block size -- lb */
+ temp2 = buf1.f_frsize;
++#endif
+ sum = ( ( off_t )temp1 * ( off_t )temp2 );
+ if( verbosity_level >= 1 )
+ {
+@@ -1733,8 +1739,12 @@
+ fprintf( stderr, "Used statvfs\n" );
+ #endif
+ temp1 = buf2.f_blocks;
++#ifdef USE_STATFS
++ temp2 = buf2.f_bsize;
++#else
+ /* On Solaris at least, f_bsize is not the actual block size -- lb */
+ temp2 = buf2.f_frsize;
++#endif
+ sum = ( ( off_t )temp1 * ( off_t )temp2 );
+ if( verbosity_level >= 1 )
+ {
diff --git a/sysutils/vobcopy/files/patch-vobcopy.h b/sysutils/vobcopy/files/patch-vobcopy.h
index 18bb1717c93d..ed9511cd82b5 100644
--- a/sysutils/vobcopy/files/patch-vobcopy.h
+++ b/sysutils/vobcopy/files/patch-vobcopy.h
@@ -1,6 +1,23 @@
---- vobcopy.h.orig Fri Jan 6 23:22:11 2006
-+++ vobcopy.h Fri Jan 6 23:34:11 2006
-@@ -67,24 +67,33 @@
+--- vobcopy.h.orig Wed Dec 7 21:32:10 2005
++++ vobcopy.h Sun Jan 8 15:26:43 2006
+@@ -19,7 +19,6 @@
+
+ #if ( defined( __unix__ ) || defined( unix )) && !defined( USG )
+ #include <sys/param.h>
+-#else
+ #endif
+
+ #if defined( __GNUC__ ) && \
+@@ -32,6 +31,8 @@
+ /* by some bugreport:*/
+ #if !( defined( BSD ) && ( BSD >= 199306 ) ) && !defined( sun )
+ #include <stdint.h>
++#else
++#include <inttypes.h>
+ #endif
+
+ /*for/from play_title.c*/
+@@ -67,24 +68,23 @@
/* ////////// *BSD ////////// */
#if ( defined( BSD ) && ( BSD >= 199306 ) )
@@ -9,11 +26,7 @@
-#include <sys/mount.h>
-#define USE_STATFS 1
+# if ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) || \
-+ ( defined( __FreeBSD__) && \
-+ ( ((__FreeBSD_version >= 460102 ) && (__FreeBSD_version < 500000)) || \
-+ ( __FreeBSD_version >= 500040) \
-+ ) \
-+ )
++ ( defined( __FreeBSD__) && ( __FreeBSD_version >= 500040 ) )
+#include <sys/statvfs.h>
# else
@@ -25,19 +38,15 @@
# endif
-# if defined(NetBSD)
+-
+-#include <sys/param.h>
+# if defined(__NetBSD__) || defined(__FreeBSD__)
- #include <sys/param.h>
-
#define USE_GETMNTINFO
-# if ( __NetBSD_Version__ < 200040000 )
+# if (defined( __NetBSD__ ) && ( __NetBSD_Version__ < 200040000 )) || \
-+ ( defined( __FreeBSD__) && \
-+ ( ((__FreeBSD_version >= 460102 ) && (__FreeBSD_version < 500000)) || \
-+ ( __FreeBSD_version >= 500040) \
-+ ) \
-+ )
++ (defined( __FreeBSD__ ))
#include <sys/mount.h>
#define USE_STATFS_FOR_DEV