[pjproject] Fix endian support for aarch64, Add speexdsp-devel dep as speex_echo.h has moved there

Peter Robinson pbrobinson at fedoraproject.org
Thu Jan 29 12:53:23 UTC 2015


commit b6ee2d3ace7f45831b586f9987a7111ac73e83ca
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Thu Jan 29 12:51:59 2015 +0000

    Fix endian support for aarch64, Add speexdsp-devel dep as speex_echo.h has moved there

 pjproject-aarch64.patch |   31 +++++++++++++++++++++++++++++++
 pjproject.spec          |   28 +++++++++++++++++++---------
 2 files changed, 50 insertions(+), 9 deletions(-)
---
diff --git a/pjproject-aarch64.patch b/pjproject-aarch64.patch
new file mode 100644
index 0000000..f5b2ca1
--- /dev/null
+++ b/pjproject-aarch64.patch
@@ -0,0 +1,31 @@
+Index: pjproject-2.3/pjlib/include/pj/config.h
+===================================================================
+--- pjproject-2.3.orig/pjlib/include/pj/config.h
++++ pjproject-2.3/pjlib/include/pj/config.h
+@@ -172,6 +172,26 @@
+ #   define PJ_IS_LITTLE_ENDIAN	1
+ #   define PJ_IS_BIG_ENDIAN	0
+ 
++#elif defined (PJ_M_AARCH64) || defined(__aarch64__)
++    /*
++     * 64bit ARMv8 processor
++     */
++#   undef PJ_M_AARCH64
++#   define PJ_M_AARCH64		1
++#   define PJ_M_NAME		"aarch64"
++#   define PJ_HAS_PENTIUM	0
++#   if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
++#      if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++#         define PJ_IS_LITTLE_ENDIAN	1
++#         define PJ_IS_BIG_ENDIAN	0
++#      elif (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
++#         define PJ_IS_LITTLE_ENDIAN	0
++#         define PJ_IS_BIG_ENDIAN	1
++#      else
++#         error Endianness must be declared for this processor
++#      endif
++#   endif
++
+ #elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
+ 	defined(__IA64__) || defined( 	_M_IA64)
+     /*
diff --git a/pjproject.spec b/pjproject.spec
index a1bca0c..4ae66b3 100644
--- a/pjproject.spec
+++ b/pjproject.spec
@@ -3,7 +3,7 @@
 Name:  pjproject
 Summary:  Libraries for building embedded/non-embedded VoIP applications
 Version: 2.3
-Release: 6%{?dist}
+Release: 7%{?dist}
 Group: System Environment/Libraries
 License: GPLv2+
 URL: http://www.pjsip.org
@@ -21,6 +21,8 @@ Patch2: pjproject_fix_libyuv.patch
 Patch3: pjproject_fixup_pc_file.patch
 # Fix endianness on ARM platforms
 Patch4: pjproject_fix_arm.patch
+# Add aarch64
+Patch5: pjproject-aarch64.patch
 
 
 BuildRequires: alsa-lib-devel
@@ -31,6 +33,7 @@ BuildRequires: openssl-devel
 BuildRequires: pkgconfig
 BuildRequires: portaudio-devel
 BuildRequires: speex-devel
+BuildRequires: speexdsp-devel
 
 
 %description
@@ -63,17 +66,18 @@ Header information for:
 
 %prep
 %setup -q -n %{name}-%{version}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%patch0 -p1 -b .fsf
+%patch1 -p1 -b .3rd
+%patch2 -p1 -b .yuv
+%patch3 -p1 -b .pkg
+%patch4 -p1 -b .arm
+%patch5 -p1 -b .aarch64
 
 # make sure we don't bundle these third-party libraries
 # (They're excluded through ./configure, but this is an 
 # additional safety net)
 rm -rf third_party/BaseClasses
-rm -rf third_party/bdsound
+rm -rf third_party/bdsounrm
 rm -rf third_party/bin
 rm -rf third_party/g7221
 rm -rf third_party/gsm
@@ -102,6 +106,7 @@ rm -rf third_party/build/ilbc
 # bundle any unnecessary libraries.  Please contact me if your project
 # needs this support, and I'll re-enable it
 export CFLAGS="-DPJ_HAS_IPV6=1 ${ARCHFLAGS} %{optflags}"
+
 %configure --enable-shared        \
            --with-external-gsm    \
            --with-external-pa     \
@@ -116,7 +121,6 @@ export CFLAGS="-DPJ_HAS_IPV6=1 ${ARCHFLAGS} %{optflags}"
            --without-libyuv       \
            --disable-g7221-codec  
 
-export CFLAGS="-DPJ_HAS_IPV6=1 %{optflags}"
 make %{?_smp_mflags} dep
 make %{?_smp_mflags}
 
@@ -125,7 +129,9 @@ make %{?_smp_mflags}
 make %{?_smp_mflags} DESTDIR=%{buildroot} install
 
 # Remove the static libraries, as they aren't wanted
-rm %{buildroot}%{_libdir}/*.a
+find %{buildroot} -type f -name "*.a" -delete
+# random extras due to patching for the FSF address change
+find %{buildroot} -type f -name "*.fsf" -delete
 
 # rpmlint complains that this is an empty file, so let's fix that
 echo -e '\n' >> %{buildroot}%{_includedir}/pj/config_site.h
@@ -165,6 +171,10 @@ echo -e '\n' >> %{buildroot}%{_includedir}/pj/config_site.h
 
 
 %changelog
+* Thu Jan 29 2015 Peter Robinson <pbrobinson at fedoraproject.org> 2.3-7
+- Fix endian support for aarch64
+- Add speexdsp-devel dep as speex_echo.h has moved there
+
 * Fri Nov 14 2014 Tom Callaway <spot at fedoraproject.org> - 2.3-6
 - rebuild against new libsrtp
 


More information about the scm-commits mailing list