diff options
author | Thomas Zander <riggs@FreeBSD.org> | 2014-09-13 12:46:27 +0000 |
---|---|---|
committer | Thomas Zander <riggs@FreeBSD.org> | 2014-09-13 12:46:27 +0000 |
commit | 0030c323d569f8b3f54eebaa00e37c7e29e9bdb3 (patch) | |
tree | b9297c5febe70e736f31bac3218ccfd555f8b956 /multimedia/mplayer | |
parent | 055b96c7346622550c5b480056d56cf1c0f69e0b (diff) | |
download | ports-0030c323d569f8b3f54eebaa00e37c7e29e9bdb3.tar.gz ports-0030c323d569f8b3f54eebaa00e37c7e29e9bdb3.zip |
Notes
Diffstat (limited to 'multimedia/mplayer')
-rw-r--r-- | multimedia/mplayer/Makefile | 3 | ||||
-rw-r--r-- | multimedia/mplayer/Makefile.options | 6 | ||||
-rw-r--r-- | multimedia/mplayer/files/extra-patch-memalign | 26 |
3 files changed, 33 insertions, 2 deletions
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" + |