[libcdio: 1/2] fixed #477288 (libcdio-devel multilib conflict) again
Adrian Reber
adrian at fedoraproject.org
Tue Jul 24 13:08:38 UTC 2012
commit bd77121a3fa636ecbdbe0617e23a7e318e674ab0
Author: Adrian Reber <adrian at lisas.de>
Date: Tue Jul 24 15:07:08 2012 +0200
fixed #477288 (libcdio-devel multilib conflict) again
cdio_config.h | 29 +++++++++++++++++++++++++++++
libcdio.spec | 19 +++++++++++++++++--
2 files changed, 46 insertions(+), 2 deletions(-)
---
diff --git a/cdio_config.h b/cdio_config.h
new file mode 100644
index 0000000..9b01c00
--- /dev/null
+++ b/cdio_config.h
@@ -0,0 +1,29 @@
+/*
+ * Kluge to support multilib installation of both 32- and 64-bit RPMS:
+ * we need to arrange that header files that appear in both RPMs are
+ * identical. Hence, this file is architecture-independent and calls
+ * in an arch-dependent file that will appear in just one RPM.
+ *
+ * To avoid breaking arches not explicitly supported by Red Hat, we
+ * use this indirection file *only* on known multilib arches.
+ *
+ * Note: this may well fail if user tries to use gcc's -I- option.
+ * But that option is deprecated anyway.
+ */
+#if defined(__x86_64__)
+#include "cdio_config_x86_64.h"
+#elif defined(__i386__)
+#include "cdio_config_i386.h"
+#elif defined(__ppc64__) || defined(__powerpc64__)
+#include "cdio_config_ppc64.h"
+#elif defined(__ppc__) || defined(__powerpc__)
+#include "cdio_config_ppc.h"
+#elif defined(__s390x__)
+#include "cdio_config_s390x.h"
+#elif defined(__s390__)
+#include "cdio_config_s390.h"
+#elif defined(__sparc__) && defined(__arch64__)
+#include "cdio_config_sparc64.h"
+#elif defined(__sparc__)
+#include "cdio_config_sparc.h"
+#endif
diff --git a/libcdio.spec b/libcdio.spec
index 0bf36f6..2421bfb 100644
--- a/libcdio.spec
+++ b/libcdio.spec
@@ -1,6 +1,6 @@
Name: libcdio
Version: 0.83
-Release: 3%{?dist}
+Release: 5%{?dist}
Summary: CD-ROM input and control library
Group: System Environment/Libraries
License: GPLv3+
@@ -8,6 +8,7 @@ URL: http://www.gnu.org/software/libcdio/
Source0: http://ftp.gnu.org/gnu/libcdio/libcdio-0.83.tar.bz2
Source1: http://ftp.gnu.org/gnu/libcdio/libcdio-0.83.tar.bz2.sig
Source2: libcdio-no_date_footer.hml
+Source3: cdio_config.h
Patch0: libcdio-fix-for-more-than-99-tracks.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig doxygen
@@ -55,7 +56,8 @@ make %{?_smp_mflags}
sed -i -e "s,%{version}.*$,%{version}\\\",g" include/cdio/version.h
cd doc/doxygen
-sed -i -e "s,HTML_FOOTER.*$,HTML_FOOTER = libcdio-no_date_footer.hml,g" Doxyfile
+sed -i -e "s,HTML_FOOTER.*$,HTML_FOOTER = libcdio-no_date_footer.hml,g; \
+ s,EXCLUDE .*$,EXCLUDE = ../../include/cdio/cdio_config.h,g;" Doxyfile
cp %{SOURCE2} .
./run_doxygen
@@ -63,6 +65,16 @@ cp %{SOURCE2} .
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
+# multilib header hack; taken from postgresql.spec
+case `uname -i` in
+ i386 | x86_64 | ppc | ppc64 | s390 | s390x | sparc | sparc64 )
+ mv $RPM_BUILD_ROOT%{_includedir}/cdio/cdio_config.h $RPM_BUILD_ROOT%{_includedir}/cdio/cdio_config_`uname -i`.h
+ install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/cdio
+ ;;
+ *)
+ ;;
+esac
+
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
@@ -133,6 +145,9 @@ fi
%changelog
+* Tue Jul 24 2012 Adrian Reber <adrian at lisas.de> - 0.83-5
+- fixed #477288 (libcdio-devel multilib conflict) again
+
* Fri Mar 23 2012 Adrian Reber <adrian at lisas.de> - 0.83-3
- fixed #804484 (/usr/bin/cd-info was killed by signal 11)
More information about the scm-commits
mailing list