- fixed multilib devel conflicts for gmp (#212286)
This commit is contained in:
Thomas Woerner 2006-10-27 17:13:39 +00:00
parent 0b1056c620
commit 03f18e13c3
3 changed files with 133 additions and 1 deletions

55
gmp-mparam.h Normal file
View File

@ -0,0 +1,55 @@
/* Generic x86 gmp-mparam.h -- Compiler/machine parameter header file.
Copyright 1991, 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
/*
* This gmp-mparam.h is a wrapper include file for the original gmp-mparam.h,
* which has been renamed to gmp-mparam-<arch>.h. There are conflicts for the
* original gmp-mparam.h on multilib systems, which result from arch-specific
* configuration options. Please do not use the arch-specific file directly.
*
* Copyright (C) 2006 Red Hat, Inc.
* Thomas Woerner <twoerner@redhat.com>
*/
#ifdef gmp_mparam_wrapper_h
#error "gmp_mparam_wrapper_h should not be defined!"
#endif
#define gmp_mparam_wrapper_h
#if defined(__i386__)
#include "gmp-mparam-i386.h"
#elif defined(__x86_64__)
#include "gmp-mparam-x86_64.h"
#elif defined(__powerpc__)
#include "gmp-mparam-ppc.h"
#elif defined(__powerpc64__)
#include "gmp-mparam-ppc64.h"
#elif defined(__s390__)
#include "gmp-mparam-s390.h"
#elif defined(__s390x__)
#include "gmp-mparam-s390x.h"
#elif defined(__ia64__)
#include "gmp-mparam-ia64.h"
#else
#error "The gmp-devel package is not usable with the architecture."
#endif
#undef gmp_mparam_wrapper_h

56
gmp.h Normal file
View File

@ -0,0 +1,56 @@
/* Definitions for GNU multiple precision functions. -*- mode: c -*-
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
/*
* This gmp.h is a wrapper include file for the original gmp.h, which has been
* renamed to gmp-<arch>.h. There are conflicts for the original gmp.h on
* multilib systems, which result from arch-specific configuration options.
* Please do not use the arch-specific file directly.
*
* Copyright (C) 2006 Red Hat, Inc.
* Thomas Woerner <twoerner@redhat.com>
*/
#ifdef gmp_wrapper_h
#error "gmp_wrapper_h should not be defined!"
#endif
#define gmp_wrapper_h
#if defined(__i386__)
#include "gmp-i386.h"
#elif defined(__x86_64__)
#include "gmp-x86_64.h"
#elif defined(__powerpc__)
#include "gmp-ppc.h"
#elif defined(__powerpc64__)
#include "gmp-ppc64.h"
#elif defined(__s390__)
#include "gmp-s390.h"
#elif defined(__s390x__)
#include "gmp-s390x.h"
#elif defined(__ia64__)
#include "gmp-ia64.h"
#else
#error "The gmp-devel package is not usable with the architecture."
#endif
#undef gmp_wrapper_h

View File

@ -9,10 +9,12 @@
Summary: A GNU arbitrary precision library.
Name: gmp
Version: 4.1.4
Release: 8
Release: 9
URL: http://www.swox.com/gmp/
Source0: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
Source1: http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
Source2: gmp.h
Source3: gmp-mparam.h
Patch0: gmp-4.0.1-s390.patch
Patch1: gmp-4.1.2-ppc64.patch
Patch2: gmp-4.1.2-autoconf.patch
@ -130,6 +132,22 @@ install -m 644 ../mpfrxx.h $RPM_BUILD_ROOT%{_includedir}
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
cd ..
# Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
# avoid file conflicts on multilib systems and install wrapper include files
# gmp.h and gmp-mparam-<arch>.h
basearch=%{_arch}
# always use i386 for iX86
%ifarch %{ix86}
basearch=i386
%endif
# Rename files and install wrappers
mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h
install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h
mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h
install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
%check
%ifnarch ppc
cd base
@ -186,6 +204,9 @@ fi
%{_infodir}/mpfr.info*
%changelog
* Fri Oct 27 2006 Thomas Woerner <twoerner@redhat.com> - 4.1.4-9
- fixed multilib devel conflicts for gmp (#212286)
* Thu Oct 26 2006 Jakub Jelinek <jakub@redhat.com> - 4.1.4-8
- upgrade mpfr to 2.2.0 (#211971)
- apply mpfr 2.2.0 cumulative patch