rpms/ppl/devel ppl.hh, NONE, 1.1 ppl_c.h, NONE, 1.1 pwl.hh, NONE, 1.1 ppl.spec, 1.8, 1.9

Roberto Bagnara (bagnara) fedora-extras-commits at redhat.com
Wed Jan 9 10:47:55 UTC 2008


Author: bagnara

Update of /cvs/pkgs/rpms/ppl/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25309

Modified Files:
	ppl.spec 
Added Files:
	ppl.hh ppl_c.h pwl.hh 
Log Message:
Avoid multiarch conflicts when installed for multiple architectures.



--- NEW FILE ppl.hh ---
/* This is the header file switcher of the Parma Polyhedra Library.
   Copyright (C) 2001-2008 Roberto Bagnara <bagnara at cs.unipr.it>

This file is part of the Parma Polyhedra Library (PPL).

The PPL is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

The PPL 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 General Public License
for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.

For the most up-to-date information see the Parma Polyhedra Library
site: http://www.cs.unipr.it/ppl/ . */

#if defined(__x86_64__)
#include "ppl-x86_64.hh"
#elif defined(__i386__)
#include "ppl-i386.hh"
#elif defined(__powerpc64__)
#include "ppl-ppc64.hh"
#elif defined(__powerpc__)
#include "ppl-ppc.hh"
#elif defined(__ia64__)
#include "ppl-ia64.hh"
#elif defined(__alpha__)
#include "ppl-alpha.hh"
#elif defined(__arm__)
#include "ppl-arm.hh"
#elif defined(__s390x__)
#include "ppl-s390x.hh"
#elif defined(__s390__)
#include "ppl-s390.hh"
#else
#error "This architecture is not supported by the currently installed ppl-devel packages."
#endif


--- NEW FILE ppl_c.h ---
/* Header file switcher for the C interface.  -*- C -*-
   Copyright (C) 2001-2008 Roberto Bagnara <bagnara at cs.unipr.it>

This file is part of the Parma Polyhedra Library (PPL).

The PPL is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

The PPL 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 General Public License
for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.

For the most up-to-date information see the Parma Polyhedra Library
site: http://www.cs.unipr.it/ppl/ . */

#if defined(__x86_64__)
#include "ppl_c-x86_64.h"
#elif defined(__i386__)
#include "ppl_c-i386.h"
#elif defined(__powerpc64__)
#include "ppl_c-ppc64.h"
#elif defined(__powerpc__)
#include "ppl_c-ppc.h"
#elif defined(__ia64__)
#include "ppl_c-ia64.h"
#elif defined(__alpha__)
#include "ppl_c-alpha.h"
#elif defined(__arm__)
#include "ppl_c-arm.h"
#elif defined(__s390x__)
#include "ppl_c-s390x.h"
#elif defined(__s390__)
#include "ppl_c-s390.h"
#else
#error "This architecture is not supported by the currently installed ppl-devel packages."
#endif


--- NEW FILE pwl.hh ---
/* This is the header file switcher of the Parma Watchdog Library.
   Copyright (C) 2001-2008 Roberto Bagnara <bagnara at cs.unipr.it>

This file is part of the Parma Watchdog Library (PWL).

The PWL is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

The PWL 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 General Public License
for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.

For the most up-to-date information see the CS at Parma software
site: http://www.cs.unipr.it/Software/ . */

#if defined(__x86_64__)
#include "pwl-x86_64.hh"
#elif defined(__i386__)
#include "pwl-i386.hh"
#elif defined(__powerpc64__)
#include "pwl-ppc64.hh"
#elif defined(__powerpc__)
#include "pwl-ppc.hh"
#elif defined(__ia64__)
#include "pwl-ia64.hh"
#elif defined(__alpha__)
#include "pwl-alpha.hh"
#elif defined(__arm__)
#include "pwl-arm.hh"
#elif defined(__s390x__)
#include "pwl-s390x.hh"
#elif defined(__s390__)
#include "pwl-s390.hh"
#else
#error "This architecture is not supported by the currently installed ppl-pwl-devel packages."
#endif


Index: ppl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ppl/devel/ppl.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ppl.spec	23 Dec 2007 12:17:26 -0000	1.8
+++ ppl.spec	9 Jan 2008 10:47:16 -0000	1.9
@@ -1,12 +1,15 @@
 Name:		ppl
 Version:	0.9
-Release:	17%{?dist}
+Release:	18%{?dist}
 
 Summary:	The Parma Polyhedra Library: a library of numerical abstractions
 Group:		Development/Libraries
 License:	GPLv2+
 URL:		http://www.cs.unipr.it/ppl/
-Source:		ftp://ftp.cs.unipr.it/pub/ppl/releases/%{version}/%{name}-%{version}.tar.gz
+Source0:	ftp://ftp.cs.unipr.it/pub/ppl/releases/%{version}/%{name}-%{version}.tar.gz
+Source1:	ppl.hh
+Source2:	ppl_c.h
+Source3:	pwl.hh
 Patch0:		ppl-0.9-docfiles.patch
 Patch1:		ppl-0.9-configure.patch
 Patch2:		ppl-0.9-makefiles.patch
@@ -174,6 +177,29 @@
 make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install
 rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/%{name}/*.la
 
+# In order to avoid multiarch conflicts when installed for multiple
+# architectures (i.e., i386 and x86_64), we rename the header files
+# of the ppl-devel and ppl-pwl-devel packages.  They are substituted with
+# ad-hoc switchers that select the appropriate header file depending on
+# the architecture for which the compiler is compiling.
+
+# Since our header files only depend on the sizeof things, we smash
+# ix86 onto i386 and arm* onto arm.
+normalized_arch=%{_arch}
+%ifarch %{ix86}
+normalized_arch=i386
+%endif
+%ifarch %{arm}
+normalized_arch=arm
+%endif
+
+mv %{buildroot}/%{_includedir}/ppl.hh %{buildroot}/%{_includedir}/ppl-${normalized_arch}.hh
+install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/ppl.hh
+mv %{buildroot}/%{_includedir}/ppl_c.h %{buildroot}/%{_includedir}/ppl_c-${normalized_arch}.h
+install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/ppl_c.h
+mv %{buildroot}/%{_includedir}/pwl.hh %{buildroot}/%{_includedir}/pwl-${normalized_arch}.hh
+install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/pwl.hh
+
 %files
 %defattr(-,root,root,-)
 %doc %{_datadir}/doc/%{name}/BUGS
@@ -193,8 +219,8 @@
 %files devel
 %defattr(-,root,root,-)
 %doc %{_datadir}/doc/%{name}/README.configure
-%{_includedir}/ppl.hh
-%{_includedir}/ppl_c.h
+%{_includedir}/ppl*.hh
+%{_includedir}/ppl_c*.h
 %{_libdir}/libppl.so
 %{_libdir}/libppl_c.so
 %{_bindir}/ppl-config
@@ -269,7 +295,7 @@
 %files pwl-devel
 %defattr(-,root,root,-)
 %doc Watchdog/README.doc
-%{_includedir}/pwl.hh
+%{_includedir}/pwl*.hh
 %{_libdir}/libpwl.so
 
 %files pwl-static
@@ -285,6 +311,9 @@
 rm -rf %{buildroot}
 
 %changelog
+* Wed Jan 09 2008 Roberto Bagnara <bagnara at cs.unipr.it> 0.9-18
+- Avoid multiarch conflicts when installed for multiple architectures.
+
 * Sun Dec 23 2007 Roberto Bagnara <bagnara at cs.unipr.it> 0.9-17
 - The SWI-Prolog `pl' package is temporarily not available on the ppc64
   architecture: temporarily disabled `ppl-swiprolog' and




More information about the fedora-extras-commits mailing list