aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mplayer
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2005-05-10 08:15:53 +0800
committerlioux <lioux@FreeBSD.org>2005-05-10 08:15:53 +0800
commitf76a59fb2478ef73c69e242b564f893bffb6fd1b (patch)
treeccb3317caf3c26fb445ee8748552d397881c3363 /multimedia/mplayer
parentffdb0df697b623650b74d6e860bb60ec742b89de (diff)
downloadfreebsd-ports-graphics-f76a59fb2478ef73c69e242b564f893bffb6fd1b.tar.gz
freebsd-ports-graphics-f76a59fb2478ef73c69e242b564f893bffb6fd1b.tar.zst
freebsd-ports-graphics-f76a59fb2478ef73c69e242b564f893bffb6fd1b.zip
o Add FreeBSD native byteswap support using <sys/endian.h>
o Bump PORTREVISION Approved by: maintainer
Diffstat (limited to 'multimedia/mplayer')
-rw-r--r--multimedia/mplayer/Makefile1
-rw-r--r--multimedia/mplayer/files/patch-bswap.h20
-rw-r--r--multimedia/mplayer/files/patch-libavcodec-bswap.h20
-rw-r--r--multimedia/mplayer/files/patch-libmpdvdkit2-bswap.h26
4 files changed, 67 insertions, 0 deletions
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index 9ea77028960..725e224605c 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -264,6 +264,7 @@
PORTNAME= mplayer
PORTVERSION= 0.99.7
+PORTREVISION= 1
CATEGORIES= multimedia audio ipv6
MASTER_SITES= http://www1.mplayerhq.hu/MPlayer/releases/ \
http://www2.mplayerhq.hu/MPlayer/releases/ \
diff --git a/multimedia/mplayer/files/patch-bswap.h b/multimedia/mplayer/files/patch-bswap.h
new file mode 100644
index 00000000000..5cd0c6e78d0
--- /dev/null
+++ b/multimedia/mplayer/files/patch-bswap.h
@@ -0,0 +1,20 @@
+--- bswap.h.orig Thu Oct 21 08:54:57 2004
++++ bswap.h Mon May 9 20:57:34 2005
+@@ -1,8 +1,17 @@
+ #ifndef __BSWAP_H__
+ #define __BSWAP_H__
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
++#elif (defined(__FreeBSD__) && __FreeBSD_version >= 470000)
++#include <sys/endian.h>
++#define bswap_16(x) bswap16(x)
++#define bswap_32(x) bswap32(x)
++#define bswap_64(x) bswap64(x)
+ #else
+
+ #include <inttypes.h>
diff --git a/multimedia/mplayer/files/patch-libavcodec-bswap.h b/multimedia/mplayer/files/patch-libavcodec-bswap.h
new file mode 100644
index 00000000000..e75b89c3719
--- /dev/null
+++ b/multimedia/mplayer/files/patch-libavcodec-bswap.h
@@ -0,0 +1,20 @@
+--- libavcodec/bswap.h.orig Sat Apr 16 17:40:51 2005
++++ libavcodec/bswap.h Mon May 9 20:47:04 2005
+@@ -6,8 +6,17 @@
+ #ifndef __BSWAP_H__
+ #define __BSWAP_H__
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
++#elif (defined(__FreeBSD__) && __FreeBSD_version >= 470000)
++#include <sys/endian.h>
++#define bswap_16(x) bswap16(x)
++#define bswap_32(x) bswap32(x)
++#define bswap_64(x) bswap64(x)
+ #else
+
+ #ifdef ARCH_X86_64
diff --git a/multimedia/mplayer/files/patch-libmpdvdkit2-bswap.h b/multimedia/mplayer/files/patch-libmpdvdkit2-bswap.h
new file mode 100644
index 00000000000..cede4f49b81
--- /dev/null
+++ b/multimedia/mplayer/files/patch-libmpdvdkit2-bswap.h
@@ -0,0 +1,26 @@
+--- libmpdvdkit2/bswap.h.orig Thu Mar 10 23:40:06 2005
++++ libmpdvdkit2/bswap.h Mon May 9 12:31:34 2005
+@@ -24,6 +24,10 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++
+ #if defined(WORDS_BIGENDIAN)
+ /* All bigendian systems are fine, just ignore the swaps. */
+ #define B2N_16(x) (void)(x)
+@@ -37,6 +41,12 @@
+ #define B2N_16(x) x = bswap_16(x)
+ #define B2N_32(x) x = bswap_32(x)
+ #define B2N_64(x) x = bswap_64(x)
++
++#elif (defined(__FreeBSD__) && __FreeBSD_version >= 470000)
++#include <sys/endian.h>
++#define B2N_16(x) be16toh(x)
++#define B2N_32(x) be32toh(x)
++#define B2N_64(x) be64toh(x)
+
+ #elif defined(__NetBSD__)
+ #include <sys/endian.h>