[libsrtp/f16] fix multilib issue with config.h
Tom Callaway
spot at fedoraproject.org
Tue Feb 21 18:40:52 UTC 2012
commit ce49231cdb58b004f7e38d9969f578899dd5e791
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Feb 21 13:40:52 2012 -0500
fix multilib issue with config.h
config.h | 18 ++++++++++++++++++
libsrtp.spec | 24 +++++++++++++++++++++++-
2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..6612125
--- /dev/null
+++ b/config.h
@@ -0,0 +1,18 @@
+/* This file is here to prevent a file conflict on multiarch systems. A
+ * conflict will frequently occur because arch-specific build-time
+ * configuration options are stored (and used, so they can't just be stripped
+ * out) in config.h. The original config.h has been renamed.
+ * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */
+
+#ifdef srtp_multilib_redirection_h
+#error "Do not define srtp_multilib_redirection_h!"
+#endif
+#define srtp_multilib_redirection_h
+
+#if defined(__x86_64__) || defined(__ppc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__s390x__)
+#include "srtp/config-64.h"
+#else
+#include "srtp/config-32.h"
+#endif
+
+#undef srtp_multilib_redirection_h
diff --git a/libsrtp.spec b/libsrtp.spec
index 8780e1d..b26df34 100644
--- a/libsrtp.spec
+++ b/libsrtp.spec
@@ -3,7 +3,7 @@
Name: lib%{shortname}
Version: 1.4.4
-Release: 2.%{cvsver}%{?dist}
+Release: 4.%{cvsver}%{?dist}
Summary: An implementation of the Secure Real-time Transport Protocol (SRTP)
Group: System Environment/Libraries
License: BSD
@@ -14,6 +14,9 @@ URL: http://srtp.sourceforge.net
Source0: %{shortname}-%{version}-%{cvsver}.tar.bz2
# Pkgconfig goodness
Source1: libsrtp.pc
+# Universal config.h
+Source2: config.h
+
# Seriously. Who doesn't do shared libs these days?
# And how does Chromium always manage to find these projects and use them?
Patch0: libsrtp-1.4.4-shared.patch
@@ -40,6 +43,12 @@ developing applications that use %{name}.
# Fix end-of-line encoding
sed -i 's/\r//g' doc/draft-irtf-cfrg-icm-00.txt
+%if 0%{?rhel} > 0
+%ifarch ppc64
+sed -i 's/-z noexecstack//' Makefile.in
+%endif
+%endif
+
%build
export CFLAGS="%{optflags} -fPIC"
%configure --disable-static
@@ -61,6 +70,10 @@ sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
+# Handle multilib issues with config.h
+mv %{buildroot}%{_includedir}/%{shortname}/config.h %{buildroot}%{_includedir}/%{shortname}/config-%{__isa_bits}.h
+cp -a %{SOURCE2} %{buildroot}%{_includedir}/%{shortname}/config.h
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@@ -76,8 +89,17 @@ sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrt
%{_libdir}/*.so
%changelog
+* Tue Feb 21 2012 Tom Callaway <spot at fedoraproject.org> - 1.4.4-4.20101004cvs
+- handle config.h multilib (bz787537)
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.4-3.20101004cvs
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.4-2.20101004cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+* Tue Jan 25 2011 Jeffrey C. Ollie <jeff at ocjtech.us>
+- Don't use '-z noexecstack' option for linker on PPC64 (EL6)
+
* Mon Oct 4 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1.4.4-1.20101004cvs
- initial package
More information about the scm-commits
mailing list