From be4659ebff230c85615ec5585d2b0de9965c6ae6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 23 Feb 2014 19:50:38 +0100 Subject: avoid variable overriding, ARCH is used in OpenADK, rename to XARCH, hopefully makes release build on hudson happy --- package/libx264/Makefile | 5 +- package/libx264/patches/patch-Makefile | 45 ++++++++- package/libx264/patches/patch-configure | 163 +++++++++++++++++++++++++++++++- 3 files changed, 204 insertions(+), 9 deletions(-) (limited to 'package/libx264') diff --git a/package/libx264/Makefile b/package/libx264/Makefile index a38bff5f2..f81577327 100644 --- a/package/libx264/Makefile +++ b/package/libx264/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libx264 # actually is git checkout from 22.01.2014 PKG_VERSION:= 1.0.1 -PKG_RELEASE:= 5 +PKG_RELEASE:= 6 PKG_MD5SUM:= 6be3e8adeaf6b007bbc04026b6ebd304 PKG_DESCR:= H264 encoding library PKG_SECTION:= libs @@ -33,9 +33,6 @@ CONFIGURE_ARGS+= --disable-cli \ --sysroot=${STAGING_TARGET_DIR} \ --cross-prefix=$(TARGET_CROSS) -post-configure: - cd $(WRKBUILD); $(MAKE) depend - libx264-install: $(INSTALL_DIR) $(IDIR_LIBX264)/usr/lib $(CP) $(WRKINST)/usr/lib/libx264*.so* \ diff --git a/package/libx264/patches/patch-Makefile b/package/libx264/patches/patch-Makefile index 8d7d883b1..c9835f0b0 100644 --- a/package/libx264/patches/patch-Makefile +++ b/package/libx264/patches/patch-Makefile @@ -1,5 +1,48 @@ --- libx264-1.0.1.orig/Makefile 2014-01-22 11:20:21.000000000 +0100 -+++ libx264-1.0.1/Makefile 2014-02-22 20:15:00.000000000 +0100 ++++ libx264-1.0.1/Makefile 2014-02-23 19:45:12.000000000 +0100 +@@ -85,13 +85,13 @@ X86SRC0 += sad-a.asm + endif + X86SRC = $(X86SRC0:%=common/x86/%) + +-ifeq ($(ARCH),X86) ++ifeq ($(XARCH),X86) + ARCH_X86 = yes + ASMSRC = $(X86SRC) common/x86/pixel-32.asm + ASFLAGS += -DARCH_X86_64=0 + endif + +-ifeq ($(ARCH),X86_64) ++ifeq ($(XARCH),X86_64) + ARCH_X86 = yes + ASMSRC = $(X86SRC:-32.asm=-64.asm) common/x86/trellis-64.asm + ASFLAGS += -DARCH_X86_64=1 +@@ -107,7 +107,7 @@ endif + endif + + # AltiVec optims +-ifeq ($(ARCH),PPC) ++ifeq ($(XARCH),PPC) + ifneq ($(AS),) + SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \ + common/ppc/quant.c common/ppc/deblock.c \ +@@ -116,7 +116,7 @@ endif + endif + + # NEON optims +-ifeq ($(ARCH),ARM) ++ifeq ($(XARCH),ARM) + 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 \ +@@ -127,7 +127,7 @@ endif + endif + + # VIS optims +-ifeq ($(ARCH),UltraSPARC) ++ifeq ($(XARCH),UltraSPARC) + ifeq ($(findstring HIGH_BIT_DEPTH, $(CONFIG)),) + ASMSRC += common/sparc/pixel.asm + OBJASM = $(ASMSRC:%.asm=%.o) @@ -201,7 +201,10 @@ $(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(O .depend: config.mak diff --git a/package/libx264/patches/patch-configure b/package/libx264/patches/patch-configure index 09b9f1fff..36667e427 100644 --- a/package/libx264/patches/patch-configure +++ b/package/libx264/patches/patch-configure @@ -1,6 +1,60 @@ --- libx264-1.0.1.orig/configure 2014-01-22 11:20:21.000000000 +0100 -+++ libx264-1.0.1/configure 2014-01-22 19:42:21.000000000 +0100 -@@ -662,7 +662,7 @@ case $host_cpu in ++++ libx264-1.0.1/configure 2014-02-23 19:48:57.000000000 +0100 +@@ -560,7 +560,7 @@ LDFLAGS="$LDFLAGS $libm" + aligned_stack=1 + case $host_cpu in + i*86) +- ARCH="X86" ++ XARCH="X86" + AS="yasm" + ASFLAGS="$ASFLAGS -O2" + if [ $compiler = GNU ]; then +@@ -600,7 +600,7 @@ case $host_cpu in + fi + ;; + x86_64) +- ARCH="X86_64" ++ XARCH="X86_64" + AS="yasm" + [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" + if [ "$SYS" = MACOSX ]; then +@@ -620,7 +620,7 @@ case $host_cpu in + fi + ;; + powerpc|powerpc64) +- ARCH="PPC" ++ XARCH="PPC" + if [ $asm = auto ] ; then + define HAVE_ALTIVEC + AS="${AS-${cross_prefix}gcc}" +@@ -633,11 +633,11 @@ case $host_cpu in + fi + ;; + sparc) +- ARCH="SPARC" ++ XARCH="SPARC" + case $(uname -m) in + sun4u|sun4v) + if [ $asm = auto ]; then +- ARCH="UltraSPARC" ++ XARCH="UltraSPARC" + if ! echo $CFLAGS | grep -Eq '\-mcpu' ; then + CFLAGS="$CFLAGS -mcpu=ultrasparc" + LDFLAGS="$LDFLAGS -mcpu=ultrasparc" +@@ -649,10 +649,10 @@ case $host_cpu in + esac + ;; + mips|mipsel|mips64|mips64el) +- ARCH="MIPS" ++ XARCH="MIPS" + ;; + arm*) +- ARCH="ARM" ++ XARCH="ARM" + if [ "$SYS" = MACOSX ] ; then + AS="${AS-extras/gas-preprocessor.pl $CC}" + ASFLAGS="$ASFLAGS -DPREFIX -DPIC" # apple's ld doesn't support movw/movt relocations at all +@@ -662,23 +662,23 @@ case $host_cpu in LDFLAGS="$LDFLAGS -arch armv7" fi else @@ -9,8 +63,74 @@ fi ;; s390|s390x) -@@ -1007,9 +1007,9 @@ if [ "$debug" = "yes" ]; then - elif [ $ARCH = ARM ]; then +- ARCH="S390" ++ XARCH="S390" + ;; + hppa*|parisc*) +- ARCH="PARISC" ++ XARCH="PARISC" + ;; + ia64) +- ARCH="IA64" ++ XARCH="IA64" + ;; + alpha*) +- ARCH="ALPHA" ++ XARCH="ALPHA" + ;; + *) +- ARCH="$(echo $host_cpu | tr a-z A-Z)" ++ XARCH="$(echo $host_cpu | tr a-z A-Z)" + ;; + esac + ASFLAGS="$ASFLAGS -DHAVE_ALIGNED_STACK=${aligned_stack}" +@@ -713,11 +713,11 @@ if [ $compiler != ICL ]; then + fi + fi + +-if [ $shared = yes -a \( $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" -o $ARCH = "ARM" -o $ARCH = "IA64" -o $ARCH = "PARISC" -o $ARCH = "MIPS" \) ] ; then ++if [ $shared = yes -a \( $XARCH = "X86_64" -o $XARCH = "PPC" -o $XARCH = "ALPHA" -o $XARCH = "ARM" -o $XARCH = "IA64" -o $XARCH = "PARISC" -o $XARCH = "MIPS" \) ] ; then + pic="yes" + fi + +-if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then ++if [ $asm = auto -a \( $XARCH = X86 -o $XARCH = X86_64 \) ] ; then + if ! as_check "vpmovzxwd ymm0, xmm0" ; then + VER=`($AS --version || echo no assembler) 2>/dev/null | head -n 1` + echo "Found $VER" +@@ -758,7 +758,7 @@ fi + [ $asm = no ] && AS="" + [ "x$AS" = x ] && asm="no" || asm="yes" + +-define ARCH_$ARCH ++define ARCH_$XARCH + define SYS_$SYS + + # skip endianness check for Intel Compiler, as all supported platforms are little. the -ipo flag will also cause the check to fail +@@ -834,7 +834,7 @@ if cc_check "math.h" "-Werror" "return l + define HAVE_LOG2F + fi + +-if [ "$SYS" = "LINUX" -a \( "$ARCH" = "X86" -o "$ARCH" = "X86_64" \) ] && cc_check "sys/mman.h" "" "MADV_HUGEPAGE;" ; then ++if [ "$SYS" = "LINUX" -a \( "$XARCH" = "X86" -o "$XARCH" = "X86_64" \) ] && cc_check "sys/mman.h" "" "MADV_HUGEPAGE;" ; then + define HAVE_THP + fi + +@@ -990,7 +990,7 @@ if [ "$pic" = "yes" ] ; then + ASFLAGS="$ASFLAGS -DPIC" + # resolve textrels in the x86 asm + cc_check stdio.h "-shared -Wl,-Bsymbolic" && SOFLAGS="$SOFLAGS -Wl,-Bsymbolic" +- [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" ++ [ $SYS = SunOS -a "$XARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" + fi + + if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +@@ -1004,19 +1004,19 @@ fi + + if [ "$debug" = "yes" ]; then + CFLAGS="-O1 -g $CFLAGS" +-elif [ $ARCH = ARM ]; then ++elif [ $XARCH = ARM ]; then # arm-gcc-4.2 produces incorrect output with -ffast-math # and it doesn't save any speed anyway on 4.4, so disable it - CFLAGS="-O3 -fno-fast-math $CFLAGS" @@ -21,3 +141,38 @@ fi if cc_check '' -fno-tree-vectorize ; then + CFLAGS="$CFLAGS -fno-tree-vectorize" + fi + +-if [ $SYS = WINDOWS -a $ARCH = X86 -a $compiler = GNU ] ; then ++if [ $SYS = WINDOWS -a $XARCH = X86 -a $compiler = GNU ] ; then + # workaround gcc/ld bug with alignment of static variables/arrays that are initialized to zero + cc_check '' -fno-zero-initialized-in-bss && CFLAGS="$CFLAGS -fno-zero-initialized-in-bss" + fi +@@ -1117,7 +1117,7 @@ if [ $compiler = GNU ]; then + else + CFLAGS="$(intel_cflags $CFLAGS)" + # icc does not define __SSE__ until SSE2 optimization and icl never defines it or _M_IX86_FP +- [ \( $ARCH = X86_64 -o $ARCH = X86 \) -a $asm = yes ] && ! cpp_check "" "" "defined(__SSE__)" && define __SSE__ ++ [ \( $XARCH = X86_64 -o $XARCH = X86 \) -a $asm = yes ] && ! cpp_check "" "" "defined(__SSE__)" && define __SSE__ + PROF_GEN_CC="${QPRE}prof-gen ${QPRE}prof-dir." + PROF_GEN_LD= + PROF_USE_CC="${QPRE}prof-use ${QPRE}prof-dir." +@@ -1146,7 +1146,7 @@ exec_prefix=$exec_prefix + bindir=$bindir + libdir=$libdir + includedir=$includedir +-ARCH=$ARCH ++XARCH=$XARCH + SYS=$SYS + CC=$CC + CFLAGS=$CFLAGS +@@ -1260,7 +1260,7 @@ gpl_filters="" + [ $gpl = yes ] && filters="$filters $gpl_filters" + + cat > conftest.log <