diff --git a/net-p2p/transmission-components/Makefile b/net-p2p/transmission-components/Makefile index 8b5441b67a07..2015ec0a8b22 100644 --- a/net-p2p/transmission-components/Makefile +++ b/net-p2p/transmission-components/Makefile @@ -1,204 +1,204 @@ PORTNAME= transmission DISTVERSION= 4.0.6 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net-p2p MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${DISTVERSION}/ MAINTAINER= mondo.debater_0q@icloud.com COMMENT= Transmission BitTorrent client WWW= https://www.transmissionbt.com LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= ${LOCALBASE}/include/fast_float/fast_float.h:math/fast_float \ ${LOCALBASE}/include/fmt/format.h:devel/libfmt \ ${LOCALBASE}/include/rapidjson/rapidjson.h:devel/rapidjson \ ${LOCALBASE}/include/utf8cpp/utf8.h:devel/utf8cpp LIB_DEPENDS= libb64.so:converters/libb64 \ libcurl.so:ftp/curl \ libdeflate.so:archivers/libdeflate \ libdht.so:devel/jech-dht \ libevent.so:devel/libevent \ libminiupnpc.so:net/miniupnpc \ libnatpmp.so:net/libnatpmp \ libpsl.so:dns/libpsl \ libutp.so:net-p2p/libutp FLAVORS= cli docs daemon gtk qt utils web FLAVOR?= ${FLAVORS:[1]} .for flavor in ${FLAVORS} ${flavor}_PKGNAMESUFFIX= -${flavor} .endfor DESCR= ${PKGDIR}/pkg-descr.${FLAVOR} .if ${FLAVOR} == docs NO_BUILD= yes LIB_DEPENDS= .endif gtk_LIB_DEPENDS= libayatana-appindicator3.so:devel/libayatana-appindicator \ libharfbuzz.so:print/harfbuzz USES= cmake cpe iconv localbase pkgconfig ssl tar:xz CPE_VENDOR= transmissionbt CPE_PRODUCT= transmission EXTRACT_AFTER_ARGS= --exclude third-party/dht \ --exclude third-party/fast_float \ --exclude third-party/fmt \ --exclude third-party/libb64 \ --exclude third-party/libdeflate \ --exclude third-party/libevent \ --exclude third-party/libnatpmp \ --exclude third-party/libpsl \ --exclude third-party/libutp \ --exclude third-party/miniupnpc \ --exclude third-party/rapidjson \ --exclude third-party/utfcpp .if ${FLAVOR} == gtk USES+= desktop-file-utils gettext-runtime gettext-tools gnome USE_GNOME= gdkpixbuf glibmm gtkmm30 .endif .if ${FLAVOR} == qt USES+= desktop-file-utils qmake:no_env qt:5 USE_QT= core dbus gui network svg widgets buildtools:build \ linguisttools:build .endif .if ${FLAVOR} == daemon USE_RC_SUBR= transmission .endif .if ${FLAVOR} == docs USES= cpe tar:xz .endif .if ${FLAVOR} == web USES= cpe tar:xz NO_ARCH= yes NO_BUILD= yes .endif CMAKE_ON= USE_SYSTEM_B64 USE_SYSTEM_DEFLATE USE_SYSTEM_DHT \ USE_SYSTEM_EVENT2 USE_SYSTEM_MINIUPNPC USE_SYSTEM_NATPMP \ USE_SYSTEM_PSL USE_SYSTEM_UTP CMAKE_OFF= ENABLE_MAC REBUILD_WEB WITH_SYSTEMD .if ${FLAVOR:Ndocs} USERS= transmission GROUPS= transmission .endif PLIST= ${PKGDIR}/pkg-plist.${FLAVOR} .if ${FLAVOR} == cli CMAKE_ON+= ENABLE_CLI CMAKE_OFF+= ENABLE_DAEMON ENABLE_GTK ENABLE_QT ENABLE_UTILS INSTALL_WEB .endif .if ${FLAVOR} == daemon CMAKE_ON+= ENABLE_DAEMON CMAKE_OFF+= ENABLE_CLI ENABLE_GTK ENABLE_QT ENABLE_UTILS INSTALL_WEB .endif .if ${FLAVOR} == gtk CMAKE_ARGS+= -DUSE_GTK_VERSION=3 CMAKE_ON+= ENABLE_GTK GTK_IS_REQUIRED CMAKE_OFF+= ENABLE_CLI ENABLE_DAEMON ENABLE_UTILS INSTALL_WEB .endif .if ${FLAVOR} == qt CMAKE_ARGS+= -DUSE_QT_VERSION=5 CMAKE_ON+= ENABLE_QT QT_IS_REQUIRED CMAKE_OFF+= ENABLE_CLI ENABLE_DAEMON ENABLE_UTILS INSTALL_WEB .endif .if ${FLAVOR} == utils CMAKE_ON+= ENABLE_UTILS CMAKE_OFF+= ENABLE_CLI ENABLE_DAEMON ENABLE_GTK ENABLE_QT ENABLE_TESTS \ ENABLE_WERROR INSTALL_WEB .endif OPTIONS_FILE= ${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options .if ${FLAVOR:Mdocs} OPTIONS_DEFINE= .endif .if ${FLAVOR:Mweb} OPTIONS_DEFINE= .endif .if ${FLAVOR:Nweb} && ${FLAVOR:Ndocs} OPTIONS_DEFINE= NLS TESTS OPTIONS_DEFAULT= NLS .endif OPTIONS_SUB= yes daemon_DESC= Build daemon docs_DESC= Install documentation gtk_DESC= Build GTK+ client qt_DESC= Build Qt client TESTS_DESC= Build & run unit tests utils_DESC= Build utilities (create, edit, remote, show) cli_DESC= Build command-line client (deprecated) web_DESC= Install web interface NLS_USES= gettext-runtime:lib NLS_CMAKE_BOOL= ENABLE_NLS TESTS_CMAKE_BOOL= ENABLE_TESTS UTILS_CMAKE_BOOL= ENABLE_UTILS WEB_CMAKE_BOOL= INSTALL_WEB .if ${FLAVOR} == docs pre-install: @${ECHO_MSG} "Removing outdated release notes" @${FIND} ${WRKSRC}/news \( -name 'news-[0-3]*' -o -name '*beta*' \) -delete do-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} @cd ${WRKSRC} ; ${CP} AUTHORS ${STAGEDIR}${DOCSDIR} ;\ ${CP} COPYING ${STAGEDIR}${DOCSDIR} ;\ ${CP} README.md ${STAGEDIR}${DOCSDIR} @cd ${WRKSRC}/docs ; ${CP} rpc-spec.md ${STAGEDIR}${DOCSDIR} @cd ${WRKSRC}/extras ; ${CP} send-email-when-torrent-done.sh ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR}/news @cd ${WRKSRC}/news ; ${CP} -R . ${STAGEDIR}${DOCSDIR}/news .endif .if ${FLAVOR} == qt post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps ${INSTALL_DATA} ${WRKSRC}/qt/icons/transmission.svg \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/transmission-qt.svg .endif .if ${FLAVOR} == daemon post-install: ${MKDIR} ${STAGEDIR}${ETCDIR}/home .endif .if ${FLAVOR} == web do-install: ( cd ${WRKSRC}/web && ${COPYTREE_SHARE} public_html ${STAGEDIR}${DATADIR} ) .endif post-install-TESTS-on: @${ECHO_MSG} "Running tests..." @cd ${BUILD_WRKSRC}/tests/libtransmission/ && \ eval ${BUILD_WRKSRC}/tests/libtransmission/libtransmission-test \ --gtest_filter="-DhtTest.usesBootstrapFile" \ #fails in poudriere due to lack of networking, passes otherwise --gtest_brief=1 \ .include diff --git a/net-p2p/transmission-components/files/patch-cmake_FindFmt.cmake b/net-p2p/transmission-components/files/patch-cmake_FindFmt.cmake index f5ba5dee86f9..c1b115e1dc75 100644 --- a/net-p2p/transmission-components/files/patch-cmake_FindFmt.cmake +++ b/net-p2p/transmission-components/files/patch-cmake_FindFmt.cmake @@ -1,11 +1,26 @@ ---- cmake/FindFmt.cmake.orig 2024-04-30 16:44:38 UTC +--- cmake/FindFmt.cmake.orig 2025-10-15 08:40:38 UTC +++ cmake/FindFmt.cmake -@@ -2,7 +2,7 @@ target_include_directories(fmt::fmt-header-only +@@ -1,10 +1,21 @@ add_library(fmt::fmt-header-only INTERFACE IMPORTED) + add_library(fmt::fmt-header-only INTERFACE IMPORTED) ++set(${CMAKE_FIND_PACKAGE_NAME}_INCLUDE "${CMAKE_INSTALL_PREFIX}/include") ++ target_include_directories(fmt::fmt-header-only INTERFACE - ${CMAKE_CURRENT_LIST_DIR}/../third-party/fmt/include) -+ ${CMAKE_INSTALL_PREFIX}/include) ++ ${${CMAKE_FIND_PACKAGE_NAME}_INCLUDE}) ++file(READ "${${CMAKE_FIND_PACKAGE_NAME}_INCLUDE}/fmt/base.h" _FMT_BASE_H) ++if(_FMT_BASE_H MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])") ++ # Use math to skip leading zeros if any. ++ math(EXPR _FMT_VERSION_MAJOR ${CMAKE_MATCH_1}) ++ math(EXPR _FMT_VERSION_MINOR ${CMAKE_MATCH_2}) ++ math(EXPR _FMT_VERSION_PATCH ${CMAKE_MATCH_3}) ++ set(${CMAKE_FIND_PACKAGE_NAME}_VERSION "${_FMT_VERSION_MAJOR}.${_FMT_VERSION_MINOR}.${_FMT_VERSION_PATCH}") ++endif() ++ target_compile_definitions(fmt::fmt-header-only INTERFACE +- FMT_EXCEPTIONS=0 ++ $,FMT_USE_EXCEPTIONS,FMT_EXCEPTIONS>=0 + FMT_HEADER_ONLY=1) diff --git a/net-p2p/transmission-components/files/patch-gtk_DetailsDialog.cc b/net-p2p/transmission-components/files/patch-gtk_DetailsDialog.cc index 0964723351fa..48aba6f6ccdd 100644 --- a/net-p2p/transmission-components/files/patch-gtk_DetailsDialog.cc +++ b/net-p2p/transmission-components/files/patch-gtk_DetailsDialog.cc @@ -1,10 +1,30 @@ ---- gtk/DetailsDialog.cc.orig 2025-08-09 13:07:00 UTC +--- gtk/DetailsDialog.cc.orig 2025-10-15 08:45:18 UTC +++ gtk/DetailsDialog.cc -@@ -49,6 +49,7 @@ +@@ -49,10 +49,12 @@ #include #include +#include #include #include + #include ++#include + #include + #include // abort() + #include +@@ -606,12 +608,12 @@ void gtr_text_buffer_set_text(Glib::RefPtr + #include + + #include "transmission.h" +@@ -105,7 +106,7 @@ void tr_session_alt_speeds::setActive(bool active, Cha + + [[nodiscard]] bool tr_session_alt_speeds::isActiveMinute(time_t time) const noexcept + { +- auto const tm = fmt::localtime(time); ++ auto const tm = *std::localtime(&time); + + size_t minute_of_the_week = tm.tm_wday * MinutesPerDay + tm.tm_hour * MinutesPerHour + tm.tm_min; + diff --git a/net-p2p/transmission-components/files/patch-libtransmission_torrent.cc b/net-p2p/transmission-components/files/patch-libtransmission_torrent.cc new file mode 100644 index 000000000000..eb34b93d0803 --- /dev/null +++ b/net-p2p/transmission-components/files/patch-libtransmission_torrent.cc @@ -0,0 +1,28 @@ +--- libtransmission/torrent.cc.orig 2025-10-15 08:51:36 UTC ++++ libtransmission/torrent.cc +@@ -6,6 +6,7 @@ + #include + #include + #include // EINVAL ++#include + #include /* INT_MAX */ + #include /* signal() */ + #include +@@ -438,6 +439,8 @@ void torrentCallScript(tr_torrent const* tor, std::str + return; + } + ++ auto const now = tr_time(); ++ + auto torrent_dir = tr_pathbuf{ tor->currentDir() }; + tr_sys_path_native_separators(std::data(torrent_dir)); + +@@ -447,7 +450,7 @@ void torrentCallScript(tr_torrent const* tor, std::str + auto const labels_str = buildLabelsString(tor); + auto const trackers_str = buildTrackersString(tor); + auto const bytes_downloaded_str = std::to_string(tor->downloadedCur + tor->downloadedPrev); +- auto const localtime_str = fmt::format("{:%a %b %d %T %Y%n}", fmt::localtime(tr_time())); ++ auto const localtime_str = fmt::format("{:%a %b %d %T %Y%n}", *std::localtime(&now)); + + auto const env = std::map{ + { "TR_APP_VERSION"sv, SHORT_VERSION_STRING }, diff --git a/net-p2p/transmission-components/files/patch-utils_remote.cc b/net-p2p/transmission-components/files/patch-utils_remote.cc new file mode 100644 index 000000000000..77f47c740d09 --- /dev/null +++ b/net-p2p/transmission-components/files/patch-utils_remote.cc @@ -0,0 +1,19 @@ +--- utils/remote.cc.orig 2025-10-15 08:53:57 UTC ++++ utils/remote.cc +@@ -8,6 +8,7 @@ + #include /* isspace */ + #include // PRId64 + #include ++#include + #include + #include + #include +@@ -900,7 +901,7 @@ static char* format_date(char* buf, size_t buflen, tim + + static char* format_date(char* buf, size_t buflen, time_t now) + { +- *fmt::format_to_n(buf, buflen - 1, "{:%a %b %d %T %Y}", fmt::localtime(now)).out = '\0'; ++ *fmt::format_to_n(buf, buflen - 1, "{:%a %b %d %T %Y}", *std::localtime(&now)).out = '\0'; + return buf; + } + diff --git a/net-p2p/transmission-components/files/patch-utils_show.cc b/net-p2p/transmission-components/files/patch-utils_show.cc new file mode 100644 index 000000000000..45ba2fda2d37 --- /dev/null +++ b/net-p2p/transmission-components/files/patch-utils_show.cc @@ -0,0 +1,11 @@ +--- utils/show.cc.orig 2025-10-15 08:54:46 UTC ++++ utils/show.cc +@@ -160,7 +160,7 @@ int parseCommandLine(app_opts& opts, int argc, char co + + [[nodiscard]] auto toString(time_t now) + { +- return now == 0 ? "Unknown" : fmt::format("{:%a %b %d %T %Y}", fmt::localtime(now)); ++ return now == 0 ? "Unknown" : fmt::format("{:%a %b %d %T %Y}", *std::localtime(&now)); + } + + bool compareSecondField(std::string_view l, std::string_view r) diff --git a/net-p2p/transmission/Makefile b/net-p2p/transmission/Makefile index 3a1bc4439f62..bdf5197b84c2 100644 --- a/net-p2p/transmission/Makefile +++ b/net-p2p/transmission/Makefile @@ -1,33 +1,33 @@ PORTNAME= transmission DISTVERSION= 4.0.6 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net-p2p MAINTAINER= mondo.debater_0q@icloud.com COMMENT= Transmission BitTorrent client WWW= https://www.transmissionbt.com LICENSE= GPLv3+ USES= metaport OPTIONS_DEFINE= CLI DAEMON DOCS GTK QT UTILS WEB OPTIONS_DEFAULT= CLI DAEMON GTK QT UTILS WEB CLI_DESC= Build command-line client (deprecated) DAEMON_DESC= Build daemon DOCS_DESC= Install documentation GTK_DESC= Build GTK+ client QT_DESC= Build Qt client UTILS_DESC= Build utilities (create, edit, remote, show) WEB_DESC= Install web interface CLI_RUN_DEPENDS= transmission-cli:net-p2p/transmission-components@cli DAEMON_RUN_DEPENDS= transmission-daemon:net-p2p/transmission-components@daemon DOCS_RUN_DEPENDS= ${DOCSDIR}/README.md:net-p2p/transmission-components@docs GTK_RUN_DEPENDS= transmission-gtk:net-p2p/transmission-components@gtk QT_RUN_DEPENDS= transmission-qt:net-p2p/transmission-components@qt UTILS_RUN_DEPENDS= transmission-create:net-p2p/transmission-components@utils WEB_RUN_DEPENDS= ${DATADIR}/public_html/index.html:net-p2p/transmission-components@web .include