[packages/xavs2] - added opt patch (drop -m32/-m64, rely on compiler default), disable asm on x32; release 2

qboosh qboosh at pld-linux.org
Wed Aug 7 19:08:30 CEST 2019


commit f9075d6956fb0f742cc310e087c423cde6609274
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Aug 7 19:10:32 2019 +0200

    - added opt patch (drop -m32/-m64, rely on compiler default), disable asm on x32; release 2

 xavs2-opt.patch | 27 +++++++++++++++++++++++++++
 xavs2.spec      |  9 ++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/xavs2.spec b/xavs2.spec
index 056ca14..3880a47 100644
--- a/xavs2.spec
+++ b/xavs2.spec
@@ -8,19 +8,22 @@ Summary:	Open-source encoder of AVS2-P2/IEEE1857.4 video coding standard
 Summary(pl.UTF-8):	Koder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych źródłach
 Name:		xavs2
 Version:	1.3
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Libraries
 #Source0Download: https://github.com/pkuvcl/xavs2/releases
 Source0:	https://github.com/pkuvcl/xavs2/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	14995147d36e633f1155c8fea7269bea
 Patch0:		%{name}-asm-arch.patch
+Patch1:		%{name}-opt.patch
 URL:		https://github.com/pkuvcl/xavs2
 %{?with_opencl:BuildRequires:	OpenCL-devel}
 %{?with_lsmash:BuildRequires:	l-smash-devel >= 1.5}
 BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	pkgconfig
+%ifarch %{ix86} %{x8664}
 BuildRequires:	yasm >= 1.2.0
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -57,6 +60,7 @@ Statyczna biblioteka xavs2.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 cd build/linux
@@ -72,6 +76,9 @@ LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
 	--bindir=%{_bindir} \
 	--includedir=%{_includedir} \
 	--libdir=%{_libdir} \
+%ifarch x32
+	--disable-asm \
+%endif
 	--disable-gpac \
 	%{!?with_lsmash:--disable-lsmash} \
 	%{!?with_opencl:--disable-opencl} \
diff --git a/xavs2-opt.patch b/xavs2-opt.patch
new file mode 100644
index 0000000..b3b7b55
--- /dev/null
+++ b/xavs2-opt.patch
@@ -0,0 +1,27 @@
+--- xavs2-1.3/build/linux/configure.orig	2018-12-20 04:20:35.000000000 +0100
++++ xavs2-1.3/build/linux/configure	2019-08-07 19:02:17.016731542 +0200
+@@ -689,16 +689,6 @@
+         AS_EXT=".asm"
+         CFLAGS="$CFLAGS -DARCH_X86_64=0"
+         ASFLAGS="$ASFLAGS -DARCH_X86_64=0 -I\$(SRCPATH)/common/x86/"
+-        if [ $compiler = GNU ]; then
+-            if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then
+-                CFLAGS="$CFLAGS -march=i686"
+-            fi
+-            if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
+-                CFLAGS="$CFLAGS -mfpmath=sse -msse -msse2"
+-            fi
+-            CFLAGS="-m32 $CFLAGS"
+-            LDFLAGS="-m32 $LDFLAGS"
+-        fi
+         if [ "$SYS" = MACOSX ]; then
+             ASFLAGS="$ASFLAGS -f macho32 -DPREFIX"
+         elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
+@@ -717,7 +707,6 @@
+         CFLAGS="$CFLAGS -DARCH_X86_64=1"
+         ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+         stack_alignment=16
+-        [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
+         if [ "$SYS" = MACOSX ]; then
+             ASFLAGS="$ASFLAGS -f macho64 -DPIC -DPREFIX"
+             if cc_check '' "-arch x86_64"; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xavs2.git/commitdiff/f9075d6956fb0f742cc310e087c423cde6609274



More information about the pld-cvs-commit mailing list