[papi] resolve: rhbz872501
William Eden Cohen
wcohen at fedoraproject.org
Thu Nov 8 16:30:08 UTC 2012
commit 361e069bd971bc6eee7091f196534799517bc1ce
Author: William Cohen <wcohen at redhat.com>
Date: Thu Nov 8 11:28:43 2012 -0500
resolve: rhbz872501
papi-libversion.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
papi.spec | 8 +++++++-
2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/papi-libversion.patch b/papi-libversion.patch
new file mode 100644
index 0000000..3657927
--- /dev/null
+++ b/papi-libversion.patch
@@ -0,0 +1,46 @@
+commit d239c350a17b0e329223f62e7efc1f786e3e7ac7
+Author: William Cohen <wcohen at redhat.com>
+Date: Wed Nov 7 13:31:50 2012 -0500
+
+ Factor out duplicate install code from Rules.pfm4_pe
+
+ The Makefile.inc has a rule to installed shared libraries. However,
+ Rules.pfm4_pe also has a slightly different set of rules to install
+ code for shared libraries. This leads to the same shared library
+ being installed under two different names. The duplicate code has
+ been removed from Rules.pfm4_pe and a symbolic link has been added to
+ ensure that any code that might have linked with
+ libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE) still runs.
+
+ Signed-off-by: William Cohen <wcohen at redhat.com>
+
+diff --git a/src/Makefile.inc b/src/Makefile.inc
+index 1cdb270..e733ed9 100644
+--- a/src/Makefile.inc
++++ b/src/Makefile.inc
+@@ -308,6 +308,7 @@ install-lib: native_install
+ @if test -r $(SHLIB) ; then \
+ cp -p $(SHLIB) $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC); \
+ chmod go+r $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) ; \
++ cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE); \
+ cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER); \
+ cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so; \
+ fi
+diff --git a/src/Rules.pfm4_pe b/src/Rules.pfm4_pe
+index 56a2f07..0f83ec4 100644
+--- a/src/Rules.pfm4_pe
++++ b/src/Rules.pfm4_pe
+@@ -66,11 +66,8 @@ ifneq (,${PFM_ROOT})
+ -$(MAKE) -C $(PFM_ROOT) ARCH="$(ARCH)" DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) install_prefix=$(PREFIX) LIBDIR=$(LIBDIR) INCDIR=$(INCDIR) MANDIR=$(MANDIR) install
+ endif
+ -install -d $(DESTDIR)$(LIBDIR)
+-ifneq (,$(findstring shared,$(LIBS)))
+- cp -p $(SHLIB) $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE)
+- cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE) libpapi.so.$(PAPIVER)
+- cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE) libpapi.so
+-endif
++# Makefile.inc already has installation of shared libraries so
++# there is no need to do it here
+ -install -d $(DESTDIR)$(DATADIR)
+ cp -f ./papi_events.csv $(DESTDIR)$(DATADIR)
+
diff --git a/papi.spec b/papi.spec
index 6c49692..c939cad 100644
--- a/papi.spec
+++ b/papi.spec
@@ -2,11 +2,12 @@
Summary: Performance Application Programming Interface
Name: papi
Version: 5.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: BSD
Group: Development/System
URL: http://icl.cs.utk.edu/papi/
Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
+Patch200: papi-libversion.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: ncurses-devel
BuildRequires: gcc-gfortran
@@ -48,6 +49,8 @@ the PAPI user-space libraries and interfaces.
%prep
%setup -q
+%patch200 -p1 -b .visible
+
%build
%if %{without bundled_libpfm}
# Build our own copy of libpfm.
@@ -109,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a
%changelog
+* Thu Nov 08 2012 William Cohen <wcohen at redhat.com> - 5.0.1-3
+- Avoid duplicated shared library.
+
* Wed Oct 03 2012 William Cohen <wcohen at redhat.com> - 5.0.1-2
- Make sure using compatible version of libpfm.
More information about the scm-commits
mailing list