--- /usr/portage/net-p2p/btg/btg-0.9.7.ebuild 2008-09-11 14:08:38.000000000 +0200 +++ btg-0.9.8.ebuild 2008-11-05 15:44:23.000000000 +0100 @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/btg/btg-0.9.7.ebuild,v 1.3 2008/09/11 11:44:58 pvdabeel Exp $ +# $Header: $ EAPI=1 @@ -13,35 +13,53 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc ~x86" -IUSE="debug doc event-callback gtk minimal ncurses session test webinterface" +IUSE="curl debug doc event-callback gtk minimal ncurses session test webinterface" -RDEPEND=">=dev-libs/boost-1.34.1 - dev-libs/expat +RDEPEND=">=dev-libs/boost-1.33 + >=dev-libs/expat-1.95.8 dev-libs/libgcrypt dev-libs/libgpg-error dev-libs/libtasn1 - dev-util/dialog - net-libs/gnutls - >=net-libs/rb_libtorrent-0.13_rc1 + >=net-libs/gnutls-1.0 + >=net-libs/rb_libtorrent-0.12.1 + !>=net-libs/rb_libtorrent-0.14 + curl? ( >=net-misc/curl-7.15.5 ) gtk? ( dev-cpp/gtkmm:2.4 dev-libs/libsigc++:2 x11-libs/pango ) + !minimal? ( dev-util/dialog ) + ncurses? ( sys-libs/ncurses:5 ) test? ( dev-util/cppunit ) webinterface? ( =dev-lang/php-5* virtual/httpd-cgi )" DEPEND="${RDEPEND} >=dev-util/pkgconfig-0.21 doc? ( app-doc/doxygen )" +pkg_setup() { + if use webinterface && ! built_with_use dev-lang/php xml;then + die "dev-lang/php should be compiled with the xml use flag when you + have the webinterface use flag set" + fi + if use webinterface && ! built_with_use dev-lang/php zlib;then + ewarn "dev-lang/php should be compiled with the zlib use flag when you + have the webinterface use flag set" + fi +} + src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}"/${P}-broken_bundled_plotmm_sigc.patch + if has_version '>=net-libs/rb_libtorrent-0.13.1' ; then + sed -i \ + -e "/PKG_CONFIG/ s:libtorrent:libtorrent-rasterbar:" \ + configure \ + || die "sed failed" + fi } src_compile() { - filter-ldflags -Wl,--as-needed --as-needed - + econf \ $(use_enable debug) \ $(use_enable gtk gui) \ @@ -50,17 +68,18 @@ $(use_enable session session-saving) \ $(use_enable test unittest) \ $(use_enable webinterface www) \ + $(use_enable curl url) \ $(use_enable !minimal command-list) \ - --enable-btg-config \ + $(use_enable !minimal btg-config) \ --disable-upnp \ --disable-dependency-tracking \ - || die + || die "econf failed" - emake || die + emake || die "emake failed" } src_install() { - emake DESTDIR="${D}" install || die + emake DESTDIR="${D}" install || die "emake install failed" dodoc AUTHORS ChangeLog README TODO @@ -77,5 +96,8 @@ echo elog "BTG needs a daemon.ini and client.ini, to create them run btg-config" elog "and put them in the home of the user running btg (/home/p2p/.btg by default)" + ewarn "On hardened system you must run" + ewarn "paxctl -m /usr/bin/btgdaemon /usr/bin/btgcli /usr/bin/btgncli" + ewarn "to get btg work." echo }