summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <drac@gentoo.org>2007-11-26 19:32:47 +0000
committerSamuli Suominen <drac@gentoo.org>2007-11-26 19:32:47 +0000
commit6c65c8e9d1d865c3e76f02f90608de53eab9476b (patch)
treed82c69b5d5fd15d6d71e9969cbfc61d0662c6758 /net-p2p
parentStable on ppc64; bug #195095 (diff)
downloadgentoo-2-6c65c8e9d1d865c3e76f02f90608de53eab9476b.tar.gz
gentoo-2-6c65c8e9d1d865c3e76f02f90608de53eab9476b.tar.bz2
gentoo-2-6c65c8e9d1d865c3e76f02f90608de53eab9476b.zip
Makefile was confusing LDFLAGS with LIBS, CFLAGS with CXXFLAGS, add a patch for it. Keyword ~amd64 wrt #200409.
(Portage version: 2.1.4_rc3)
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/hrktorrent/ChangeLog7
-rw-r--r--net-p2p/hrktorrent/files/hrktorrent-0.2.2-Makefile.patch26
-rw-r--r--net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild38
3 files changed, 53 insertions, 18 deletions
diff --git a/net-p2p/hrktorrent/ChangeLog b/net-p2p/hrktorrent/ChangeLog
index 16c26dfb34aa..2d93c0797949 100644
--- a/net-p2p/hrktorrent/ChangeLog
+++ b/net-p2p/hrktorrent/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-p2p/hrktorrent
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/hrktorrent/ChangeLog,v 1.2 2007/11/26 17:46:17 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/hrktorrent/ChangeLog,v 1.3 2007/11/26 19:32:46 drac Exp $
+
+ 26 Nov 2007; Samuli Suominen <drac@gentoo.org>
+ +files/hrktorrent-0.2.2-Makefile.patch, hrktorrent-0.2.2.ebuild:
+ Makefile was confusing LDFLAGS with LIBS, CFLAGS with CXXFLAGS, add a patch
+ for it. Keyword ~amd64 wrt #200409.
*hrktorrent-0.2.2 (26 Nov 2007)
diff --git a/net-p2p/hrktorrent/files/hrktorrent-0.2.2-Makefile.patch b/net-p2p/hrktorrent/files/hrktorrent-0.2.2-Makefile.patch
new file mode 100644
index 000000000000..660d53cd12e7
--- /dev/null
+++ b/net-p2p/hrktorrent/files/hrktorrent-0.2.2-Makefile.patch
@@ -0,0 +1,26 @@
+diff -ur hrktorrent-0.2.2.orig/Makefile hrktorrent-0.2.2/Makefile
+--- hrktorrent-0.2.2.orig/Makefile 2007-11-25 17:17:16.000000000 +0200
++++ hrktorrent-0.2.2/Makefile 2007-11-26 21:26:51.000000000 +0200
+@@ -1,17 +1,17 @@
+-C = g++
++CXX = g++
+ OBJ = main.o core.o settings.o utils.o
+ OUT = hrktorrent
+
+-CFLAGS = `pkg-config --cflags libtorrent` -O2 -pipe
+-LDFLAGS = `pkg-config --libs libtorrent` -lpthread
++CXXFLAGS += `pkg-config --cflags libtorrent`
++LIBS = `pkg-config --libs libtorrent` -lpthread
+
+ all: $(OUT)
+
+ %.o: %.cpp
+- $(C) -c -o $@ $<
++ $(CXX) $(CXXFLAGS) -c -o $@ $<
+
+ $(OUT): $(OBJ)
+- $(C) $(LDFLAGS) $(OBJ) -o $(OUT)
++ $(CXX) $(LDFLAGS) $(OBJ) $(LIBS) -o $(OUT)
+
+ clean:
+ rm -rf $(OBJ) $(OUT)
diff --git a/net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild b/net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild
index bdc53f5856ef..56e325b12b0b 100644
--- a/net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild
+++ b/net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild
@@ -1,41 +1,45 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild,v 1.1 2007/11/26 17:46:17 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/hrktorrent/hrktorrent-0.2.2.ebuild,v 1.2 2007/11/26 19:32:46 drac Exp $
-inherit toolchain-funcs
+inherit eutils toolchain-funcs
DESCRIPTION="A slim rb_libtorrent based console torrent application supporting DHT"
-HOMEPAGE="http://henrik.unit5.ca/hrktorrent/"
-SRC_URI="http://henrik.unit5.ca/hrktorrent/${P}.tar.bz2"
+HOMEPAGE="http://henrik.unit5.ca/hrktorrent"
+SRC_URI="http://henrik.unit5.ca/${PN}/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~x86"
+KEYWORDS="~amd64 ~x86"
IUSE=""
-RDEPEND="dev-cpp/asio
- =net-libs/rb_libtorrent-0.12"
-DEPEND="${RDEPEND}"
+RDEPEND="=net-libs/rb_libtorrent-0.12*"
+DEPEND="${RDEPEND}
+ dev-cpp/asio
+ dev-util/pkgconfig"
src_unpack() {
unpack ${A}
cd "${S}"
+ # Makefile is confusing LIBS with LDFLAGS and CFLAGS with CXXFLAGS.
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+}
- # Respect CFLAGS, call g++ correctly, and don't strip
- sed -i -e "s/-O2 -pipe/${CFLAGS}/g" -e "s/g++/$(tc-getCXX)/g" \
- -e "s/-lpthread -s/-lpthread/g" -e "s/\$(C) -c/\$(C) \$(CFLAGS) -c/g" \
- Makefile || die "sed failed"
+src_compile() {
+ emake CXX="$(tc-getCXX)" || die "emake failed."
}
src_install() {
- dodir /usr/bin
- cp "${WORKDIR}/${P}/hrktorrent" "${D}/usr/bin" || die "install failed"
- dodoc CHANGELOG README hrktorrent.rc.example
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc CHANGELOG README ${PN}.rc.example
}
pkg_postinst() {
- elog "A sample configuration file for ${PN} can be found"
- elog "in /usr/share/doc/${PF}/hrktorrent.rc.example.{gz,bz2}"
+ local docsuffix=$(ecompress --suffix)
+
+ elog "A sample configuration file for ${PN} can be found in"
+ elog "/usr/share/doc/${PF}/hrktorrent.rc.example${docsuffix}"
elog "To use a config file, extract it, put it in your home directory"
elog "and name it \".hrktorrent.rc\""
}