mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- Fix powerpc support
- Bump PORTREVISION Submitted by: stas
This commit is contained in:
parent
c311f99b08
commit
94b594e75e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=250837
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= x264
|
||||
PORTVERSION= 0.0.20090119
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/ \
|
||||
http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
|
||||
@ -49,6 +50,8 @@ LDFLAGS+= -fstack-protector
|
||||
|
||||
.if ${ARCH}=="i386"
|
||||
MAKE_ENV+= ARCH_X86="1"
|
||||
.elif ${ARCH} == "powerpc"
|
||||
MAKE_ENV+= ARCH_PPC="1"
|
||||
.endif
|
||||
|
||||
MAKE_ENV+= ARCH=${ARCH}
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- ./Makefile.orig 2008-12-18 22:45:07.000000000 +0100
|
||||
+++ ./Makefile 2009-03-17 19:09:28.000000000 +0100
|
||||
--- Makefile.orig 2008-12-18 13:45:07.000000000 -0800
|
||||
+++ Makefile 2010-02-27 15:21:32.000000000 -0800
|
||||
@@ -26,12 +26,12 @@
|
||||
cpu-a.asm dct-32.asm
|
||||
X86SRC = $(X86SRC0:%=common/x86/%)
|
||||
@ -15,3 +15,12 @@
|
||||
ARCH_X86 = yes
|
||||
ASMSRC = $(X86SRC:-32.asm=-64.asm)
|
||||
ASFLAGS += -DARCH_X86_64
|
||||
@@ -47,7 +47,7 @@
|
||||
endif
|
||||
|
||||
# AltiVec optims
|
||||
-ifeq ($(ARCH),PPC)
|
||||
+ifeq ($(ARCH),powerpc)
|
||||
ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
|
||||
common/ppc/quant.c common/ppc/deblock.c \
|
||||
common/ppc/predict.c
|
||||
|
30
multimedia/x264-devel/files/patch-common_cpu.c
Normal file
30
multimedia/x264-devel/files/patch-common_cpu.c
Normal file
@ -0,0 +1,30 @@
|
||||
--- common/cpu.c.orig 2010-02-28 10:49:54.000000000 -0800
|
||||
+++ common/cpu.c 2010-02-28 10:56:06.000000000 -0800
|
||||
@@ -211,6 +211,27 @@
|
||||
return cpu;
|
||||
}
|
||||
|
||||
+#elif defined(SYS_FREEBSD)
|
||||
+#include <sys/sysctl.h>
|
||||
+uint32_t x264_cpu_detect( void )
|
||||
+{
|
||||
+ uint32_t cpu;
|
||||
+ int has_altivec, error;
|
||||
+ size_t length;
|
||||
+
|
||||
+ cpu = 0;
|
||||
+ has_altivec = 0;
|
||||
+ length = sizeof( has_altivec );
|
||||
+ error = sysctlbyname("hw.altivec", &has_altivec, &length, NULL, 0 );
|
||||
+
|
||||
+ if( error == 0 && has_altivec != 0 )
|
||||
+ {
|
||||
+ cpu |= X264_CPU_ALTIVEC;
|
||||
+ }
|
||||
+
|
||||
+ return cpu;
|
||||
+}
|
||||
+
|
||||
#elif defined( SYS_LINUX )
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= x264
|
||||
PORTVERSION= 0.0.20090119
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/ \
|
||||
http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
|
||||
@ -49,6 +50,8 @@ LDFLAGS+= -fstack-protector
|
||||
|
||||
.if ${ARCH}=="i386"
|
||||
MAKE_ENV+= ARCH_X86="1"
|
||||
.elif ${ARCH} == "powerpc"
|
||||
MAKE_ENV+= ARCH_PPC="1"
|
||||
.endif
|
||||
|
||||
MAKE_ENV+= ARCH=${ARCH}
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- ./Makefile.orig 2008-12-18 22:45:07.000000000 +0100
|
||||
+++ ./Makefile 2009-03-17 19:09:28.000000000 +0100
|
||||
--- Makefile.orig 2008-12-18 13:45:07.000000000 -0800
|
||||
+++ Makefile 2010-02-27 15:21:32.000000000 -0800
|
||||
@@ -26,12 +26,12 @@
|
||||
cpu-a.asm dct-32.asm
|
||||
X86SRC = $(X86SRC0:%=common/x86/%)
|
||||
@ -15,3 +15,12 @@
|
||||
ARCH_X86 = yes
|
||||
ASMSRC = $(X86SRC:-32.asm=-64.asm)
|
||||
ASFLAGS += -DARCH_X86_64
|
||||
@@ -47,7 +47,7 @@
|
||||
endif
|
||||
|
||||
# AltiVec optims
|
||||
-ifeq ($(ARCH),PPC)
|
||||
+ifeq ($(ARCH),powerpc)
|
||||
ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
|
||||
common/ppc/quant.c common/ppc/deblock.c \
|
||||
common/ppc/predict.c
|
||||
|
30
multimedia/x264/files/patch-common_cpu.c
Normal file
30
multimedia/x264/files/patch-common_cpu.c
Normal file
@ -0,0 +1,30 @@
|
||||
--- common/cpu.c.orig 2010-02-28 10:49:54.000000000 -0800
|
||||
+++ common/cpu.c 2010-02-28 10:56:06.000000000 -0800
|
||||
@@ -211,6 +211,27 @@
|
||||
return cpu;
|
||||
}
|
||||
|
||||
+#elif defined(SYS_FREEBSD)
|
||||
+#include <sys/sysctl.h>
|
||||
+uint32_t x264_cpu_detect( void )
|
||||
+{
|
||||
+ uint32_t cpu;
|
||||
+ int has_altivec, error;
|
||||
+ size_t length;
|
||||
+
|
||||
+ cpu = 0;
|
||||
+ has_altivec = 0;
|
||||
+ length = sizeof( has_altivec );
|
||||
+ error = sysctlbyname("hw.altivec", &has_altivec, &length, NULL, 0 );
|
||||
+
|
||||
+ if( error == 0 && has_altivec != 0 )
|
||||
+ {
|
||||
+ cpu |= X264_CPU_ALTIVEC;
|
||||
+ }
|
||||
+
|
||||
+ return cpu;
|
||||
+}
|
||||
+
|
||||
#elif defined( SYS_LINUX )
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
Loading…
Reference in New Issue
Block a user