diff options
author | koobs <koobs@FreeBSD.org> | 2014-12-31 14:20:13 +0800 |
---|---|---|
committer | koobs <koobs@FreeBSD.org> | 2014-12-31 14:20:13 +0800 |
commit | da7c990dbb881827dbcb80a4666c090fa0eb86fd (patch) | |
tree | 65c63c1c55ae2e941fa6e443632825428b89b986 /multimedia | |
parent | 41d4e877f6bcfe5bfdffd6375bda19d7240d3ece (diff) | |
download | freebsd-ports-gnome-da7c990dbb881827dbcb80a4666c090fa0eb86fd.tar.gz freebsd-ports-gnome-da7c990dbb881827dbcb80a4666c090fa0eb86fd.tar.zst freebsd-ports-gnome-da7c990dbb881827dbcb80a4666c090fa0eb86fd.zip |
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
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/libx264/Makefile | 6 | ||||
-rw-r--r-- | multimedia/libx264/files/patch-Makefile | 23 | ||||
-rw-r--r-- | multimedia/libx264/files/patch-common_cpu.c | 8 | ||||
-rw-r--r-- | multimedia/libx264/files/patch-configure | 25 | ||||
-rw-r--r-- | multimedia/x264/Makefile | 3 | ||||
-rw-r--r-- | multimedia/x264/files/patch-Makefile | 23 | ||||
-rw-r--r-- | multimedia/x264/files/patch-common_cpu.c | 8 | ||||
-rw-r--r-- | multimedia/x264/files/patch-configure | 25 |
8 files changed, 96 insertions, 25 deletions
diff --git a/multimedia/libx264/Makefile b/multimedia/libx264/Makefile index ad4016d00966..926ce3ab48e9 100644 --- a/multimedia/libx264/Makefile +++ b/multimedia/libx264/Makefile @@ -49,6 +49,8 @@ CONFIGURE_ARGS+= --extra-cflags="-I${LOCALBASE}/include" \ --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 diff --git a/multimedia/libx264/files/patch-Makefile b/multimedia/libx264/files/patch-Makefile index 6d5646214e2c..52084c1fe529 100644 --- a/multimedia/libx264/files/patch-Makefile +++ b/multimedia/libx264/files/patch-Makefile @@ -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 \ diff --git a/multimedia/libx264/files/patch-common_cpu.c b/multimedia/libx264/files/patch-common_cpu.c index b1c529d67055..5d2bd7d4c068 100644 --- a/multimedia/libx264/files/patch-common_cpu.c +++ b/multimedia/libx264/files/patch-common_cpu.c @@ -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 }; diff --git a/multimedia/libx264/files/patch-configure b/multimedia/libx264/files/patch-configure new file mode 100644 index 000000000000..3830d51c01f2 --- /dev/null +++ b/multimedia/libx264/files/patch-configure @@ -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) diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile index 6e6e0e47056a..f2938b4e41f1 100644 --- a/multimedia/x264/Makefile +++ b/multimedia/x264/Makefile @@ -45,7 +45,6 @@ X264_GITVER= ${X264_COMMIT:C/^(.......).*$/\1/g} 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${LOCALBASE}/include" \ --disable-opencl \ --system-libx264 +CFLAGS_armv6+= -mcpu=arm1136jf-s + PLIST_FILES= bin/x264 PLIST_SUB+= X264_BUILD=${X264_BUILD} diff --git a/multimedia/x264/files/patch-Makefile b/multimedia/x264/files/patch-Makefile index 6d5646214e2c..6c90cc2e7a26 100644 --- a/multimedia/x264/files/patch-Makefile +++ b/multimedia/x264/files/patch-Makefile @@ -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 \ diff --git a/multimedia/x264/files/patch-common_cpu.c b/multimedia/x264/files/patch-common_cpu.c index b1c529d67055..5d2bd7d4c068 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 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 }; diff --git a/multimedia/x264/files/patch-configure b/multimedia/x264/files/patch-configure new file mode 100644 index 000000000000..3830d51c01f2 --- /dev/null +++ b/multimedia/x264/files/patch-configure @@ -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) |