]> git.pld-linux.org Git - packages/davs2.git/commitdiff
- added opt patch (drop -m32/-m64, rely on compiler default), disable asm on x32... auto/th/davs2-1.6-2
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 7 Aug 2019 17:01:00 +0000 (19:01 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 7 Aug 2019 17:01:00 +0000 (19:01 +0200)
davs2-opt.patch [new file with mode: 0644]
davs2.spec

diff --git a/davs2-opt.patch b/davs2-opt.patch
new file mode 100644 (file)
index 0000000..afa3ec9
--- /dev/null
@@ -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
index 3076c4a14f10aeb097354fa0aa7ade0c775764b4..3c1e4c7b7ea5bcd11fd80a624a4240048afdf53d 100644 (file)
@@ -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 \
This page took 0.097332 seconds and 4 git commands to generate.