diff --git a/common/shlibs b/common/shlibs index f8949579224..c13f5df6db9 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1 libairspyhf.so.0 libairspyhf-1.6.8_1 libtraceevent.so.1 libtraceevent-1.6.2_1 +libtracefs.so.1 libtracefs-1.4.2_1 diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel new file mode 120000 index 00000000000..23466cce799 --- /dev/null +++ b/srcpkgs/libtracefs-devel @@ -0,0 +1 @@ +libtracefs \ No newline at end of file diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch new file mode 100644 index 00000000000..e0cd38d5a7d --- /dev/null +++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch @@ -0,0 +1,10 @@ +--- a/utest/tracefs-utest.c ++++ b/utest/tracefs-utest.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch new file mode 100644 index 00000000000..50ba010fe21 --- /dev/null +++ b/srcpkgs/libtracefs/patches/musl.patch @@ -0,0 +1,17 @@ +--- a/include/tracefs.h ++++ b/include/tracefs.h +@@ -10,6 +10,14 @@ + #include + #include + ++#ifndef _GNU_SOURCE ++#if !__GLIBC__ ++/* See CPU_SET(3) */ ++struct cpu_set_t; ++typedef struct cpu_set_t cpu_set_t; ++#endif ++#endif ++ + char *tracefs_get_tracing_file(const char *name); + void tracefs_put_tracing_file(char *name); + diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template new file mode 100644 index 00000000000..f7c1cb68f62 --- /dev/null +++ b/srcpkgs/libtracefs/template @@ -0,0 +1,42 @@ +# Template file for 'libtracefs' +pkgname=libtracefs +version=1.6.1 +revision=1 +build_style=gnu-makefile +make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}" +make_build_target="all doc" +make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig" +make_install_target="install install_doc" +make_use_env=yes +hostmakedepends="asciidoc xmlto source-highlight pkg-config" +makedepends="libtraceevent-devel" +checkdepends="CUnit-devel" +short_desc="Linux kernel trace file system library" +maintainer="Orphaned " +license="GPL-2.0-only, LGPL-2.1-only" +homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/" +distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz" +checksum=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab + +do_check() { + make ${makejobs} test + utest/trace-utest +} + +post_install() { + # manpage for sample program + rm ${DESTDIR}/usr/share/man/man1/sqlhist.1 +} + +libtracefs-devel_package() { + depends="${sourcepkg}>=${version}_${revision} ${makedepends}" + short_desc+=" - development files" + pkg_install() { + vmove usr/share/doc + vmove usr/share/man/man3 + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +}