Changeset View
Standalone View
multimedia/x264/Makefile
Show All 13 Lines | |||||
# is being updated to. Then run version.sh against it. | # is being updated to. Then run version.sh against it. | ||||
# | # | ||||
# Bumping PORTREVISION for dependent ports? This is useful: | # Bumping PORTREVISION for dependent ports? This is useful: | ||||
# cd $PORTSDIR; for x in $(find . -name "Makefile*" -print); | # cd $PORTSDIR; for x in $(find . -name "Makefile*" -print); | ||||
# do str=$(grep -i x264.so $x); if [[ -n $str ]] { echo "$x" }; done | # do str=$(grep -i x264.so $x); if [[ -n $str ]] { echo "$x" }; done | ||||
PORTNAME= x264 | PORTNAME= x264 | ||||
PORTVERSION= 0.${X264_BUILD}.${X264_REV} | PORTVERSION= 0.${X264_BUILD}.${X264_REV} | ||||
PORTREVISION?= 0 # 0 in libx264 | PORTREVISION?= 1 # 0 in libx264 | ||||
CATEGORIES= multimedia | CATEGORIES= multimedia | ||||
MASTER_SITES= https://downloads.videolan.org/pub/videolan/x264/snapshots/ \ | MASTER_SITES= https://downloads.videolan.org/pub/videolan/x264/snapshots/ \ | ||||
https://samples.mplayerhq.hu/yuv4mpeg2/:pgo | https://samples.mplayerhq.hu/yuv4mpeg2/:pgo | ||||
DISTNAME= ${PORTNAME}-snapshot-${X264_SNAPSHOT}-2245-stable | DISTNAME= ${PORTNAME}-snapshot-${X264_SNAPSHOT}-2245-stable | ||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} | DISTFILES= ${DISTNAME}${EXTRACT_SUFX} | ||||
DIST_SUBDIR= x264 | DIST_SUBDIR= x264 | ||||
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} | EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} | ||||
Show All 14 Lines | |||||
USES?= pkgconfig | USES?= pkgconfig | ||||
USES+= gmake localbase shebangfix tar:bzip2 | USES+= gmake localbase shebangfix tar:bzip2 | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
HAS_CONFIGURE= yes | HAS_CONFIGURE= yes | ||||
SHEBANG_FILES= configure | SHEBANG_FILES= configure | ||||
PLIST_FILES?= bin/x264 | PLIST_FILES?= bin/x264 | ||||
OPTIONS_DEFINE+= DEBUG FFMS GCC LAVF PGO SWSCALE | OPTIONS_DEFINE+= DEBUG FFMS GCC LAVF LTO OPTIMIZED_CFLAGS PGO SWSCALE | ||||
OPTIONS_RADIO+= MP4 | OPTIONS_RADIO+= MP4 | ||||
OPTIONS_RADIO_MP4+= GPAC LSMASH | OPTIONS_RADIO_MP4+= GPAC LSMASH | ||||
OPTIONS_DEFAULT+= FFMS LAVF LSMASH SWSCALE | OPTIONS_DEFAULT+= FFMS LAVF LSMASH SWSCALE | ||||
OPTIONS_DEFAULT_aarch64= LTO OPTIMIZED_CFLAGS | |||||
OPTIONS_DEFAULT_amd64= LTO OPTIMIZED_CFLAGS | |||||
OPTIONS_DEFAULT_armv7= LTO OPTIMIZED_CFLAGS | |||||
koobs: Can you provide a comment/explain why only these archs get these flags by default, or rather… | |||||
diizzyAuthorUnsubmitted Not Done Inline ActionsThose are the platforms I could run-time test on (using real hardware), I'm not sure if it works as intended on platforms such as i386, MIPS, PPC etc. diizzy: Those are the platforms I could run-time test on (using real hardware), I'm not sure if it… | |||||
OPTIONS_DEFAULT_powerpc= GCC | OPTIONS_DEFAULT_powerpc= GCC | ||||
OPTIONS_DEFAULT_powerpc64= GCC | OPTIONS_DEFAULT_powerpc64= GCC | ||||
OPTIONS_DEFAULT_powerpcspe= GCC | OPTIONS_DEFAULT_powerpcspe= GCC | ||||
FFMS_DESC= FFmpeg Source input support | FFMS_DESC= FFmpeg Source input support | ||||
GPAC_DESC= GPAC library support | GPAC_DESC= GPAC library support | ||||
LAVF_DESC= libav* format input support (requires FFmpeg) | LAVF_DESC= libav* format input support (requires FFmpeg) | ||||
LTO_DESC= Use Link-Time Optimization | |||||
koobsUnsubmitted Not Done Inline ActionsIf some decent number of ports use LTO as an option name, we could/should probably factor it out into a shared description in bsd.options.desc.mk koobs: If some decent number of ports use LTO as an option name, we could/should probably factor it… | |||||
diizzyAuthorUnsubmitted Not Done Inline ActionsI posted on the mailing list about it for input and to verify if it's even doable. diizzy: I posted on the mailing list about it for input and to verify if it's even doable.
https… | |||||
LSMASH_DESC= L-SMASH library support | LSMASH_DESC= L-SMASH library support | ||||
MP4_DESC= MPEG-4 output | MP4_DESC= MPEG-4 output | ||||
SWSCALE_DESC= Resize video filter | SWSCALE_DESC= Resize video filter | ||||
DEBUG_CONFIGURE_ENABLE= debug | DEBUG_CONFIGURE_ENABLE= debug | ||||
DEBUG_CONFIGURE_OFF= --enable-strip | DEBUG_CONFIGURE_OFF= --enable-strip | ||||
FFMS_LIB_DEPENDS= libffms2.so:multimedia/ffms2 | FFMS_LIB_DEPENDS= libffms2.so:multimedia/ffms2 | ||||
FFMS_CONFIGURE_ENABLE= ffms | FFMS_CONFIGURE_ENABLE= ffms | ||||
FFMS_IMPLIES= SWSCALE | FFMS_IMPLIES= SWSCALE | ||||
GCC_VARS= USE_GCC=yes | GCC_VARS= USE_GCC=yes | ||||
GPAC_LIB_DEPENDS= libgpac.so:multimedia/gpac-libgpac | GPAC_LIB_DEPENDS= libgpac.so:multimedia/gpac-libgpac | ||||
GPAC_CONFIGURE_ENABLE= gpac | GPAC_CONFIGURE_ENABLE= gpac | ||||
LAVF_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ | LAVF_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ | ||||
libavformat.so:multimedia/ffmpeg \ | libavformat.so:multimedia/ffmpeg \ | ||||
libavutil.so:multimedia/ffmpeg | libavutil.so:multimedia/ffmpeg | ||||
LAVF_CONFIGURE_ENABLE= lavf | LAVF_CONFIGURE_ENABLE= lavf | ||||
LAVF_IMPLIES= SWSCALE | LAVF_IMPLIES= SWSCALE | ||||
LTO_CONFIGURE_ENABLE= lto | |||||
LSMASH_LIB_DEPENDS= liblsmash.so:multimedia/l-smash | LSMASH_LIB_DEPENDS= liblsmash.so:multimedia/l-smash | ||||
LSMASH_CONFIGURE_ENABLE=lsmash | LSMASH_CONFIGURE_ENABLE=lsmash | ||||
PGO_DISTFILES= ${Y4M_VIDEO_DISTFILE}:pgo | PGO_DISTFILES= ${Y4M_VIDEO_DISTFILE}:pgo | ||||
PGO_MAKE_ENV= VIDS="${WRKDIR}/${Y4M_VIDEO}" | PGO_MAKE_ENV= VIDS="${WRKDIR}/${Y4M_VIDEO}" | ||||
PGO_ALL_TARGET= fprofiled | PGO_ALL_TARGET= fprofiled | ||||
# y4m sample video | # y4m sample video | ||||
Y4M_VIDEO= example.y4m | Y4M_VIDEO= example.y4m | ||||
Y4M_VIDEO_DISTFILE= example.y4m.bz2 | Y4M_VIDEO_DISTFILE= example.y4m.bz2 | ||||
PGO_VARS= USE_GCC=any \ | PGO_VARS= USE_GCC=any \ | ||||
RESTRICTED="${Y4M_VIDEO_DISTFILE} file may not be mirrored" \ | RESTRICTED="${Y4M_VIDEO_DISTFILE} file may not be mirrored" \ | ||||
RESTRICTED_FILES="${Y4M_VIDEO_DISTFILE}" | RESTRICTED_FILES="${Y4M_VIDEO_DISTFILE}" | ||||
SWSCALE_LIB_DEPENDS= libavutil.so:multimedia/ffmpeg \ | SWSCALE_LIB_DEPENDS= libavutil.so:multimedia/ffmpeg \ | ||||
libswscale.so:multimedia/ffmpeg | libswscale.so:multimedia/ffmpeg | ||||
SWSCALE_CONFIGURE_ENABLE= swscale | SWSCALE_CONFIGURE_ENABLE= swscale | ||||
CONFIGURE_ARGS?= --system-libx264 | CONFIGURE_ARGS?= --system-libx264 | ||||
CONFIGURE_ARGS+= --prefix="${PREFIX}" \ | CONFIGURE_ARGS+= --prefix="${PREFIX}" | ||||
koobsUnsubmitted Not Done Inline ActionsI'm pretty sure CONFIGURE_ARGS already contains this value by default from the framework. Can you check, and if so, remove this koobs: I'm pretty sure `CONFIGURE_ARGS` already contains this value by default from the framework. Can… | |||||
diizzyAuthorUnsubmitted Done Inline ActionsYou're correct, I'll remove it diizzy: You're correct, I'll remove it | |||||
--extra-cflags="${CPPFLAGS} ${CFLAGS}" \ | |||||
--extra-ldflags="${LDFLAGS}" | |||||
post-extract-PGO-on: | post-extract-PGO-on: | ||||
@${BZIP2_CMD} -dc ${DISTDIR}/${DIST_SUBDIR}/${Y4M_VIDEO_DISTFILE} \ | @${BZIP2_CMD} -dc ${DISTDIR}/${DIST_SUBDIR}/${Y4M_VIDEO_DISTFILE} \ | ||||
>${WRKDIR}/${Y4M_VIDEO} | >${WRKDIR}/${Y4M_VIDEO} | ||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e ' \ | @${REINPLACE_CMD} -e ' \ | ||||
s|gpac_static|gpac|g' \ | s|gpac_static|gpac|g' \ | ||||
${WRKSRC}/configure | ${WRKSRC}/configure | ||||
@${REINPLACE_CMD} -e ' \ | @${REINPLACE_CMD} -e ' \ | ||||
s|bash|sh|; \ | s|bash|sh|; \ | ||||
s|VER="x"|VER="${X264_REV} ${X264_GITVER}"|; \ | s|VER="x"|VER="${X264_REV} ${X264_GITVER}"|; \ | ||||
s|VERSION=""|VERSION=" r${X264_REV} ${X264_GITVER}"|' \ | s|VERSION=""|VERSION=" r${X264_REV} ${X264_GITVER}"|' \ | ||||
${WRKSRC}/version.sh | ${WRKSRC}/version.sh | ||||
.if !target(pre-build) | .if !target(pre-build) | ||||
pre-build: | pre-build: | ||||
@(${RM} ${WRKSRC}/x264_config.h) | @(${RM} ${WRKSRC}/x264_config.h) | ||||
.endif | |||||
.include <bsd.port.options.mk> | |||||
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} | |||||
CFLAGS:= ${CFLAGS:S/-O2//g} | |||||
.endif | .endif | ||||
koobsUnsubmitted Not Done Inline ActionsOPTIMIZED_CFLAGS should probably 'append' to CFLAGS (such that it honours and extends user-CFLAGS), rather than replacing/removing system flags, or flags provided from somewhere else. OPTIMIZED_CFLAGS_CFLAGS=-O3 or similar koobs: OPTIMIZED_CFLAGS should probably 'append' to CFLAGS (such that it honours and extends user… | |||||
diizzyAuthorUnsubmitted Not Done Inline ActionsI agree it's not ideal but I wanted to avoid potential confusing compiler output as libx264 sets -O3 by default. Another solution would be to strip default -O3 argument from sources, not sure which way to go. Untouched With CFLAGS appended diizzy: I agree it's not ideal but I wanted to avoid potential confusing compiler output as libx264… | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
Can you provide a comment/explain why only these archs get these flags by default, or rather, why other archs dont
I'd like to provide that detail in the commit log message