commit: 7efb79339f8cfbb0ceb00bf2ebf3d56dee4ef0fe Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> AuthorDate: Sun Jun 29 12:01:03 2025 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Wed Jul 2 17:23:30 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7efb7933
net-p2p/transmission: use net-libs/mbedtls:3 Closes: https://bugs.gentoo.org/959271 Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42797 Closes: https://github.com/gentoo/gentoo/pull/42797 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> .../files/transmission-4.1.0-mbedtls-3.patch | 59 ++++++++++++++++++++++ ...2.ebuild => transmission-4.1.0_beta2-r1.ebuild} | 4 +- net-p2p/transmission/transmission-9999.ebuild | 9 +++- 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/net-p2p/transmission/files/transmission-4.1.0-mbedtls-3.patch b/net-p2p/transmission/files/transmission-4.1.0-mbedtls-3.patch new file mode 100644 index 000000000000..8a0a6ba64f8e --- /dev/null +++ b/net-p2p/transmission/files/transmission-4.1.0-mbedtls-3.patch @@ -0,0 +1,59 @@ +From https://github.com/transmission/transmission/pull/7631 +From: "Azamat H. Hackimov" <[email protected]> +Date: Thu, 26 Jun 2025 18:59:19 +0300 +Subject: [PATCH 1/2] Generate imported targets for MbedTLS + +This change allows to use MbedTLS 3.6 config module without significant +code alteration which simplifies integration with future versions of +MbedTLS. + +Signed-off-by: Azamat H. Hackimov <[email protected]> +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -298,8 +298,7 @@ if(WITH_CRYPTO STREQUAL "AUTO" OR WITH_CRYPTO STREQUAL "mbedtls") + tr_fixup_list_option(WITH_CRYPTO "mbedtls" MBEDTLS_FOUND "AUTO" MBEDTLS_IS_REQUIRED) + if(WITH_CRYPTO STREQUAL "mbedtls") + set(CRYPTO_PKG "mbedtls") +- set(CRYPTO_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIRS}) +- set(CRYPTO_LIBRARIES ${MBEDTLS_LIBRARIES}) ++ set(CRYPTO_LIBRARIES MbedTLS::mbedtls MbedTLS::mbedcrypto) + endif() + endif() + +--- a/cmake/FindMbedTLS.cmake ++++ b/cmake/FindMbedTLS.cmake +@@ -43,6 +43,22 @@ find_package_handle_standard_args(MbedTLS + MBEDTLS_INCLUDE_DIR + VERSION_VAR MBEDTLS_VERSION) + ++if(MBEDTLS_LIBRARY AND NOT TARGET MbedTLS::mbedtls) ++ add_library(MbedTLS::mbedtls UNKNOWN IMPORTED) ++ set_target_properties(MbedTLS::mbedtls PROPERTIES ++ IMPORTED_LOCATION ${MBEDTLS_LIBRARY} ++ INTERFACE_INCLUDE_DIRECTORIES ${MBEDTLS_INCLUDE_DIR} ++ ) ++endif() ++ ++if(MBEDCRYPTO_LIBRARY AND NOT TARGET MbedTLS::mbedcrypto) ++ add_library(MbedTLS::mbedcrypto UNKNOWN IMPORTED) ++ set_target_properties(MbedTLS::mbedcrypto PROPERTIES ++ IMPORTED_LOCATION ${MBEDCRYPTO_LIBRARY} ++ INTERFACE_INCLUDE_DIRECTORIES ${MBEDTLS_INCLUDE_DIR} ++ ) ++endif() ++ + mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDCRYPTO_LIBRARY) + + if(MBEDTLS_PREFER_STATIC_LIB) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,7 @@ set(GLIBMM_MINIMUM 2.60.0) + set(GTKMM3_MINIMUM 3.24.0) + set(GTKMM4_MINIMUM 4.11.1) + set(OPENSSL_MINIMUM 1.1.0) +-set(MBEDTLS_MINIMUM 1.3) ++set(MBEDTLS_MINIMUM 3.6) + set(NPM_MINIMUM 8.1.307) # Node.js 14 + set(PSL_MINIMUM 0.21.1) + set(QT_MINIMUM 5.6) diff --git a/net-p2p/transmission/transmission-4.1.0_beta2.ebuild b/net-p2p/transmission/transmission-4.1.0_beta2-r1.ebuild similarity index 96% rename from net-p2p/transmission/transmission-4.1.0_beta2.ebuild rename to net-p2p/transmission/transmission-4.1.0_beta2-r1.ebuild index 019844590783..067d0f3ac5ac 100644 --- a/net-p2p/transmission/transmission-4.1.0_beta2.ebuild +++ b/net-p2p/transmission/transmission-4.1.0_beta2-r1.ebuild @@ -3,6 +3,7 @@ EAPI=8 +CMAKE_REMOVE_MODULES_LIST=( FindMbedTLS ) inherit cmake flag-o-matic tmpfiles systemd xdg-utils if [[ ${PV} == 9999 ]]; then @@ -42,7 +43,7 @@ COMMON_DEPEND=" app-arch/libdeflate:=[gzip(+)] >=dev-libs/libevent-2.1.0:=[threads(+)] !mbedtls? ( dev-libs/openssl:0= ) - mbedtls? ( net-libs/mbedtls:0= ) + mbedtls? ( net-libs/mbedtls:3= ) net-libs/libnatpmp >=net-libs/libpsl-0.21.1 >=net-libs/miniupnpc-1.7:= @@ -69,6 +70,7 @@ RDEPEND="${COMMON_DEPEND} PATCHES=( "${FILESDIR}/transmission-dht-cmake-4.patch" + "${FILESDIR}/transmission-4.1.0-mbedtls-3.patch" ) src_prepare() { diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild index 5e09d9018343..82b81aec38aa 100644 --- a/net-p2p/transmission/transmission-9999.ebuild +++ b/net-p2p/transmission/transmission-9999.ebuild @@ -1,8 +1,9 @@ -# Copyright 2006-2024 Gentoo Authors +# Copyright 2006-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +CMAKE_REMOVE_MODULES_LIST=( FindMbedTLS ) inherit cmake flag-o-matic tmpfiles systemd xdg-utils if [[ ${PV} == 9999 ]]; then @@ -42,7 +43,7 @@ COMMON_DEPEND=" app-arch/libdeflate:=[gzip(+)] >=dev-libs/libevent-2.1.0:=[threads(+)] !mbedtls? ( dev-libs/openssl:0= ) - mbedtls? ( net-libs/mbedtls:0= ) + mbedtls? ( net-libs/mbedtls:3= ) net-libs/libnatpmp >=net-libs/libpsl-0.21.1 >=net-libs/miniupnpc-1.7:= @@ -67,6 +68,10 @@ RDEPEND="${COMMON_DEPEND} ${ACCT_DEPEND} " +PATCHES=( + "${FILESDIR}/transmission-4.1.0-mbedtls-3.patch" +) + src_configure() { local mycmakeargs=( -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
