diff --git a/net-p2p/transmission/Makefile b/net-p2p/transmission/Makefile index 706724e8c8da..10c1b2de41e1 100644 --- a/net-p2p/transmission/Makefile +++ b/net-p2p/transmission/Makefile @@ -1,190 +1,190 @@ PORTNAME= transmission DISTVERSION= 4.0.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-p2p MAINTAINER= mondo.debater_0q@icloud.com COMMENT= Transmission BitTorrent client WWW= https://www.transmissionbt.com LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libb64.so:converters/libb64 \ libcurl.so:ftp/curl \ libdeflate.so:archivers/libdeflate \ libdht.so:devel/jech-dht \ libevent.so:devel/libevent \ libfmt.so:devel/libfmt \ libminiupnpc.so:net/miniupnpc \ libnatpmp.so:net/libnatpmp \ libpsl.so:dns/libpsl \ libutp.so:net-p2p/libutp FLAVORS= default cli daemon gtk qt utils FLAVOR?= ${FLAVORS:[1]} .for flavor in ${FLAVORS} ${flavor}_PKGNAMESUFFIX= -${flavor} .endfor CONFLICTS_INSTALL= transmission-default default_CONFLICTS_INSTALL= transmission-* gtk_LIB_DEPENDS= libayatana-appindicator3.so:devel/libayatana-appindicator \ libharfbuzz.so:print/harfbuzz GTK_LIB_DEPENDS= ${gtk_LIB_DEPENDS} USES= cmake cpe iconv libtool localbase pkgconfig ssl CPE_VENDOR= transmissionbt CPE_PRODUCT= transmission USE_GITHUB= YES GH_TUPLE= google:googletest:af29db7:googletest/third-party/googletest \ transmission:fast_float:6624977:fast_float/third-party/fast_float \ transmission:utfcpp:b85efd6:utfcpp/third-party/utfcpp \ transmission:wide-integer:4de0b52:wideinteger/third-party/wide-integer .if ${FLAVOR} == gtk USES+= desktop-file-utils gettext-runtime gettext-tools gnome USE_GNOME= gdkpixbuf2 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 USE_RC_SUBR= transmission CMAKE_ARGS= -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=${LOCALBASE}/include \ -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=${LOCALBASE}/include \ -DCMAKE_INSTALL_MANDIR="${PREFIX}/man" 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 USERS= transmission GROUPS= transmission 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 .endif .if ${FLAVOR} == gtk CMAKE_ON+= ${GTK_CMAKE_ON} CMAKE_ARGS+= ${GTK_CMAKE_ARGS} CMAKE_OFF+= ENABLE_CLI ENABLE_DAEMON ENABLE_UTILS INSTALL_WEB .endif .if ${FLAVOR} == qt CMAKE_ON+= ${QT_CMAKE_ON} CMAKE_ARGS+= ${QT_CMAKE_ARGS} 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_DEFINE= CLI DAEMON DOCS GTK NLS QT TESTS UTILS WEB OPTIONS_DEFAULT= CLI DAEMON DOCS GTK NLS QT UTILS WEB DOCS_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-CMakeLists.txt .if ${FLAVOR:Ndefault} && ${FLAVOR:Ndaemon} EXTRA_PATCHES= ${DOCS_EXTRA_PATCHES_OFF} .endif .if ${FLAVOR:Mdaemon} OPTIONS_DEFINE= DOCS NLS TESTS WEB OPTIONS_DEFAULT= DOCS NLS WEB .endif .if ${FLAVOR:Ndefault} && ${FLAVOR:Ndaemon} OPTIONS_DEFINE= NLS TESTS OPTIONS_DEFAULT= NLS .endif OPTIONS_SUB= yes CLI_DESC= Build remote & command-line (deprecated) clients DAEMON_DESC= Build daemon GTK_DESC= Build GTK+ client QT_DESC= Build QT client TESTS_DESC= Build & run unit tests UTILS_DESC= Build utilities (create, edit, show) WEB_DESC= Install web client (imples daemon) CLI_CMAKE_BOOL= ENABLE_CLI DAEMON_CMAKE_BOOL= ENABLE_DAEMON GTK_CMAKE_ON= ENABLE_GTK \ GTK_IS_REQUIRED GTK_CMAKE_ARGS+= -DUSE_GTK_VERSION=3 QT_CMAKE_ON= ENABLE_QT \ QT_IS_REQUIRED QT_CMAKE_ARGS+= -DUSE_QT_VERSION=5 GTK_USES= desktop-file-utils gettext-runtime gettext-tools gnome GTK_USE= GNOME=gdkpixbuf2,glibmm,gtkmm30 QT_USES= desktop-file-utils qmake:no_env qt:5 QT_USE= QT=core,dbus,gui,network,svg,widgets,buildtools:build,linguisttools:build NLS_USES= gettext-runtime:lib NLS_CMAKE_BOOL= ENABLE_NLS TESTS_CMAKE_BOOL= ENABLE_TESTS UTILS_CMAKE_BOOL= ENABLE_UTILS WEB_IMPLIES= DAEMON WEB_CMAKE_BOOL= INSTALL_WEB post-extract: @${ECHO_MSG} "Cludging use of devel/libfmt as Transmission's CMakeLists.txt does not properly search for it." @${MKDIR} ${WRKSRC}/third-party/fmt/include/fmt @${LN} -Fs ${PREFIX}/include/fmt ${WRKSRC}/third-party/fmt/include/fmt post-extract-DOCS-on: @${ECHO_MSG} "Removing outdated release notes" @${FIND} ${WRKSRC}/news \( -name 'news-[0-3]*' -o -name '*beta*' \) -delete .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.svg .endif .if ${FLAVOR} == daemon post-install: ${MKDIR} ${STAGEDIR}${ETCDIR}/home .endif post-install-DAEMON-on: ${MKDIR} ${STAGEDIR}${ETCDIR}/home 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/files/transmission.in b/net-p2p/transmission/files/transmission.in index b638ccc90275..47d06ce8d86f 100644 --- a/net-p2p/transmission/files/transmission.in +++ b/net-p2p/transmission/files/transmission.in @@ -1,80 +1,80 @@ #!/bin/sh # PROVIDE: transmission # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable this service: # # transmission_enable: Set to NO by default. Set it to YES to enable it. # transmission_watch_dir: Directory for torrent files to download # automatically. Off by default unless you add # a path. # transmission_conf_dir: Directory where transmission configuration # data is stored. # Default: %%PREFIX%%/etc/transmission/home # transmission_download_dir: Directory to store downloaded data. # Default: %%PREFIX%%/etc/transmission/home/Downloads # transmission_user: The user account transmission daemon runs as what # you want it to be. It uses 'transmission' user by # default. # transmission_web_home: Use alternative directory for the web interface # files, such as javascript, html and graphics. # transmission_chown: By default, transmission checks and fixes the # permissions for its home directory. If this # causes problems, set this variable to no. # transmission_log: Use alternate log file for transmission. # If not specified, it sends log to rsyslog. # transmission_log_level: Set to 'critical', 'error', 'warn', 'info', # 'debug' or 'trace' to configure log verbosity. . /etc/rc.subr name=transmission rcvar=transmission_enable load_rc_config $name : ${transmission_enable:=NO} : ${transmission_conf_dir=%%PREFIX%%/etc/transmission/home} : ${transmission_download_dir=%%PREFIX%%/etc/transmission/home/Downloads} : ${transmission_user:=transmission} transmission_group=${transmission_group:-$transmission_user} : ${transmission_chown:=yes} command=%%PREFIX%%/bin/transmission-daemon pidfile=/var/run/transmission/daemon.pid extra_commands=reload start_precmd=transmission_prestart transmission_flags=" \ ${transmission_watch_dir:+-c ${transmission_watch_dir}} \ ${transmission_conf_dir:+-g ${transmission_conf_dir}} \ ${transmission_download_dir:+-w ${transmission_download_dir}} \ ${transmission_log:+--logfile ${transmission_log}} \ - ${transmission_log_level:+--loglevel ${transmission_log_level}} \ + ${transmission_log_level:+--log-level ${transmission_log_level}} \ ${pidfile:+-x $pidfile} \ ${transmission_flags}" transmission_prestart() { install -d -o $transmission_user ${pidfile%/*} if checkyesno transmission_chown; then mkdir -p $transmission_conf_dir $transmission_download_dir chown $transmission_user:$transmission_group $transmission_download_dir chown -R $transmission_user:$transmission_group $transmission_conf_dir chgrp $transmission_group $transmission_conf_dir chmod 750 $transmission_conf_dir fi if [ -n "$transmission_web_home" ]; then TRANSMISSION_WEB_HOME=$transmission_web_home export TRANSMISSION_WEB_HOME fi if [ -n "$transmission_log" ]; then touch $transmission_log chown $transmission_user:$transmission_group $transmission_log fi } run_rc_command $1