From 2e53d380fb1b13ce3fa5b0e3908ce43d27c8a3eb Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 22 May 2024 18:30:25 +0200 Subject: [PATCH 01/11] app-text/libmspub: Fix build w/ ICU-75, update EAPI 7 -> 8 Closes: https://bugs.gentoo.org/932494 Signed-off-by: Andreas Sturmlechner --- app-text/libmspub/libmspub-0.1.4.ebuild | 16 ++++++++-------- app-text/libmspub/libmspub-9999.ebuild | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app-text/libmspub/libmspub-0.1.4.ebuild b/app-text/libmspub/libmspub-0.1.4.ebuild index dfb60ca4296b2..78d0df1963cf4 100644 --- a/app-text/libmspub/libmspub-0.1.4.ebuild +++ b/app-text/libmspub/libmspub-0.1.4.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit autotools flag-o-matic @@ -19,18 +19,18 @@ LICENSE="LGPL-2.1" SLOT="0" IUSE="doc static-libs" -BDEPEND=" - virtual/pkgconfig - doc? ( app-text/doxygen ) -" RDEPEND=" dev-libs/icu:= dev-libs/librevenge sys-libs/zlib " DEPEND="${RDEPEND} - dev-libs/boost dev-build/libtool + dev-libs/boost +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) " PATCHES=( "${FILESDIR}/${P}-gcc10.patch" ) @@ -44,8 +44,8 @@ src_prepare() { } src_configure() { - # bug 619044 - append-cxxflags -std=c++14 + # bug 619044, 932494 + append-cxxflags -std=c++17 local myeconfargs=( --disable-werror diff --git a/app-text/libmspub/libmspub-9999.ebuild b/app-text/libmspub/libmspub-9999.ebuild index 81c8ae0ea3ecc..f42bebd2d32f1 100644 --- a/app-text/libmspub/libmspub-9999.ebuild +++ b/app-text/libmspub/libmspub-9999.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit autotools flag-o-matic -if [[ ${PV} = *9999 ]]; then +if [[ ${PV} = *9999* ]]; then EGIT_REPO_URI="https://anongit.freedesktop.org/git/libreoffice/libmspub.git" inherit git-r3 else @@ -19,18 +19,18 @@ LICENSE="LGPL-2.1" SLOT="0" IUSE="doc static-libs" -BDEPEND=" - virtual/pkgconfig - doc? ( app-text/doxygen ) -" RDEPEND=" dev-libs/icu:= dev-libs/librevenge sys-libs/zlib " DEPEND="${RDEPEND} - dev-libs/boost dev-build/libtool + dev-libs/boost +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) " src_prepare() { @@ -42,8 +42,8 @@ src_prepare() { } src_configure() { - # bug 619044 - append-cxxflags -std=c++14 + # bug 619044, 932494 + append-cxxflags -std=c++17 local myeconfargs=( --disable-werror From 31586e0747139c56007fbddc660a04e453271843 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 22 May 2024 18:34:24 +0200 Subject: [PATCH 02/11] media-libs/libvisio: Fix build w/ ICU-75 Closes: https://bugs.gentoo.org/932496 Signed-off-by: Andreas Sturmlechner --- media-libs/libvisio/libvisio-0.1.7.ebuild | 4 ++-- media-libs/libvisio/libvisio-9999.ebuild | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/media-libs/libvisio/libvisio-0.1.7.ebuild b/media-libs/libvisio/libvisio-0.1.7.ebuild index 6559e28557cd7..3ca3071ebb83f 100644 --- a/media-libs/libvisio/libvisio-0.1.7.ebuild +++ b/media-libs/libvisio/libvisio-0.1.7.ebuild @@ -45,8 +45,8 @@ src_prepare() { } src_configure() { - # bug 619688 - append-cxxflags -std=c++14 + # bug 619688, 932496 + append-cxxflags -std=c++17 local myeconfargs=( $(use_with doc docs) diff --git a/media-libs/libvisio/libvisio-9999.ebuild b/media-libs/libvisio/libvisio-9999.ebuild index afb540c46a513..f9f22b09cf32b 100644 --- a/media-libs/libvisio/libvisio-9999.ebuild +++ b/media-libs/libvisio/libvisio-9999.ebuild @@ -45,8 +45,8 @@ src_prepare() { } src_configure() { - # bug 619688 - append-cxxflags -std=c++14 + # bug 619688, 932496 + append-cxxflags -std=c++17 local myeconfargs=( $(use_with doc docs) From 4b23e98d6eec2b7ba230f9fc8e51402605856e5d Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 22 May 2024 18:45:17 +0200 Subject: [PATCH 03/11] dev-libs/xerces-c: Fix build w/ ICU-75 Closes: https://bugs.gentoo.org/931105 Signed-off-by: Andreas Sturmlechner --- dev-libs/xerces-c/files/xerces-c-3.2.5-cxx17.patch | 11 +++++++++++ dev-libs/xerces-c/xerces-c-3.2.5.ebuild | 1 + 2 files changed, 12 insertions(+) create mode 100644 dev-libs/xerces-c/files/xerces-c-3.2.5-cxx17.patch diff --git a/dev-libs/xerces-c/files/xerces-c-3.2.5-cxx17.patch b/dev-libs/xerces-c/files/xerces-c-3.2.5-cxx17.patch new file mode 100644 index 0000000000000..ed47510e08ad2 --- /dev/null +++ b/dev-libs/xerces-c/files/xerces-c-3.2.5-cxx17.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,7 +23,7 @@ + + # Try C++14, then fall back to C++11 and C++98. Used for feature tests + # for optional features. +-set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_CXX_STANDARD 17) + + # Use folders (for IDE project grouping) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/dev-libs/xerces-c/xerces-c-3.2.5.ebuild b/dev-libs/xerces-c/xerces-c-3.2.5.ebuild index 2ff3cf44a5bcb..e134d155af4b2 100644 --- a/dev-libs/xerces-c/xerces-c-3.2.5.ebuild +++ b/dev-libs/xerces-c/xerces-c-3.2.5.ebuild @@ -35,6 +35,7 @@ DOCS=( CREDITS KEYS NOTICE README ) PATCHES=( "${FILESDIR}"/${PN}-3.2.4-strict-aliasing.patch + "${FILESDIR}"/${P}-cxx17.patch # bug 931105 ) pkg_setup() { From a8cbbe6b8f6df4990000594f5688fd207ba79d28 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 18 May 2024 17:51:49 -0400 Subject: [PATCH 04/11] dev-util/git-fixup: Add new package, version 1.6.1 Signed-off-by: Matt Turner --- dev-util/git-fixup/Manifest | 1 + dev-util/git-fixup/git-fixup-1.6.1.ebuild | 26 +++++++++++++++++++++++ dev-util/git-fixup/metadata.xml | 11 ++++++++++ 3 files changed, 38 insertions(+) create mode 100644 dev-util/git-fixup/Manifest create mode 100644 dev-util/git-fixup/git-fixup-1.6.1.ebuild create mode 100644 dev-util/git-fixup/metadata.xml diff --git a/dev-util/git-fixup/Manifest b/dev-util/git-fixup/Manifest new file mode 100644 index 0000000000000..b815f8a8beeac --- /dev/null +++ b/dev-util/git-fixup/Manifest @@ -0,0 +1 @@ +DIST git-fixup-1.6.1.tar.gz 8571 BLAKE2B 4451f1af753d6bd13a5a9d11f79b313f8a2b00f2f386c89eb14e8d2af6cf9c1f424328912160d2059b173fc9f64271872a816b53de340413ef779ff6bcc21bfc SHA512 502d0a188333420ea2467bfc22bbfeefab595cc951777403baaafaa14b34c138adaee590fdc09ce71faf58d13666f85cdd8495a4039632c73d269565336c381f diff --git a/dev-util/git-fixup/git-fixup-1.6.1.ebuild b/dev-util/git-fixup/git-fixup-1.6.1.ebuild new file mode 100644 index 0000000000000..8ea2e80d5334d --- /dev/null +++ b/dev-util/git-fixup/git-fixup-1.6.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/keis/git-fixup" + inherit git-r3 +else + SRC_URI="https://github.com/keis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Fighting the copy-paste element of your rebase workflow" +HOMEPAGE="https://github.com/keis/git-fixup" + +LICENSE="ISC" +SLOT="0" + +RDEPEND="! + + + + mattst88@gentoo.org + Matt Turner + + + keis/git-fixup + + From c5ec870bb471c02afde3265db8eb2183a1a37cf7 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 22 May 2024 18:55:18 +0200 Subject: [PATCH 05/11] dev-db/kdb: Fix build w/ ICU-75 Signed-off-by: Andreas Sturmlechner --- dev-db/kdb/kdb-3.2.0-r2.ebuild | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-db/kdb/kdb-3.2.0-r2.ebuild b/dev-db/kdb/kdb-3.2.0-r2.ebuild index 10bcdad1f64e3..f62284ddcc1da 100644 --- a/dev-db/kdb/kdb-3.2.0-r2.ebuild +++ b/dev-db/kdb/kdb-3.2.0-r2.ebuild @@ -61,6 +61,7 @@ pkg_setup() { src_configure() { local mycmakeargs=( + -DCMAKE_CXX_STANDARD=17 -DKDB_DEBUG_GUI=$(usex debug) $(cmake_use_find_package mysql MySQL) $(cmake_use_find_package postgres PostgreSQL) From 9165284da18643f84258374610687a347937face Mon Sep 17 00:00:00 2001 From: "Karlson2k (Evgeny Grin)" Date: Wed, 22 May 2024 13:51:56 +0200 Subject: [PATCH 06/11] net-libs/libmicrohttpd: mute QA warning with clang This is actually a workaround for clang bug. Closes: https://bugs.gentoo.org/923760 Signed-off-by: Karlson2k (Evgeny Grin) Closes: https://github.com/gentoo/gentoo/pull/36774 Signed-off-by: Sam James --- net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild | 2 ++ net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild | 6 ++++++ net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild b/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild index 03bfe985f82fa..23248a0a4ddd2 100644 --- a/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild +++ b/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild @@ -30,6 +30,7 @@ PATCHES=( "${FILESDIR}"/${PN}-0.9.75-fix-testsuite-with-lto.patch ) # All checks in libmicrohttpd's configure are correct # Gentoo Bug #898662 +# Gentoo Bug #923760 QA_CONFIG_IMPL_DECL_SKIP=( 'pthread_sigmask' 'CreateThread' @@ -64,6 +65,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( 'sysctlbyname' 'usleep' 'nanosleep' + 'stpncpy' ) multilib_src_configure() { diff --git a/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild b/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild index d0eed498d5a53..4e246d2365161 100644 --- a/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild +++ b/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild @@ -27,6 +27,12 @@ BDEPEND="ssl? ( virtual/pkgconfig )" DOCS=( AUTHORS NEWS COPYING README ChangeLog ) +# All checks in libmicrohttpd's configure are correct +# Gentoo Bug #923760 +QA_CONFIG_IMPL_DECL_SKIP=( + 'stpncpy' +) + pkg_pretend() { if use kernel_linux ; then CONFIG_CHECK="" diff --git a/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild b/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild index bf51ab8876523..149b791325ffa 100644 --- a/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild +++ b/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild @@ -27,6 +27,12 @@ BDEPEND="ssl? ( virtual/pkgconfig )" DOCS=( AUTHORS NEWS COPYING README ChangeLog ) +# All checks in libmicrohttpd's configure are correct +# Gentoo Bug #923760 +QA_CONFIG_IMPL_DECL_SKIP=( + 'stpncpy' +) + pkg_pretend() { if use kernel_linux ; then CONFIG_CHECK="" From 134a587cb1e2067712125b90ac36c99c731ffab5 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 22 May 2024 18:03:01 +0100 Subject: [PATCH 07/11] dev-qt/qtwebengine: Stabilize 5.15.13_p20240510 arm64, #931961 Signed-off-by: Sam James --- dev-qt/qtwebengine/qtwebengine-5.15.13_p20240510.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.13_p20240510.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.13_p20240510.ebuild index 009eada0b8ecd..3e3c2e1e5af48 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.15.13_p20240510.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.15.13_p20240510.ebuild @@ -12,7 +12,7 @@ DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applic HOMEPAGE="https://www.qt.io/" if [[ ${QT5_BUILD_TYPE} == release ]]; then - KEYWORDS="~amd64 ~arm64 ~x86" + KEYWORDS="~amd64 arm64 ~x86" if [[ ${PV} == ${QT5_PV}_p* ]]; then SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz" S="${WORKDIR}/${P}" From 4695936558bce9e5073f5de4cef7f3f8e0cb2fb1 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 22 May 2024 18:04:26 +0100 Subject: [PATCH 08/11] net-libs/libmicrohttpd: crank copyright Signed-off-by: Sam James --- net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild | 2 +- net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild b/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild index 23248a0a4ddd2..559ef0ee54abc 100644 --- a/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild +++ b/net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" diff --git a/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild b/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild index 4e246d2365161..61956a4b3cf27 100644 --- a/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild +++ b/net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" From 23f1ae4b297222620b6ba3ef6b7383838950239f Mon Sep 17 00:00:00 2001 From: "Karlson2k (Evgeny Grin)" Date: Wed, 22 May 2024 11:20:38 +0200 Subject: [PATCH 09/11] net-libs/libmicrohttpd: fix ebuild file 'verify-sig' was added accidentally and non-functional currently. Signed-off-by: Karlson2k (Evgeny Grin) Closes: https://github.com/gentoo/gentoo/pull/36768 Signed-off-by: Sam James --- net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild b/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild index 149b791325ffa..ae6f6ca11cdae 100644 --- a/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild +++ b/net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild @@ -15,7 +15,7 @@ S="${WORKDIR}"/${MY_P} LICENSE="|| ( LGPL-2.1+ !ssl? ( GPL-2+-with-eCos-exception-2 ) )" SLOT="0/12" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="debug +epoll +eventfd ssl static-libs test +thread-names verify-sig" +IUSE="debug +epoll +eventfd ssl static-libs test +thread-names" REQUIRED_USE="epoll? ( kernel_linux )" RESTRICT="!test? ( test )" From 7ddbe4653c28dc3bd082308bf1818137debb5b3c Mon Sep 17 00:00:00 2001 From: "Karlson2k (Evgeny Grin)" Date: Wed, 22 May 2024 12:30:51 +0200 Subject: [PATCH 10/11] net-misc/r8125: improve setting for 'ptp' USE flag The upstream fixed compatibility of various build flags, there is no need anymore to disable some features, when PTP is enabled. Also update the upstream homepage URL. Signed-off-by: Karlson2k (Evgeny Grin) Closes: https://github.com/gentoo/gentoo/pull/36771 Signed-off-by: Sam James --- net-misc/r8125/r8125-9.013.02-r1.ebuild | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 net-misc/r8125/r8125-9.013.02-r1.ebuild diff --git a/net-misc/r8125/r8125-9.013.02-r1.ebuild b/net-misc/r8125/r8125-9.013.02-r1.ebuild new file mode 100644 index 0000000000000..56829dd9ebd51 --- /dev/null +++ b/net-misc/r8125/r8125-9.013.02-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 + +DESCRIPTION="r8125 vendor driver for Realtek RTL8125 PCI-E NICs" +HOMEPAGE="https://www.realtek.com/Download/List?cate_id=584" +# Mirrored to avoid captcha +SRC_URI="https://github.com/Karlson2k/r8125/releases/download/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="+multi-tx-q ptp +rss use-firmware" + +CONFIG_CHECK="~!R8169" +WARNING_R8169="CONFIG_R8169 is enabled. ${PN} will not be loaded unless kernel driver Realtek 8169 PCI Gigabit Ethernet (CONFIG_R8169) is DISABLED." + +src_compile() { + local modlist=( ${PN}=kernel/drivers/net/ethernet/realtek:src ) + local modargs=( + # Build parameters + KERNELDIR="${KV_OUT_DIR}" + # Configuration settings + ENABLE_PTP_SUPPORT=$(usex ptp y n) + ENABLE_RSS_SUPPORT=$(usex rss y n) + ENABLE_MULTIPLE_TX_QUEUE=$(usex multi-tx-q y n) + ENABLE_USE_FIRMWARE_FILE=$(usex use-firmware y n) + ENABLE_PAGE_REUSE=y + ENABLE_RX_PACKET_FRAGMENT=y + ) + + linux-mod-r1_src_compile +} From f425b156d1ce0e2607795ee14facd8fb98e4642b Mon Sep 17 00:00:00 2001 From: Christopher Byrne Date: Wed, 22 May 2024 11:44:59 -0500 Subject: [PATCH 11/11] app-crypt/tpm2-tss: Hide write_all symbol to fix tpm2-abrmd crash on clang/lld Closes: https://bugs.gentoo.org/923411 Closes: https://bugs.gentoo.org/923412 Signed-off-by: Christopher Byrne Closes: https://github.com/gentoo/gentoo/pull/36777 Signed-off-by: Sam James --- ...m2-tss-4.0.2-Hide-write-all-function.patch | 24 ++++ app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild | 110 ++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch create mode 100644 app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch new file mode 100644 index 0000000000000..bd682df53bac2 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Hide-write-all-function.patch @@ -0,0 +1,24 @@ +diff --git a/src/util/io.c b/src/util/io.c +index c6446826..50c0fd6c 100644 +--- a/src/util/io.c ++++ b/src/util/io.c +@@ -81,6 +81,7 @@ read_all ( + return recvd_total; + } + ++__attribute__ ((visibility("hidden"))) + ssize_t + write_all ( + SOCKET fd, +diff --git a/src/util/io.h b/src/util/io.h +index 25dd5c45..fec391d8 100644 +--- a/src/util/io.h ++++ b/src/util/io.h +@@ -70,6 +70,7 @@ read_all ( + * are detected. This is currently limited to interrupted system calls and + * short writes. + */ ++__attribute__ ((visibility("hidden"))) + ssize_t + write_all ( + SOCKET fd, diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild new file mode 100644 index 0000000000000..1ada848dd5d2e --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.2-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev + +DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" +HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0/4" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc +fapi +openssl mbedtls +policy static-libs test" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ^^ ( mbedtls openssl ) + fapi? ( openssl !mbedtls ) + policy? ( openssl !mbedtls ) +" + +RDEPEND=" + acct-group/tss + acct-user/tss + sys-apps/util-linux:=[${MULTILIB_USEDEP}] + fapi? ( + dev-libs/json-c:=[${MULTILIB_USEDEP}] + >=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] + ) + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] ) + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${RDEPEND} + test? ( app-crypt/swtpm + dev-libs/uthash + dev-util/cmocka + fapi? ( >=net-misc/curl-7.80.0 ) ) +" + +BDEPEND=" + sys-apps/acl + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.2-Dont-install-files-into-run.patch" + "${FILESDIR}/${PN}-4.0.1-Make-sysusers-and-tmpfiles-optional.patch" + "${FILESDIR}/${PN}-4.0.1-Do-not-consider-failures-to-write-files-in-sys-hard.patch" + "${FILESDIR}/${PN}-4.0.2-Hide-write-all-function.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~TCG_TPM" + linux-info_pkg_setup + kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required" +} + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + # Fails with inlining + filter-flags -fno-semantic-interposition + # tests fail with LTO enabbled. See bug 865275 and 865279 + filter-lto + + local myconf=( + --localstatedir=/var + $(multilib_native_use_enable doc doxygen-doc) + $(use_enable fapi) + $(use_enable policy) + $(use_enable static-libs static) + $(multilib_native_use_enable test unit) + $(multilib_native_use_enable test integration) + $(multilib_native_use_enable test self-generated-certificate) + --disable-tcti-libtpms + --disable-defaultflags + --disable-weakcrypto + --with-crypto="$(usex mbedtls mbed ossl)" + --with-runstatedir=/run + --with-udevrulesdir="$(get_udevdir)/rules.d" + --with-udevrulesprefix=60- + --without-sysusersdir + --with-tmpfilesdir="/usr/lib/tmpfiles.d" + ) + + ECONF_SOURCE=${S} econf "${myconf[@]}" +} + +multilib_src_install() { + default + keepdir /var/lib/tpm2-tss/system/keystore + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process tpm2-tss-fapi.conf + udev_reload +} + +pkg_postrm() { + udev_reload +}