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

diff --git a/xavs2-opt.patch b/xavs2-opt.patch
new file mode 100644 (file)
index 0000000..b3b7b55
--- /dev/null
@@ -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
index 056ca1478ed07d5ec361fa418e2ef7f2cd850595..3880a47f532639e192208e553d1f288673ebe8b1 100644 (file)
@@ -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} \
This page took 0.09935 seconds and 4 git commands to generate.