Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220537 - net-p2p/transmission-1.20 should not depend on gettext and glib only if USE=gtk
Summary: net-p2p/transmission-1.20 should not depend on gettext and glib only if USE=gtk
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Saleem Abdulrasool (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-06 08:32 UTC by Natanael Copa
Modified: 2008-09-04 21:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
transmission-1.11.ebuild (transmission-1.11.ebuild,1.31 KB, text/plain)
2008-05-06 08:34 UTC, Natanael Copa
Details
transmission-1.20.ebuild (transmission-1.20.ebuild,1004 bytes, text/plain)
2008-05-13 12:54 UTC, Natanael Copa
Details
transmission-daemon.initd (transmission-daemon.initd,930 bytes, text/plain)
2008-05-29 06:02 UTC, Natanael Copa
Details
transmission-daemon.confd (transmission-daemon.confd,68 bytes, text/plain)
2008-05-29 06:02 UTC, Natanael Copa
Details
transmission-1.20.ebuild (transmission-1.20.ebuild,1.43 KB, text/plain)
2008-05-29 06:10 UTC, Natanael Copa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-05-06 08:32:09 UTC
Depending gettext makes the package unavailable on uclibc and its not necessary.
Comment 1 Natanael Copa 2008-05-06 08:34:39 UTC
Created attachment 152075 [details]
transmission-1.11.ebuild

The ebuild also removes a hardcoded -O3 -funroll-loops (the sed stuff)

--- transmission-1.11.ebuild.orig	2008-05-06 08:33:07 +0000
+++ transmission-1.11.ebuild	2008-05-06 08:30:30 +0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/transmission-1.11.ebuild,v 1.1 2008/04/20 04:32:38 compnerd Exp $
 
-inherit autotools eutils
+inherit autotools eutils flag-o-matic
 
 DESCRIPTION="Simple BitTorrent client"
 HOMEPAGE="http://www.transmissionbt.com/"
@@ -11,22 +11,27 @@
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
-IUSE="gtk libnotify"
+IUSE="gtk libnotify nls"
 
 RDEPEND=">=dev-libs/glib-2.16
 		 >=dev-libs/openssl-0.9.8
 		 gtk? ( >=x11-libs/gtk+-2.6 )
 		 libnotify? ( >=x11-libs/libnotify-0.4.4 )"
 DEPEND="${RDEPEND}
-		sys-devel/gettext
+		nls? ( sys-devel/gettext )
 		>=dev-util/pkgconfig-0.19
 		gtk? ( >=dev-util/intltool-0.35 )"
 
 src_unpack() {
 	unpack ${A}
 	cd "${S}"
-
+	
 	epatch "${FILESDIR}/transmission-1.11-libnotify-option.patch"
+	# builds without NLS if the macro _() is defined.
+	use nls || append-flags -D"_\(a\)=\(a\)"
+	sed -e 's:CFLAGS=.*:CFLAGS="${CFLAGS}":' \
+		-e 's:CXXFLAGS=.*:CXXFLAGS="${CXXFLAGS}":' \
+		-i ${S}/configure.ac
 	AT_M4DIR="${S}/m4" eautoreconf
 }
Comment 2 Natanael Copa 2008-05-06 08:58:37 UTC
Patch is also submitted upstream to support proper --disable-nls configure options rather than adding a _() define to CFLAGS.

http://trac.transmissionbt.com/ticket/916
Comment 3 Saleem Abdulrasool (RETIRED) gentoo-dev 2008-05-13 02:48:40 UTC
Id rather get this fixed properly from upstream.
Comment 4 Natanael Copa 2008-05-13 12:38:37 UTC
fwiw, seems like gettext is not needed for 1.20.
Comment 5 Natanael Copa 2008-05-13 12:53:09 UTC
reopening bug.

The 1.20 ebuild should not depend on gettext. It works just fine without.
The glib dependency should only be there if USE=gtk.

fixing those issues and it compiles like a charm on uclibc (-nls).
Comment 6 Natanael Copa 2008-05-13 12:54:51 UTC
Created attachment 153043 [details]
transmission-1.20.ebuild

--- transmission-1.20.ebuild.orig	2008-05-13 12:49:20 +0000
+++ transmission-1.20.ebuild	2008-05-13 12:46:36 +0000
@@ -13,12 +13,11 @@
 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
 IUSE="gtk libnotify"
 
-RDEPEND=">=dev-libs/glib-2.16
+RDEPEND="gtk? ( >=dev-libs/glib-2.16 )
 		 >=dev-libs/openssl-0.9.8
 		 gtk? ( >=x11-libs/gtk+-2.6 )
 		 libnotify? ( >=x11-libs/libnotify-0.4.4 )"
 DEPEND="${RDEPEND}
-		sys-devel/gettext
 		>=dev-util/pkgconfig-0.19
 		gtk? ( >=dev-util/intltool-0.35 )"
Comment 7 Natanael Copa 2008-05-29 06:02:25 UTC
Created attachment 154665 [details]
transmission-daemon.initd

My local overlay includes an init.d and conf.d script and works on uclibc.

I'm dumping what I got in case there would be any interest in supporting uclibc in main gentoo tree.
Comment 8 Natanael Copa 2008-05-29 06:02:53 UTC
Created attachment 154667 [details]
transmission-daemon.confd
Comment 9 Natanael Copa 2008-05-29 06:10:23 UTC
Created attachment 154669 [details]
transmission-1.20.ebuild

The configure script will detect and use gettext if its there so the dependency is not needed anymore.

This ebuild also sets up a transmission user to be used for the transmission-daemon.


--- /usr/portage/net-p2p/transmission/transmission-1.20.ebuild	2008-05-13 02:54:27 +0000
+++ /usr/alpine-portage/net-p2p/transmission/transmission-1.20.ebuild	2008-05-19 12:02:30 +0000
@@ -13,23 +13,40 @@
 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
 IUSE="gtk libnotify"
 
-RDEPEND=">=dev-libs/glib-2.16
+RDEPEND="gtk? ( >=dev-libs/glib-2.16 )
 		 >=dev-libs/openssl-0.9.8
 		 gtk? ( >=x11-libs/gtk+-2.6 )
 		 libnotify? ( >=x11-libs/libnotify-0.4.4 )"
 DEPEND="${RDEPEND}
-		sys-devel/gettext
 		>=dev-util/pkgconfig-0.19
 		gtk? ( >=dev-util/intltool-0.35 )"
 
 src_compile() {
-	econf $(use_with gtk) $(use_enable libnotify) --with-wx-config=no || die "configure failed"
+	econf \
+		$(use_with gtk) \
+		$(use_enable libnotify) \
+		--with-wx-config=no || die "configure failed"
 	emake || die "build failed"
 }
 
 src_install() {
 	make DESTDIR="${D}" install || die "install failed"
 	dodoc AUTHORS NEWS
+	keepdir /var/run/transmission
+	fperms 0750 /var/run/transmission
+	fowners transmission:transmission /var/run/transmission
 
-	doinitd "${FILESDIR}/transmission-daemon"
+	keepdir /var/lib/transmission
+	fperms 0770 /var/lib/transmission
+	fowners transmission:transmission /var/lib/transmission
+
+	newinitd "${FILESDIR}/transmission-daemon.initd" transmission-daemon
+	newconfd "${FILESDIR}/transmission-daemon.confd" transmission-daemon
+}
+
+pkg_setup() {
+	enewgroup transmission 
+	enewuser transmission -1 -1 /var/lib/transmission transmission
 }
+
+
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2008-05-29 12:00:20 UTC
(In reply to comment #9)
> The configure script will detect and use gettext if its there so the dependency
> is not needed anymore.

Sorry but that's just wrong. Either it needs to depend on it unconditionally or one needs to fix build-system to support --enable/--disable-nls.

http://www.gentoo.org/proj/en/qa/automagic.xml
Comment 11 Natanael Copa 2008-05-29 13:30:01 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > The configure script will detect and use gettext if its there so the dependency
> > is not needed anymore.
> 
> Sorry but that's just wrong. Either it needs to depend on it unconditionally or
> one needs to fix build-system to support --enable/--disable-nls.
> 
> http://www.gentoo.org/proj/en/qa/automagic.xml
> 

hm... well, it builds just fine without gettext so saying that it is required is  not any better. 

What about this:

DEPEND="gtk? ( sys-devel/gettext ) ..."

Upstream won't do --enable/--disable-nls because current behaviour WORKSFORTHEM
http://trac.transmissionbt.com/ticket/916

Comment 12 Saleem Abdulrasool (RETIRED) gentoo-dev 2008-09-04 21:12:32 UTC
They did not say that at all.  What they said is that the patch still needs work.  Marking as WONTFIX again.