forked from rarias/jungle
Use pkg-config instead of papi_version_check
This commit is contained in:
parent
1e36c3b204
commit
fad79643fa
67
pkgs/nanos6/check-papi-version-with-pkgconfig.patch
Normal file
67
pkgs/nanos6/check-papi-version-with-pkgconfig.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff --git a/m4/papi.m4 b/m4/papi.m4
|
||||
--- a/m4/papi.m4
|
||||
+++ b/m4/papi.m4
|
||||
@@ -24,12 +24,13 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
else
|
||||
PKG_CHECK_MODULES(
|
||||
[papi],
|
||||
- [papi],
|
||||
+ [papi >= 5.6.0],
|
||||
[
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([retrieved from pkg-config])
|
||||
papi_CPPFLAGS="${papi_CFLAGS}"
|
||||
ac_use_papi=yes
|
||||
+ ac_papi_version_correct=yes
|
||||
], [
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([not available])
|
||||
@@ -67,27 +68,29 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
fi
|
||||
|
||||
if test x"${ac_use_papi}" = x"yes" ; then
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
- else
|
||||
- papiBinary=papi_version
|
||||
- fi
|
||||
- papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
+ papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
+ else
|
||||
+ papiBinary=papi_version
|
||||
+ fi
|
||||
+ papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
|
||||
- AX_COMPARE_VERSION(
|
||||
- [[${papiVersion}]],
|
||||
- [[ge]],
|
||||
- [[5.6.0]],
|
||||
- [[ac_papi_version_correct=yes]],
|
||||
- [[ac_papi_version_correct=no]]
|
||||
- )
|
||||
+ AX_COMPARE_VERSION(
|
||||
+ [[${papiVersion}]],
|
||||
+ [[ge]],
|
||||
+ [[5.6.0]],
|
||||
+ [[ac_papi_version_correct=yes]],
|
||||
+ [[ac_papi_version_correct=no]]
|
||||
+ )
|
||||
|
||||
- if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
- AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
- ac_use_papi=no
|
||||
- else
|
||||
- AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
- AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
+ ac_use_papi=no
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
+ AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -96,17 +96,14 @@ in
|
||||
separateDebugInfo = true;
|
||||
|
||||
strictDeps = true;
|
||||
patches = [ ./check-papi-version-with-pkgconfig.patch ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
pkg-config
|
||||
|
||||
# TODO: papi_version is needed for configure:
|
||||
# ./configure: line 27378: papi_version: command not found
|
||||
# This probably breaks cross-compilation
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
|
||||
68
pkgs/nosv/check-papi-version-with-pkgconfig.patch
Normal file
68
pkgs/nosv/check-papi-version-with-pkgconfig.patch
Normal file
@ -0,0 +1,68 @@
|
||||
diff --git a/m4/papi.m4 b/m4/papi.m4
|
||||
index de905848..fa3db9a1 100644
|
||||
--- a/m4/papi.m4
|
||||
+++ b/m4/papi.m4
|
||||
@@ -24,12 +24,13 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
else
|
||||
PKG_CHECK_MODULES(
|
||||
[papi],
|
||||
- [papi],
|
||||
+ [papi >= 5.6.0],
|
||||
[
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([retrieved from pkg-config])
|
||||
papi_CFLAGS="${papi_CFLAGS}"
|
||||
ac_use_papi=yes
|
||||
+ ac_papi_version_correct=yes
|
||||
], [
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([not available])
|
||||
@@ -67,27 +68,29 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
fi
|
||||
|
||||
if test x"${ac_use_papi}" = x"yes" ; then
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
- else
|
||||
- papiBinary=papi_version
|
||||
- fi
|
||||
- papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
+ papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
+ else
|
||||
+ papiBinary=papi_version
|
||||
+ fi
|
||||
+ papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
|
||||
- AX_COMPARE_VERSION(
|
||||
- [[${papiVersion}]],
|
||||
- [[ge]],
|
||||
- [[5.6.0]],
|
||||
- [[ac_papi_version_correct=yes]],
|
||||
- [[ac_papi_version_correct=no]]
|
||||
- )
|
||||
+ AX_COMPARE_VERSION(
|
||||
+ [[${papiVersion}]],
|
||||
+ [[ge]],
|
||||
+ [[5.6.0]],
|
||||
+ [[ac_papi_version_correct=yes]],
|
||||
+ [[ac_papi_version_correct=no]]
|
||||
+ )
|
||||
|
||||
- if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
- AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
- ac_use_papi=no
|
||||
- else
|
||||
- AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
- AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
+ ac_use_papi=no
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
+ AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -47,6 +47,7 @@ in
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
patches = [ ./check-papi-version-with-pkgconfig.patch ];
|
||||
configureFlags = [
|
||||
"--with-ovni=${ovni}"
|
||||
"CACHELINE_WIDTH=${toString cacheline}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user