[packages/qmmp-plugin-pack] - added x32 patch; release 2
qboosh
qboosh at pld-linux.org
Wed May 24 16:32:54 CEST 2017
commit 57e0716b69805588fd7165fcbc48a31081526ba0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed May 24 16:33:40 2017 +0200
- added x32 patch; release 2
qmmp-plugin-pack-x32.patch | 99 ++++++++++++++++++++++++++++++++++++++++++++++
qmmp-plugin-pack.spec | 4 +-
2 files changed, 102 insertions(+), 1 deletion(-)
---
diff --git a/qmmp-plugin-pack.spec b/qmmp-plugin-pack.spec
index f2cf89a..4219b30 100644
--- a/qmmp-plugin-pack.spec
+++ b/qmmp-plugin-pack.spec
@@ -2,11 +2,12 @@ Summary: Qmmp Plugin Pack
Summary(pl.UTF-8): Zestaw wtyczek dla odtwarzacza Qmmp
Name: qmmp-plugin-pack
Version: 1.1.3
-Release: 1
+Release: 2
License: GPL v2+
Group: X11/Applications/Multimedia
Source0: http://qmmp.ylsoftware.com/files/plugins/%{name}-%{version}.tar.bz2
# Source0-md5: a6ebe7b16494360bfdc6ce30cc28f7bd
+Patch0: %{name}-x32.patch
URL: http://qmmp.ylsoftware.com/plugins.php
BuildRequires: Qt5Widgets-devel >= 5.4.0
BuildRequires: cmake >= 2.8.11
@@ -110,6 +111,7 @@ libxmp.
%prep
%setup -q
+%patch0 -p1
%build
install -d build
diff --git a/qmmp-plugin-pack-x32.patch b/qmmp-plugin-pack-x32.patch
new file mode 100644
index 0000000..6d67b90
--- /dev/null
+++ b/qmmp-plugin-pack-x32.patch
@@ -0,0 +1,99 @@
+--- qmmp-plugin-pack-1.1.3/src/Input/ffap/CMakeLists.txt.orig 2016-10-04 14:45:00.000000000 +0200
++++ qmmp-plugin-pack-1.1.3/src/Input/ffap/CMakeLists.txt 2017-05-24 16:27:29.130890035 +0200
+@@ -59,16 +59,29 @@
+
+ message("-- Architecture: x86")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
++ IF(LIB_SUFFIX STREQUAL "x32")
++ ADD_DEFINITIONS(-DARCH_X86_32)
++
++ add_custom_command(OUTPUT x86inc.o
++ COMMAND yasm ARGS -m amd64 -f elfx32 -DARCH_X86_64 -DPIC x86inc.asm -o ${CMAKE_CURRENT_BINARY_DIR}/x86inc.o
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
++ COMMENT "compiling x86inc.asm")
++ add_custom_command(OUTPUT dsputil_yasm.o
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
++ COMMAND yasm ARGS -m amd64 -f elfx32 -DARCH_X86_64 -DPIC dsputil_yasm.asm -o ${CMAKE_CURRENT_BINARY_DIR}/dsputil_yasm.o
++ DEPENDS x86inc.o COMMENT "compiling dsputil_yasm.asm")
++ ELSE(LIB_SUFFIX STREQUAL "x32")
+ ADD_DEFINITIONS(-DARCH_X86_64)
+
+ add_custom_command(OUTPUT x86inc.o
+ COMMAND yasm ARGS -m amd64 -f elf64 -DARCH_X86_64 -DPIC x86inc.asm -o ${CMAKE_CURRENT_BINARY_DIR}/x86inc.o
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "compiling x86inc.asm")
+ add_custom_command(OUTPUT dsputil_yasm.o
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND yasm ARGS -m amd64 -f elf64 -DARCH_X86_64 -DPIC dsputil_yasm.asm -o ${CMAKE_CURRENT_BINARY_DIR}/dsputil_yasm.o
+ DEPENDS x86inc.o COMMENT "compiling dsputil_yasm.asm")
++ ENDIF(LIB_SUFFIX STREQUAL "x32")
+
+ message("-- Architecture: x86_64")
+ ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86)$")
+--- qmmp-plugin-pack-1.1.3/src/Input/ffap/ffap.c.orig 2016-10-04 14:45:00.000000000 +0200
++++ qmmp-plugin-pack-1.1.3/src/Input/ffap/ffap.c 2017-05-24 16:25:39.245492751 +0200
+@@ -47,6 +47,9 @@
+ #include <math.h>
+ #include "ffap.h"
+
++#if ARCH_X86_32 || ARCH_X86_64
++#include <cpuid.h>
++#endif
+
+ #if defined(_WIN32) && ! defined(_MSC_VER)
+ #include <malloc.h>
+@@ -1760,38 +1763,16 @@
+ uint32_t max_std_level, max_ext_level, std_caps=0, ext_caps=0;
+
+ #if ARCH_X86_32
+- x86_reg a, c;
+- __asm__ volatile (
+- /* See if CPUID instruction is supported ... */
+- /* ... Get copies of EFLAGS into eax and ecx */
+- "pushfl\n\t"
+- "pop %0\n\t"
+- "mov %0, %1\n\t"
+-
+- /* ... Toggle the ID bit in one copy and store */
+- /* to the EFLAGS reg */
+- "xor $0x200000, %0\n\t"
+- "push %0\n\t"
+- "popfl\n\t"
+-
+- /* ... Get the (hopefully modified) EFLAGS */
+- "pushfl\n\t"
+- "pop %0\n\t"
+- : "=a" (a), "=c" (c)
+- :
+- : "cc"
+- );
+-
+- if (a == c) {
++ if (__get_cpuid_max(0, NULL) == 0) {
+ trace ("ffap: cpuid is not supported\n");
+ return 0; /* CPUID not supported */
+ }
+ #endif
+
+- cpuid(0, max_std_level, ebx, ecx, edx);
++ __get_cpuid(0, &max_std_level, &ebx, &ecx, &edx);
+
+ if(max_std_level >= 1){
+- cpuid(1, eax, ebx, ecx, std_caps);
++ __get_cpuid(1, &eax, &ebx, &ecx, &std_caps);
+ if (std_caps & (1<<23))
+ rval |= FF_MM_MMX;
+ if (std_caps & (1<<25))
+@@ -1812,10 +1793,10 @@
+ ;
+ }
+
+- cpuid(0x80000000, max_ext_level, ebx, ecx, edx);
++ __get_cpuid(0x80000000, &max_ext_level, &ebx, &ecx, &edx);
+
+ if(max_ext_level >= 0x80000001){
+- cpuid(0x80000001, eax, ebx, ecx, ext_caps);
++ __get_cpuid(0x80000001, &eax, &ebx, &ecx, &ext_caps);
+ if (ext_caps & (1<<31))
+ rval |= FF_MM_3DNOW;
+ if (ext_caps & (1<<30))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qmmp-plugin-pack.git/commitdiff/57e0716b69805588fd7165fcbc48a31081526ba0
More information about the pld-cvs-commit
mailing list