From 5fe8970289599a40412aee3b1c78b5029761ddac Mon Sep 17 00:00:00 2001 From: Simon Lukasik Date: Wed, 15 Feb 2012 11:49:34 +0100 Subject: [PATCH] Resolve multilib conflict of gpgme.h (#341351) --- gpgme-new-warning.h | 6 ++++++ gpgme-new.h | 36 ++++++++++++++++++++++++++++++++++++ gpgme.spec | 12 +++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 gpgme-new-warning.h create mode 100644 gpgme-new.h diff --git a/gpgme-new-warning.h b/gpgme-new-warning.h new file mode 100644 index 0000000..d43f1c1 --- /dev/null +++ b/gpgme-new-warning.h @@ -0,0 +1,6 @@ +/* Prepended at gpgme package build-time. */ + +#ifndef gpgme_gpgme_multilib_redirection_h +#error "Don't include this file directly, use instead!" +#endif + diff --git a/gpgme-new.h b/gpgme-new.h new file mode 100644 index 0000000..a16361d --- /dev/null +++ b/gpgme-new.h @@ -0,0 +1,36 @@ +/* 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 in gpgme.h. By stripping them we would + * risk for issues like bug 621698 to stay unnoticed. This file is inspired + * by opensslconf-new.h. + * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ + +#ifdef gpgme_gpgme_multilib_redirection_h +#error "Do not define gpgme_gpgme_multilib_redirection_h!" +#endif +#define gpgme_gpgme_multilib_redirection_h + +#if defined(__i386__) +#include "gpgme-i386.h" +#elif defined(__ia64__) +#include "gpgpme-ia64.h" +#elif defined(__powerpc64__) +#include "gpgme-ppc64.h" +#elif defined(__powerpc__) +#include "gpgme-ppc.h" +#elif defined(__s390x__) +#include "gpgme-s390x.h" +#elif defined(__s390__) +#include "gpgme-s390.h" +#elif defined(__sparc__) && defined(__arch64__) +#include "gpgme-sparc64.h" +#elif defined(__sparc__) +#include "gpgme-sparc.h" +#elif defined(__x86_64__) +#include "gpgme-x86_64.h" +#else +#error "This gpgme-devel package does not work your architecture?" +#endif + +#undef gpgme_gpgme_multilib_redirection_h + diff --git a/gpgme.spec b/gpgme.spec index 2ba2379..687678c 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -2,13 +2,15 @@ Name: gpgme Summary: GnuPG Made Easy - high level crypto API Version: 1.3.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: Applications/System URL: http://www.gnupg.org/related_software/gpgme/ Source0: ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-%{version}.tar.bz2 Source1: ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-%{version}.tar.bz2.sig +Source2: gpgme-new.h +Source3: gpgme-new-warning.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch1: gpgme-1.3.0-config_extras.patch @@ -93,6 +95,10 @@ cat > $RPM_BUILD_ROOT%{_bindir}/gpgme-config <<__END__ #!/bin/sh exec %{_bindir}/gpgme-config.\$(arch) \$@ __END__ +install -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_includedir}/gpgme-%{_target_cpu}.h +cat $RPM_BUILD_ROOT/%{_includedir}/gpgme.h >> \ + $RPM_BUILD_ROOT/%{_includedir}/gpgme-%{_target_cpu}.h +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_prefix}/include/gpgme.h %endif %check @@ -138,6 +144,10 @@ fi %changelog +* Wed Feb 15 2012 Simon Lukasik - 1.3.0-6 +- Resolve multilib conflict of gpgme-config (#341351) +- Resolve multilib conflict of gpgme.h (#341351) + * Fri Jan 13 2012 Fedora Release Engineering - 1.3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild