summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/oprofile/APKBUILD42
-rw-r--r--user/oprofile/disable-regex-test.patch11
-rw-r--r--user/oprofile/posixise.patch43
3 files changed, 96 insertions, 0 deletions
diff --git a/user/oprofile/APKBUILD b/user/oprofile/APKBUILD
new file mode 100644
index 000000000..b4730f3c4
--- /dev/null
+++ b/user/oprofile/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=oprofile
+pkgver=1.3.0
+pkgrel=0
+pkgdesc="System profiler for Linux"
+url="http://oprofile.sourceforge.net/news/"
+arch="all"
+license="GPL-2.0-only"
+depends=""
+makedepends="binutils-dev libpfm-dev popt-dev"
+subpackages="$pkgname-doc"
+source="https://prdownloads.sourceforge.net/oprofile/oprofile-$pkgver.tar.gz
+ disable-regex-test.patch
+ posixise.patch
+ "
+
+build() {
+ cd "$builddir"
+ CXXFLAGS="$CXXFLAGS" ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="02a940cd8d38834dca2a97c8ac0fff04ef95b3819cfdf74a462b9326c7abbf2dc55d2a9b9d1fbefc7f455465bf85516be2b879d7daf1861ba2c4af51214377ba oprofile-1.3.0.tar.gz
+9ad0e25f2ab165e6613d8fbd65b652fb82b41beef28f9edca6b763001d50fb5f35e433454a7beeecaa1d0d3adc9c9f16adc6d4d9f20ae9d27cc3120c04906576 disable-regex-test.patch
+b19229521e28c871e432b15aab386c99c17f0ce3f9ab22b8669d64a8e0a22dd80ba7647ad903e9b71233815a457a3fa57aec9fb123cf7b28b04e61bc1ea250aa posixise.patch"
diff --git a/user/oprofile/disable-regex-test.patch b/user/oprofile/disable-regex-test.patch
new file mode 100644
index 000000000..7904cae4f
--- /dev/null
+++ b/user/oprofile/disable-regex-test.patch
@@ -0,0 +1,11 @@
+--- oprofile-1.3.0/libregex/tests/Makefile.in.old 2018-07-16 19:39:39.000000000 +0000
++++ oprofile-1.3.0/libregex/tests/Makefile.in 2018-10-10 20:38:01.400000000 +0000
+@@ -87,7 +87,7 @@
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-check_PROGRAMS = regex_test$(EXEEXT) java_test$(EXEEXT)
++check_PROGRAMS = java_test$(EXEEXT)
+ TESTS = $(check_PROGRAMS)
+ subdir = libregex/tests
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff --git a/user/oprofile/posixise.patch b/user/oprofile/posixise.patch
new file mode 100644
index 000000000..dd2ead122
--- /dev/null
+++ b/user/oprofile/posixise.patch
@@ -0,0 +1,43 @@
+--- oprofile-1.3.0/libpe_utils/op_pe_utils.cpp.old 2018-07-16 18:58:37.000000000 +0000
++++ oprofile-1.3.0/libpe_utils/op_pe_utils.cpp 2018-10-10 20:20:10.730000000 +0000
+@@ -530,7 +530,7 @@
+ static string _handle_powerpc_event_spec(string event_spec)
+ {
+ FILE * fp;
+- char line[MAX_INPUT];
++ char line[_POSIX_MAX_INPUT];
+ size_t grp_pos;
+ string evt, err_msg;
+ size_t evt_name_len;
+@@ -579,7 +579,7 @@
+ }
+
+ err_msg = "Cannot find event ";
+- while (fgets(line, MAX_INPUT, fp)) {
++ while (fgets(line, _POSIX_MAX_INPUT, fp)) {
+ if (!first_non_cyc_evt_found) {
+ if (!strncmp(line, "PM_", 3))
+ first_non_cyc_evt_found = true;
+--- oprofile-1.3.0/pe_profiling/operf.cpp.old 2016-08-08 15:03:27.000000000 +0000
++++ oprofile-1.3.0/pe_profiling/operf.cpp 2018-10-10 20:27:23.190000000 +0000
+@@ -860,9 +860,9 @@
+ {
+ if (remove(fpath)) {
+ perror("sample data removal error");
+- return FTW_STOP;
++ return -1;
+ } else {
+- return FTW_CONTINUE;
++ return 0;
+ }
+ }
+
+@@ -897,7 +897,7 @@
+ return;
+
+ if (!operf_options::append) {
+- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
++ int flags = FTW_DEPTH;
+ errno = 0;
+ if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
+ errno != ENOENT) {