rpms/papi/F-12 papi-3.7.2-config.patch, NONE, 1.1 papi.spec, 1.4, 1.5 .cvsignore, 1.3, 1.4 sources, 1.3, 1.4

William Eden Cohen wcohen at fedoraproject.org
Thu Dec 10 21:06:24 UTC 2009


Author: wcohen

Update of /cvs/pkgs/rpms/papi/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13718

Modified Files:
	papi.spec .cvsignore sources 
Added Files:
	papi-3.7.2-config.patch 
Log Message:
* Thu Dec 10 2009 William Cohen <wcohen at redhat.com> - 3.7.2-3
- Adjust configure.

* Mon Dec 9 2009 William Cohen <wcohen at redhat.com> - 3.7.2-2
- Remove dependency on kernel-devel.

* Mon Dec 9 2009 William Cohen <wcohen at redhat.com> - 3.7.2-1
- Import papi-3.7.2.



papi-3.7.2-config.patch:
 configure.in |   92 ++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 47 insertions(+), 45 deletions(-)

--- NEW FILE papi-3.7.2-config.patch ---
diff -up papi-3.7.2/src/configure.in.header papi-3.7.2/src/configure.in
--- papi-3.7.2/src/configure.in.header	2009-12-10 15:05:09.000000000 -0500
+++ papi-3.7.2/src/configure.in	2009-12-10 15:05:13.000000000 -0500
@@ -1013,61 +1013,63 @@ AC_ARG_WITH(pfm_libdir,
             )
 
 # PCL start
-# set PCL manually set with --with-pcl, 
-# or by default if perfctr and perfmon are not available
-# and linux kernel version is >= 31
-
-if test "$cross_compiling" = "no" -a "$OS" = "linux" -a "`uname -r | grep "2.6."`"; then
-# gives the position in $OSVER of *first* character in substring "2.6."
-POS1=`expr index "$OSVER" "2.6."`
-POS2=`expr $POS1 + 4`
-VERS=`expr substr "$OSVER" "$POS2" 2`
-
-# Version 2.6.31 of the kernel uses perf_counter.h and all subsequent versions use perf_event.h
-if test "$VERS" = "31"; then
-  perf_header="perf_counter.h"
-  CFLAGS="$CFLAGS -DKERNEL31"
-elif test "$VERS" -gt 31; then
-  perf_header="perf_event.h"
+if test "x$perfctr" != "xyes" -a "$perfmon" = "0"; then
+
+# Try to find perf_event.h or perf_counter.h on
+# user specific path or default of /usr/include/linux
+AC_ARG_WITH(pcl_incdir,
+	   [  --with-pcl-incdir=<path>	Specify path to the correct perf event header file],
+  [
+case "$with_pcl_incdir" in
+yes) AC_MSG_ERROR([--with-pcl-incdir requires an argument]) ;;
+''|no) ;;
+*) pcl_incdir=$with_pcl_incdir ;;
+esac],
+[pcl_incdir="/usr/include/linux"])
+
+# Linux 2.6.32 and newer check
+AC_CHECK_FILE($pcl_incdir/perf_event.h,
+	[pcl="yes" PCLPATH="$pcl_incdir/perf_event.h"])
+
+# Linux 2.6.31 check
+if test "x$PCLPATH" = "x"; then
+AC_CHECK_FILE($pcl_incdir/perf_counter.h,
+	[pcl="yes" PCLPATH="$pcl_incdir/perf_counter.h"
+	   CFLAGS="$CFLAGS -DKERNEL31"])
 fi
 
-if test "${VERS}" -ge 31; then
 AC_ARG_WITH(pcl,
             [  --with-pcl=<yes,no>		Specify existence of Performance Counters for Linux],
-            [pcl=$withval
-             AC_CHECK_FILE(/lib/modules/$OSVER/source/include/linux/$perf_header, [ pcl="yes"
-               PCLPATH="/lib/modules/$OSVER/source/include/linux/$perf_header"],
-                [ pcl="no" ])
-            ],
-            [if test "$perfctr" = "no" -a "$perfmon" = "0"; then
-              AC_CHECK_FILE(/lib/modules/$OSVER/source/include/linux/$perf_header, [ pcl="yes"
-               PCLPATH="/lib/modules/$OSVER/source/include/linux/$perf_header"],
-                [ pcl="no" ])
-             fi
-            ])
-elif test "$perfctr" = "no" -a "$perfmon" = "0"; then
-AC_MSG_ERROR([PAPI requires a patch for any kernel older than 2.6.31])
+            [pcl=$withval])
+
+#fall back check for the perf_event.h or perf_counter.h in -devel for running
+#linux kernel
+if test "x$cross_compiling" != "xyes" -a "$OS" = "linux" -a "x$PCLPATH" = "x"; then
+
+pcl_incdir="/lib/modules/$OSVER/source/include/linux"
+
+# Linux 2.6.32 and newer check
+AC_CHECK_FILE($pcl_incdir/perf_event.h,
+	[pcl="yes" PCLPATH="$pcl_incdir/perf_event.h"])
+
+# Linux 2.6.31 check
+if test "x$PCLPATH" = "x"; then
+AC_CHECK_FILE($pcl_incdir/perf_counter.h,
+	[pcl="yes" PCLPATH="$pcl_incdir/perf_counter.h"
+	   CFLAGS="$CFLAGS -DKERNEL31"])
+fi
+
+if test "x$PCLPATH" = "x"; then
+  pcl=no
 fi
 
-# If we are running a PCL kernel, the correct include file should have been found in 
-# /lib/modules/$OSVER/source/include/linux. If the file was not found
-# see if the user has set a path and ensure it can be found there
-if test "$pcl" = "no"; then
-AC_ARG_WITH(pcl_incdir,
-	   [  --with-pcl-incdir=<path>	Specify path to the correct perf event header file],
-	   [pcl_incdir=$withval
-	     AC_CHECK_FILE($pcl_incdir/$perf_header, [pcl="yes"
-              PCLPATH="$pcl_incdir/$perf_header"], 
-		[AC_MSG_ERROR([$perf_header could not be found at $pcl_incdir])])
-           ],
-           [if test "$perfctr" = "no" -a "$perfmon" = "0"; then
-            AC_MSG_ERROR([$perf_header could not be found and no patch is installed.])
-            fi
-           ])
 fi
 fi
 # PCL end
 
+if test "x$pcl" != "xyes" -a "x$perfctr" != "xyes" -a "$perfmon" = "0"; then
+  AC_MSG_ERROR([No performance monitoring interface available])
+fi
 
 AC_ARG_WITH(pmapi,
             [  --with-pmapi=<path>		Specify path of pmapi on aix system ],


Index: papi.spec
===================================================================
RCS file: /cvs/pkgs/rpms/papi/F-12/papi.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- papi.spec	19 Nov 2009 16:33:53 -0000	1.4
+++ papi.spec	10 Dec 2009 21:06:23 -0000	1.5
@@ -1,16 +1,18 @@
 Summary: Performance Application Programming Interface
 Name: papi
-Version: 3.7.1
-Release: 4%{?dist}
+Version: 3.7.2
+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
+Patch1: papi-3.7.2-config.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: ncurses-devel
+BuildRequires: kernel-headers >= 2.6.31
 BuildRequires: gcc-gfortran
-BuildRequires: kernel-devel >= 2.6.31
 BuildRequires: chrpath
+BuildRequires: autoconf
 #Right now libpfm does not know anything about s390 and will fail
 ExcludeArch: s390, s390x
 
@@ -30,11 +32,12 @@ that uses PAPI.
 %prep
 %setup -q
 
+%patch1 -p1 -b .header
+
 %build
 cd src
-PERF_HEAD=`ls /usr/src/kernels/*/include/linux/perf_counter.h|sort |tail -n 1` || exit 1
-PERF_HEADER=`dirname $PERF_HEAD`
-%configure --with-pcl=yes --with-pcl-incdir=$PERF_HEADER --disable-static
+autoconf
+%configure --disable-static
 make %{?_smp_mflags}
 
 #%check
@@ -72,6 +75,15 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_mandir}/man3/*
 
 %changelog
+* Thu Dec 10 2009 William Cohen <wcohen at redhat.com> - 3.7.2-3
+- Adjust configure.
+
+* Mon Dec 9 2009 William Cohen <wcohen at redhat.com> - 3.7.2-2
+- Remove dependency on kernel-devel.
+
+* Mon Dec 9 2009 William Cohen <wcohen at redhat.com> - 3.7.2-1
+- Import papi-3.7.2.
+
 * Thu Nov 19 2009 William Cohen <wcohen at redhat.com> - 3.7.1-4
 - Exclude s390 and s390x.
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/papi/F-12/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- .cvsignore	16 Nov 2009 19:49:02 -0000	1.3
+++ .cvsignore	10 Dec 2009 21:06:24 -0000	1.4
@@ -1 +1 @@
-papi-3.7.1.tar.gz
+papi-3.7.2.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/papi/F-12/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- sources	16 Nov 2009 19:49:02 -0000	1.3
+++ sources	10 Dec 2009 21:06:24 -0000	1.4
@@ -1 +1 @@
-c9d9b073e62bc36dc13d5aa1ee65ec4e  papi-3.7.1.tar.gz
+2138a961b184046a863a5350937b89c8  papi-3.7.2.tar.gz




More information about the scm-commits mailing list