aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/x264
diff options
context:
space:
mode:
authorxmj <xmj@FreeBSD.org>2014-11-23 00:23:34 +0800
committerxmj <xmj@FreeBSD.org>2014-11-23 00:23:34 +0800
commit7ed6ffb0684e6f6b2941842f6f48af6384d96e6a (patch)
tree69858a5647bf444b8dbaae3a0602f21ce314cc16 /multimedia/x264
parent3d249881a1fbea4311dce69fd794b3526df0f004 (diff)
downloadfreebsd-ports-gnome-7ed6ffb0684e6f6b2941842f6f48af6384d96e6a.tar.gz
freebsd-ports-gnome-7ed6ffb0684e6f6b2941842f6f48af6384d96e6a.tar.zst
freebsd-ports-gnome-7ed6ffb0684e6f6b2941842f6f48af6384d96e6a.zip
multimedia/x264: General overhaul
- Split x264 into two ports: the CLI application (x264), and the library (libx264). This will allow x264 to use lavf and friends from ffmpeg for decoding and demuxing while preventing a circular dependency between the two: x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather than x264. - Add the LAVF option to the CLI port, making the dependency on ffmpeg optional. - Update to 0.142.2455. - Amend fixes to local patches so that they can apply to the new upstream files. - Provide the git revision and other version information to the build environment, allowing the CLI binary to display this information (like the Windows builds). - Remove unsupported build options (X11_OUTPUT). - Ensure that the library and CLI ports each have the appropriate options. - Add notes for future contributors who wish to update the ports. - Bump PORTREVISION for all dependent ports. PR: 187805 Differential Revision: https://reviews.freebsd.org/D1159 Submitted by: Andrew Berg <aberg010@my.hennepintech.edu> Approved by: koobs (maintainer, mentor)
Diffstat (limited to 'multimedia/x264')
-rw-r--r--multimedia/x264/Makefile60
-rw-r--r--multimedia/x264/distinfo4
-rw-r--r--multimedia/x264/files/patch-Makefile17
-rw-r--r--multimedia/x264/pkg-plist7
4 files changed, 50 insertions, 38 deletions
diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile
index 5bce27c1d575..39e6903c5f28 100644
--- a/multimedia/x264/Makefile
+++ b/multimedia/x264/Makefile
@@ -1,9 +1,24 @@
# 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.
+# 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*.
+#
+# Bumping PORTREVISION for dependent ports? This is useful:
+# cd $PORTSDIR; for x in $(find . -name "Makefile*" -print);
+# do str=$(grep -i x264.so $x); if [[ -n $str ]] { echo "$x" }; done
PORTNAME= x264
PORTVERSION= 0.${X264_BUILD}.${X264_REV}
-PORTREVISION= 4
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.videolan.org/pub/videolan/x264/snapshots/ \
http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
@@ -13,39 +28,41 @@ DIST_SUBDIR= x264
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= koobs@FreeBSD.org
-COMMENT= Library and tool for encoding H.264/AVC video streams
+COMMENT= Tool for encoding H.264/AVC video streams
LICENSE= GPLv2
BUILD_DEPENDS= yasm>=0.6.0:${PORTSDIR}/devel/yasm \
${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
+LIB_DEPENDS= libx264.so:${PORTSDIR}/multimedia/libx264
-X264_BUILD= 136
-X264_REV= 2358
-X264_COMMIT= 3361d59a0a83dcb8b321cc0eb8e6ba68ca49c7d4
+X264_BUILD= 142
+X264_REV= 2455
+X264_COMMIT= 021c0dc6c95c1bc239c9db78a80dd85fc856a4dd
X264_GITVER= ${X264_COMMIT:C/^(.......).*$/\1/g}
-X264_SNAPSHOT= 20130827
+X264_SNAPSHOT= 20140827
-USES= gmake tar:bzip2
+USES= gmake tar:bzip2 pkgconfig
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_LDCONFIG= yes
HAS_CONFIGURE= yes
-OPTIONS_DEFINE= ASM DEBUG HI10P PGO GCC GPAC X11_OUTPUT
+OPTIONS_DEFINE= ASM DEBUG PGO GCC GPAC LAVF
OPTIONS_DEFAULT= ASM GPAC
ASM_DESC= Enable Assembly Optimizations
+DEBUG_DESC= Generate Debugging Symbols
+PGO_DESC= Use Profile-Guided Optimization
GCC_DESC= Use current GCC
-HI10P_DESC= Enable High 10 Profile 10-bit encoding
GPAC_DESC= Enable MPEG-4 Output
-X11_OUTPUT_DESC= Enable X11 Output
+LAVF_DESC= Enable libav* format input/output support (requires ffmpeg)
CONFIGURE_ARGS+= --extra-cflags="-I${LOCALBASE}/include" \
--extra-ldflags="-L${LOCALBASE}/lib" \
- --enable-static --enable-shared \
--disable-opencl \
- --disable-swscale
+ --system-libx264
PLIST_SUB+= X264_BUILD=${X264_BUILD}
+PLIST_FILES= bin/x264
.include <bsd.port.options.mk>
@@ -59,10 +76,6 @@ USE_GCC= any
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
@@ -93,9 +106,13 @@ LIB_DEPENDS+= libgpac.so:${PORTSDIR}/multimedia/gpac-libgpac
CONFIGURE_ARGS+= --disable-gpac
.endif
-.if ${PORT_OPTIONS:MX11_OUTPUT}
-CONFIGURE_ARGS+= --enable-visualize
-USE_XORG= x11
+.if ${PORT_OPTIONS:MLAVF}
+LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= libavformat.so:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= libavutil.so:${PORTSDIR}/multimedia/ffmpeg
+LIB_DEPENDS+= libswscale.so:${PORTSDIR}/multimedia/ffmpeg
+.else
+CONFIGURE_ARGS+= --disable-swscale --disable-lavf
.endif
post-extract:
@@ -109,7 +126,10 @@ post-patch:
s|/bin/bash|${LOCALBASE}/bin/bash|; \
s|gpac_static|gpac|g' \
${WRKSRC}/configure
- @${REINPLACE_CMD} -e 's|bash|sh|' ${WRKSRC}/version.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
@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
s|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/Makefile
diff --git a/multimedia/x264/distinfo b/multimedia/x264/distinfo
index 1843312f62ed..304371397ce8 100644
--- a/multimedia/x264/distinfo
+++ b/multimedia/x264/distinfo
@@ -1,4 +1,4 @@
-SHA256 (x264/x264-snapshot-20130827-2245-stable.tar.bz2) = 5e418d6bb0fa8aebd503f7c6298ef0ee007ae8f066811d5427c28edc4a0304ef
-SIZE (x264/x264-snapshot-20130827-2245-stable.tar.bz2) = 619606
+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
diff --git a/multimedia/x264/files/patch-Makefile b/multimedia/x264/files/patch-Makefile
index cca5b3e448ea..6d5646214e2c 100644
--- a/multimedia/x264/files/patch-Makefile
+++ b/multimedia/x264/files/patch-Makefile
@@ -1,24 +1,23 @@
---- Makefile.orig 2013-08-27 22:45:07.000000000 +0200
-+++ Makefile 2014-02-04 20:59:54.000000000 +0100
-@@ -86,13 +86,13 @@
+--- Makefile.orig 2014-08-27 15:45:08.000000000 -0500
++++ Makefile 2014-10-21 16:18:59.299348000 -0500
+@@ -85,12 +85,12 @@
endif
X86SRC = $(X86SRC0:%=common/x86/%)
-
+
-ifeq ($(ARCH),X86)
+ifeq ($(ARCH),i386)
ARCH_X86 = yes
ASMSRC = $(X86SRC) common/x86/pixel-32.asm
- ASFLAGS += -DARCH_X86_64=0
endif
-
+
-ifeq ($(ARCH),X86_64)
+ifeq ($(ARCH),amd64)
ARCH_X86 = yes
ASMSRC = $(X86SRC:-32.asm=-64.asm) common/x86/trellis-64.asm
- ASFLAGS += -DARCH_X86_64=1
-@@ -108,7 +108,14 @@
endif
-
+@@ -104,7 +104,14 @@
+ endif
+
# AltiVec optims
-ifeq ($(ARCH),PPC)
+ifeq ($(ARCH),powerpc)
diff --git a/multimedia/x264/pkg-plist b/multimedia/x264/pkg-plist
deleted file mode 100644
index 7bedc90a6bc6..000000000000
--- a/multimedia/x264/pkg-plist
+++ /dev/null
@@ -1,7 +0,0 @@
-bin/x264
-include/x264.h
-include/x264_config.h
-lib/libx264.a
-lib/libx264.so
-lib/libx264.so.%%X264_BUILD%%
-libdata/pkgconfig/x264.pc