Created
November 13, 2011 13:09
-
-
Save lichray/1362097 to your computer and use it in GitHub Desktop.
A combined patch to multimedia/mplayer in FreeBSD ports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ruN --exclude=CVS /usr/ports/multimedia/mplayer.orig/Makefile /usr/ports/multimedia/mplayer/Makefile | |
--- /usr/ports/multimedia/mplayer.orig/Makefile 2011-08-21 03:11:55.000000000 -0500 | |
+++ /usr/ports/multimedia/mplayer/Makefile 2011-11-13 06:34:11.657281955 -0600 | |
@@ -7,7 +7,7 @@ | |
PORTNAME= mplayer | |
PORTVERSION= ${MPLAYER_PORT_VERSION} | |
-PORTREVISION= 3 | |
+PORTREVISION= 4 | |
COMMENT= High performance media player supporting many formats | |
.include "${.CURDIR}/Makefile.shared" | |
@@ -51,7 +51,7 @@ | |
OPTIONS+= THEORA "Enable ogg theora video support" off | |
OPTIONS+= VPX "Enable VP8 video via libvpx" off | |
OPTIONS+= SCHROEDINGER "Dirac codec via libschroedinger" off | |
-OPTIONS+= ASS "Enable ASS/SSA subtitle rendering" on | |
+OPTIONS+= ASS "Enable ASS/SSA subtitle rendering via libass" off | |
.if !defined(PACKAGE_BUILDING) | |
OPTIONS+= WIN32 "Enable win32 codec set on the IA32 arch" on | |
.endif | |
@@ -91,6 +91,7 @@ | |
--disable-libdirac-lavc \ | |
--disable-mencoder \ | |
--disable-mpg123 \ | |
+ --disable-alsa \ | |
--disable-musepack | |
.include "${.CURDIR}/Makefile.options" | |
@@ -100,7 +101,7 @@ | |
BUILD_DEPENDS += pkg-config:${PORTSDIR}/devel/pkg-config | |
LIBASS_PKGCONFIG_CFLAGS= pkg-config --cflags --silence-errors libass | |
.else | |
-CONFIGURE_ARGS+= --disable-ass --disable-ass-internal --disable-enca | |
+CONFIGURE_ARGS+= --enable-ass --enable-ass-internal --disable-enca | |
LIBASS_PKGCONFIG_CFLAGS= ${ECHO_CMD} | |
.endif | |
@@ -286,9 +287,13 @@ | |
${WRKSRC}/config.mak | |
@${REINPLACE_CMD} \ | |
-e 's#HAVE_FAST_CMOV 1#HAVE_FAST_CMOV 0#g' \ | |
+ ${WRKSRC}/config.h | |
+.if ${OSVERSION} < 802502 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900027) | |
+ @${REINPLACE_CMD} \ | |
-e 's#HAVE_LOG2 1#HAVE_LOG2 0#g' \ | |
-e 's#HAVE_LOG2F 1#HAVE_LOG2F 0#g' \ | |
${WRKSRC}/config.h | |
+.endif | |
post-install: | |
@${MKDIR} ${DATADIR} | |
diff -ruN --exclude=CVS /usr/ports/multimedia/mplayer.orig/files/patch-libao2-ao_oss.c /usr/ports/multimedia/mplayer/files/patch-libao2-ao_oss.c | |
--- /usr/ports/multimedia/mplayer.orig/files/patch-libao2-ao_oss.c 2010-04-21 08:07:22.000000000 -0500 | |
+++ /usr/ports/multimedia/mplayer/files/patch-libao2-ao_oss.c 2011-10-31 20:00:54.498526512 -0500 | |
@@ -1,14 +1,38 @@ | |
---- libao2/ao_oss.c.orig 2009-05-12 21:58:57.000000000 -0500 | |
-+++ libao2/ao_oss.c 2009-07-23 19:58:44.870097203 -0500 | |
-@@ -453,6 +453,7 @@ | |
+--- libao2/ao_oss.c.orig 2010-01-11 14:27:52.000000000 -0600 | |
++++ libao2/ao_oss.c 2011-05-01 03:24:37.465580362 -0500 | |
+@@ -72,6 +72,11 @@ static int format2oss(int format) | |
+ case AF_FORMAT_S16_BE: return AFMT_S16_BE; | |
+ #ifdef AFMT_S24_PACKED | |
+ case AF_FORMAT_S24_LE: return AFMT_S24_PACKED; | |
++#elif defined(__FreeBSD__) && defined(AFMT_S24_LE) | |
++ case AF_FORMAT_U24_LE: return AFMT_U24_LE; | |
++ case AF_FORMAT_U24_BE: return AFMT_U24_BE; | |
++ case AF_FORMAT_S24_LE: return AFMT_S24_LE; | |
++ case AF_FORMAT_S24_BE: return AFMT_S24_BE; | |
+ #endif | |
+ #ifdef AFMT_U32_LE | |
+ case AF_FORMAT_U32_LE: return AFMT_U32_LE; | |
+@@ -115,6 +120,11 @@ static int oss2format(int format) | |
+ case AFMT_S16_BE: return AF_FORMAT_S16_BE; | |
+ #ifdef AFMT_S24_PACKED | |
+ case AFMT_S24_PACKED: return AF_FORMAT_S24_LE; | |
++#elif defined(__FreeBSD__) && defined(AFMT_S24_LE) | |
++ case AFMT_U24_LE: return AF_FORMAT_U24_LE; | |
++ case AFMT_U24_BE: return AF_FORMAT_U24_BE; | |
++ case AFMT_S24_LE: return AF_FORMAT_S24_LE; | |
++ case AFMT_S24_BE: return AF_FORMAT_S24_BE; | |
+ #endif | |
+ #ifdef AFMT_U32_LE | |
+ case AFMT_U32_LE: return AF_FORMAT_U32_LE; | |
+@@ -448,6 +458,7 @@ static void reset(void){ | |
fcntl(audio_fd, F_SETFD, FD_CLOEXEC); | |
#endif | |
+ ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); | |
oss_format = format2oss(ao_data.format); | |
- if(ao_data.format == AF_FORMAT_AC3) | |
+ if(AF_FORMAT_IS_AC3(ao_data.format)) | |
ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); | |
-@@ -464,7 +465,6 @@ | |
+@@ -459,7 +470,6 @@ static void reset(void){ | |
int c = ao_data.channels-1; | |
ioctl (audio_fd, SNDCTL_DSP_STEREO, &c); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment