Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2014 22:28:07 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r375492 - head/multimedia/libx264
Message-ID:  <201412242228.sBOMS7fv086375@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Wed Dec 24 22:28:06 2014
New Revision: 375492
URL: https://svnweb.freebsd.org/changeset/ports/375492
QAT: https://qat.redports.org/buildarchive/r375492/

Log:
  multimedia/libx264: Merry Modernized Port Christmas
  
  - Update COMMENT (library only)
  - Add LICENSE_FILE
  - Use pathfix for pkgconfig
  - Remove unecessary WRKSRC override
  - Use OPTIONS helpers
  - Restore PGO option to OPTIONS_DEFINE
  - Don't disable CLI so PGO can run. Remove it in post-install:
  - Whitespace alignment
  - Sort OPTIONS
  - Remove -fstack-protector conditional (framework handles this now)
  - Strip shared library

Modified:
  head/multimedia/libx264/Makefile

Modified: head/multimedia/libx264/Makefile
==============================================================================
--- head/multimedia/libx264/Makefile	Wed Dec 24 22:18:28 2014	(r375491)
+++ head/multimedia/libx264/Makefile	Wed Dec 24 22:28:06 2014	(r375492)
@@ -5,6 +5,7 @@
 
 PORTNAME=	libx264
 PORTVERSION=	0.${X264_BUILD}.${X264_REV}
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	ftp://ftp.videolan.org/pub/videolan/x264/snapshots/ \
 		http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
@@ -14,12 +15,13 @@ DIST_SUBDIR=	libx264
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	koobs@FreeBSD.org
-COMMENT=	Library and tool for encoding H.264/AVC video streams
+COMMENT=	Library for encoding H.264/MPEG-4 AVC video
 
 LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
 BUILD_DEPENDS=	yasm>=0.6.0:${PORTSDIR}/devel/yasm \
-		${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
+		bash:${PORTSDIR}/shells/bash
 
 X264_BUILD=	142
 X264_REV=	2455
@@ -27,51 +29,34 @@ X264_COMMIT=	021c0dc6c95c1bc239c9db78a80
 X264_GITVER=	${X264_COMMIT:C/^(.......).*$/\1/g}
 X264_SNAPSHOT=	20140827
 
-USES=		gmake tar:bzip2
-WRKSRC=		${WRKDIR}/${DISTNAME}
+USES=		gmake pathfix tar:bzip2
 USE_LDCONFIG=	yes
 HAS_CONFIGURE=	yes
 
-OPTIONS_DEFINE=		ASM DEBUG HI10P GCC
+OPTIONS_DEFINE=		ASM DEBUG GCC HI10P PGO
 OPTIONS_DEFAULT=	ASM
-ASM_DESC=		Enable Assembly Optimizations
-DEBUG_DESC=		Generate Debugging Symbols
-GCC_DESC=		Use current GCC
-HI10P_DESC=		Enable High 10 Profile 10-bit encoding
+
+ASM_DESC=	Enable Assembly Optimizations
+DEBUG_DESC=	Generate Debugging Symbols
+GCC_DESC=	Use current GCC
+HI10P_DESC=	Enable High 10 Profile 10-bit encoding
+
+ASM_CONFIGURE_OFF=	--disable-asm
+DEBUG_CONFIGURE_ON=     --enable-debug
+GCC_USE=                GCC=yes
+HI10P_CONFIGURE_ON=	--bit-depth=10
+PGO_USE=		GCC=yes
 
 CONFIGURE_ARGS+=	--extra-cflags="-I${LOCALBASE}/include" \
 			--extra-ldflags="-L${LOCALBASE}/lib" \
 			--enable-static --enable-shared \
-			--disable-opencl \
-			--disable-cli
+			--disable-opencl
 
-PLIST_SUB+=	X264_BUILD=${X264_BUILD}
+PATHFIX_MAKEFILEIN=	Makefile
+PLIST_SUB+=		X264_BUILD=${X264_BUILD}
 
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MGCC}
-USE_GCC=	yes
-.endif
-
-.if !${PORT_OPTIONS:MASM}
-CONFIGURE_ARGS+=	--disable-asm
-.endif
-
-.if ${PORT_OPTIONS:MHI10P}
-CONFIGURE_ARGS+=	--bit-depth=10
-.endif
-
-.if ${PORT_OPTIONS:MDEBUG} || defined(WITH_DEBUG)
-CONFIGURE_ARGS+=	--enable-debug
-.endif
-
-# Around the time GCC stack protection (aka Propolice) for userland
-# was enabled on src/share/mk/bsd.sys.mk
-# SVN rev 180012 on 2008-06-25 21:33:28Z by ru
-.if ${OSVERSION} >= 800040
-LDFLAGS+=	-fstack-protector
-.endif
-
 .if ${PORT_OPTIONS:MPGO}
 # y4m sample video
 Y4M_VIDEO=example.y4m
@@ -81,7 +66,7 @@ DISTFILES+=	${Y4M_VIDEO_DISTFILE}:pgo
 ALL_TARGET=	fprofiled
 MAKE_ENV+=	VIDS="${WRKDIR}/${Y4M_VIDEO}"
 
-RESTRICTED=	${Y4M_VIDEO_DISTFILE} file may not be mirrored
+RESTRICTED=		${Y4M_VIDEO_DISTFILE} file may not be mirrored
 RESTRICTED_FILES=	${Y4M_VIDEO_DISTFILE}
 .endif
 
@@ -100,8 +85,9 @@ post-patch:
 		s|VER="x"|VER="${X264_REV} ${X264_GITVER}"|; \
 		s|VERSION=""|VERSION=" r${X264_REV} ${X264_GITVER}"|' \
 		${WRKSRC}/version.sh
-	@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
-		s|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
-		${WRKSRC}/Makefile
+
+post-install:
+	${RM} ${STAGEDIR}${PREFIX}/bin/x264
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libx264.so.*
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412242228.sBOMS7fv086375>