[iaxclient] Add patch to fix build on aarch64
Peter Robinson
pbrobinson at fedoraproject.org
Thu Jul 3 08:53:48 UTC 2014
commit 709f38edb1120575eba7669238252a830cfc09f7
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Thu Jul 3 09:53:52 2014 +0100
Add patch to fix build on aarch64
iaxclient-portable.patch | 18 ++++++++++++++++++
iaxclient.spec | 21 +++++++--------------
2 files changed, 25 insertions(+), 14 deletions(-)
---
diff --git a/iaxclient-portable.patch b/iaxclient-portable.patch
new file mode 100644
index 0000000..5458bc0
--- /dev/null
+++ b/iaxclient-portable.patch
@@ -0,0 +1,18 @@
+--- iaxclient-2.1beta3/lib/ringbuffer.c 2008-04-07 19:05:42.000000000 +0300
++++ iaxclient-2.1beta3-portable/lib/ringbuffer.c 2014-06-16 13:01:13.766101686 +0300
+@@ -98,9 +98,14 @@
+ # define rb_ReadMemoryBarrier() OSMemoryBarrier()
+ # define rb_WriteMemoryBarrier() OSMemoryBarrier()
+ #elif defined(__GNUC__)
++ /* GCC >= 4.1 has built-in intrinsics. We'll use those */
++# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
++# define rb_FullMemoryBarrier() __sync_synchronize()
++# define rb_ReadMemoryBarrier() __sync_synchronize()
++# define rb_WriteMemoryBarrier() __sync_synchronize()
+ /* GCC understands volatile asm and "memory" to mean it
+ * should not reorder memory read/writes */
+-# if defined( __ppc__ ) || defined( __powerpc__ )
++# elif defined( __ppc__ ) || defined( __powerpc__ )
+ # define rb_FullMemoryBarrier() asm volatile("sync":::"memory")
+ # define rb_ReadMemoryBarrier() asm volatile("sync":::"memory")
+ # define rb_WriteMemoryBarrier() asm volatile("sync":::"memory")
diff --git a/iaxclient.spec b/iaxclient.spec
index 6e001e8..7bc027f 100644
--- a/iaxclient.spec
+++ b/iaxclient.spec
@@ -3,11 +3,7 @@
%define mainver 2.1
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
-%ifarch sparcv9
-%define tkphonearch sparc
-%else
%define tkphonearch %{_arch}
-%endif
Name: iaxclient
Version: %{mainver}
@@ -30,7 +26,8 @@ Patch5: iaxclient-2.1beta3-theora-detection.patch
Patch6: iaxclient-2.1beta3-implicit-DSO-libm.patch
Patch7: iaxclient-2.1beta3-arm-barriers.patch
Patch8: iaxclient-2.1beta3-format-security-fix.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch9: iaxclient-portable.patch
+
BuildRequires: speex-devel, libtheora-devel, gsm-devel, portaudio-devel, iax-devel
BuildRequires: tk-devel, gtk2-devel, SDL-devel, libogg-devel, liboggz-devel
BuildRequires: wxGTK-devel, libvidcap-devel, desktop-file-utils, libtool
@@ -99,7 +96,8 @@ wx IAX Phone Client.
%patch6 -p1 -b .DSO
%patch7 -p1 -b .arm
%patch8 -p1 -b .format-security
-autoreconf
+%patch9 -p1 -b .portable
+autoreconf -vif
chmod -x contrib/tcl/README.txt
sed -i 's|/usr/lib|%{_libdir}|g' lib/libiax2/iax-config.in
@@ -114,7 +112,6 @@ cd contrib/tcl/
make %{?_smp_mflags} LIBTOOL="%{_bindir}/libtool"
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot} LIBTOOL="%{_bindir}/libtool"
find %{buildroot} -name '*.la' -exec rm -f {} ';'
find %{buildroot} -name '*.a' -exec rm -f {} ';'
@@ -144,15 +141,12 @@ desktop-file-install --vendor "" \
cd %{buildroot}%{tcl_sitearch}/iaxclient/tkphone/
ln -s iaxcli iaxcli-Linux-%{tkphonearch}
-%clean
-rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
%doc AUTHORS COPYING.LIB ChangeLog README
%{_bindir}/iaxcomm
%{_bindir}/iaxphone
@@ -160,7 +154,6 @@ rm -rf %{buildroot}
%{_libdir}/libiaxclient.so.*
%files devel
-%defattr(-,root,root,-)
%{_bindir}/stresstest
%{_bindir}/testcall
%{_bindir}/vtestcall
@@ -169,12 +162,10 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/iaxclient.pc
%files -n tcl-iaxclient
-%defattr(-,root,root,-)
%doc contrib/tcl/README.txt
%{tcl_sitearch}/tcliaxclient0.2/
%files -n tkiaxphone
-%defattr(-,root,root,-)
%{_bindir}/run-tkiaxphone.sh
%{_bindir}/tkiaxphone
%{tcl_sitearch}/iaxclient/
@@ -182,12 +173,14 @@ rm -rf %{buildroot}
%{_datadir}/pixmaps/tkiaxphone.png
%files -n wxiax
-%defattr(-,root,root,-)
%{_bindir}/wxiax
%{_datadir}/applications/wxiax.desktop
%{_datadir}/pixmaps/wxiax.png
%changelog
+* Thu Jul 3 2014 Peter Robinson <pbrobinson at fedoraproject.org> 2.1-0.19.beta3
+- Add patch to fix build on aarch64
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1-0.18.beta3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list