aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multimedia/mencoder/Makefile5
-rw-r--r--multimedia/mplayer/Makefile3
-rw-r--r--multimedia/mplayer/Makefile.options6
-rw-r--r--multimedia/mplayer/files/extra-patch-memalign26
4 files changed, 36 insertions, 4 deletions
diff --git a/multimedia/mencoder/Makefile b/multimedia/mencoder/Makefile
index e35996d477da..35f5994f1d33 100644
--- a/multimedia/mencoder/Makefile
+++ b/multimedia/mencoder/Makefile
@@ -11,14 +11,15 @@ COMMENT= Convenient video file and movie encoder
OPTIONS_DEFINE= AMR_NB AMR_WB BLURAY CDIO CDPARANOIA DEBUG DIRAC \
DV FAAC FONTCONFIG FRIBIDI GIF GSM IPV6 JACK \
- LADSPA LIBMNG LZO MAD NAS OCFLAGS OPENAL OPENJPEG \
- OPUS OTCHAIN PROFILE PULSEAUDIO REAL RTCPU RTMP \
+ LADSPA LIBMNG LZO MAD MEMALIGN NAS OCFLAGS OPENAL \
+ OPENJPEG OPUS OTCHAIN PROFILE PULSEAUDIO REAL RTCPU RTMP \
SCHROEDINGER SMB THEORA TWOLAME V4L VPX WIN32 X264 XVID
OPTIONS_DEFAULT=GIF IPV6 OCFLAGS RTCPU WIN32 X264 XVID
BLURAY_DESC?= BluRay support
LZO_DESC?= Enable external liblzo library
+MEMALIGN_DESC?= Avoid memory alignment hacks (EXPERIMENTAL)
OCFLAGS_DESC?= Use optimized compiler flags
OTCHAIN_DESC?= Use gcc 4.6+ toolchain on legacy systems
REAL_DESC?= Enable realplayer plugin
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index 9e18e3776dae..f839a1d5c746 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -11,7 +11,7 @@ COMMENT= High performance media player supporting many formats
OPTIONS_DEFINE= AALIB AMR_NB AMR_WB BLURAY CACA DEBUG DV \
ENCA FRIBIDI GIF GSM GUI IPV6 JACK \
- LADSPA LIBMNG LIRC LZO NAS OCFLAGS \
+ LADSPA LIBMNG LIRC LZO MEMALIGN NAS OCFLAGS \
OPENAL OPENGL OPENJPEG OPUS OTCHAIN PROFILE \
PULSEAUDIO REAL RTC RTCPU RTMP SCHROEDINGER SDL \
SKINS SMB SVGALIB V4L VDPAU VPX WIN32 \
@@ -26,6 +26,7 @@ OPTIONS_DEFAULT=FRIBIDI IPV6 OCFLAGS OPENGL RTCPU SKINS \
BLURAY_DESC?= BluRay support
ENCA_DESC?= Charset conversion via enca
LZO_DESC?= External liblzo support
+MEMALIGN_DESC?= Avoid memory alignment hacks (EXPERIMENTAL)
OCFLAGS_DESC?= Use optimized compiler flags
OTCHAIN_DESC?= Use gcc 4.6+ toolchain on legacy systems
REAL_DESC?= Enable realplayer plugin
diff --git a/multimedia/mplayer/Makefile.options b/multimedia/mplayer/Makefile.options
index c927b9f5a151..ac54154575b3 100644
--- a/multimedia/mplayer/Makefile.options
+++ b/multimedia/mplayer/Makefile.options
@@ -54,6 +54,10 @@ CATEGORIES+= ipv6
CONFIGURE_ARGS+= --disable-inet6
.endif
+.if ${PORT_OPTIONS:MMEMALIGN}
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-memalign
+.endif
+
.if ${PORT_OPTIONS:MRTMP}
LIB_DEPENDS+= librtmp.so:${PORTSDIR}/multimedia/librtmp
CONFIGURE_ARGS+= --enable-librtmp
@@ -144,7 +148,7 @@ MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
#trying to compile a debug version with the default flags.
.if ${PORT_OPTIONS:MDEBUG}
WITH_DEBUG= yes
-CONFIGURE_ARGS+= --enable-debug
+CONFIGURE_ARGS+= --enable-debug=3
.if ${ARCH} == "i386" && !defined(WITH_BASE_CLANG)
DEBUG_FLAGS= -g -fomit-frame-pointer
.endif
diff --git a/multimedia/mplayer/files/extra-patch-memalign b/multimedia/mplayer/files/extra-patch-memalign
new file mode 100644
index 000000000000..58c437e434d7
--- /dev/null
+++ b/multimedia/mplayer/files/extra-patch-memalign
@@ -0,0 +1,26 @@
+--- configure.orig 2014-08-23 15:59:32.000000000 +0200
++++ configure 2014-09-11 18:37:11.383671007 +0200
+@@ -3766,17 +3766,17 @@
+ echores "$aligned_malloc"
+
+
+-echocheck "memalign()"
++echocheck "aligned_alloc()"
+ # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
+-def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
++def_memalign='#define HAVE_MEMALIGN 0'
+ _memalign=no
+-statement_check malloc.h 'memalign(64, sizeof(char))' && _memalign=yes
++statement_check stdlib.h 'aligned_alloc(32, 32*sizeof(char))' && _memalign=yes
+ if test "$_memalign" = yes ; then
+- def_memalign='#define HAVE_MEMALIGN 1'
++ def_map_memalign='#define memalign(a, b) aligned_alloc(a, b)'
++ def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
+ else
+- def_memalign='#define HAVE_MEMALIGN 0'
+ def_map_memalign='#define memalign(a, b) malloc(b)'
+- darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
++ def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
+ fi
+ echores "$_memalign"
+