summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Porcel <armin76@gentoo.org>2007-01-12 11:03:14 +0000
committerRaúl Porcel <armin76@gentoo.org>2007-01-12 11:03:14 +0000
commit4463d1351c117febadbf3f9251465f12cc16646e (patch)
treef77928f2ec8ed59b6d2ec884f65b7b0b3a395110 /net-p2p/mldonkey
parentAdded missing dependencies. (diff)
downloadhistorical-4463d1351c117febadbf3f9251465f12cc16646e.tar.gz
historical-4463d1351c117febadbf3f9251465f12cc16646e.tar.bz2
historical-4463d1351c117febadbf3f9251465f12cc16646e.zip
Add new patch, from bug 161169, thanks to spiralvoice <spiralvoice at hotmail dot com>
Package-Manager: portage-2.1.1-r2
Diffstat (limited to 'net-p2p/mldonkey')
-rw-r--r--net-p2p/mldonkey/ChangeLog11
-rw-r--r--net-p2p/mldonkey/Manifest19
-rw-r--r--net-p2p/mldonkey/files/digest-mldonkey-2.8.2-r13
-rw-r--r--net-p2p/mldonkey/files/mldonkey-2.8.2-avoid_dupl_sending.patch133
-rw-r--r--net-p2p/mldonkey/mldonkey-2.8.2-r1.ebuild173
5 files changed, 333 insertions, 6 deletions
diff --git a/net-p2p/mldonkey/ChangeLog b/net-p2p/mldonkey/ChangeLog
index b587affc0d48..d9f5467b000d 100644
--- a/net-p2p/mldonkey/ChangeLog
+++ b/net-p2p/mldonkey/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-p2p/mldonkey
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/ChangeLog,v 1.134 2006/12/21 06:35:42 compnerd Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/ChangeLog,v 1.135 2007/01/12 11:03:14 armin76 Exp $
+
+*mldonkey-2.8.2-r1 (12 Jan 2007)
+
+ 12 Jan 2007; Raúl Porcel <armin76@gentoo.org>
+ +files/mldonkey-2.8.2-avoid_dupl_sending.patch, +mldonkey-2.8.2-r1.ebuild:
+ Add new patch, from bug 161169, thanks to spiralvoice <spiralvoice at
+ hotmail dot com>
21 Dec 2006; Saleem Abdulrasool <compnerd@gentoo.org>
-mldonkey-2.5.16-r9.ebuild:
diff --git a/net-p2p/mldonkey/Manifest b/net-p2p/mldonkey/Manifest
index 59012e8cc11c..c87682e9cee0 100644
--- a/net-p2p/mldonkey/Manifest
+++ b/net-p2p/mldonkey/Manifest
@@ -14,6 +14,10 @@ AUX mldonkey-2.7.6-magic.patch 6693 RMD160 96097de4fc7c2f17218da07df13a082f113e9
MD5 69a5142bc9dc243dbb8ae121b5dc5505 files/mldonkey-2.7.6-magic.patch 6693
RMD160 96097de4fc7c2f17218da07df13a082f113e9ad1 files/mldonkey-2.7.6-magic.patch 6693
SHA256 f95040c125e41c65381e90c124993a7769a5be0daa0790895f8e503a1d97304a files/mldonkey-2.7.6-magic.patch 6693
+AUX mldonkey-2.8.2-avoid_dupl_sending.patch 6027 RMD160 1264bbc07351ee770a905ebdc2d3f317f3c25529 SHA1 5d02ee1105716158bd889ec3f413a1dd49c7301e SHA256 c40a3f7a50b86cbb141ab242b57bd257e5ed59e06158adefdc7aac9205632567
+MD5 f99565d33e2f1b174129123816070f2f files/mldonkey-2.8.2-avoid_dupl_sending.patch 6027
+RMD160 1264bbc07351ee770a905ebdc2d3f317f3c25529 files/mldonkey-2.8.2-avoid_dupl_sending.patch 6027
+SHA256 c40a3f7a50b86cbb141ab242b57bd257e5ed59e06158adefdc7aac9205632567 files/mldonkey-2.8.2-avoid_dupl_sending.patch 6027
AUX mldonkey-gui.desktop 263 RMD160 c8da2a5e90446cefe75e93969b975093b2d367b0 SHA1 6e350814866f741ef76389c98df34af22751e164 SHA256 8ba9aec085500abbc7fcf53cf34a61e23a5b68cdc8b4b856f4395a5729608eb9
MD5 93e16748ad44af182177978057266aa7 files/mldonkey-gui.desktop 263
RMD160 c8da2a5e90446cefe75e93969b975093b2d367b0 files/mldonkey-gui.desktop 263
@@ -56,14 +60,18 @@ EBUILD mldonkey-2.7.7.ebuild 4467 RMD160 be7e3ed8eb927676b6e3c9f08be7bfe08034697
MD5 267ffcdbe7693de4ad72ced261524758 mldonkey-2.7.7.ebuild 4467
RMD160 be7e3ed8eb927676b6e3c9f08be7bfe080346977 mldonkey-2.7.7.ebuild 4467
SHA256 53616cee7b3fdbd46b2f5c737fb76546143c4ffe04361b0f1949fc92fbc1efd6 mldonkey-2.7.7.ebuild 4467
+EBUILD mldonkey-2.8.2-r1.ebuild 4709 RMD160 137f92ea3dda2677ad8e93c0baa14c0b14df3279 SHA1 4396d616e76e1f7e1431862c8b7bfc568814ff5a SHA256 4bf5d680fd6d7e05836c0701aadabfc7e5887123bf57e58a753658185fa1f0d7
+MD5 454df0612c6af49a19929c7758c637f0 mldonkey-2.8.2-r1.ebuild 4709
+RMD160 137f92ea3dda2677ad8e93c0baa14c0b14df3279 mldonkey-2.8.2-r1.ebuild 4709
+SHA256 4bf5d680fd6d7e05836c0701aadabfc7e5887123bf57e58a753658185fa1f0d7 mldonkey-2.8.2-r1.ebuild 4709
EBUILD mldonkey-2.8.2.ebuild 4602 RMD160 8a6e64088e2c86fab474089d767985a5f91eeed3 SHA1 45f96cdd8c3d572b1fc72d95d4276a458b26303f SHA256 ba707eb5a085eb4ae7c3d61b58b7a0cec5d2d340d22450922f22f3a4ee79ef31
MD5 35057848aee18f2370eab075a510794f mldonkey-2.8.2.ebuild 4602
RMD160 8a6e64088e2c86fab474089d767985a5f91eeed3 mldonkey-2.8.2.ebuild 4602
SHA256 ba707eb5a085eb4ae7c3d61b58b7a0cec5d2d340d22450922f22f3a4ee79ef31 mldonkey-2.8.2.ebuild 4602
-MISC ChangeLog 21981 RMD160 0760fe0beaf216a19fd83fdffbe3177ebba0631b SHA1 e43b83c4148d62ee259f0815aa790692d735a7a7 SHA256 34d41d64b43d0d53082d5d0c8618f1bf5f5eb8df42fa41c784d17375c271ba41
-MD5 16c54be593c24d64c7ba906a39ed9355 ChangeLog 21981
-RMD160 0760fe0beaf216a19fd83fdffbe3177ebba0631b ChangeLog 21981
-SHA256 34d41d64b43d0d53082d5d0c8618f1bf5f5eb8df42fa41c784d17375c271ba41 ChangeLog 21981
+MISC ChangeLog 22232 RMD160 5d527d1bbb76c33ccaa1f21900aa3864b7af4fde SHA1 dd8e87138f031edd111b3c28894b7267e731c267 SHA256 41ec510abe3ce5b387b78e8b3c6855ad4a2eba2b3ef72b08d0b165bba8542a2b
+MD5 b095310c19f8073f64cd3be04277618c ChangeLog 22232
+RMD160 5d527d1bbb76c33ccaa1f21900aa3864b7af4fde ChangeLog 22232
+SHA256 41ec510abe3ce5b387b78e8b3c6855ad4a2eba2b3ef72b08d0b165bba8542a2b ChangeLog 22232
MISC metadata.xml 242 RMD160 d0edc89382298dee00d3571b62a5f457ef268751 SHA1 25511186cac54f1353a3347f72da7f5d05b9da57 SHA256 b354d71d5efbed0ff97e27564894438b42a8bd8b577007cadc6972dd37d6b5f8
MD5 ee159929f3e247f937fe88bb1919d8bd metadata.xml 242
RMD160 d0edc89382298dee00d3571b62a5f457ef268751 metadata.xml 242
@@ -83,3 +91,6 @@ SHA256 4259da6fad3ea758293a8795cbab96ebd293ac70b2bcca938385cb24f37343b7 files/di
MD5 7a49132cb0108ac570b978eb6000db45 files/digest-mldonkey-2.8.2 250
RMD160 4213be41a9c4db4d112e40396786dcd55f49436a files/digest-mldonkey-2.8.2 250
SHA256 cdb85c503837b524df40852095c65b6fe6211fdc48b803c4da5a92554e6286a1 files/digest-mldonkey-2.8.2 250
+MD5 7a49132cb0108ac570b978eb6000db45 files/digest-mldonkey-2.8.2-r1 250
+RMD160 4213be41a9c4db4d112e40396786dcd55f49436a files/digest-mldonkey-2.8.2-r1 250
+SHA256 cdb85c503837b524df40852095c65b6fe6211fdc48b803c4da5a92554e6286a1 files/digest-mldonkey-2.8.2-r1 250
diff --git a/net-p2p/mldonkey/files/digest-mldonkey-2.8.2-r1 b/net-p2p/mldonkey/files/digest-mldonkey-2.8.2-r1
new file mode 100644
index 000000000000..04ea99d280aa
--- /dev/null
+++ b/net-p2p/mldonkey/files/digest-mldonkey-2.8.2-r1
@@ -0,0 +1,3 @@
+MD5 123aeb79a3ca91a4943b59f044e98d4a mldonkey-2.8.2.tar.bz2 2652074
+RMD160 ce95184805ac8f4c690e37c75d418b5f7e265f92 mldonkey-2.8.2.tar.bz2 2652074
+SHA256 51efc1c339b8cbafde93f4444f18e4243f41008b1c4107a41602542e9eeaa68e mldonkey-2.8.2.tar.bz2 2652074
diff --git a/net-p2p/mldonkey/files/mldonkey-2.8.2-avoid_dupl_sending.patch b/net-p2p/mldonkey/files/mldonkey-2.8.2-avoid_dupl_sending.patch
new file mode 100644
index 000000000000..9b0968d37e60
--- /dev/null
+++ b/net-p2p/mldonkey/files/mldonkey-2.8.2-avoid_dupl_sending.patch
@@ -0,0 +1,133 @@
+diff -a -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x '*.cmi' -x '*.cma' -x '*.cmo' -x '*.cmx' -x '*.cmxa' -x '*.a' -x '*.o' -x .depend -x Makefile -x mlnet -x ocamlpp.byte -N -r -u ./src/networks/donkey/donkeyClient.ml ./src/networks/donkey/donkeyClient.ml
+--- ./src/networks/donkey/donkeyClient.ml 2007-01-06 19:15:17.000000000 +0100
++++ ./src/networks/donkey/donkeyClient.ml 2007-01-07 23:15:39.000000000 +0100
+@@ -449,15 +449,17 @@
+
+ let new_chunk up begin_pos end_pos =
+ if begin_pos <> end_pos then
+- let pair = (begin_pos, end_pos) in
+- (match up.up_chunks with
+- [] ->
++ let chunk = (begin_pos, end_pos) in
++ (* the zone requested is already "in the pipe" *)
++ if not (List.mem chunk up.up_flying_chunks) then
++ match up.up_chunks with
++ | [] ->
+ up.up_pos <- begin_pos;
+ up.up_end_chunk <- end_pos;
+- up.up_chunks <- [pair];
+- | chunks ->
+- if not (List.mem pair chunks) then
+- up.up_chunks <- chunks @ [pair])
++ up.up_chunks <- [chunk];
++ | up_chunks ->
++ if not (List.mem chunk up_chunks) then
++ up.up_chunks <- up_chunks @ [chunk]
+
+ let identify_client_brand c =
+ if c.client_brand = Brand_unknown then
+@@ -2055,13 +2057,21 @@
+ set_rtimeout sock !!upload_timeout;
+
+ let up, waiting = match c.client_upload with
+- Some ({ up_file = f } as up) when f == file -> up, up.up_waiting
++ | Some ({ up_file = f } as up) when f == file ->
++ (* zones are received in the order they're sent, so we
++ know that the oldest of the zones "in fly" must have
++ been received when this QueryBlockReq was sent *)
++ (match up.up_flying_chunks with
++ | [] -> ()
++ | _ :: q -> up.up_flying_chunks <- q);
++ up, up.up_waiting
+ | Some old_up ->
+ {
+ up_file = file;
+ up_pos = Int64.zero;
+ up_end_chunk = Int64.zero;
+ up_chunks = [];
++ up_flying_chunks = [];
+ up_waiting = old_up.up_waiting;
+ }, old_up.up_waiting
+ | _ ->
+@@ -2070,6 +2080,7 @@
+ up_pos = Int64.zero;
+ up_end_chunk = Int64.zero;
+ up_chunks = [];
++ up_flying_chunks = [];
+ up_waiting = false;
+ }, false
+ in
+@@ -2157,12 +2168,12 @@
+ let init_client sock c =
+ set_handler sock WRITE_DONE (fun s ->
+ match c.client_upload with
+- None -> ()
+- | Some up ->
++ | Some ({ up_chunks = _ :: _ } as up) ->
+ if not up.up_waiting && !CommonUploads.has_upload = 0 then begin
+ up.up_waiting <- true;
+ CommonUploads.ready_for_upload (as_client c)
+ end
++ | _ -> ()
+ );
+ (*
+ set_handler sock (BASIC_EVENT RTIMEOUT) (fun s ->
+diff -a -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x '*.cmi' -x '*.cma' -x '*.cmo' -x '*.cmx' -x '*.cmxa' -x '*.a' -x '*.o' -x .depend -x Makefile -x mlnet -x ocamlpp.byte -N -r -u ./src/networks/donkey/donkeyFiles.ml ./src/networks/donkey/donkeyFiles.ml
+--- ./src/networks/donkey/donkeyFiles.ml 2007-01-06 19:15:17.000000000 +0100
++++ ./src/networks/donkey/donkeyFiles.ml 2007-01-07 23:16:18.000000000 +0100
+@@ -127,7 +127,7 @@
+ (* lprintf "send_client_block\n"; *)
+ if per_client > 0 && CommonUploads.can_write_len sock max_msg_size then
+ match c.client_upload with
+- | Some ({ up_chunks = _ :: chunks } as up) ->
++ | Some ({ up_chunks = current_chunk :: chunks } as up) ->
+ if up.up_file.file_shared = None then begin
+ (* Is there a message to warn that a file is not shared anymore ? *)
+ c.client_upload <- None;
+@@ -138,16 +138,17 @@
+ if max_len <= msg_block_size_int then
+ (* last block from chunk *)
+ begin
++ send_small_block c sock up.up_file up.up_pos max_len;
+ if !verbose_upload then
+ lprintf_nl "End of chunk (%d) %Ld %s" max_len up.up_end_chunk (file_best_name up.up_file);
+- send_small_block c sock up.up_file up.up_pos max_len;
++ up.up_flying_chunks <- up.up_flying_chunks @ [current_chunk];
+ up.up_chunks <- chunks;
+ let per_client = per_client - max_len in
+ match chunks with
+- [] ->
++ | [] ->
+ if !verbose_upload then
+- lprintf_nl "NO CHUNKS";
+- c.client_upload <- None;
++ lprintf_nl "NO MORE CHUNKS";
++ up.up_waiting <- false;
+ | (begin_pos, end_pos) :: _ ->
+ up.up_pos <- begin_pos;
+ up.up_end_chunk <- end_pos;
+@@ -172,10 +173,10 @@
+ let size = min max_msg_size size in
+ send_client_block c sock size;
+ (match c.client_upload with
+- None -> ()
+- | Some up ->
++ | Some ({ up_chunks = _ :: _ }) ->
+ if !CommonUploads.has_upload = 0 then
+ CommonUploads.ready_for_upload (as_client c)
++ | _ -> ()
+ )
+ )
+ let _ =
+diff -a -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x '*.cmi' -x '*.cma' -x '*.cmo' -x '*.cmx' -x '*.cmxa' -x '*.a' -x '*.o' -x .depend -x Makefile -x mlnet -x ocamlpp.byte -N -r -u ./src/networks/donkey/donkeyTypes.ml ./src/networks/donkey/donkeyTypes.ml
+--- ./src/networks/donkey/donkeyTypes.ml 2007-01-06 19:15:17.000000000 +0100
++++ ./src/networks/donkey/donkeyTypes.ml 2007-01-07 23:15:39.000000000 +0100
+@@ -618,6 +618,8 @@
+ mutable up_pos : int64;
+ mutable up_end_chunk : int64;
+ mutable up_chunks : (int64 * int64) list;
++ (* zones sent but not yet received by other peer, oldest first *)
++ mutable up_flying_chunks : (int64 * int64) list;
+ mutable up_waiting : bool;
+ }
+
diff --git a/net-p2p/mldonkey/mldonkey-2.8.2-r1.ebuild b/net-p2p/mldonkey/mldonkey-2.8.2-r1.ebuild
new file mode 100644
index 000000000000..007dda5428ef
--- /dev/null
+++ b/net-p2p/mldonkey/mldonkey-2.8.2-r1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/mldonkey-2.8.2-r1.ebuild,v 1.1 2007/01/12 11:03:14 armin76 Exp $
+
+inherit flag-o-matic
+
+IUSE="batch doc fasttrack gd gnutella gtk guionly magic"
+
+DESCRIPTION="MLDonkey is a multi-network P2P application written in Ocaml, coming with its own Gtk GUI, web and telnet interface."
+HOMEPAGE="http://www.nongnu.org/mldonkey/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
+RESTRICT="nomirror"
+
+RDEPEND="dev-lang/perl
+ guionly? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6 )
+ gtk? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6 )
+ gd? ( >=media-libs/gd-2.0.28 )
+ magic? ( sys-apps/file )"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/autoconf-2.58
+ !batch? ( >=dev-lang/ocaml-3.08.3 )
+ batch? ( net-misc/wget )"
+
+MLUSER="p2p"
+
+pkg_setup() {
+ if use gtk; then
+ echo ""
+ einfo "If the compile with gui fails, and you have updated Ocaml"
+ einfo "recently, you may have forgotten that you need to run"
+ einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh"
+ einfo "to learn which ebuilds you need to recompile"
+ einfo "each time you update Ocaml to a different version"
+ einfo "see the Ocaml ebuild for details"
+ echo ""
+ fi
+
+ if use gtk && !(built_with_use dev-ml/lablgtk svg); then
+ eerror "dev-ml/lablgtk must be built with the 'svg' USE flag to use the gtk gui"
+ die "Recompile dev-ml/lablgtk with enabled svg USE flag"
+ fi
+
+ if use gd && !(built_with_use media-libs/gd truetype); then
+ eerror "media-libs/gd must be built with 'truetype' to compile"
+ eerror "MLDonkey with gd support"
+ die "Recompile media-libs/gd with enabled truetype USE flag"
+ fi
+}
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ # Avoid upload unneeded data to eMule clients, bug #161169
+ epatch "${FILESDIR}/${P}-avoid_dupl_sending.patch"
+
+ export WANT_AUTOCONF=2.5
+ cd "${S}"/config
+ autoconf
+ cd "${S}"
+}
+
+src_compile() {
+ append-ldflags -Wl,-z,noexecstack
+
+ # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
+
+ # batch Automatically download and build OCAML-3.08.3 for compiling itself
+ # onlygui Disable all nets support, build only chosen GUI
+
+ if use gtk || use guionly; then
+ myconf="--enable-gui=newgui2"
+ else
+ myconf="--disable-gui"
+ fi
+
+ if use guionly; then
+ myconf="${myconf} --disable-multinet --disable-donkey"
+ fi
+
+ cd ${S}
+ econf \
+ --sysconfdir=/etc/mldonkey \
+ --sharedstatedir=/var/mldonkey \
+ --localstatedir=/var/mldonkey \
+ --enable-checks \
+ $(use_enable fasttrack) \
+ $(use_enable gnutella) \
+ $(use_enable gnutella gnutella2) \
+ $(use_enable batch) \
+ $(use_enable gd) \
+ $(use_enable magic) \
+ ${myconf} || die "econf failed"
+
+ export OCAMLRUNPARAM="l=256M"
+ emake || die "emake failed"
+
+ if ! use guionly; then
+ emake utils || die "emake utils failed"
+ fi;
+}
+
+src_install() {
+ if ! use guionly; then
+ dobin mlnet mld_hash get_range copysources make_torrent subconv
+ dobin ${FILESDIR}/mldonkey
+
+ insinto /etc/conf.d; newins ${FILESDIR}/mldonkey.confd mldonkey
+ exeinto /etc/init.d; newexe "${FILESDIR}/mldonkey.initd-2.8" mldonkey
+ fi
+
+ if use gtk; then
+ dobin mlgui mlguistarter
+ domenu ${FILESDIR}/${PN}-gui.desktop
+ doicon ${FILESDIR}/${PN}.png
+ fi
+
+ if use doc ; then
+ cd ${S}/distrib
+ dodoc ChangeLog *.txt
+ dohtml *.html
+
+ insinto /usr/share/doc/${PF}/scripts
+ doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
+
+ cd ${S}/docs
+ dodoc *.txt *.tex *.pdf
+ dohtml *.html
+
+ cd ${S}/docs/developers
+ dodoc *.txt *.tex
+
+ cd ${S}/docs/images
+ insinto /usr/share/doc/${PF}/html/images
+ doins *
+ fi
+}
+
+pkg_preinst() {
+ if ! use guionly; then
+ enewuser ${MLUSER} -1 /bin/bash /home/p2p users
+ fi
+}
+
+pkg_postinst() {
+ if ! use guionly; then
+ echo
+ einfo "Running \`mldonkey' will start the server inside ~/.mldonkey/"
+ einfo "If you want to start MLDonkey in a particular working directory,"
+ einfo "use the \`mlnet' command."
+ einfo "If you want to start MLDonkey as a system service, use"
+ einfo "the /etc/init.d/mldonkey script. To control bandwidth, use"
+ einfo "the 'slow' and 'fast' arguments. Be sure to have a look at"
+ einfo "/etc/conf.d/mldonkey also."
+ echo
+ einfo "Attention: 2.6 has changed the inifiles structure, so downgrading"
+ einfo "will be problematic."
+ einfo "User settings (admin) are transferred to users.ini from "
+ einfo "downloads.ini"
+ einfo "Old ini files are automatically converted to the new format"
+ echo
+ else
+ echo
+ einfo "Simply run mlgui to start the chosen MLDonkey gui."
+ einfo "It puts its config files into ~/.mldonkey"
+ fi
+}