Resolve multilib conflict of gpgme.h (#341351)

This commit is contained in:
Simon Lukasik 2012-02-15 11:49:34 +01:00
parent 7552b013de
commit 5fe8970289
3 changed files with 53 additions and 1 deletions

6
gpgme-new-warning.h Normal file
View File

@ -0,0 +1,6 @@
/* Prepended at gpgme package build-time. */
#ifndef gpgme_gpgme_multilib_redirection_h
#error "Don't include this file directly, use <gpgme.h> instead!"
#endif

36
gpgme-new.h Normal file
View File

@ -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

View File

@ -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 <slukasik@redhat.com> - 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 <rel-eng@lists.fedoraproject.org> - 1.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild