From 0a6eef6d1f4df2249f3ad0aae07cdee1c3fc9215 Mon Sep 17 00:00:00 2001 From: Peter Volkov Date: Wed, 19 Oct 2011 10:59:45 +0000 Subject: [PATCH] Version bump, bug 387035 wrt lexa and Daniel T. Do not reset permissions, bug 349867 thank Tony Levi for report and Nikolaj Sjujskij for getting me back on issue. Package-Manager: portage-2.1.10.27/cvs/Linux x86_64 --- net-p2p/transmission/ChangeLog | 10 +- net-p2p/transmission/Manifest | 15 +- ...nsmission-2.41-0003-system-miniupnpc.patch | 281 ++++++++++++++++++ net-p2p/transmission/transmission-2.41.ebuild | 148 +++++++++ 4 files changed, 452 insertions(+), 2 deletions(-) create mode 100644 net-p2p/transmission/files/transmission-2.41-0003-system-miniupnpc.patch create mode 100644 net-p2p/transmission/transmission-2.41.ebuild diff --git a/net-p2p/transmission/ChangeLog b/net-p2p/transmission/ChangeLog index b380f289744d..d67a6541c0fb 100644 --- a/net-p2p/transmission/ChangeLog +++ b/net-p2p/transmission/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-p2p/transmission # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/ChangeLog,v 1.156 2011/08/05 21:00:38 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/ChangeLog,v 1.157 2011/10/19 10:59:45 pva Exp $ + +*transmission-2.41 (19 Oct 2011) + + 19 Oct 2011; Peter Volkov +transmission-2.41.ebuild, + +files/transmission-2.41-0003-system-miniupnpc.patch: + Version bump, bug 387035 wrt lexa and Daniel T. Do not reset permissions, bug + 349867 thank Tony Levi for report and Nikolaj Sjujskij for getting me back on + issue. *transmission-2.33-r1 (05 Aug 2011) diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest index b06d8b486f43..2e70b2b375da 100644 --- a/net-p2p/transmission/Manifest +++ b/net-p2p/transmission/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX transmission-2.31-0001-configure.ac.patch 1513 RMD160 dc538328560cc1d470bdd33b5f26989b95b035e5 SHA1 26392849d5284a30174506d343f87f1404e4211b SHA256 d7cb0336a665d1ce1728cd07f6920e991eece9e6bc3eb7c84e1ae9209bd57d22 AUX transmission-2.31-0002-config.in-4-qt.pro.patch 2434 RMD160 364eca9a6144e53a7208da1c0b17f11b13b7a27f SHA1 850eb2e80518be9b04312369980830f5635bcc34 SHA256 fca9ebed543990728b6884b9249ab86023bee7da4fe77d1b206d46413af54210 AUX transmission-2.31-0003-system-miniupnpc.patch 22326 RMD160 9042f531db97c5caec503ef8a560ad172d0fb922 SHA1 7fd5b162da193a1b4abd029756c676a40bd9c66d SHA256 79c2128a2e399d8cad19a885a7cc3c12b09d9cd3cdbff83c2aa07eb1d3e8ce10 @@ -6,6 +9,7 @@ AUX transmission-2.31-qt-libutp.patch 707 RMD160 cf81e7cd4361e09ef1d4cdfcb75e2e2 AUX transmission-2.33-0001-configure.ac.patch 1513 RMD160 c55d306b5657a07e71c88e703d4be86c47606bdf SHA1 e2c230117fb57ecddebb3798402cd1b36e45776c SHA256 aa269bb7ab69754a29399062b8abdab915a7172fa99a0747360584bcc9afaa25 AUX transmission-2.33-0002-config.in-4-qt.pro.patch 2434 RMD160 eff545e8416f2bb92035717a35121ecaa0ba089f SHA1 e4470173150fe2b84583e295842e9ad13063ca75 SHA256 41d289f1701606eb337375ddcbc69f9c6b7e3e82d7212d8c3e4ecb4d034f7c46 AUX transmission-2.33-0003-system-miniupnpc.patch 10483 RMD160 bce3fce6ed161dd476acc24118c29242a3eaecd2 SHA1 8aad4fcc81c67bec5ce50c9b6a7a09c3cfa1e580 SHA256 bedf15cca0b63f97da62dbb1164b432ada1f08d34335feb0ef05d907c9898b16 +AUX transmission-2.41-0003-system-miniupnpc.patch 9639 RMD160 e23714576aa12d6a79ca8ca64793f549cc4d6534 SHA1 1d21efda014426ff4c34a30a7beadf7c730496c2 SHA256 9949347aa2dec92ef73b3dfc00d49618572b397e66d8415cca15933cce2f63f0 AUX transmission-daemon.confd.3 703 RMD160 482953d2bd8e9c69300af3389615764649954a63 SHA1 a4d16dde4e2408b48620cc89c4a8759b042797f2 SHA256 4b47acf195a14a322550cfcaa735a59aac38410d1c2c63ffa824ff131c55ca70 AUX transmission-daemon.initd.6 2209 RMD160 2ed6f67e83a04eef148b39204dc4a6281bff0680 SHA1 4c6c0ce20d71e398b7254332e3afef6349f1f8a0 SHA256 61ece2b8307b0ee7ce637428f6871176f03873eff1871f34baf8c2627982f36a AUX transmission-daemon.initd.7 2196 RMD160 e2a1aa4c2e39fe360d39fa72b16994aecd53485a SHA1 4d7b59f9540cd9045ac00013cd9abb7726f85984 SHA256 0e7268ac3b8ea74afeb1d39871b3e5ee675575c517ebccd1f3ba67340deed6df @@ -13,10 +17,19 @@ AUX transmission-daemon.initd.8 2235 RMD160 2848770ae93c597ea5cd6e8d22857bb99578 DIST transmission-2.22.tar.bz2 4802843 RMD160 e87b560f81fc8bc422dc7071a4b27bdcf2b2d6ac SHA1 ddd515bdcc201193b45f58b705f6e8fde9fcb5d1 SHA256 5a4079194f45260c143f21ea6f33ce2660d89fca02ad8f1e65169968d365e4d4 DIST transmission-2.31.tar.xz 2558880 RMD160 e777e32e5d02e8a93a64e4821ea0f9ccd8724f2c SHA1 84cfbc4e6a8db437d3c5b7eb983ce763b2879b62 SHA256 82cd04c93c65df818d38dcec154f5864520ab3147fac372e11d8e9d12506deba DIST transmission-2.33.tar.xz 2583032 RMD160 8b8228a2fad55a64d46314f1bf879a8b89fa150d SHA1 a5502723e9b8fdc982cc4d3c052e4839cb45b1a8 SHA256 c15a7f9d82743fb329ee12e41bf242070ddbaa8c6741da7ce0bb91d8d399a072 +DIST transmission-2.41.tar.xz 2623344 RMD160 a2c9c80cff444978dff305d573007473af5b3084 SHA1 dd9531587778dc46757b1520accacf6afa20c370 SHA256 f31bf798f620b436b2f5ed7047fa27fab78ce4b229d6d02f8c71f9867277685a EBUILD transmission-2.22.ebuild 3905 RMD160 fa3fb412e80762df5ea9f586e306d3d78f7940a2 SHA1 c8abfcb6c950ebe7946b912fc5246d6f950f7bd1 SHA256 bc88d99b145cd04958b0b7c34533e2e730a247d3b87423010886178e542b0a4d EBUILD transmission-2.31-r1.ebuild 4186 RMD160 b73a2ad82fc17b03adf6f622cf984f0616d467f9 SHA1 34e11a0f03e0d1623f2e8d2a5ff1fd5d51f748fe SHA256 988da632a1b272360ba679091dc9b7764e8033cd4b765ae7fa36b6e17589c9c4 EBUILD transmission-2.31.ebuild 3614 RMD160 6aea3b61e03e52aa67dc93a3fad133e9b4804aa1 SHA1 1efec7a48458a81996572e4e18eb9c336a37b66f SHA256 46928432ead81af791d9f5f258d34ec8cfbc767f91dd7b6e458713dfa765fd2f EBUILD transmission-2.33-r1.ebuild 4360 RMD160 adde6fb9821b740584a38d2163be3318db8c1d5c SHA1 ce5bb8596dd783762e9534b7029d44e3408eae63 SHA256 e26d046d0076e792889702821c4ef06a6d00d5a5014c8c8613d67cd386238939 EBUILD transmission-2.33.ebuild 4356 RMD160 f04825ed475243c6a5673ce8e0055665f5c083d3 SHA1 a02e5d5c44f08bbf4a31893a8f5b08516ea061b9 SHA256 30e201d4880d55e6562ed348b5a2a240b0387248a83ee4ee0ad90e62eac5909e -MISC ChangeLog 26902 RMD160 87f4477f795d1b8e3f1a1b18b1341027c0ad246a SHA1 76dc8e2ccaf109af83cb8725aa165a12223de3bc SHA256 445901bb977551ffe789006e9ba29b3cdb19827133aca7db903e9e7093346410 +EBUILD transmission-2.41.ebuild 3843 RMD160 f67f1c334497416b572eb4078e3b0ebed0546539 SHA1 1339abd02928304e079d415dd97b1a6af3d1e7a9 SHA256 f006bcb732b62a1177235edf024527ceb4ccd9b10f1dbc515e463a3962da8f19 +MISC ChangeLog 27234 RMD160 570cd714b5d6dd6868a41304ba79cbb612fb9508 SHA1 e6bb59069ada1cde904e02133c73f82c9cd1c802 SHA256 52a780eaabe72a92adaeed8649ca259a1c0d9ed6e3885f41c1af3ff2ae6ac7b5 MISC metadata.xml 444 RMD160 eb5aae9bdea645819e40b675f8372ded120d5783 SHA1 4b0f30908cea35a0fc8aca9cbe29599a0f833ab4 SHA256 ae66598063f3fa803005a3daf431d4dc4171e6988c38c128e6565910855dfaa9 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iF4EAREIAAYFAk6erTUACgkQGrk+8vGYmwd9JwD+Ns7a4/kofdgggcDaGplPOiO+ +PvFkPBWtO3uRAvxNPgcA/1c+25yTBW9M7JZ/1ooxuOuSk6MTb6kyzZg3P/eKWRcu +=rUn9 +-----END PGP SIGNATURE----- diff --git a/net-p2p/transmission/files/transmission-2.41-0003-system-miniupnpc.patch b/net-p2p/transmission/files/transmission-2.41-0003-system-miniupnpc.patch new file mode 100644 index 000000000000..e4b6271ba771 --- /dev/null +++ b/net-p2p/transmission/files/transmission-2.41-0003-system-miniupnpc.patch @@ -0,0 +1,281 @@ +=== modified file 'cli/Makefile.am' +--- cli/Makefile.am 2011-10-19 10:26:45 +0000 ++++ cli/Makefile.am 2011-10-19 10:37:21 +0000 +@@ -18,8 +18,8 @@ + + transmission_cli_LDADD = \ + $(top_builddir)/libtransmission/libtransmission.a \ ++ @LIBUPNP_LIBS@ \ + $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ +- $(top_builddir)/third-party/miniupnp/libminiupnp.a \ + @DHT_LIBS@ \ + @LIBUTP_LIBS@ \ + @LIBEVENT_LIBS@ \ + +=== modified file 'configure.ac' +--- configure.ac 2011-10-19 10:36:21 +0000 ++++ configure.ac 2011-10-19 10:37:21 +0000 +@@ -229,6 +229,77 @@ + + dnl ---------------------------------------------------------------------------- + dnl ++dnl Allow usage of system miniupnp library ++LIBUPNP_CFLAGS="-I\$(top_srcdir)/third-party/" ++LIBUPNP_LIBS="\$(top_builddir)/third-party/miniupnp/libminiupnp.a" ++LIBUPNP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a" ++build_bundled_miniupnp="yes" ++AC_ARG_ENABLE([external-miniupnp], ++ AS_HELP_STRING([--enable-external-miniupnp],[Use system external-miniupnp]), ++ [want_external_miniupnp=${enableval}], ++ [want_external_miniupnp=no]) ++if test "x$want_external_miniupnp" != "xno" ; then ++ AC_DEFINE([SYSTEM_MINIUPNP]) ++ ac_save_LIBS="$LIBS" ++ LIBS="-lminiupnpc" ++ # Check miniupnp 1.5 ++ AC_TRY_LINK([ ++ #include ++ #include ++ #include ++ ],[ ++ struct UPNPDev * devlist; ++ struct UPNPUrls urls; ++ struct IGDdatas data; ++ char lanaddr[16]; ++ char portStr[8]; ++ char intPort[8]; ++ char intClient[16]; ++ upnpDiscover( 2000, NULL, NULL, 0 ); ++ UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) ); ++ UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype, ++ portStr, "TCP", intClient, intPort ); ++ ],[ ++ AC_DEFINE(HAVE_MINIUPNP_15, 1, [Define to 1 if you have miniupnpc version 1.5]) ++ build_bundled_miniupnp="no"]) ++ ++ # Check miniupnp 1.6 ++ AC_TRY_LINK([ ++ #include ++ #include ++ #include ++ #include ++ ],[ ++ struct UPNPDev * devlist; ++ struct UPNPUrls urls; ++ struct IGDdatas data; ++ char lanaddr[16]; ++ char portStr[8]; ++ char intPort[8]; ++ char intClient[16]; ++ upnpDiscover( 2000, NULL, NULL, 0, 0, &errno ); ++ UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) ); ++ UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype, ++ portStr, "TCP", intClient, intPort, NULL, NULL, NULL ); ++ ],[ ++ AC_DEFINE(HAVE_MINIUPNP_16, 1, [Define to 1 if you have miniupnpc version 1.6]) ++ build_bundled_miniupnp="no"]) ++ ++ if test "x$build_bundled_miniupnp" = "xno" ; then ++ LIBUPNP_CFLAGS="" ++ LIBUPNP_LIBS="-lminiupnpc" ++ LIBUPNP_LIBS_QT="-lminiupnpc" ++ else ++ AC_MSG_ERROR("Requested system libminiupnp but it is not found") ++ fi ++ LIBS="$ac_save_LIBS" ++fi ++AM_CONDITIONAL([BUILD_MINIUPNP],[test "x$build_bundled_miniupnp" = "xyes"]) ++AC_SUBST(LIBUPNP_CFLAGS) ++AC_SUBST(LIBUPNP_LIBS) ++AC_SUBST(LIBUPNP_LIBS_QT) ++dnl ---------------------------------------------------------------------------- ++dnl + dnl detection for the GTK+ client + + PKG_CHECK_MODULES(GTK, +@@ -401,7 +472,7 @@ + libtransmission/Makefile + utils/Makefile + third-party/Makefile +- third-party/miniupnp/Makefile ++ third-party/miniupnp/Makefile + third-party/libnatpmp/Makefile + third-party/libutp/Makefile + third-party/dht/Makefile + +=== modified file 'daemon/Makefile.am' +--- daemon/Makefile.am 2011-10-19 10:26:45 +0000 ++++ daemon/Makefile.am 2011-10-19 10:37:21 +0000 +@@ -20,7 +20,7 @@ + + LDADD = \ + $(top_builddir)/libtransmission/libtransmission.a \ +- $(top_builddir)/third-party/miniupnp/libminiupnp.a \ ++ @LIBUPNP_LIBS@ \ + $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ + @DHT_LIBS@ \ + @LIBUTP_LIBS@ \ + +=== modified file 'gtk/Makefile.am' +--- gtk/Makefile.am 2011-10-19 10:26:45 +0000 ++++ gtk/Makefile.am 2011-10-19 10:37:21 +0000 +@@ -84,7 +84,7 @@ + + transmission_gtk_LDADD = \ + $(top_builddir)/libtransmission/libtransmission.a \ +- $(top_builddir)/third-party/miniupnp/libminiupnp.a \ ++ @LIBUPNP_LIBS@ \ + $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ + @DHT_LIBS@ \ + @LIBUTP_LIBS@ \ + +=== modified file 'libtransmission/Makefile.am' +--- libtransmission/Makefile.am 2011-10-19 10:26:45 +0000 ++++ libtransmission/Makefile.am 2011-10-19 10:37:21 +0000 +@@ -8,6 +8,7 @@ + AM_CFLAGS = \ + @DHT_CFLAGS@ \ + @LIBUTP_CFLAGS@ \ ++ @LIBUPNP_CFLAGS@ \ + @LIBEVENT_CFLAGS@ \ + @LIBCURL_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ +@@ -139,7 +140,7 @@ + + apps_ldadd = \ + ./libtransmission.a \ +- $(top_builddir)/third-party/miniupnp/libminiupnp.a \ ++ @LIBUPNP_LIBS@ \ + $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ + @INTLLIBS@ \ + @DHT_LIBS@ \ + +=== modified file 'libtransmission/upnp.c' +--- libtransmission/upnp.c 2011-10-19 10:26:45 +0000 ++++ libtransmission/upnp.c 2011-10-19 10:37:21 +0000 +@@ -13,8 +13,13 @@ + #include + #include + ++#ifdef SYSTEM_MINIUPNP ++#include ++#include ++#else + #include + #include ++#endif + + #include "transmission.h" + #include "port-forwarding.h" +@@ -97,7 +102,12 @@ + { + struct UPNPDev * devlist; + errno = 0; +- devlist = upnpDiscover( 2000, NULL, NULL, 0, 0, &errno ); ++#ifdef HAVE_MINIUPNP_16 ++ devlist = upnpDiscover( 2000, NULL, NULL, 0, 0, &errno ); ++#else ++ devlist = upnpDiscover( 2000, NULL, NULL, 0 ); ++#endif ++ + if( devlist == NULL ) + { + tr_ndbg( +@@ -144,9 +154,17 @@ + + tr_snprintf( portStr, sizeof( portStr ), "%d", handle->port ); + if( UPNP_GetSpecificPortMappingEntry( handle->urls.controlURL, handle->data.first.servicetype, +- portStr, "TCP", intClient, intPort, NULL, NULL, NULL ) != UPNPCOMMAND_SUCCESS || ++#ifdef HAVE_MINIUPNP_16 ++ portStr, "TCP", intClient, intPort, NULL, NULL, NULL ) != UPNPCOMMAND_SUCCESS || ++#else ++ portStr, "TCP", intClient, intPort ) != UPNPCOMMAND_SUCCESS || ++#endif + UPNP_GetSpecificPortMappingEntry( handle->urls.controlURL, handle->data.first.servicetype, ++#ifdef HAVE_MINIUPNP_16 + portStr, "UDP", intClient, intPort, NULL, NULL, NULL ) != UPNPCOMMAND_SUCCESS ) ++#else ++ portStr, "UDP", intClient, intPort ) != UPNPCOMMAND_SUCCESS ) ++#endif + { + tr_ninf( getKey( ), _( "Port %d isn't forwarded" ), handle->port ); + handle->isMapped = false; +@@ -198,7 +216,11 @@ + err_tcp = UPNP_AddPortMapping( handle->urls.controlURL, + handle->data.first.servicetype, + portStr, portStr, handle->lanaddr, ++#ifdef HAVE_MINIUPNP_16 + desc, "TCP", NULL, NULL ); ++#else ++ desc, "TCP", NULL ); ++#endif + if( err_tcp ) + tr_ndbg( getKey( ), "TCP Port forwarding failed with error %d (errno %d - %s)", + err_tcp, errno, tr_strerror( errno ) ); +@@ -207,7 +229,11 @@ + err_udp = UPNP_AddPortMapping( handle->urls.controlURL, + handle->data.first.servicetype, + portStr, portStr, handle->lanaddr, ++#ifdef HAVE_MINIUPNP_16 + desc, "UDP", NULL, NULL ); ++#else ++ desc, "UDP", NULL ); ++#endif + if( err_udp ) + tr_ndbg( getKey( ), "UDP Port forwarding failed with error %d (errno %d - %s)", + err_udp, errno, tr_strerror( errno ) ); + +=== modified file 'qt/config.in' +--- qt/config.in 2011-10-19 10:36:21 +0000 ++++ qt/config.in 2011-10-19 10:37:01 +0000 +@@ -1,1 +1,3 @@ + LIBUTP_LIBS = @LIBUTP_LIBS_QT@ ++MINIUPNP_LIBS = @LIBUPNP_LIBS_QT@ ++ + +=== modified file 'qt/qtr.pro' +--- qt/qtr.pro 2011-10-19 10:36:21 +0000 ++++ qt/qtr.pro 2011-10-19 10:37:26 +0000 +@@ -23,7 +23,7 @@ + LIBS += $${TRANSMISSION_TOP}/libtransmission/libtransmission.a + LIBS += $${LIBUTP_LIBS} + LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a +-LIBS += $${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a ++LIBS += $${MINIUPNP_LIBS} + LIBS += $${TRANSMISSION_TOP}/third-party/libnatpmp/libnatpmp.a + unix: LIBS += -L$${EVENT_TOP}/lib -lz -lrt + win32:DEFINES += QT_DBUS + +=== modified file 'third-party/Makefile.am' +--- third-party/Makefile.am 2011-10-19 10:26:45 +0000 ++++ third-party/Makefile.am 2011-10-19 10:37:26 +0000 +@@ -1,11 +1,14 @@ + if BUILD_UTP + UTP_DIR = libutp + endif ++if BUILD_MINIUPNP ++ MINIUPNP_DIR = miniupnp ++endif + + SUBDIRS = \ + dht \ + libnatpmp \ +- miniupnp \ ++ $(MINIUPNP_DIR) \ + $(UTP_DIR) + + EXTRA_DIST = \ + +=== modified file 'utils/Makefile.am' +--- utils/Makefile.am 2011-10-19 10:26:45 +0000 ++++ utils/Makefile.am 2011-10-19 10:37:26 +0000 +@@ -26,7 +26,7 @@ + + transmission_create_LDADD = \ + $(top_builddir)/libtransmission/libtransmission.a \ +- $(top_builddir)/third-party/miniupnp/libminiupnp.a \ ++ @LIBUPNP_LIBS@ \ + $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ + @INTLLIBS@ \ + @DHT_LIBS@ \ + diff --git a/net-p2p/transmission/transmission-2.41.ebuild b/net-p2p/transmission/transmission-2.41.ebuild new file mode 100644 index 000000000000..7e5af81ce3d9 --- /dev/null +++ b/net-p2p/transmission/transmission-2.41.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/transmission-2.41.ebuild,v 1.1 2011/10/19 10:59:45 pva Exp $ + +EAPI=4 +inherit eutils fdo-mime gnome2-utils qt4-r2 autotools + +MY_P="${P/_beta/b}" + +DESCRIPTION="A Fast, Easy and Free BitTorrent client" +HOMEPAGE="http://www.transmissionbt.com/" +SRC_URI="http://download.transmissionbt.com/${PN}/files/${MY_P}.tar.xz" + +LICENSE="MIT GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gtk kde libnotify libcanberra nls qt4 utp" + +RDEPEND=" + sys-libs/zlib + >=dev-libs/libevent-2.0.10 + >=dev-libs/openssl-0.9.4 + || ( >=net-misc/curl-7.16.3[ssl] + >=net-misc/curl-7.16.3[gnutls] ) + >=net-libs/miniupnpc-1.6 + gtk? ( >=dev-libs/glib-2.28:2 + >=x11-libs/gtk+-2.22:2 + >=dev-libs/dbus-glib-0.70 + libnotify? ( >=x11-libs/libnotify-0.4.3 ) + libcanberra? ( >=media-libs/libcanberra-0.10 ) ) + qt4? ( x11-libs/qt-gui:4[dbus] )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2.2.6b + nls? ( sys-devel/gettext + >=dev-util/intltool-0.40 ) + dev-util/pkgconfig + sys-apps/sed" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE="gtk? ( nls )" + +pkg_setup() { + enewgroup transmission + enewuser transmission -1 -1 -1 transmission +} + +src_prepare() { + # https://trac.transmissionbt.com/ticket/4323 + epatch "${FILESDIR}/${PN}-2.33-0001-configure.ac.patch" + epatch "${FILESDIR}/${PN}-2.33-0002-config.in-4-qt.pro.patch" + epatch "${FILESDIR}/${P}-0003-system-miniupnpc.patch" + + # Upstream is not interested in this: https://trac.transmissionbt.com/ticket/4324 + sed -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' -i libtransmission/Makefile.am || die + + eautoreconf + + sed -i -e 's:-ggdb3::g' configure || die + # Magnet link support + if use kde; then + cat > qt/transmission-magnet.protocol <<-EOF + [Protocol] + exec=transmission-qt '%u' + protocol=magnet + Icon=transmission + input=none + output=none + helper=true + listing= + reading=false + writing=false + makedir=false + deleting=false + EOF + fi +} + +src_configure() { + # cli and daemon doesn't have external deps and are enabled by default + econf \ + $(use_enable nls) \ + $(use_enable utp) \ + $(use_enable gtk) \ + $(use gtk && use_enable libnotify) \ + $(use gtk && use_enable libcanberra) \ + --enable-external-miniupnp + + use qt4 && cd qt && eqmake4 qtr.pro +} + +src_compile() { + emake + use qt4 && cd qt && emake +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS NEWS qt/README.txt + rm -f "${ED}"/usr/share/${PN}/web/LICENSE + + newinitd "${FILESDIR}"/${PN}-daemon.initd.8 ${PN}-daemon + newconfd "${FILESDIR}"/${PN}-daemon.confd.3 ${PN}-daemon + + keepdir /var/{transmission/{config,downloads},log/transmission} + fowners -R transmission:transmission /var/{transmission/{,config,downloads},log/transmission} + + if use qt4; then + cd qt + emake INSTALL_ROOT="${D}/usr" install + insinto /usr/share/applications/ + doins transmission-qt.desktop + mv icons/transmission{,-qt}.png + doicon icons/transmission-qt.png + if use kde; then + insinto /usr/share/kde4/services/ + doins transmission-magnet.protocol + fi + fi +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + fdo-mime_desktop_database_update + gnome2_icon_cache_update + + ewarn "If you use transmission-daemon, please, set 'rpc-username' and" + ewarn "'rpc-password' (in plain text, transmission-daemon will hash it on" + ewarn "start) in settings.json file located at /var/transmission/config or" + ewarn "any other appropriate config directory." + if use utp; then + ewarn + ewarn "Since uTP is enabled ${PN} needs large kernel buffers for the UDP socket." + ewarn "Please, add into /etc/sysctl.conf following lines:" + ewarn " net.core.rmem_max = 4194304" + ewarn " net.core.wmem_max = 1048576" + ewarn "and run sysctl -p" + fi +} + +pkg_postrm() { + fdo-mime_desktop_database_update + gnome2_icon_cache_update +} -- 2.26.2