[packages/flac] - fix build on x32 arch
baggins
baggins at pld-linux.org
Thu Dec 25 13:35:33 CET 2014
commit 85c00d196b92a2e281220ae39b28d9a8c4131191
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Dec 25 12:38:15 2014 +0000
- fix build on x32 arch
flac.spec | 4 ++++
x32.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
---
diff --git a/flac.spec b/flac.spec
index f1f441c..cf2262e 100644
--- a/flac.spec
+++ b/flac.spec
@@ -13,6 +13,7 @@ Group: Libraries
Source0: http://downloads.xiph.org/releases/flac/%{name}-%{version}.tar.xz
# Source0-md5: b9922c9a0378c88d3e901b234f852698
Patch0: %{name}-opt.patch
+Patch1: x32.patch
URL: http://xiph.org/flac/
BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1:1.11
@@ -116,6 +117,7 @@ Wtyczka dla XMMS umożliwiająca odtwarzanie plików w formacie FLAC.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%{__rm} m4/ogg.m4
@@ -144,10 +146,12 @@ rm -rf $RPM_BUILD_ROOT
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+%if %{with xmms}
%{__rm} $RPM_BUILD_ROOT%{xmms_input_plugindir}/*.la
%if %{with static_libs}
%{__rm} $RPM_BUILD_ROOT%{xmms_input_plugindir}/*.a
%endif
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..b4c05ba
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,36 @@
+--- flac-1.3.1/configure.ac~ 2014-12-25 12:11:41.000000000 +0000
++++ flac-1.3.1/configure.ac 2014-12-25 12:28:28.561894846 +0000
+@@ -150,6 +150,7 @@
+ *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
+ *-*-darwin*) OBJ_FORMAT=macho ;;
+ *emx*) OBJ_FORMAT=aout ;;
++ *gnux32*) OBJ_FORMAT=elfx32 ;;
+ *) OBJ_FORMAT=elf ;;
+ esac
+ AC_SUBST(OBJ_FORMAT)
+@@ -370,6 +371,12 @@
+ CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
++ fi
++
++ if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elfx32; then
++ CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
++ CFLAGS="$CFLAGS -fvisibility=hidden"
++ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ fi
+
+ if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then
+--- flac-1.3.1/src/libFLAC/ia32/nasm.h~ 2014-11-27 01:19:47.000000000 +0000
++++ flac-1.3.1/src/libFLAC/ia32/nasm.h 2014-12-25 12:31:46.790820947 +0000
+@@ -50,6 +50,10 @@
+ %idefine code_section section .text align=16
+ %idefine data_section section .data align=32
+ %idefine bss_section section .bss align=32
++%elifdef OBJ_FORMAT_elfx32
++ %idefine code_section section .text align=16
++ %idefine data_section section .data align=32
++ %idefine bss_section section .bss align=32
+ %else
+ %error unsupported object format!
+ %endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/flac.git/commitdiff/85c00d196b92a2e281220ae39b28d9a8c4131191
More information about the pld-cvs-commit
mailing list