commit:     5439a2db1028e8ae6a202bf2c6a723d83ed87b28
Author:     brahmajit das <listout <AT> protonmail <DOT> com>
AuthorDate: Thu Aug 18 18:53:27 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 19:16:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5439a2db

dev-libs/libtracefs: add 1.4.2

Version bump and test fix. This is related to bug 855893. The issues on
that bug is fixed upsteam, hence updating the package is another fix.

Closes: https://bugs.gentoo.org/855893
Signed-off-by: brahmajit das <listout <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26890
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libtracefs/Manifest                       |  1 +
 .../files/libtracefs-1.4.2-fix-test.patch          | 11 +++++
 dev-libs/libtracefs/libtracefs-1.4.2.ebuild        | 57 ++++++++++++++++++++++
 3 files changed, 69 insertions(+)

diff --git a/dev-libs/libtracefs/Manifest b/dev-libs/libtracefs/Manifest
index 2a637a33332c..d2acd5e5977d 100644
--- a/dev-libs/libtracefs/Manifest
+++ b/dev-libs/libtracefs/Manifest
@@ -1 +1,2 @@
 DIST libtracefs-1.3.1.tar.gz 175453 BLAKE2B 
d9801c9f50513a8b2d2de57f768aec69c3e47b4c41ba1e887b28465d3a0a6bf10e5d2c60f81615615176bdb65e10ef7e2b7dee5cbb214705cc69e55bb923231c
 SHA512 
1d8423ff1033a4ab601dd8e9fa4a801c27425234505070733641c8c9a4dd382cc6563d3fde89958f18e0bc95e2cbbdf65e69a2935fe208d5de9fd3ac26374ec1
+DIST libtracefs-1.4.2.tar.gz 178382 BLAKE2B 
a956423370077613417812ad18da284521e8798701d558f4e419af6c43bd8a06c489525bbab26e6bc5d5d5e8fd0e6a7322d34f976a4ea560670eb594818d07fc
 SHA512 
4a66c3cf8050de5acc4c63996cbcfa2c014e26ad6011eb89b0cff47ffbd6343637009354edf6bb173b9fd08103012774376c33fd6f642741f7990f2d6de3ea0c

diff --git a/dev-libs/libtracefs/files/libtracefs-1.4.2-fix-test.patch 
b/dev-libs/libtracefs/files/libtracefs-1.4.2-fix-test.patch
new file mode 100644
index 000000000000..fb2bdb2f5995
--- /dev/null
+++ b/dev-libs/libtracefs/files/libtracefs-1.4.2-fix-test.patch
@@ -0,0 +1,11 @@
+# Fix PATH_MAX not defined due to missing limits.h
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>

diff --git a/dev-libs/libtracefs/libtracefs-1.4.2.ebuild 
b/dev-libs/libtracefs/libtracefs-1.4.2.ebuild
new file mode 100644
index 000000000000..70e3e35683e6
--- /dev/null
+++ b/dev-libs/libtracefs/libtracefs-1.4.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2019-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Linux kernel trace file system library"
+HOMEPAGE="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/";
+
+if [[ ${PV} =~ [9]{4,} ]]; then
+       
EGIT_REPO_URI="git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+       inherit git-r3
+else
+       
SRC_URI="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/${P}.tar.gz";
+       KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="doc"
+RDEPEND="
+       >=dev-libs/libtraceevent-1.3.0
+"
+DEPEND="${RDEPEND}"
+# source-highlight is needed, see bug https://bugs.gentoo.org/865469
+BDEPEND="
+       virtual/pkgconfig
+       doc? ( app-text/xmlto app-text/asciidoc dev-util/source-highlight )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.2-fix-test.patch
+)
+
+src_configure() {
+       EMAKE_FLAGS=(
+               "prefix=${EPREFIX}/usr"
+               "libdir=${EPREFIX}/usr/$(get_libdir)"
+               "CC=$(tc-getCC)"
+               "AR=$(tc-getAR)"
+               VERBOSE=1
+       )
+}
+
+src_compile() {
+       emake "${EMAKE_FLAGS[@]}"
+       use doc && emake doc
+}
+
+src_install() {
+       emake "${EMAKE_FLAGS[@]}" DESTDIR="${ED}" install
+       # can't prevent installation of the static lib with parameters
+       rm "${ED}/usr/$(get_libdir)/libtracefs.a" || die
+       # install-doc is wrong target, see https://bugs.gentoo.org/865465
+       use doc && emake "${EMAKE_FLAGS[@]}" DESTDIR="${ED}" install_doc
+}

Reply via email to