diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 67 | ||||
-rw-r--r-- | xavs-0.1.55-dont-strip-symbols.patch | 12 | ||||
-rw-r--r-- | xavs-dup-asm.patch | 38 | ||||
-rw-r--r-- | xavs-dynamic-xavs.patch | 13 | ||||
-rw-r--r-- | xavs-x32-yasm.patch | 46 |
6 files changed, 199 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..db1e5c706324 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = xavs-svn + pkgdesc = XAVS is to implement high quality encoder and decoder of the Audio Video Standard of China (AVS). + pkgver = 55 + pkgrel = 1 + url = http://xavs.sourceforge.net/ + arch = i686 + arch = x86_64 + arch = arm + license = GPL + makedepends = yasm + source = xavs-svn::svn+http://svn.code.sf.net/p/xavs/code/trunk + source = https://github.com/OpenMandrivaAssociation/xavs/raw/master/xavs-0.1.55-dont-strip-symbols.patch + source = https://github.com/pld-linux/xavs/raw/master/xavs-dynamic-xavs.patch + source = xavs-dup-asm.patch + source = xavs-x32-yasm.patch + md5sums = SKIP + md5sums = 8ce1d21e378d234b949cb035c66d5655 + md5sums = f6c2726fc2c11025b868952f389c0db3 + md5sums = b39717e48edb5e8b8696e50d41c24ac0 + md5sums = d42b193cb6f8c9bfd62a0631698e29f0 + +pkgname = xavs-svn + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..25fecd338b18 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Yunhui Fu <yhfudev@gmail.com> + +pkgname=xavs-svn +pkgver=55 +pkgrel=1 +pkgdesc="XAVS is to implement high quality encoder and decoder of the Audio Video Standard of China (AVS)." +arch=(i686 x86_64 arm) +url="http://xavs.sourceforge.net/" +license=(GPL) +depends=() +makedepends=(yasm) +#options=(!strip) + +source=( + "${pkgname}::svn+http://svn.code.sf.net/p/xavs/code/trunk" + https://github.com/OpenMandrivaAssociation/xavs/raw/master/xavs-0.1.55-dont-strip-symbols.patch + https://github.com/pld-linux/xavs/raw/master/xavs-dynamic-xavs.patch + xavs-dup-asm.patch + xavs-x32-yasm.patch + ) +md5sums=( + 'SKIP' + '8ce1d21e378d234b949cb035c66d5655' + 'f6c2726fc2c11025b868952f389c0db3' + 'b39717e48edb5e8b8696e50d41c24ac0' + 'd42b193cb6f8c9bfd62a0631698e29f0' + ) + +pkgver_git() { + cd "${srcdir}/${pkgname}" + local ver="$(git show | grep commit | awk '{print $2}' )" + #printf "r%s" "${ver//[[:alpha:]]}" + echo ${ver:0:7} +} + +pkgver_svn() { + cd "${srcdir}/${pkgname}" + local ver="$(svn info | grep Revision | awk '{print $2}' )" + #printf "r%s" "${ver//[[:alpha:]]}" + echo ${ver:0:7} +} + +pkgver() { + pkgver_svn +} + +prepare() { + cd "${srcdir}/${pkgname}" + patch -Np1 -i ${srcdir}/xavs-dynamic-xavs.patch + patch -Np1 -i ${srcdir}/xavs-0.1.55-dont-strip-symbols.patch + patch -Np1 -i ${srcdir}/xavs-dup-asm.patch + patch -Np1 -i ${srcdir}/xavs-x32-yasm.patch + sed -i -e 's|$(CC) -o $@ $(OBJCLI) $(LDFLAGS) -L. -lxavs|$(CC) -o $@ $(OBJCLI) -L. -lxavs $(LDFLAGS)|' Makefile + sed -i -e 's|xavs$(EXE): $(OBJCLI) $(SONAME)|xavs$(EXE): $(OBJCLI) $(SONAME) libxavs.a|' Makefile +} + +build() { + cd "${srcdir}/${pkgname}" + ./configure --enable-shared --disable-asm --prefix=/usr + make +} + +package() { + cd "${srcdir}/${pkgname}" + make DESTDIR="${pkgdir}" install + install -m 644 libxavs.a ${pkgdir}/usr/lib/libxavs.a +} diff --git a/xavs-0.1.55-dont-strip-symbols.patch b/xavs-0.1.55-dont-strip-symbols.patch new file mode 100644 index 000000000000..439a15f2fcec --- /dev/null +++ b/xavs-0.1.55-dont-strip-symbols.patch @@ -0,0 +1,12 @@ +--- xavs-0.1.55/configure~ 2011-11-24 10:42:06.000000000 +0100 ++++ xavs-0.1.55/configure 2011-11-24 11:49:04.908528371 +0100 +@@ -404,8 +404,7 @@ if [ "$pic" = "yes" ] ; then + fi + + if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -s -fomit-frame-pointer" +- LDFLAGS="$LDFLAGS -s" ++ CFLAGS="$CFLAGS -fomit-frame-pointer" + fi + + if [ "$debug" = "yes" ]; then diff --git a/xavs-dup-asm.patch b/xavs-dup-asm.patch new file mode 100644 index 000000000000..9d9db9974a2c --- /dev/null +++ b/xavs-dup-asm.patch @@ -0,0 +1,38 @@ +From 8300fbf4918bca2af1af2aee6a337815e90b51e1 Mon Sep 17 00:00:00 2001 +From: Greg Nietsky <gregory@distrotech.co.za> +Date: Thu, 21 Nov 2013 12:11:32 +0200 +Subject: [PATCH] Remove duplicate deffinitions + +--- + common/i386/cpu-a.asm | 1 - + common/i386/deblock_inter.asm | 2 -- + 2 files changed, 3 deletions(-) + +diff --git a/common/i386/cpu-a.asm b/common/i386/cpu-a.asm +index ad883cf..cf6a4eb 100644 +--- a/common/i386/cpu-a.asm ++++ b/common/i386/cpu-a.asm +@@ -37,7 +37,6 @@ SECTION .text + + cglobal xavs_cpu_cpuid_test + cglobal xavs_cpu_cpuid +-cglobal xavs_emms + + ALIGN 16 + ;----------------------------------------------------------------------------- +diff --git a/common/i386/deblock_inter.asm b/common/i386/deblock_inter.asm +index d6d7208..84e96f6 100644 +--- a/common/i386/deblock_inter.asm ++++ b/common/i386/deblock_inter.asm +@@ -9,8 +9,6 @@ dw_4: times 8 dw 4 + + + SECTION .text +-cglobal xavs_deblock_v_chroma_mmxext +-cglobal xavs_deblock_h_chroma_mmxext + + + ; out: %4 = |%1-%2|>%3 +-- +2.6.2 + diff --git a/xavs-dynamic-xavs.patch b/xavs-dynamic-xavs.patch new file mode 100644 index 000000000000..4b17b2cb92a2 --- /dev/null +++ b/xavs-dynamic-xavs.patch @@ -0,0 +1,13 @@ +--- xavs/Makefile.orig 2011-07-01 20:23:47.000000000 +0200 ++++ xavs/Makefile 2011-07-01 21:16:09.407118004 +0200 +@@ -59,8 +59,8 @@ + $(SONAME): .depend $(OBJS) $(OBJASM) + $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SOFLAGS) $(LDFLAGS) + +-xavs$(EXE): $(OBJCLI) libxavs.a +- $(CC) -o $@ $+ $(LDFLAGS) ++xavs$(EXE): $(OBJCLI) $(SONAME) ++ $(CC) -o $@ $(OBJCLI) $(LDFLAGS) -L. -lxavs + + xavsvfw.dll: libxavs.a $(wildcard vfw/*.c vfw/*.h) + make -C vfw/build/cygwin diff --git a/xavs-x32-yasm.patch b/xavs-x32-yasm.patch new file mode 100644 index 000000000000..863a30f3a6e1 --- /dev/null +++ b/xavs-x32-yasm.patch @@ -0,0 +1,46 @@ +From 358587b8a881bca4d933b7a1dd9471322b9f4bd7 Mon Sep 17 00:00:00 2001 +From: Greg Nietsky <gregory@distrotech.co.za> +Date: Thu, 21 Nov 2013 12:05:25 +0200 +Subject: [PATCH 1/2] Add support for x32 yasm + +--- + configure | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 2026833..e7c1ce3 100755 +--- a/configure ++++ b/configure +@@ -155,6 +155,7 @@ host_cpu="${host%%-*}" + host="${host#*-}" + host_vendor="${host%%-*}" + host_os="${host#*-}" ++host_ver="${host_os#*-}" + + case $host_os in + beos*) +@@ -191,6 +192,9 @@ case $host_os in + SYS="LINUX" + CFLAGS="$CFLAGS -DHAVE_MALLOC_H" + LDFLAGS="$LDFLAGS -lm" ++ if [ "${host_ver}" == "gnux32" ];then ++ ABI="X32"; ++ fi; + ;; + cygwin*) + SYS="MINGW" +@@ -242,8 +246,10 @@ case $host_cpu in + LDFLAGS="$LDFLAGS -arch x86_64" + elif [ "$SYS" = MINGW ]; then + ASFLAGS="$ASFLAGS -f win32 -m amd64 -DPREFIX" ++ elif [ "$ABI" = X32 ]; then ++ ASFLAGS="$ASFLAGS -f elfx32 -m amd64" + else +- ASFLAGS="$ASFLAGS -f elf -m amd64" ++ ASFLAGS="$ASFLAGS -f elf64 -m amd64" + fi + ;; + powerpc|powerpc64) +-- +2.6.2 + |