Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2014 06:20:14 +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: r375870 - in head/multimedia: libx264 libx264/files x264 x264/files
Message-ID:  <201412310620.sBV6KElS041843@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Wed Dec 31 06:20:13 2014
New Revision: 375870
URL: https://svnweb.freebsd.org/changeset/ports/375870
QAT: https://qat.redports.org/buildarchive/r375870/

Log:
  multimedia/{lib}x264: Fix build on ARMv6
  
  - Fix build for missing symbols on ARMv6 [1]
  - Backport upstream 9463ec00 to fix default AS on ARM [2]
  - Remove unecessary WRKSRC override (x264)
  - Whitespace alignment
  
  [2] http://git.videolan.org/?p=x264.git;a=patch;h=9463ec
  
  PR:		196033 [1]
  Submitted by:	Mikael Urandar <mikael.urankar at gmail com> [1]
  Tested by:	sbruno

Added:
  head/multimedia/libx264/files/patch-configure   (contents, props changed)
  head/multimedia/x264/files/patch-configure   (contents, props changed)
Modified:
  head/multimedia/libx264/Makefile
  head/multimedia/libx264/files/patch-Makefile
  head/multimedia/libx264/files/patch-common_cpu.c
  head/multimedia/x264/Makefile
  head/multimedia/x264/files/patch-Makefile
  head/multimedia/x264/files/patch-common_cpu.c

Modified: head/multimedia/libx264/Makefile
==============================================================================
--- head/multimedia/libx264/Makefile	Wed Dec 31 06:11:27 2014	(r375869)
+++ head/multimedia/libx264/Makefile	Wed Dec 31 06:20:13 2014	(r375870)
@@ -49,6 +49,8 @@ CONFIGURE_ARGS+=	--extra-cflags="-I${LOC
 			--enable-static --enable-shared \
 			--disable-opencl
 
+CFLAGS_armv6+=		-mcpu=arm1136jf-s
+
 PATHFIX_MAKEFILEIN=	Makefile
 PLIST_SUB+=		X264_BUILD=${X264_BUILD}
 
@@ -62,8 +64,8 @@ USE_GCC=	any
 
 .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

Modified: head/multimedia/libx264/files/patch-Makefile
==============================================================================
--- head/multimedia/libx264/files/patch-Makefile	Wed Dec 31 06:11:27 2014	(r375869)
+++ head/multimedia/libx264/files/patch-Makefile	Wed Dec 31 06:20:13 2014	(r375870)
@@ -1,23 +1,23 @@
---- Makefile.orig       2014-08-27 15:45:08.000000000 -0500
-+++ Makefile    2014-10-21 16:18:59.299348000 -0500
-@@ -85,12 +85,12 @@
+--- Makefile.orig	2014-12-31 01:23:15 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 @@
+@@ -104,7 +104,14 @@ endif
  endif
-
+ 
  # AltiVec optims
 -ifeq ($(ARCH),PPC)
 +ifeq ($(ARCH),powerpc)
@@ -31,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: head/multimedia/libx264/files/patch-common_cpu.c
==============================================================================
--- head/multimedia/libx264/files/patch-common_cpu.c	Wed Dec 31 06:11:27 2014	(r375869)
+++ head/multimedia/libx264/files/patch-common_cpu.c	Wed Dec 31 06:20:13 2014	(r375870)
@@ -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: head/multimedia/libx264/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/libx264/files/patch-configure	Wed Dec 31 06:20:13 2014	(r375870)
@@ -0,0 +1,25 @@
+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
+@@ -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)

Modified: head/multimedia/x264/Makefile
==============================================================================
--- head/multimedia/x264/Makefile	Wed Dec 31 06:11:27 2014	(r375869)
+++ head/multimedia/x264/Makefile	Wed Dec 31 06:20:13 2014	(r375870)
@@ -45,7 +45,6 @@ X264_GITVER=	${X264_COMMIT:C/^(.......).
 X264_SNAPSHOT=	20140827
 
 USES=		gmake pkgconfig tar:bzip2
-WRKSRC=		${WRKDIR}/${DISTNAME}
 USE_LDCONFIG=	yes
 HAS_CONFIGURE=	yes
 
@@ -71,6 +70,8 @@ CONFIGURE_ARGS+=	--extra-cflags="-I${LOC
 			--disable-opencl \
 			--system-libx264
 
+CFLAGS_armv6+=		-mcpu=arm1136jf-s
+
 PLIST_FILES=	bin/x264
 PLIST_SUB+=	X264_BUILD=${X264_BUILD}
 

Modified: head/multimedia/x264/files/patch-Makefile
==============================================================================
--- head/multimedia/x264/files/patch-Makefile	Wed Dec 31 06:11:27 2014	(r375869)
+++ head/multimedia/x264/files/patch-Makefile	Wed Dec 31 06:20:13 2014	(r375870)
@@ -1,23 +1,23 @@
---- Makefile.orig       2014-08-27 15:45:08.000000000 -0500
-+++ Makefile    2014-10-21 16:18:59.299348000 -0500
-@@ -85,12 +85,12 @@
+--- 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 @@
+@@ -104,7 +104,14 @@ endif
  endif
-
+ 
  # AltiVec optims
 -ifeq ($(ARCH),PPC)
 +ifeq ($(ARCH),powerpc)
@@ -31,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: head/multimedia/x264/files/patch-common_cpu.c
==============================================================================
--- head/multimedia/x264/files/patch-common_cpu.c	Wed Dec 31 06:11:27 2014	(r375869)
+++ head/multimedia/x264/files/patch-common_cpu.c	Wed Dec 31 06:20:13 2014	(r375870)
@@ -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: head/multimedia/x264/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/x264/files/patch-configure	Wed Dec 31 06:20:13 2014	(r375870)
@@ -0,0 +1,25 @@
+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
+@@ -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)



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