diff --git a/srcpkgs/oprofile/patches/basename.patch b/srcpkgs/oprofile/patches/basename.patch new file mode 100644 index 00000000000..350715a7d13 --- /dev/null +++ b/srcpkgs/oprofile/patches/basename.patch @@ -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; diff --git a/srcpkgs/oprofile/patches/musl.patch b/srcpkgs/oprofile/patches/musl.patch new file mode 100644 index 00000000000..22214dfdb25 --- /dev/null +++ b/srcpkgs/oprofile/patches/musl.patch @@ -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) { diff --git a/srcpkgs/oprofile/template b/srcpkgs/oprofile/template index 43a1042e14d..188aa467e27 100644 --- a/srcpkgs/oprofile/template +++ b/srcpkgs/oprofile/template @@ -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 " license="GPL-2" homepage="http://oprofile.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" -checksum=cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c +checksum=eb95f98c40b7d0ee29b45fba3565d9f8381747528aa6b6159e37d4fa0c8ca57d