mirror of
https://git.freebsd.org/ports.git
synced 2025-06-01 02:46:27 -04:00
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
This commit is contained in:
parent
cb004e044e
commit
d5c038ec8c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=395729
6 changed files with 41 additions and 35 deletions
|
@ -13,16 +13,24 @@ COMMENT= Convenient video file and movie encoder
|
|||
OPTIONS_DEFINE= AMR_NB AMR_WB BLURAY CDIO DEBUG DV FAAC FONTCONFIG \
|
||||
FRIBIDI GIF GNUTLS GSM IPV6 JACK LADSPA LIBMNG LZO \
|
||||
MAD NAS OCFLAGS OPENAL OPENJPEG OPUS PULSEAUDIO REAL \
|
||||
RTCPU RTMP SCHROEDINGER SMB THEORA TWOLAME V4L VPX \
|
||||
RTMP SCHROEDINGER SMB THEORA TWOLAME V4L VPX \
|
||||
X264 XVID
|
||||
|
||||
OPTIONS_DEFAULT=GIF GNUTLS IPV6 OCFLAGS RTCPU X264 XVID
|
||||
OPTIONS_DEFAULT=GIF GNUTLS IPV6 OCFLAGS X264 XVID
|
||||
|
||||
OPTIONS_DEFINE_i386= RTCPU
|
||||
OPTIONS_DEFINE_amd64= RTCPU
|
||||
OPTIONS_DEFINE_ppc= RTCPU
|
||||
|
||||
OPTIONS_DEFAULT_i386= RTCPU
|
||||
OPTIONS_DEFAULT_amd64= RTCPU
|
||||
OPTIONS_DEFAULT_ppc= RTCPU
|
||||
|
||||
BLURAY_DESC?= BluRay support
|
||||
LZO_DESC?= Enable external liblzo library
|
||||
OCFLAGS_DESC?= Use optimized compiler flags
|
||||
REAL_DESC?= Enable realplayer plugin
|
||||
RTCPU_DESC?= Use runtime CPU detection on supported archs
|
||||
RTCPU_DESC?= Use runtime CPU detection
|
||||
|
||||
RESTRICTED= Port has restricted dependencies
|
||||
|
||||
|
@ -84,11 +92,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}|' \
|
||||
|
|
|
@ -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}|' \
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue