From 5703ce4239a55a1bc70882a08239641dbc7290ec Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Feb 21 2012 18:41:23 +0000 Subject: fix multilib issue with config.h --- 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 7efaa7a..b26df34 100644 --- a/libsrtp.spec +++ b/libsrtp.spec @@ -3,7 +3,7 @@ Name: lib%{shortname} Version: 1.4.4 -Release: 3.%{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,11 +89,17 @@ sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrt %{_libdir}/*.so %changelog +* Tue Feb 21 2012 Tom Callaway - 1.4.4-4.20101004cvs +- handle config.h multilib (bz787537) + * Fri Jan 13 2012 Fedora Release Engineering - 1.4.4-3.20101004cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 1.4.4-2.20101004cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild +* Tue Jan 25 2011 Jeffrey C. Ollie +- Don't use '-z noexecstack' option for linker on PPC64 (EL6) + * Mon Oct 4 2010 Tom "spot" Callaway - 1.4.4-1.20101004cvs - initial package