aboutsummaryrefslogtreecommitdiff
path: root/multimedia/x264/Makefile
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2009-02-27 01:51:39 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2009-02-27 01:51:39 +0000
commit11d4107f73aa296fae814d8db7686b2afd170571 (patch)
treeb50876f02dd5a87dc1770c368533d196ec94e7b6 /multimedia/x264/Makefile
parentbcf2435844d70b39c7c984ec308eed4d879e73f4 (diff)
downloadports-11d4107f73aa296fae814d8db7686b2afd170571.tar.gz
ports-11d4107f73aa296fae814d8db7686b2afd170571.zip
o Add PGO option to enable Profile-Guided Optimization build support.
o Add DIST_SUBDIR since a y4m video sample fetched when WITH_PGO has a name that is too generic. o Add RESTRICTED specifically for the same y4m video sample when WITH_PGO. This sample cannot be mirrored even though the port may still be both packaged and redistributed. o Be pedantic when declaring port variables to insure slave port safety o No PORTREVISION bump since there was neither functionality nor PLIST change
Notes
Notes: svn path=/head/; revision=229124
Diffstat (limited to 'multimedia/x264/Makefile')
-rw-r--r--multimedia/x264/Makefile27
1 files changed, 25 insertions, 2 deletions
diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile
index c70cf287850f..41c68d495dfd 100644
--- a/multimedia/x264/Makefile
+++ b/multimedia/x264/Makefile
@@ -9,8 +9,12 @@ PORTNAME= x264
PORTVERSION= 0.0.20080409
PORTREVISION?= 2
CATEGORIES= multimedia
-MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/
+MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/ \
+ http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
DISTNAME= ${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245
+DISTFILES= ${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245${EXTRACT_SUFX}
+DIST_SUBDIR= x264
+EXTRACT_ONLY= ${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245${EXTRACT_SUFX}
MAINTAINER= multimedia@FreeBSD.org
COMMENT?= Multimedia library and tool for encoding H.264/AVC video streams
@@ -27,7 +31,8 @@ USE_LDCONFIG= yes
HAS_CONFIGURE= yes
OPTIONS= DEBUG "Enable Debugging" Off \
- OPTIMIZED_CFLAGS "Enable Optimized CFLAGS" Off
+ OPTIMIZED_CFLAGS "Enable Optimized CFLAGS" Off \
+ PGO "Enable Profile-Guided Optimization" Off
CONFIGURE_ARGS+= --extra-cflags="${CPPFLAGS} ${CFLAGS} -fPIC -I${LOCALBASE}/include -I${LOCALBASE}/include" \
--extra-ldflags="${LDFLAGS} -L${LOCALBASE}/lib -L${LOCALBASE}/lib" \
@@ -58,6 +63,19 @@ MAKE_ENV+= ARCH=${ARCH}
CONFIGURE_ARGS+= --enable-debug
.endif
+.if defined(WITH_PGO) && ${SLAVE_PORT:L}!="yes"
+# y4m sample video
+Y4M_VIDEO=example.y4m
+Y4M_VIDEO_DISTFILE=example.y4m.bz2
+
+DISTFILES+= ${Y4M_VIDEO_DISTFILE}
+ALL_TARGET= fprofiled
+MAKE_ENV+= VIDS="${WRKDIR}/${Y4M_VIDEO}"
+
+RESTRICTED= ${Y4M_VIDEO}.bz2 file may not be mirrored
+RESTRICTED_FILES= ${Y4M_VIDEO_DISTFILE}
+.endif
+
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O2 -funroll-loops -ffast-math
.endif
@@ -73,6 +91,11 @@ CONFIGURE_ARGS+= --enable-visualize
USE_XORG= x11
.endif
+post-extract:
+.if defined(WITH_PGO) && ${SLAVE_PORT:L}!="yes"
+ @( cd ${WRKDIR} && ${BZIP2_CMD} -dc ${DISTDIR}/${Y4M_VIDEO_DISTFILE} > ${Y4M_VIDEO} )
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
s|-lpthread|${PTHREAD_LIBS}|g' \