oprofile: update to 1.2.0

- Add musl.patch to workaround lack of certain FTW_ constants in musl
- Add basename.patch to fix build error

Closes: #7313 [via git-merge-pr]
This commit is contained in:
Peter Bui 2017-08-08 13:05:49 -04:00 committed by Duncaen
parent 915fba1c0e
commit 4d2cd41120
3 changed files with 50 additions and 2 deletions

View file

@ -0,0 +1,13 @@
Use internal op_basename function rather than basename.
--- pp/oparchive.cpp 2017-08-08 13:32:18.667327870 -0400
+++ pp/oparchive.cpp 2017-08-08 13:36:09.502600880 -0400
@@ -261,7 +262,7 @@
/* determine the session name of sample file */
int offset = sample_name.find('{');
string base_samples_dir = sample_name.substr(0, offset-1);
- string session = basename(base_samples_dir.c_str());
+ string session = op_basename(base_samples_dir);
/* Get rid of the the archive_path from the name */
string sample_base = sample_name.substr(offset);
string sample_archive_file = dest_samples_dir + "/" + session + "/" + sample_base;

View file

@ -0,0 +1,35 @@
musl does not implement glibc extensions such as FTW_STOP, FTW_CONTINUE, and
FTW_ACTIONRETVAL.
--- pe_profiling/operf.cpp 2017-08-08 13:44:44.573674304 -0400
+++ pe_profiling/operf.cpp 2017-08-08 13:46:27.876692262 -0400
@@ -860,9 +860,17 @@
{
if (remove(fpath)) {
perror("sample data removal error");
+#ifdef __GLIBC__
return FTW_STOP;
+#else
+ return errno;
+#endif
} else {
+#ifdef __GLIBC__
return FTW_CONTINUE;
+#else
+ return 0;
+#endif
}
}
@@ -897,7 +905,11 @@
return;
if (!operf_options::append) {
+#ifdef __GLIBC__
int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
+#else
+ int flags = FTW_DEPTH;
+#endif
errno = 0;
if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
errno != ENOENT) {

View file

@ -1,6 +1,6 @@
# Template file for 'oprofile'
pkgname=oprofile
version=1.1.0
version=1.2.0
revision=1
build_style=gnu-configure
configure_args="--disable-static"
@ -14,4 +14,4 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://oprofile.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz"
checksum=cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c
checksum=eb95f98c40b7d0ee29b45fba3565d9f8381747528aa6b6159e37d4fa0c8ca57d