summaryrefslogtreecommitdiff
path: root/multimedia/libmpeg3/patches
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2005-06-07 23:38:34 +0000
committerhubertf <hubertf@pkgsrc.org>2005-06-07 23:38:34 +0000
commit971cdb67b0120ac6b233d22b9f1edd20f0f01eae (patch)
treee24d8286a83f518c658aae6e8cc1f70eadb5f108 /multimedia/libmpeg3/patches
parentf431e37bc033a9aeef9b4c694fa8997016636ca1 (diff)
downloadpkgsrc-971cdb67b0120ac6b233d22b9f1edd20f0f01eae.tar.gz
Bump to libmpeg3-1.3nb5: fix building on MacOS X:
* patch-ac: define bswap_16 and bswap_32 as appropriate for NetBSD, Linux and MacOS X * patch-ae: Pull in headers for 'struct stat'. Hello Linux!
Diffstat (limited to 'multimedia/libmpeg3/patches')
-rw-r--r--multimedia/libmpeg3/patches/patch-ac27
-rw-r--r--multimedia/libmpeg3/patches/patch-ae13
2 files changed, 24 insertions, 16 deletions
diff --git a/multimedia/libmpeg3/patches/patch-ac b/multimedia/libmpeg3/patches/patch-ac
index 987729d8d3a..f41cfd9f44f 100644
--- a/multimedia/libmpeg3/patches/patch-ac
+++ b/multimedia/libmpeg3/patches/patch-ac
@@ -1,19 +1,26 @@
-$NetBSD: patch-ac,v 1.1 2004/06/26 18:00:21 grant Exp $
-
---- mpeg3ifo.c.orig Tue Jul 31 17:18:25 2001
-+++ mpeg3ifo.c Tue Jul 31 17:18:56 2001
-@@ -1,9 +1,13 @@
+--- mpeg3ifo.c.orig 2001-05-20 05:05:26.000000000 +0200
++++ mpeg3ifo.c 2005-06-08 01:20:54.000000000 +0200
+@@ -1,10 +1,22 @@
-#include <byteswap.h>
#include <dirent.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-+
-+#include <sys/endian.h>
-+#include <machine/bswap.h>
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
++#if defined(__NetBSD__)
++# include <sys/endian.h>
++# include <machine/bswap.h>
++# define bswap_16(x) bswap16(x)
++# define bswap_32(x) bswap32(x)
++#elif defined(linux)
++# include <byteswap.h>
++#elif defined(__APPLE__) || defined(__MACH__) /* MacOS X */
++# include <libkern/OSByteOrder.h>
++# define bswap_16(x) OSSwapInt16(x)
++# define bswap_32(x) OSSwapInt32(x)
++#endif
++
#include "ifo.h"
#include "mpeg3private.h"
+ #include "mpeg3protos.h"
diff --git a/multimedia/libmpeg3/patches/patch-ae b/multimedia/libmpeg3/patches/patch-ae
index 945eb272c37..94c490468e6 100644
--- a/multimedia/libmpeg3/patches/patch-ae
+++ b/multimedia/libmpeg3/patches/patch-ae
@@ -1,8 +1,6 @@
-$NetBSD: patch-ae,v 1.1 2004/06/26 18:00:21 grant Exp $
-
---- mpeg3io.c.orig 2001-05-20 13:05:26.000000000 +1000
-+++ mpeg3io.c 2004-05-04 23:48:36.000000000 +1000
-@@ -1,11 +1,17 @@
+--- mpeg3io.c.orig 2001-05-20 05:05:26.000000000 +0200
++++ mpeg3io.c 2005-06-08 00:54:51.000000000 +0200
+@@ -1,11 +1,20 @@
#include "mpeg3private.h"
#include "mpeg3protos.h"
@@ -19,10 +17,13 @@ $NetBSD: patch-ae,v 1.1 2004/06/26 18:00:21 grant Exp $
+# endif
+#endif
+
++#include <sys/types.h>
++#include <sys/stat.h>
++
mpeg3_fs_t* mpeg3_new_fs(char *path)
{
mpeg3_fs_t *fs = calloc(1, sizeof(mpeg3_fs_t));
-@@ -88,27 +94,15 @@
+@@ -88,27 +97,15 @@
int mpeg3io_device(char *path, char *device)
{