[packages/davs2] - 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 18:58:58 CEST 2019


commit e1c98151ca6948a18d9357b59ebbeb254b60b4a3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Aug 7 19:01:00 2019 +0200

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

 davs2-opt.patch | 27 +++++++++++++++++++++++++++
 davs2.spec      |  9 ++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/davs2.spec b/davs2.spec
index 3076c4a..3c1e4c7 100644
--- a/davs2.spec
+++ b/davs2.spec
@@ -7,7 +7,7 @@ Summary:	Open-source decoder of AVS2-P2/IEEE1857.4 video coding standard
 Summary(pl.UTF-8):	Dekoder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych źródłach
 Name:		davs2
 Version:	1.6
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Libraries
 #Source0Download: https://github.com/pkuvcl/davs2/releases
@@ -15,13 +15,16 @@ Source0:	https://github.com/pkuvcl/davs2/archive/%{version}/%{name}-%{version}.t
 # Source0-md5:	c8861c1220c05a172b9ce472cbf929af
 Patch0:		%{name}-extern.patch
 Patch1:		%{name}-gcc8-fix.patch
+Patch2:		%{name}-opt.patch
 URL:		https://github.com/pkuvcl/davs2
 %{?with_opencl:BuildRequires:	OpenCL-devel}
 BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.674
 BuildRequires:	sed >= 4.0
+%ifarch %{ix86} %{x8664}
 BuildRequires:	yasm >= 1.2.0
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -61,6 +64,7 @@ Statyczna biblioteka davs2.
 
 %undos source/common/vec/intrinsic_{deblock_avx2,idct_avx2,inter_pred,inter_pred_avx2,intra-pred_avx2,pixel_avx,sao_avx2}.cc
 %patch1 -p1
+%patch2 -p1
 
 %build
 cd build/linux
@@ -76,6 +80,9 @@ LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
 	--bindir=%{_bindir} \
 	--includedir=%{_includedir} \
 	--libdir=%{_libdir} \
+%ifarch x32
+	--disable-asm \
+%endif
 	%{!?with_opencl:--disable-opencl} \
 	--enable-pic \
 	--enable-shared \
diff --git a/davs2-opt.patch b/davs2-opt.patch
new file mode 100644
index 0000000..afa3ec9
--- /dev/null
+++ b/davs2-opt.patch
@@ -0,0 +1,27 @@
+--- davs2-1.6/build/linux/configure.orig	2018-11-15 09:15:32.000000000 +0100
++++ davs2-1.6/build/linux/configure	2019-08-07 18:54:44.563834364 +0200
+@@ -659,16 +659,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
+@@ -687,7 +677,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/davs2.git/commitdiff/e1c98151ca6948a18d9357b59ebbeb254b60b4a3



More information about the pld-cvs-commit mailing list