[Midnightbsd-cvs] mports [19374] trunk/multimedia/x264: switch to tool and lib separate for x264

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Jun 8 08:08:07 EDT 2015


Revision: 19374
          http://svnweb.midnightbsd.org/mports/?rev=19374
Author:   laffer1
Date:     2015-06-08 08:08:06 -0400 (Mon, 08 Jun 2015)
Log Message:
-----------
switch to tool and lib separate for x264

Modified Paths:
--------------
    trunk/multimedia/x264/Makefile
    trunk/multimedia/x264/distinfo
    trunk/multimedia/x264/files/patch-Makefile
    trunk/multimedia/x264/files/patch-common_cpu.c

Added Paths:
-----------
    trunk/multimedia/x264/files/patch-configure

Removed Paths:
-------------
    trunk/multimedia/x264/pkg-plist

Modified: trunk/multimedia/x264/Makefile
===================================================================
--- trunk/multimedia/x264/Makefile	2015-06-07 01:26:06 UTC (rev 19373)
+++ trunk/multimedia/x264/Makefile	2015-06-08 12:08:06 UTC (rev 19374)
@@ -12,38 +12,50 @@
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	ports at MidnightBSD.org
-COMMENT?=	Library and tool for encoding H.264/AVC video streams
+COMMENT=	Front-end for encoding H.264/MPEG-4 AVC video
 
 LICENSE=	gpl2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	yasm>=0.6.0:${PORTSDIR}/devel/yasm \
-		${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
+BUILD_DEPENDS=	yasm>=1.2.0:${PORTSDIR}/devel/yasm \
+		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
-WRKSRC=		${WRKDIR}/${DISTNAME}
+USES=		gmake pkgconfig tar:bzip2
 USE_LDCONFIG=	yes
 HAS_CONFIGURE=	yes
 
-OPTIONS_DEFINE=		ASM DEBUG HI10P PGO GCC GPAC X11_OUTPUT
+OPTIONS_DEFINE=		ASM DEBUG GCC GPAC LAVF PGO
 OPTIONS_DEFAULT=	ASM GPAC
-ASM_DESC=		Enable Assembly Optimizations
+
 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
+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
+GPAC_CONFIGURE_OFF=	--disable-gpac
+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" \
 			--extra-ldflags="-L${LOCALBASE}/lib" \
-			--enable-static --enable-shared \
 			--disable-opencl \
-			--disable-swscale
+			--system-libx264
 
+CFLAGS_armv6+=		-mcpu=arm1136jf-s
+
+PLIST_FILES=	bin/x264
 PLIST_SUB+=	X264_BUILD=${X264_BUILD}
 
 .include <bsd.mport.options.mk>
@@ -54,49 +66,19 @@
 USE_GCC=	any
 .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
-Y4M_VIDEO_DISTFILE=example.y4m.bz2
+Y4M_VIDEO=		example.y4m
+Y4M_VIDEO_DISTFILE=	example.y4m.bz2
 
 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
 
-.if ${PORT_OPTIONS:MGPAC}
-LIB_DEPENDS+=		libgpac.so:${PORTSDIR}/multimedia/gpac-libgpac
-.else
-CONFIGURE_ARGS+=	--disable-gpac
-.endif
-
-.if ${PORT_OPTIONS:MX11_OUTPUT}
-CONFIGURE_ARGS+=	--enable-visualize
-USE_XORG=		x11
-.endif
-
 post-extract:
 .if ${PORT_OPTIONS:MPGO}
 	@( cd ${WRKDIR} && ${BZIP2_CMD} -dc ${DISTDIR}/${DIST_SUBDIR}/${Y4M_VIDEO_DISTFILE} > ${Y4M_VIDEO} )
@@ -104,15 +86,17 @@
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
-		s|-lpthread|${PTHREAD_LIBS}|g; \
 		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|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
-		s|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
-		${WRKSRC}/Makefile
+	@${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
 
+pre-build:
+	@(${RM} ${WRKSRC}/x264_config.h)
+
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/x264
 

Modified: trunk/multimedia/x264/distinfo
===================================================================
--- trunk/multimedia/x264/distinfo	2015-06-07 01:26:06 UTC (rev 19373)
+++ trunk/multimedia/x264/distinfo	2015-06-08 12:08:06 UTC (rev 19374)
@@ -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

Modified: trunk/multimedia/x264/files/patch-Makefile
===================================================================
--- trunk/multimedia/x264/files/patch-Makefile	2015-06-07 01:26:06 UTC (rev 19373)
+++ trunk/multimedia/x264/files/patch-Makefile	2015-06-08 12:08:06 UTC (rev 19374)
@@ -1,6 +1,6 @@
---- 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 20:45:08 UTC
++++ Makefile
+@@ -85,12 +85,12 @@ X86SRC0 += sad-a.asm
  endif
  X86SRC = $(X86SRC0:%=common/x86/%)
  
@@ -8,7 +8,6 @@
 +ifeq ($(ARCH),i386)
  ARCH_X86 = yes
  ASMSRC   = $(X86SRC) common/x86/pixel-32.asm
- ASFLAGS += -DARCH_X86_64=0
  endif
  
 -ifeq ($(ARCH),X86_64)
@@ -15,9 +14,9 @@
 +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
+ endif
  
  # AltiVec optims
 -ifeq ($(ARCH),PPC)
@@ -32,3 +31,12 @@
  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 \

Modified: trunk/multimedia/x264/files/patch-common_cpu.c
===================================================================
--- trunk/multimedia/x264/files/patch-common_cpu.c	2015-06-07 01:26:06 UTC (rev 19373)
+++ trunk/multimedia/x264/files/patch-common_cpu.c	2015-06-08 12:08:06 UTC (rev 19374)
@@ -1,6 +1,6 @@
---- common/cpu.c.orig	2010-06-24 22:45:07.000000000 +0200
-+++ common/cpu.c	2010-07-18 22:55:49.324572565 +0200
-@@ -234,7 +234,7 @@
+--- common/cpu.c.orig	2014-08-27 20:45:08 UTC
++++ common/cpu.c
+@@ -313,7 +313,7 @@ uint32_t x264_cpu_detect( void )
  
  #elif ARCH_PPC
  
@@ -9,7 +9,7 @@
  #include <sys/sysctl.h>
  uint32_t x264_cpu_detect( void )
  {
-@@ -242,12 +242,16 @@
+@@ -321,12 +321,16 @@ uint32_t x264_cpu_detect( void )
      uint32_t cpu = 0;
  #if SYS_OPENBSD
      int      selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC };

Added: trunk/multimedia/x264/files/patch-configure
===================================================================
--- trunk/multimedia/x264/files/patch-configure	                        (rev 0)
+++ trunk/multimedia/x264/files/patch-configure	2015-06-08 12:08:06 UTC (rev 19374)
@@ -0,0 +1,25 @@
+From 9463ec0004f1bddc49c05ed8e38430a4ce1738fb Mon Sep 17 00:00:00 2001
+From: Janne Grunau <janne-x264 at 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
+@@ -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}}"
+         fi
+         ;;
+     s390|s390x)


Property changes on: trunk/multimedia/x264/files/patch-configure
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/multimedia/x264/pkg-plist
===================================================================
--- trunk/multimedia/x264/pkg-plist	2015-06-07 01:26:06 UTC (rev 19373)
+++ trunk/multimedia/x264/pkg-plist	2015-06-08 12:08:06 UTC (rev 19374)
@@ -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



More information about the Midnightbsd-cvs mailing list