summaryrefslogtreecommitdiff
path: root/multimedia/x264
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2015-07-03 07:02:44 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2015-07-03 07:02:44 +0000
commit9b08af5e1a546b78fe93f99c39a534eeca7acf11 (patch)
treefb62b3412f4fbbccc19b38b48e8e04f5e9d1afda /multimedia/x264
parentReplace deprecated des_ with DES_ and fix LibreSSL build. (diff)
multimedia/{lib}x264: Update to 0.144.2533 and major refactor
- Update to 0.144.2533 (from upstream stable branch) [1] - Switch x264 and libx264 ports to master/slave ports respectively - Bump PORTREVISION for dependent ports as the shared library version has changed. multimedia/x264: - Clean up and update "updating instructions" in Makefile header - Tweak COMMENT - Only LIB_DEPENDS on libx264 and add PLIST_FILES if this isn't the libx264 port. - Allow COMMENT, USES, OPTIONS_*, CONFIGURE_ARGS to be overriden in libx264 port. - Place common configure arguments in a CONFIGURE_COMMON_ARGS variable to make overriding values without duplication easier. - Use --prefix configure argument over post-patch replacements - Enable stripping of binaries and libraries if DEBUG is off. Remove post-install target STRIP_CMD accordingly. - Delete patch-Makefile in favour of patching WRKSRC/configure to identify amd64, arm64 and mipsn32. powerpc and powerpc64 are now covered upstream without needing patches. - Patch out a bogus compiler argument check (cc_check) that results in -Wno-maybe-uninitialized being added to CFLAGS causing causes warnings when clang is cc. The cc_check function checks for basename $CC to identify compiler type (icl, clang, gcc, etc). multimedia/libx264: - Remove all Makefile entries that are duplicated or common and found in the master port (x264). - Set lib as the PKGNAMEPREFIX - Tweak COMMENT - Delete upstreamed ARM patches [1] - Delete all but one patch, as they duplicate those in x264. - Dont remove pkgconfig/libdata directory Changes: https://git.videolan.org/?p=x264.git;a=shortlog;h=refs/heads/stable Based on: PR: 201260 [1] Submitted by: Andrey Cherkashin <andoriyu gmail com> [1]
Notes
Notes: svn path=/head/; revision=391217
Diffstat (limited to 'multimedia/x264')
-rw-r--r--multimedia/x264/Makefile65
-rw-r--r--multimedia/x264/distinfo6
-rw-r--r--multimedia/x264/files/patch-Makefile42
-rw-r--r--multimedia/x264/files/patch-common_cpu.c6
-rw-r--r--multimedia/x264/files/patch-configure59
5 files changed, 78 insertions, 100 deletions
diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile
index 9c20cf7e2b44..04244b777951 100644
--- a/multimedia/x264/Makefile
+++ b/multimedia/x264/Makefile
@@ -1,17 +1,17 @@
# Created by: Michael Johnson <ahze@FreeBSD.org>
# $FreeBSD$
#
-# Updating notes:
-# We use the nightly tarballs for the *stable* branch of the git repo.
-# X264_BUILD is the "core" number, and can always be found in x264.h.
+# NOTES FOR UPDATING PORT:
+#
+# We use tarballs from the *stable* branch of the upstream git repository.
+#
+# X264_BUILD is the "core" number, and can be found in x264.h.
+#
# X264_COMMIT is the commit number, and can be found here:
# http://git.videolan.org/?p=x264.git;a=shortlog;h=refs/heads/stable
-# To get X264_REV, you must checkout the git revision for the version to
-# which you wish to update, and then run version.sh against it.
-# Don't forget to update these for multimedia/libx264 as well:
-# X264_BUILD, X264_REV, X264_COMMIT, X264_SNAPSHOT
#
-# distinfo for this port and libx264 should always be *identical*.
+# X264_REV requires a checkout the git revision for the version the port
+# is being updated to. Then run version.sh against it.
#
# Bumping PORTREVISION for dependent ports? This is useful:
# cd $PORTSDIR; for x in $(find . -name "Makefile*" -print);
@@ -19,7 +19,6 @@
PORTNAME= x264
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
@@ -29,54 +28,62 @@ DIST_SUBDIR= x264
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= koobs@FreeBSD.org
-COMMENT= Front-end for encoding H.264/MPEG-4 AVC video
+COMMENT?= H.264/MPEG-4 AVC Video Encoding (Front End CLI)
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= yasm>=1.2.0:${PORTSDIR}/devel/yasm \
bash:${PORTSDIR}/shells/bash
-LIB_DEPENDS= libx264.so:${PORTSDIR}/multimedia/libx264
-X264_BUILD= 142
-X264_REV= 2455
-X264_COMMIT= 021c0dc6c95c1bc239c9db78a80dd85fc856a4dd
+X264_BUILD= 144
+X264_REV= 2533
+X264_COMMIT= c8a773ebfca148ef04f5a60d42cbd7336af0baf6
X264_GITVER= ${X264_COMMIT:C/^(.......).*$/\1/g}
-X264_SNAPSHOT= 20140827
+X264_SNAPSHOT= 20150629
-USES= gmake pkgconfig tar:bzip2
+USES?= gmake pkgconfig tar:bzip2
USE_LDCONFIG= yes
HAS_CONFIGURE= yes
-OPTIONS_DEFINE= ASM DEBUG GCC GPAC LAVF PGO
-OPTIONS_DEFAULT= ASM GPAC
+OPTIONS_DEFINE?= ASM DEBUG GCC GPAC LAVF PGO
+OPTIONS_DEFAULT?= ASM GPAC
GCC_DESC= Use current GCC
GPAC_DESC= MPEG-4 output support
LAVF_DESC= libav* format input/output support (requires FFmpeg)
ASM_CONFIGURE_OFF= --disable-asm
+
DEBUG_CONFIGURE_ON= --enable-debug
-GPAC_LIB_DEPENDS= libgpac.so:${PORTSDIR}/multimedia/gpac-libgpac
+DEBUG_CONFIGURE_OFF= --enable-strip
+
GPAC_CONFIGURE_OFF= --disable-gpac
+GPAC_LIB_DEPENDS= libgpac.so:${PORTSDIR}/multimedia/gpac-libgpac
+
+LAVF_CONFIGURE_OFF= --disable-swscale --disable-lavf
LAVF_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \
libavformat.so:${PORTSDIR}/multimedia/ffmpeg \
libavutil.so:${PORTSDIR}/multimedia/ffmpeg \
libswscale.so:${PORTSDIR}/multimedia/ffmpeg
-LAVF_CONFIGURE_OFF= --disable-swscale --disable-lavf
-CONFIGURE_ARGS+= --extra-cflags="-I${LOCALBASE}/include" \
+CONFIGURE_COMMON_ARGS= --prefix=${PREFIX} \
+ --extra-cflags="-I${LOCALBASE}/include" \
--extra-ldflags="-L${LOCALBASE}/lib" \
--disable-opencl \
+
+CONFIGURE_ARGS?= ${CONFIGURE_COMMON_ARGS} \
--system-libx264
CFLAGS_armv6+= -mcpu=arm1136jf-s
-PLIST_FILES= bin/x264
-PLIST_SUB+= X264_BUILD=${X264_BUILD}
-
.include <bsd.port.options.mk>
+.if ${SLAVE_PORT} == "no"
+PLIST_FILES= bin/x264
+LIB_DEPENDS= libx264.so:${PORTSDIR}/multimedia/libx264
+.endif
+
.if ${PORT_OPTIONS:MGCC}
USE_GCC= yes
.elif ${PORT_OPTIONS:MPGO}
@@ -102,19 +109,19 @@ post-extract:
.endif
post-patch:
- @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
+ @${REINPLACE_CMD} -e ' \
s|/bin/bash|${LOCALBASE}/bin/bash|; \
s|gpac_static|gpac|g' \
${WRKSRC}/configure
- @${REINPLACE_CMD} -e 's|bash|sh|; \
+ @${REINPLACE_CMD} -e ' \
+ s|bash|sh|; \
s|VER="x"|VER="${X264_REV} ${X264_GITVER}"|; \
s|VERSION=""|VERSION=" r${X264_REV} ${X264_GITVER}"|' \
${WRKSRC}/version.sh
+.if ${SLAVE_PORT} == "no"
pre-build:
@(${RM} ${WRKSRC}/x264_config.h)
-
-post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/x264
+.endif
.include <bsd.port.mk>
diff --git a/multimedia/x264/distinfo b/multimedia/x264/distinfo
index 304371397ce8..c334d0cba069 100644
--- a/multimedia/x264/distinfo
+++ b/multimedia/x264/distinfo
@@ -1,4 +1,2 @@
-SHA256 (x264/x264-snapshot-20140827-2245-stable.tar.bz2) = fb1de3f802a83778527d45e69b552efa73b677ebb3ac633a8720923e71ffc5e3
-SIZE (x264/x264-snapshot-20140827-2245-stable.tar.bz2) = 624939
-SHA256 (x264/example.y4m.bz2) = a5bec9d37362bd9d7773fbd0644643f9ec096d654d20823004e88d5df32bbff7
-SIZE (x264/example.y4m.bz2) = 4910029
+SHA256 (x264/x264-snapshot-20150629-2245-stable.tar.bz2) = 403a1e7178cf9d676d5ffd4641031ae568a501bb3c14fc8ca9bb7c8ac7465340
+SIZE (x264/x264-snapshot-20150629-2245-stable.tar.bz2) = 672453
diff --git a/multimedia/x264/files/patch-Makefile b/multimedia/x264/files/patch-Makefile
deleted file mode 100644
index 6c90cc2e7a26..000000000000
--- a/multimedia/x264/files/patch-Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
---- Makefile.orig 2014-08-27 20:45:08 UTC
-+++ Makefile
-@@ -85,12 +85,12 @@ X86SRC0 += sad-a.asm
- endif
- X86SRC = $(X86SRC0:%=common/x86/%)
-
--ifeq ($(ARCH),X86)
-+ifeq ($(ARCH),i386)
- ARCH_X86 = yes
- ASMSRC = $(X86SRC) common/x86/pixel-32.asm
- endif
-
--ifeq ($(ARCH),X86_64)
-+ifeq ($(ARCH),amd64)
- ARCH_X86 = yes
- ASMSRC = $(X86SRC:-32.asm=-64.asm) common/x86/trellis-64.asm
- endif
-@@ -104,7 +104,14 @@ endif
- endif
-
- # AltiVec optims
--ifeq ($(ARCH),PPC)
-+ifeq ($(ARCH),powerpc)
-+ARCH_PPC = yes
-+endif
-+ifeq ($(ARCH),powerpc64)
-+ARCH_PPC = yes
-+endif
-+
-+ifdef ARCH_PPC
- ifneq ($(AS),)
- SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
- common/ppc/quant.c common/ppc/deblock.c \
-@@ -113,7 +120,7 @@ endif
- endif
-
- # NEON optims
--ifeq ($(ARCH),ARM)
-+ifeq ($(ARCH),armv6)
- ifneq ($(AS),)
- ASMSRC += common/arm/cpu-a.S common/arm/pixel-a.S common/arm/mc-a.S \
- common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \
diff --git a/multimedia/x264/files/patch-common_cpu.c b/multimedia/x264/files/patch-common_cpu.c
index 5d2bd7d4c068..08ddb9e34a07 100644
--- a/multimedia/x264/files/patch-common_cpu.c
+++ b/multimedia/x264/files/patch-common_cpu.c
@@ -1,6 +1,6 @@
---- common/cpu.c.orig 2014-08-27 20:45:08 UTC
+--- common/cpu.c.orig 2015-06-29 20:45:09 UTC
+++ common/cpu.c
-@@ -313,7 +313,7 @@ uint32_t x264_cpu_detect( void )
+@@ -316,7 +316,7 @@ uint32_t x264_cpu_detect( void )
#elif ARCH_PPC
@@ -9,7 +9,7 @@
#include <sys/sysctl.h>
uint32_t x264_cpu_detect( void )
{
-@@ -321,12 +321,16 @@ uint32_t x264_cpu_detect( void )
+@@ -324,12 +324,16 @@ uint32_t x264_cpu_detect( void )
uint32_t cpu = 0;
#if SYS_OPENBSD
int selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC };
diff --git a/multimedia/x264/files/patch-configure b/multimedia/x264/files/patch-configure
index 3830d51c01f2..61414cdd63db 100644
--- a/multimedia/x264/files/patch-configure
+++ b/multimedia/x264/files/patch-configure
@@ -1,25 +1,40 @@
-From 9463ec0004f1bddc49c05ed8e38430a4ce1738fb Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-x264@jannau.net>
-Date: Sun, 20 Jul 2014 13:40:28 +0200
-Subject: [PATCH] arm/ppc: use $CC as default assembler
-
---- configure.orig 2014-08-27 20:45:08 UTC
+--- configure.orig 2015-06-29 20:45:09 UTC
+++ configure
-@@ -648,7 +648,7 @@ case $host_cpu in
- ARCH="PPC"
- if [ $asm = auto ] ; then
- define HAVE_ALTIVEC
-- AS="${AS-${cross_prefix}gcc}"
-+ AS="${AS-${CC}}"
- if [ $SYS = MACOSX ] ; then
- CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4"
- else
-@@ -674,7 +674,7 @@ case $host_cpu in
- LDFLAGS="$LDFLAGS -arch armv7"
- fi
- else
-- AS="${AS-${cross_prefix}gcc}"
-+ AS="${AS-${CC}}"
+@@ -639,7 +639,7 @@ case $host_cpu in
+ ASFLAGS="$ASFLAGS -f elf"
fi
;;
- s390|s390x)
+- x86_64)
++ x86_64|amd64)
+ ARCH="X86_64"
+ AS="yasm"
+ AS_EXT=".asm"
+@@ -678,7 +678,7 @@ case $host_cpu in
+ sparc)
+ ARCH="SPARC"
+ ;;
+- mips|mipsel|mips64|mips64el)
++ mips|mipsel|mips64|mips64el|mipsn32)
+ ARCH="MIPS"
+ ;;
+ arm*)
+@@ -695,7 +695,7 @@ case $host_cpu in
+ AS="${AS-${CC}}"
+ fi
+ ;;
+- aarch64)
++ aarch64|arm64)
+ ARCH="AARCH64"
+ if [ "$SYS" = MACOSX ] ; then
+ AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -- ${CC}}"
+@@ -1089,10 +1089,6 @@ if cc_check '' -Wshadow ; then
+ CFLAGS="-Wshadow $CFLAGS"
+ fi
+
+-if cc_check '' -Wmaybe-uninitialized ; then
+- CFLAGS="-Wno-maybe-uninitialized $CFLAGS"
+-fi
+-
+ if [ $compiler = ICC -o $compiler = ICL ] ; then
+ if cc_check 'extras/intel_dispatcher.h' '' 'x264_intel_dispatcher_override();' ; then
+ define HAVE_INTEL_DISPATCHER