summaryrefslogtreecommitdiff
path: root/multimedia/mplayer
diff options
context:
space:
mode:
authorThomas Zander <riggs@FreeBSD.org>2015-08-31 21:26:40 +0000
committerThomas Zander <riggs@FreeBSD.org>2015-08-31 21:26:40 +0000
commitd5c038ec8cb4326e9e0e12a256d6f9e3f0915bb8 (patch)
tree2fb5cd6ef3c168a61dbde36f0aa087343b5cd67d /multimedia/mplayer
parentcb004e044ec4d7df28d7a38d3ea5b38f85030bcf (diff)
downloadfreebsd-ports-d5c038ec8cb4326e9e0e12a256d6f9e3f0915bb8.zip
Enable VDPAU by default for mplayer on i386/amd64; general port cleanup
amd64/i386: - Enable VDPAU by default for the large NVIDIA user base, proposed by ehaupt - BUILD_DEPEND on yasm only on amd64/i386 General cleanups: - Remove REINPLACE_CMD on CONFIGURE_SCRIPT conditional for post-8.x machines, is now part of patch-configure - Offer RTCPU OPTION only on archs that support it (amd64, i386, ppc) - Update RTCPU_DESC accordingly - Use OPTION helper for RTCPU instead of complicated conditionals - Remove superfluous check for ARCH when setting CFLAGS for armv6
Diffstat (limited to 'multimedia/mplayer')
-rw-r--r--multimedia/mplayer/Makefile26
-rw-r--r--multimedia/mplayer/Makefile.common2
-rw-r--r--multimedia/mplayer/Makefile.options18
-rw-r--r--multimedia/mplayer/Makefile.optvars2
-rw-r--r--multimedia/mplayer/files/patch-configure9
5 files changed, 30 insertions, 27 deletions
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index af8ab0ea1501..a9e6f3026f62 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -3,30 +3,39 @@
PORTNAME= mplayer
PORTVERSION= ${MPLAYER_PORT_VERSION}
+PORTREVISION= 1
CATEGORIES= multimedia audio
MAINTAINER= riggs@FreeBSD.org
COMMENT= High performance media player supporting many formats
-.include "${.CURDIR}/Makefile.common"
+.include "${.CURDIR}/../../multimedia/mplayer/Makefile.common"
OPTIONS_DEFINE= AALIB AMR_NB AMR_WB BLURAY CACA CDIO DEBUG DV \
ENCA FONTCONFIG FRIBIDI GIF GNUTLS GSM GUI IPV6 JACK \
LADSPA LIBMNG LIRC LZO NAS OCFLAGS OPENAL OPENGL \
- OPENJPEG OPUS PULSEAUDIO REAL RTC RTCPU RTMP \
+ OPENJPEG OPUS PULSEAUDIO REAL RTC RTMP \
SCHROEDINGER SDL SKINS SMB SVGALIB V4L VDPAU VPX \
X11 X11DGA X11VM XINERAMA XVIDEO XVMC
-OPTIONS_DEFAULT=FONTCONFIG FRIBIDI GNUTLS IPV6 OCFLAGS OPENGL RTCPU \
+OPTIONS_DEFAULT=FONTCONFIG FRIBIDI GNUTLS IPV6 OCFLAGS OPENGL \
SKINS X11 X11DGA X11VM XINERAMA XVIDEO
+OPTIONS_DEFINE_i386= RTCPU
+OPTIONS_DEFINE_amd64= RTCPU
+OPTIONS_DEFINE_ppc= RTCPU
+
+OPTIONS_DEFAULT_i386= RTCPU VDPAU
+OPTIONS_DEFAULT_amd64= RTCPU VDPAU
+OPTIONS_DEFAULT_ppc= RTCPU
+
BLURAY_DESC?= BluRay support
ENCA_DESC?= Charset conversion via enca
LZO_DESC?= External liblzo support
OCFLAGS_DESC?= Use optimized compiler flags
REAL_DESC?= Enable realplayer plugin
RTC_DESC?= Add support for kernel real time clock
-RTCPU_DESC?= Use runtime CPU detection on supported archs
+RTCPU_DESC?= Use runtime CPU detection
SKINS_DESC?= Install skins for GUI
X11DGA_DESC?= X11 DGA video driver support
X11VM_DESC?= X11 VidMode support
@@ -38,7 +47,7 @@ CONFLICTS= mplayer2-2.*
CONFFILES= example.conf input.conf menu.conf dvb-menu.conf
USES+= iconv pkgconfig
-.include "${.CURDIR}/Makefile.optvars"
+.include "${.CURDIR}/../../multimedia/mplayer/Makefile.optvars"
.include <bsd.port.pre.mk>
CONFIGURE_ARGS+= --disable-arts \
@@ -55,7 +64,7 @@ CONFIGURE_ARGS+= --disable-arts \
--disable-musepack \
--disable-theora
-.include "${.CURDIR}/Makefile.options"
+.include "${.CURDIR}/../../multimedia/mplayer/Makefile.options"
.if ${PORT_OPTIONS:MGUI} && ${PORT_OPTIONS:MX11}
PLIST_SUB+= GMPLAYER=""
@@ -126,11 +135,6 @@ pre-patch:
${MV} ${WRKDIR}/ffmpeg-${FFMPEG_VERSION} ${WRKSRC}/ffmpeg
post-patch:
-.if ${OSVERSION} >= 900010
- @${REINPLACE_CMD} -e \
- '/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \
- ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.endif
@${REINPLACE_CMD} \
-e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|; \
s|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
diff --git a/multimedia/mplayer/Makefile.common b/multimedia/mplayer/Makefile.common
index 11b893dc52e9..ca223766d329 100644
--- a/multimedia/mplayer/Makefile.common
+++ b/multimedia/mplayer/Makefile.common
@@ -21,8 +21,6 @@ LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \
libfreetype.so:${PORTSDIR}/print/freetype2 \
libdvdnav.so:${PORTSDIR}/multimedia/libdvdnav
-BUILD_DEPENDS= ${LOCALBASE}/bin/yasm:${PORTSDIR}/devel/yasm
-
USES= compiler:c11 gmake iconv ncurses tar:bzip2 tar:xz
GNU_CONFIGURE= yes
CONFIGURE_ENV= TMPDIR="${WRKSRC}"
diff --git a/multimedia/mplayer/Makefile.options b/multimedia/mplayer/Makefile.options
index 5c0887566551..1aabba77fdc9 100644
--- a/multimedia/mplayer/Makefile.options
+++ b/multimedia/mplayer/Makefile.options
@@ -89,11 +89,6 @@ CONFIGURE_ARGS+= --disable-tv-v4l1 \
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-aligned_alloc
.endif
-# Supported architectures for runtime CPU detection
-.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ppc"
-MPLAYER_RTCPU_SUPPORTED_ARCH= yes
-.endif
-
# Unsupported architectures for inline assembly
.if ${ARCH} == "ppc"
CONFIGURE_ARGS+= --disable-asm
@@ -104,22 +99,17 @@ CONFIGURE_ARGS+= --disable-asm
BROKEN= Does not compile on sparc64
.endif
-.if ${PORT_OPTIONS:MRTCPU} \
- && defined(MPLAYER_RTCPU_SUPPORTED_ARCH)
-CONFIGURE_ARGS+=--enable-runtime-cpudetection
-.endif
-
.if ${CHOSEN_COMPILER_TYPE} == clang
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang-version
# Require 16 byte stack realignment on i386 to interface
# properly with hand crafted assembler code in ffmpeg
-.if ${ARCH} == "i386"
-CFLAGS+= -mstack-alignment=16 -mstackrealign
-.endif # ${ARCH} == "i386"
+CFLAGS_i386+= -mstack-alignment=16 -mstackrealign
.endif # ${CHOSEN_COMPILER_TYPE} == clang
-.if ${ARCH} == "armv6"
CFLAGS_armv6+= -no-integrated-as
+
+.if ${ARCH} == "amd64" || ${ARCH} == "i386"
+BUILD_DEPENDS+= ${LOCALBASE}/bin/yasm:${PORTSDIR}/devel/yasm
.endif
# Extra build options for debugging and optimised CFLAGS
diff --git a/multimedia/mplayer/Makefile.optvars b/multimedia/mplayer/Makefile.optvars
index f879a46ad241..d8bbe22df0e7 100644
--- a/multimedia/mplayer/Makefile.optvars
+++ b/multimedia/mplayer/Makefile.optvars
@@ -82,6 +82,8 @@ RTC_BUILD_DEPENDS= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
RTC_RUN_DEPENDS= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
RTC_CONFIGURE_ENABLE= rtc
+RTCPU_CONFIGURE_ON= --enable-runtime-cpudetection
+
SCHROEDINGER_LIB_DEPENDS= libschroedinger-1.0.so:${PORTSDIR}/multimedia/schroedinger
SCHROEDINGER_CONFIGURE_OFF= --disable-libschroedinger-lavc
diff --git a/multimedia/mplayer/files/patch-configure b/multimedia/mplayer/files/patch-configure
index cf4c421ece4e..3a81e72a17d6 100644
--- a/multimedia/mplayer/files/patch-configure
+++ b/multimedia/mplayer/files/patch-configure
@@ -158,6 +158,15 @@
fi
echores "$_mencoder"
+@@ -8072,7 +8083,7 @@ libs_mplayer=$ld_tmp
+
+ #############################################################################
+
+-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
++CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+ CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+
@@ -8353,7 +8364,7 @@ TIMER = $_timer
EXESUF = $_exesuf
EXESUFS_ALL = .exe