Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KTorrent 3.1beta1 ebuild[updated]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ltboy
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 197
Location: Utah

PostPosted: Tue Apr 29, 2008 6:57 am    Post subject: KTorrent 3.1beta1 ebuild[updated] Reply with quote

I scrapped together an ebuild for KTorrent 3.1beta1 from the 3.0.1 ebuild. It uses some dirty hacks but I'm to lazy right now to do things the right way.

UPDATE: Made a patch that fixes mediaplayer and cleaned up ebuild. Mediaplayer flag is now enabled by default.

ktorrent-3.1_beta1-mediamodel-include-fix.patch
Code:

diff -Naur ktorrent-3.1_beta1.orig/plugins/mediaplayer/mediamodel.h ktorrent-3.1_beta1.orig/plugins/mediaplayer/mediamodel.h
--- ktorrent-3.1_beta1.orig/plugins/mediaplayer/mediamodel.h   2008-04-29 11:31:39.541620384 -0600
+++ ktorrent-3.1_beta1/plugins/mediaplayer/mediamodel.h        2008-04-29 11:30:34.152664273 -0600
@@ -22,6 +22,7 @@
 #define KTMEDIAMODEL_H

 #include <QAbstractItemModel>
+#include <util/constants.h>

 namespace bt
 {


ktorrent-3.1_beta1.ebuild
Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-p2p/ktorrent/ktorrent-3.1_beta1.ebuild,v 1.1 2008/03/26 20:49:04 deathwing00 Exp $

EAPI="1"
NEED_KDE=":kde-4"
inherit versionator kde4-base

# Install to KDEDIR rather than /usr, to slot properly.
PREFIX="${KDEDIR}"

MY_P="${P/_/}"
MY_PV="${PV/_/}"

DESCRIPTION="A BitTorrent program for KDE."
HOMEPAGE="http://ktorrent.org/"
SRC_URI="http://${PN}.org/downloads/${MY_PV}/${MY_P}.tar.bz2"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
SLOT="kde-4"
IUSE="+bwscheduler +infowidget +ipfilter +logviewer +scanfolder +search +stats +upnp +webinterface +zeroconf +mediaplayer"

DEPEND="dev-libs/gmp
        app-crypt/qca:2"
RDEPEND="${DEPEND}
        infowidget? ( >=dev-libs/geoip-1.4.4 )
        ipfilter? (
                || ( >=kde-base/kdebase-kioslaves-4.0.0:${SLOT}
                        >=kde-base/kdebase-4.0.0:${SLOT} ) )
        zeroconf? (
                || ( >=kde-base/kdnssd-4.0.0:${SLOT}
                        >=kde-base/kdenetwork-4.0.0:${SLOT} ) )"

LANGS="ar be bg ca da de el en_GB eo es et eu fi fr ga gl hu it ja km lt nb nds nl nn
oc pl pt pt_BR ru se sk sr sv tr uk zh_CN zh_TW"

S="${WORKDIR}/${MY_P}"

for X in ${LANGS}; do
        IUSE="${IUSE} linguas_${X}"
done

src_compile() {
        comment_all_add_subdirectory po/ || die "sed to remove all linguas failed."

        local X
        for X in ${LANGS}; do
                if use linguas_${X}; then
                        sed -i -e "/add_subdirectory(\s*${X}\s*)\s*$/ s/^#DONOTCOMPILE //" \
                                po/CMakeLists.txt || die "sed to uncomment ${lang} failed."
                fi
        done

        #Add another header include to mediamodel.h
        epatch "${FILESDIR}/${P}-mediamodel-include-fix.patch"

        mycmakeargs="${mycmakeargs}
                -DCMAKE_INSTALL_PREFIX=${PREFIX}
                -DENABLE_DHT_SUPPORT=ON
                $(cmake-utils_use_enable bwscheduler BWSCHEDULER_PLUGIN)
                $(cmake-utils_use_enable infowidget INFOWIDGET_PLUGIN)
                $(cmake-utils_use_with infowidget SYSTEM_GEOIP)
                $(cmake-utils_use_enable ipfilter IPFILTER_PLUGIN)
                $(cmake-utils_use_enable logviewer LOGVIEWER_PLUGIN)
                $(cmake-utils_use_enable scanfolder SCANFOLDER_PLUGIN)
                $(cmake-utils_use_enable search SEARCH_PLUGIN)
                $(cmake-utils_use_enable stats STATS_PLUGIN)
                $(cmake-utils_use_enable upnp UPNP_PLUGIN)
                $(cmake-utils_use_enable webinterface WEBINTERFACE_PLUGIN)
                $(cmake-utils_use_enable zeroconf ZEROCONF_PLUGIN)
                $(cmake-utils_use_enable mediaplayer MEDIAPLAYER_PLUGIN)"
        kde4-base_src_compile
}

_________________
Mmmm.... Brains!


Last edited by ltboy on Tue Apr 29, 2008 8:26 pm; edited 2 times in total
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Tue Apr 29, 2008 12:49 pm    Post subject: Reply with quote

But the right way is easier...
MY_PV=${PV/_/}
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
ltboy
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 197
Location: Utah

PostPosted: Tue Apr 29, 2008 3:55 pm    Post subject: Reply with quote

AHAH! So that's how you do that...
_________________
Mmmm.... Brains!
Back to top
View user's profile Send private message
ltboy
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 197
Location: Utah

PostPosted: Tue Apr 29, 2008 5:19 pm    Post subject: Reply with quote

Oh, and you can scratch the "export CMAKE_COMPILER_VERBOSE=YesPlease" line. I put that in there to help me try and find why it was failing(mediaplayer plugin)...
_________________
Mmmm.... Brains!
Back to top
View user's profile Send private message
ltboy
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 197
Location: Utah

PostPosted: Tue Apr 29, 2008 5:50 pm    Post subject: Reply with quote

Updated ebuild and added patch. See up top.
_________________
Mmmm.... Brains!
Back to top
View user's profile Send private message
Drantin
n00b
n00b


Joined: 11 Feb 2004
Posts: 9

PostPosted: Tue May 06, 2008 12:08 am    Post subject: patch Reply with quote

The patch seems a bit unnecessary now... and causes problems on building...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum