summaryrefslogtreecommitdiff
path: root/multimedia/libmpeg3
diff options
context:
space:
mode:
authorgrant <grant>2005-10-29 01:36:42 +0000
committergrant <grant>2005-10-29 01:36:42 +0000
commitc926628f4a910e0bfaf13f1eaf07658554c299fc (patch)
treeac8c97e659b879e3ecc0e2a46367e8134f0e3985 /multimedia/libmpeg3
parent547b2c39d5f58f029dccfb8ceb67c7c805fa6ab2 (diff)
downloadpkgsrc-c926628f4a910e0bfaf13f1eaf07658554c299fc.tar.gz
sprinkle some #ifdef and simplify, instead of unconditionally adding
stuff for NetBSD that breaks this on all other platforms.
Diffstat (limited to 'multimedia/libmpeg3')
-rw-r--r--multimedia/libmpeg3/distinfo4
-rw-r--r--multimedia/libmpeg3/patches/patch-ae72
2 files changed, 40 insertions, 36 deletions
diff --git a/multimedia/libmpeg3/distinfo b/multimedia/libmpeg3/distinfo
index fb2280f62ed..44386b544c3 100644
--- a/multimedia/libmpeg3/distinfo
+++ b/multimedia/libmpeg3/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2005/09/06 08:10:59 abs Exp $
+$NetBSD: distinfo,v 1.6 2005/10/29 01:36:42 grant Exp $
SHA1 (libmpeg3-1.3.tar.gz) = e7e8b03ab45d5593558b0d19e31f0694cfdfa2b5
RMD160 (libmpeg3-1.3.tar.gz) = b1751f681d26758873746aa38368150eb0a4bafd
@@ -7,7 +7,7 @@ SHA1 (patch-aa) = 88e1c193bb00056f757830c98f6bbbc58c1b16da
SHA1 (patch-ab) = 844cfcbd99269f1f0b4bef76e0a8567522070707
SHA1 (patch-ac) = 68576efb30a0d6f4cfe23fd543a04c4f3ada8936
SHA1 (patch-ad) = 86edf9af264370bf89050b02e956b5bacc86881e
-SHA1 (patch-ae) = 919ad3973104d161c0c38d016ce2b35390332454
+SHA1 (patch-ae) = 411443571371b2f964ab6408ee5be217f8ca7896
SHA1 (patch-af) = 7e62a236ee0a7398c1b1a3e994261ebb9be50bae
SHA1 (patch-ag) = bf321ac689b82889ca1a2bb8a96cb6e387280f32
SHA1 (patch-ah) = 58ffda3df9be3b089de362451ddf249a74fac5be
diff --git a/multimedia/libmpeg3/patches/patch-ae b/multimedia/libmpeg3/patches/patch-ae
index d797d8107ee..9ee333b088e 100644
--- a/multimedia/libmpeg3/patches/patch-ae
+++ b/multimedia/libmpeg3/patches/patch-ae
@@ -1,58 +1,62 @@
-$NetBSD: patch-ae,v 1.4 2005/09/06 08:10:59 abs Exp $
+$NetBSD: patch-ae,v 1.5 2005/10/29 01:36:42 grant Exp $
---- mpeg3io.c.orig 2001-05-20 05:05:26.000000000 +0200
+--- mpeg3io.c.orig 2001-05-20 13:05:26.000000000 +1000
+++ mpeg3io.c
-@@ -1,11 +1,20 @@
+@@ -1,8 +1,21 @@
#include "mpeg3private.h"
#include "mpeg3protos.h"
-#include <mntent.h>
-#include <sys/stat.h>
-+#include <sys/param.h>
-+#include <sys/mount.h>
- #include <stdlib.h>
- #include <string.h>
-
-+#ifdef __NetBSD__
-+# if __NetBSD_Version__ >= 299000900 /* 2.99.9 */
++#ifndef __NetBSD__
++# include <mntent.h>
++# include <sys/stat.h>
++#else
++# include <sys/param.h>
++# include <sys/mount.h>
++
++# if __NetBSD_Version__ >= 299000900 /* 2.99.9 */
+# define statfs statvfs
+# endif
-+#endif
+
-+#include <sys/types.h>
-+#include <sys/stat.h>
++# include <sys/types.h>
++# include <sys/stat.h>
++#endif
+
- mpeg3_fs_t* mpeg3_new_fs(char *path)
- {
- mpeg3_fs_t *fs = calloc(1, sizeof(mpeg3_fs_t));
-@@ -88,27 +97,15 @@ int mpeg3io_read_data(unsigned char *buf
+ #include <stdlib.h>
+ #include <string.h>
+
+@@ -88,16 +101,23 @@ int mpeg3io_read_data(unsigned char *buf
int mpeg3io_device(char *path, char *device)
{
-- struct stat file_st, device_st;
-- struct mntent *mnt;
-- FILE *fp;
-+ struct statfs file_st;
++#ifndef __NetBSD__
+ struct stat file_st, device_st;
+ struct mntent *mnt;
+ FILE *fp;
-- if(stat(path, &file_st) < 0)
-+ if(statfs(path, &file_st) < 0)
+ if(stat(path, &file_st) < 0)
++#else
++ struct statfs file_st;
++
++ if (statfs(path, &file_st) < 0)
++#endif
{
perror("mpeg3io_device");
return 1;
}
-- fp = setmntent(MOUNTED, "r");
-- while(fp && (mnt = getmntent(fp)))
-- {
-- if(stat(mnt->mnt_fsname, &device_st) < 0) continue;
-- if(device_st.st_rdev == file_st.st_dev)
-- {
-- strncpy(device, mnt->mnt_fsname, MPEG3_STRLEN);
-- break;
-- }
-- }
-- endmntent(fp);
++#ifndef __NetBSD__
+ fp = setmntent(MOUNTED, "r");
+ while(fp && (mnt = getmntent(fp)))
+ {
+@@ -109,6 +129,9 @@ int mpeg3io_device(char *path, char *dev
+ }
+ }
+ endmntent(fp);
++#else
+ strncpy(device, file_st.f_mntfromname, MPEG3_STRLEN);
++#endif
return 0;
}