aboutsummaryrefslogtreecommitdiffstats
path: root/devel/papi/files
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2013-11-14 21:36:20 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2013-11-14 21:36:20 +0800
commitf6b63d512d3e1fd48314486cbbcc15113d3313cd (patch)
tree978d07e2996f93dd087cacf2af0a838969705de3 /devel/papi/files
parentb5c84e0fe7252314442d5a61d72ee1359bbdd236 (diff)
downloadfreebsd-ports-gnome-f6b63d512d3e1fd48314486cbbcc15113d3313cd.tar.gz
freebsd-ports-gnome-f6b63d512d3e1fd48314486cbbcc15113d3313cd.tar.zst
freebsd-ports-gnome-f6b63d512d3e1fd48314486cbbcc15113d3313cd.zip
- Update to 5.2.0, fix build [1]
- Reset maintainership (maintainer no longer uses FreeBSD, via private email) [1] - Support staging Submitted by: glebius ([1])
Diffstat (limited to 'devel/papi/files')
-rw-r--r--devel/papi/files/patch-attach2.c19
-rw-r--r--devel/papi/files/patch-attach3.c19
-rw-r--r--devel/papi/files/patch-configure38
-rw-r--r--devel/papi/files/patch-coretemp_freebsd.c21
-rw-r--r--devel/papi/files/patch-x86_cpuid_info.c22
5 files changed, 114 insertions, 5 deletions
diff --git a/devel/papi/files/patch-attach2.c b/devel/papi/files/patch-attach2.c
new file mode 100644
index 000000000000..f1418ea9d5d0
--- /dev/null
+++ b/devel/papi/files/patch-attach2.c
@@ -0,0 +1,19 @@
+--- ctests/attach2.c.orig 2013-11-10 23:03:27.000000000 +0400
++++ ctests/attach2.c 2013-11-10 23:08:11.000000000 +0400
+@@ -25,6 +25,7 @@
+ #if defined(__FreeBSD__)
+ # define PTRACE_ATTACH PT_ATTACH
+ # define PTRACE_CONT PT_CONTINUE
++# define PTRACE_TRACEME PT_TRACE_ME
+ #endif
+
+ int
+@@ -148,7 +149,7 @@
+ test_fail_exit( __FILE__, __LINE__, "PAPI_start", retval );
+
+ printf("Continuing\n");
+- if ( ptrace( PTRACE_CONT, pid, NULL, NULL ) == -1 ) {
++ if ( ptrace( PTRACE_CONT, pid, NULL, 0 ) == -1 ) {
+ perror( "ptrace(PTRACE_CONT)" );
+ return 1;
+ }
diff --git a/devel/papi/files/patch-attach3.c b/devel/papi/files/patch-attach3.c
new file mode 100644
index 000000000000..90539a8493ed
--- /dev/null
+++ b/devel/papi/files/patch-attach3.c
@@ -0,0 +1,19 @@
+--- ctests/attach3.c.orig 2013-11-10 23:03:20.000000000 +0400
++++ ctests/attach3.c 2013-11-10 23:06:44.000000000 +0400
+@@ -25,6 +25,7 @@
+ #if defined(__FreeBSD__)
+ # define PTRACE_ATTACH PT_ATTACH
+ # define PTRACE_CONT PT_CONTINUE
++# define PTRACE_TRACEME PT_TRACE_ME
+ #endif
+
+ int
+@@ -149,7 +150,7 @@
+ test_fail_exit( __FILE__, __LINE__, "PAPI_start", retval );
+
+ printf("Continuing\n");
+- if ( ptrace( PTRACE_CONT, pid, NULL, NULL ) == -1 ) {
++ if ( ptrace( PTRACE_CONT, pid, NULL, 0 ) == -1 ) {
+ perror( "ptrace(PTRACE_CONT)" );
+ return 1;
+ }
diff --git a/devel/papi/files/patch-configure b/devel/papi/files/patch-configure
index f104beaf6cf0..66fdfb2355dc 100644
--- a/devel/papi/files/patch-configure
+++ b/devel/papi/files/patch-configure
@@ -1,11 +1,39 @@
---- ./configure.orig 2011-01-21 06:49:01.000000000 +0300
-+++ ./configure 2012-10-22 12:27:41.000000000 +0400
-@@ -5800,7 +5800,7 @@
+--- configure.orig 2013-08-06 20:12:20.000000000 +0400
++++ configure 2013-11-10 23:00:05.000000000 +0400
+@@ -6906,7 +6906,7 @@
MAKEVER="freebsd"
LDFLAGS="-lpmc"
# HWPMC driver is available for FreeBSD >= 6
- FREEBSD_VERSION=`uname -r | cut -c 1`
+ FREEBSD_VERSION=`uname -r | cut -d'.' -f1`
if test "${FREEBSD_VERSION}" -lt 6 ; then
- as_fn_error "PAPI requires FreeBSD 6 or greater" "$LINENO" 5
- fi
+ { { echo "$as_me:$LINENO: error: PAPI requires FreeBSD 6 or greater" >&5
+ echo "$as_me: error: PAPI requires FreeBSD 6 or greater" >&2;}
+@@ -7525,11 +7525,11 @@
+
+
+ for comp in $components; do
+- idx=`expr index "$comp" /`
++ idx=`echo "$comp" | sed -n "s/\/.*//p" | wc -c`
+ if test "$idx" = 0; then
+ subcomp=$comp
+ else
+- subcomp=${comp:$idx}
++ subcomp=`echo $comp | sed -E "s/^.{${idx}}//"`
+ fi
+ COMPONENT_RULES="$COMPONENT_RULES components/$comp/Rules.$subcomp"
+ echo "extern papi_vector_t _${subcomp}_vector;" >> components_config.h
+@@ -7542,11 +7542,11 @@
+ fi
+
+ for comp in $components; do
+- idx=`expr index "$comp" /`
++ idx=`echo "$comp" | sed -n "s/\/.*//p" | wc -c`
+ if test "$idx" = 0; then
+ subcomp=$comp
+ else
+- subcomp=${comp:$idx}
++ subcomp=`echo $comp | sed -E "s/^.{${idx}}//"`
+ fi
+ echo " &_${subcomp}_vector," >> components_config.h
+ done
diff --git a/devel/papi/files/patch-coretemp_freebsd.c b/devel/papi/files/patch-coretemp_freebsd.c
new file mode 100644
index 000000000000..56c4deda7f33
--- /dev/null
+++ b/devel/papi/files/patch-coretemp_freebsd.c
@@ -0,0 +1,21 @@
+--- components/coretemp_freebsd/coretemp_freebsd.c.orig 2013-08-06 20:12:19.000000000 +0400
++++ components/coretemp_freebsd/coretemp_freebsd.c 2013-11-11 01:15:20.000000000 +0400
+@@ -140,6 +140,9 @@
+ ret = sysctlnametomib (tmp, mib, &len);
+ }
+
++ if (CORETEMP_NUM_EVENTS == 0)
++ return PAPI_OK;
++
+ /* Allocate memory for the our event table */
+ coretemp_native_table = (coretemp_native_event_entry_t *)
+ papi_malloc (sizeof (coretemp_native_event_entry_t) * CORETEMP_NUM_EVENTS);
+@@ -377,7 +380,7 @@
+ int coretemp_shutdown_component (void)
+ {
+
+- SUBDBG( "coretemp_shutdown_component... %p\n", ctx );
++ SUBDBG( "coretemp_shutdown_component...\n");
+
+ /* Last chance to clean up */
+ papi_free (coretemp_native_table);
diff --git a/devel/papi/files/patch-x86_cpuid_info.c b/devel/papi/files/patch-x86_cpuid_info.c
new file mode 100644
index 000000000000..e0f2f7eab174
--- /dev/null
+++ b/devel/papi/files/patch-x86_cpuid_info.c
@@ -0,0 +1,22 @@
+--- x86_cpuid_info.c.orig 2013-08-06 20:12:26.000000000 +0400
++++ x86_cpuid_info.c 2013-11-14 16:49:25.000000000 +0400
+@@ -1252,11 +1252,14 @@
+ unsigned int* ecx, unsigned int* edx,
+ unsigned int index, unsigned int ecx_in )
+ {
+- unsigned int a,b,c,d;
+- __asm__ __volatile__ (".byte 0x53\n\tcpuid\n\tmovl %%ebx, %%esi\n\t.byte 0x5b"
+- : "=a" (a), "=S" (b), "=c" (c), "=d" (d) \
+- : "0" (index), "2"(ecx_in) );
+- *eax = a; *ebx = b; *ecx = c; *edx = d;
++ __asm__ __volatile__ (
++ "mov %%ebx, %%esi;"
++ "cpuid;"
++ "mov %%ebx, %3;"
++ "mov %%esi, %%ebx;"
++ : "=a" (*eax), "=c" (*ecx), "=d" (*edx)
++ : "m" (*ebx), "0" (index), "1" (ecx_in), "2" (42)
++ : "esi", "memory" );
+ }
+
+