o Add FreeBSD native byteswap support using <sys/endian.h>
o Bump PORTREVISION Approved by: maintainer
This commit is contained in:
parent
7488473e0b
commit
228b59d4e8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134964
4 changed files with 67 additions and 0 deletions
|
@ -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/ \
|
||||
|
|
20
multimedia/mplayer/files/patch-bswap.h
Normal file
20
multimedia/mplayer/files/patch-bswap.h
Normal file
|
@ -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>
|
20
multimedia/mplayer/files/patch-libavcodec-bswap.h
Normal file
20
multimedia/mplayer/files/patch-libavcodec-bswap.h
Normal file
|
@ -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
|
26
multimedia/mplayer/files/patch-libmpdvdkit2-bswap.h
Normal file
26
multimedia/mplayer/files/patch-libmpdvdkit2-bswap.h
Normal file
|
@ -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>
|
Loading…
Reference in a new issue