summaryrefslogtreecommitdiff
path: root/net-p2p/mldonkey
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/mldonkey')
-rw-r--r--net-p2p/mldonkey/Manifest11
-rw-r--r--net-p2p/mldonkey/files/ocaml-4.03.patch145
-rw-r--r--net-p2p/mldonkey/files/ocaml4.patch12
-rw-r--r--net-p2p/mldonkey/metadata.xml9
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild174
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.6.ebuild172
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.7.ebuild (renamed from net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild)116
7 files changed, 72 insertions, 567 deletions
diff --git a/net-p2p/mldonkey/Manifest b/net-p2p/mldonkey/Manifest
index 42f10017b764..e0ccb7ab4b07 100644
--- a/net-p2p/mldonkey/Manifest
+++ b/net-p2p/mldonkey/Manifest
@@ -1,10 +1,5 @@
AUX mldonkey.confd-2.8 887 BLAKE2B 43cc5c149ceefc7ec3631d280e0a17266bed0d690b19d34932e7a47131e6c7e2bc0e836821f5b3e1bb4adb1438b1fa7a5b8f7e2f827d0bebfab85025bdea0b3d SHA512 0ec0fe4fcf87222e31852e7e254e5e054bc31b713d5e4679b2a794c6df8cf0347f9a1d3d345bb48144b13d3e8dcb38168d0be32c766b7d678a8055fc066beb4d
AUX mldonkey.initd 3158 BLAKE2B 7cacc7c72de3e80c3d4f79f3e15b4b583169e6391c5cf9350910e683ba296139b899d86a715f588d5c488edc2651ae61db7ed7048c751d6d26c0ba09084adc6c SHA512 33530e71032be0771296fde58a46dc02859a82de5173ff71bbbcdebf879e6d7d6b597b4104db0ab2f319d3f5848db41d17cadbdd781c6f97dd23387b7f823054
-AUX ocaml-4.03.patch 5140 BLAKE2B 592dbb7bd8bc53e039a0cf806d9e69cbb6e70ca002152ca21e941e7f6adfc40abd18ff33cb49e77d25b19eef07ee79be48f4b1d3a63e819d814598637079f1bf SHA512 19f0736c72abcbb992aa55bb7a685bc21234c6f807b0efcfb09791aee9843823779ae6c94f70a9c891b9aa0ac388618d8c775beee1244e264c0b27096e8a2399
-AUX ocaml4.patch 547 BLAKE2B e2cb8eb12121beb5cc81ba34dcf8ddd78f2ab9826d4c6cdc028c14b3f04e6bcc041bf153ec1d6aaf2d78c97c9d70e26f4ccbc87e7c2cef2499b22bf157dd2695 SHA512 f99d4050613e210c2092153a7b1a45028ea26d4e90d295b1d19ed3a25b7ae656c15efca84a5f694703dca339c1a5e7baec5d71ad815f96c41620a8ed7c34422c
-DIST mldonkey-3.1.5.tar.bz2 2847382 BLAKE2B 60df6ffba295d0a230f1ca2d143e21529387fb453529cd89e84911b72248c0fec15261b7d3ed54be2c8d1de84bf4e8faaebcfa2019960af845493fb2385e46c8 SHA512 96e75acf91d7ecc41490f898e06d284da27404c7e567f173936d8113885a3b4b6bc93341358f92a30d3f699eef681d97ce56414a37bb02a535ad2da4d4ad13a3
-DIST mldonkey-3.1.6.tar.bz2 2886916 BLAKE2B f92c7195c67e3a9186cb9e691114dc2c1b967dab93a7c280a6fe25c2f3a18d97e849f738d0f4669f0e967c3b717ed0329f40d95c07be13a46fb5a96fc49ff716 SHA512 d0c7256c7c43934bc132183cfe0c8d85c61a874e295b86ba989f43fd4d9f3672bdf18439a9fefce52c30a6a8df08a5a464dcc21d4bf199d1b502fa344683081a
-EBUILD mldonkey-3.1.5-r1.ebuild 4347 BLAKE2B d4a3f6cc9022d983bbf10b9e631b7519896718c1508a478f1f5745b63af0b242dc787e52c27bc49bef3fbcffa1caef24d79ba0930173dc270726a3e18cdd1134 SHA512 dbd6dbd07c2088eb1eca91b8c0441cbeee0edb9c7ae6a736184174203c1d79e08b70a9345e9717a77d22b11a31a21faee69bf3e08bf1cc983877ba6ff5495036
-EBUILD mldonkey-3.1.6-r1.ebuild 4453 BLAKE2B 440753ae53e894aae8c69409c37a8a49adddc3c7ad4b52186d5c47aa5fbfec442c361550cfe063d6c658a463a605f44d098439c0709e2c8d3175448ae34d3065 SHA512 b7f6005af2f70c91ff8d7c82c4d8ecb4b71f7ad1fc51e04146aaa47c9f496828fe950fd1c69996d426413ca8be2a517ed205ea5873e3e764f40b8ebe5b22c7bb
-EBUILD mldonkey-3.1.6.ebuild 4320 BLAKE2B b29ecc98ce41a4ca232c658caca7538ad296c0e8659dec1325b00a92f1a80d2d5a51763559f04eef1e8dc3983ef674b380ee026ae3f8e68c45d62753b6b26a5d SHA512 b1273d8b84660a185da4b3f389f14c3dea57868cc7b02803de5926038622065824aaf73671b12d3c7aa42e30bbc7ff454eb66c0aa6ed3181be23e726f760cdd4
-MISC metadata.xml 571 BLAKE2B 7b77724802434cb17e85d74ece410514b6dc0b20d0c303393df8e91960997fc172c25737bae265f1ba75007add724ea9ce03d5b547fc07f51f22b9a2db71ad73 SHA512 fd3e9235e3af0b6fa0d06e627b56bdca8b149346ca9efa861dc658690f1f16cadc8c0bb7f65b1156fddf205451ad90f23d4ad91c35ab2c5094ac22381c79c53d
+DIST mldonkey-3.1.7-2.tar.bz2 2801815 BLAKE2B f914648b4e2a358e51518f3b58dc0df803cdb28d7706783504644266690514c17c2cae0688011073391db221eb8f38c7cbaf1e913220d824e41ca2e23d4c8587 SHA512 11cb0fa0db95e918c291009f4121a1b34cf485e5ac6826a72a4dc520dd78d21ced40d205fa26eb451c7d3eb31f2193cbb64e46c99c85dc932762c1bcc4da4934
+EBUILD mldonkey-3.1.7.ebuild 4511 BLAKE2B edb2721ec9dff498eaabafdf1b263c355024107e49582ac7b5a632700270e240c3057f14c6940463dcbb5679a4b0c0935080b77659c7aef8ec7b60cd8d70deba SHA512 500a7865b3ac804f82afc47ed907d554023801c0baa44a4654e68c736d6d0c92b9285a1290d76120f6d3a5e99bcbcf5f2cad54c5bf5db8a20308f7a3826c8fa5
+MISC metadata.xml 779 BLAKE2B d57b3c5b63c33bbb2fa699498dd7d05038fba219c8778a50b1acdfa9c4be4e5b3161af20ec29cc44f63c3a4d33fa7c93faa7835a5f269646b3a8873349702ae6 SHA512 97d2135549869254658d258e3833bf0c700edddf94fa7b40244b14b4bece855b7683191d33db5ad9ccef2884a63ee2ea6e8f9dc5ef28bd1a870266930c610c0c
diff --git a/net-p2p/mldonkey/files/ocaml-4.03.patch b/net-p2p/mldonkey/files/ocaml-4.03.patch
deleted file mode 100644
index fce94c851e2d..000000000000
--- a/net-p2p/mldonkey/files/ocaml-4.03.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-Index: mldonkey-3.1.5/src/config/unix/os_stubs_c.c
-===================================================================
---- mldonkey-3.1.5.orig/src/config/unix/os_stubs_c.c
-+++ mldonkey-3.1.5/src/config/unix/os_stubs_c.c
-@@ -66,7 +66,7 @@ ssize_t os_read(OS_FD fd, char *buf, siz
-
- void os_ftruncate(OS_FD fd, OFF_T len, /* bool */ int sparse)
- {
-- int64 cursize;
-+ int64_t cursize;
- if(!fd) failwith("ftruncate32: file is closed");
-
- cursize = os_getfdsize(fd);
-@@ -109,7 +109,7 @@ int os_getdtablesize()
-
- *******************************************************************/
-
--int64 os_getfdsize(OS_FD fd)
-+int64_t os_getfdsize(OS_FD fd)
- {
- struct stat buf;
-
-@@ -127,7 +127,7 @@ int64 os_getfdsize(OS_FD fd)
-
- *******************************************************************/
-
--int64 os_getfilesize(char *path)
-+int64_t os_getfilesize(char *path)
- {
- struct stat buf;
-
-Index: mldonkey-3.1.5/src/networks/donkey/donkeyGlobals.ml
-===================================================================
---- mldonkey-3.1.5.orig/src/networks/donkey/donkeyGlobals.ml
-+++ mldonkey-3.1.5/src/networks/donkey/donkeyGlobals.ml
-@@ -781,7 +781,6 @@ let set_client_name c name md4 =
- c.client_md4 <- md4;
- end
-
--exception ClientFound of client
- let find_client_by_name name =
- try
- H.iter (fun c ->
-Index: mldonkey-3.1.5/src/utils/cdk/zip.ml
-===================================================================
---- mldonkey-3.1.5.orig/src/utils/cdk/zip.ml
-+++ mldonkey-3.1.5/src/utils/cdk/zip.ml
-@@ -72,8 +72,6 @@ type out_file =
- mutable of_entries: entry list;
- of_comment: string }
-
--exception Error of string * string * string
--
- (* Return the position of the last occurrence of s1 in s2, or -1 if not
- found. *)
-
-Index: mldonkey-3.1.5/src/utils/cdk/zlibstubs.c
-===================================================================
---- mldonkey-3.1.5.orig/src/utils/cdk/zlibstubs.c
-+++ mldonkey-3.1.5/src/utils/cdk/zlibstubs.c
-@@ -191,7 +191,7 @@ value camlzip_inflateEnd(value vzs)
-
- value camlzip_update_crc32(value crc, value buf, value pos, value len)
- {
-- return copy_int32(crc32((uint32) Int32_val(crc),
-+ return copy_int32(crc32((uint32_t) Int32_val(crc),
- &Byte_u(buf, Long_val(pos)),
- Long_val(len)));
- }
-Index: mldonkey-3.1.5/src/utils/lib/fst_hash.c
-===================================================================
---- mldonkey-3.1.5.orig/src/utils/lib/fst_hash.c
-+++ mldonkey-3.1.5/src/utils/lib/fst_hash.c
-@@ -197,7 +197,7 @@ unsigned short fst_hash_checksum (unsign
- /*****************************************************************************/
-
- // hash file
--int fst_hash_file (unsigned char *fth, char *file, int64 filesize)
-+int fst_hash_file (unsigned char *fth, char *file, int64_t filesize)
- {
- FILE *fp;
- unsigned char *buf;
-@@ -271,7 +271,7 @@ int fst_hash_file (unsigned char *fth, c
- }
-
-
--void fst_hash_string (unsigned char *fth, unsigned char *file, int64 filesize)
-+void fst_hash_string (unsigned char *fth, unsigned char *file, int64_t filesize)
- {
- unsigned char * buf = file;
- size_t len = filesize;
-Index: mldonkey-3.1.5/src/utils/lib/options.ml4
-===================================================================
---- mldonkey-3.1.5.orig/src/utils/lib/options.ml4
-+++ mldonkey-3.1.5/src/utils/lib/options.ml4
-@@ -332,7 +332,6 @@ let exit_exn = Exit
-
-
- let unsafe_get = String.unsafe_get
--external is_printable : char -> bool = "caml_is_printable"
- let unsafe_set = String.unsafe_set
-
- let escaped s =
-@@ -343,7 +342,7 @@ let escaped s =
- (match unsafe_get s i with
- '"' | '\\' -> 2
- | '\n' | '\t' -> 1
-- | c -> if is_printable c then 1 else 4)
-+ | c -> 1)
- done;
- if !n = String.length s then s
- else
-@@ -354,16 +353,7 @@ let escaped s =
- '"' | '\\' as c -> unsafe_set s' !n '\\'; incr n; unsafe_set s' !n c
- | '\n' | '\t' as c -> unsafe_set s' !n c
- | c ->
-- if is_printable c then unsafe_set s' !n c
-- else
-- let a = int_of_char c in
-- unsafe_set s' !n '\\';
-- incr n;
-- unsafe_set s' !n (char_of_int (48 + a / 100));
-- incr n;
-- unsafe_set s' !n (char_of_int (48 + a / 10 mod 10));
-- incr n;
-- unsafe_set s' !n (char_of_int (48 + a mod 10))
-+ unsafe_set s' !n c
- end;
- incr n
- done;
-Index: mldonkey-3.1.5/src/utils/lib/os_stubs.h
-===================================================================
---- mldonkey-3.1.5.orig/src/utils/lib/os_stubs.h
-+++ mldonkey-3.1.5/src/utils/lib/os_stubs.h
-@@ -155,8 +155,8 @@ extern OFF_T os_lseek(OS_FD fd, OFF_T po
- extern void os_ftruncate(OS_FD fd, OFF_T len, int sparse);
- extern ssize_t os_read(OS_FD fd, char *buf, size_t len);
- extern int os_getdtablesize();
--extern int64 os_getfdsize(OS_FD fd);
--extern int64 os_getfilesize(char *path);
-+extern int64_t os_getfdsize(OS_FD fd);
-+extern int64_t os_getfilesize(char *path);
- extern void os_set_nonblock(OS_SOCKET fd);
- extern void os_uname(char buf[]);
- extern int os_os_supported();
diff --git a/net-p2p/mldonkey/files/ocaml4.patch b/net-p2p/mldonkey/files/ocaml4.patch
deleted file mode 100644
index 32882417b62c..000000000000
--- a/net-p2p/mldonkey/files/ocaml4.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: mldonkey-3.1.5/src/utils/net/terminal.ml
-===================================================================
---- mldonkey-3.1.5.orig/src/utils/net/terminal.ml
-+++ mldonkey-3.1.5/src/utils/net/terminal.ml
-@@ -185,7 +185,6 @@ module Output = struct
- let canal = List.assoc chan !chanmap in
- etat.chan <- Some (chan, canal);
- info (sprintf "connecte au canal '%s'" chan);
-- (* {| canal ALL } *)
- with Not_found -> (* pas encore de recepteur pour ce canal *)
- try (* on en cree un *)
- let serveur = nsrecord.get_loc chan in
diff --git a/net-p2p/mldonkey/metadata.xml b/net-p2p/mldonkey/metadata.xml
index d0d3c96afa8b..9471439b9f3e 100644
--- a/net-p2p/mldonkey/metadata.xml
+++ b/net-p2p/mldonkey/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>gentoo@chuso.net</email>
+ <name>Jesus Perez Rey</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="bittorrent">enable bittorrent support</flag>
<flag name="fasttrack">enable fasttrack support</flag>
diff --git a/net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild b/net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild
deleted file mode 100644
index a3013344ae6c..000000000000
--- a/net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic eutils autotools toolchain-funcs user
-
-IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt"
-
-DESCRIPTION="Multi-network P2P application written in Ocaml, with Gtk, web & telnet interface"
-HOMEPAGE="http://mldonkey.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ppc ~sparc x86"
-
-RDEPEND="dev-lang/perl
- dev-ml/camlp4:=
- guionly? ( >=gnome-base/librsvg-2.4.0
- >=dev-ml/lablgtk-2.6 )
- gtk? ( >=gnome-base/librsvg-2.4.0
- >=dev-ml/lablgtk-2.6[svg] )
- gd? ( >=media-libs/gd-2.0.28[truetype] )
- magic? ( sys-apps/file )"
-
-DEPEND="${RDEPEND}
- >=dev-lang/ocaml-3.10.2[ocamlopt?]"
-
-RESTRICT="!ocamlopt? ( strip )"
-
-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
-
- # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
- # results in relocations if gcc wants to create a PIE executable
- if gcc-specs-pie ; then
- append-ldflags -nopie
- ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
- ewarn "We have appended -nopie to ocaml build options"
- ewarn "because linking an executable with pie while the objects are not pic will not work"
- fi
-}
-
-src_prepare() {
- cd "${S}"/config
- eautoconf
- cd "${S}"
- use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
- eapply "${FILESDIR}/ocaml4.patch"
- has_version '>=dev-lang/ocaml-4.03' && eapply "${FILESDIR}/ocaml-4.03.patch"
-
- default
-}
-
-src_configure() {
- # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
-
- # 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}"
-
- local my_extra_libs
- if use gd; then
- my_extra_libs="-lpng"
- fi
-
- econf LIBS="${my_extra_libs}"\
- --sysconfdir=/etc/mldonkey \
- --sharedstatedir=/var/mldonkey \
- --localstatedir=/var/mldonkey \
- --enable-checks \
- --disable-batch \
- $(use_enable bittorrent) \
- $(use_enable fasttrack) \
- $(use_enable gnutella) \
- $(use_enable gnutella gnutella2) \
- $(use_enable gd) \
- $(use_enable magic) \
- ${myconf}
-}
-
-src_compile() {
- export OCAMLRUNPARAM="l=256M"
- emake
-
- if ! use guionly; then
- emake utils
- fi;
-}
-
-src_install() {
- local myext=""
- use ocamlopt || myext=".byte"
- if ! use guionly; then
- for i in mlnet mld_hash get_range copysources subconv; do
- newbin $i$myext $i
- done
- use bittorrent && newbin make_torrent$myext make_torrent
-
- newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
- fperms 600 /etc/conf.d/mldonkey
- newinitd "${FILESDIR}/mldonkey.initd" mldonkey
- fi
-
- if use gtk; then
- for i in mlgui mlguistarter; do
- newbin $i$myext $i
- done
- make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
- newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
- fi
-
- if use doc ; then
- cd "${S}"/distrib
- dodoc ChangeLog *.txt
-
- 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 -1 /home/p2p users
- fi
-}
-
-pkg_postinst() {
- if ! use guionly; then
- echo
- 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
- else
- echo
- einfo "Simply run mlgui to start the chosen MLDonkey gui."
- einfo "It puts its config files into ~/.mldonkey"
- fi
-}
diff --git a/net-p2p/mldonkey/mldonkey-3.1.6.ebuild b/net-p2p/mldonkey/mldonkey-3.1.6.ebuild
deleted file mode 100644
index 6aa27aceb28f..000000000000
--- a/net-p2p/mldonkey/mldonkey-3.1.6.ebuild
+++ /dev/null
@@ -1,172 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit versionator flag-o-matic eutils autotools toolchain-funcs user
-
-IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt"
-
-DESCRIPTION="Multi-network P2P application written in Ocaml, with Gtk, web & telnet interface"
-HOMEPAGE="http://mldonkey.sourceforge.net/"
-SRC_URI="https://github.com/ygrek/mldonkey/releases/download/release-$(replace_all_version_separators '-')/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
-
-RDEPEND="dev-lang/perl
- dev-ml/camlp4:=
- guionly? ( >=gnome-base/librsvg-2.4.0
- >=dev-ml/lablgtk-2.6 )
- gtk? ( >=gnome-base/librsvg-2.4.0
- >=dev-ml/lablgtk-2.6[svg] )
- gd? ( >=media-libs/gd-2.0.28[truetype] )
- magic? ( sys-apps/file )"
-
-DEPEND="${RDEPEND}
- >=dev-lang/ocaml-3.10.2[ocamlopt?]"
-
-RESTRICT="!ocamlopt? ( strip )"
-
-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
-
- # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
- # results in relocations if gcc wants to create a PIE executable
- if gcc-specs-pie ; then
- append-ldflags -nopie
- ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
- ewarn "We have appended -nopie to ocaml build options"
- ewarn "because linking an executable with pie while the objects are not pic will not work"
- fi
-}
-
-src_prepare() {
- cd "${S}"/config
- eautoconf
- cd "${S}"
- use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
-
- default
-}
-
-src_configure() {
- # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
-
- # 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}"
-
- local my_extra_libs
- if use gd; then
- my_extra_libs="-lpng"
- fi
-
- econf LIBS="${my_extra_libs}"\
- --sysconfdir=/etc/mldonkey \
- --sharedstatedir=/var/mldonkey \
- --localstatedir=/var/mldonkey \
- --enable-checks \
- --disable-batch \
- $(use_enable bittorrent) \
- $(use_enable fasttrack) \
- $(use_enable gnutella) \
- $(use_enable gnutella gnutella2) \
- $(use_enable gd) \
- $(use_enable magic) \
- ${myconf}
-}
-
-src_compile() {
- export OCAMLRUNPARAM="l=256M"
- emake
-
- if ! use guionly; then
- emake utils
- fi;
-}
-
-src_install() {
- local myext=""
- use ocamlopt || myext=".byte"
- if ! use guionly; then
- for i in mlnet mld_hash get_range copysources subconv; do
- newbin $i$myext $i
- done
- use bittorrent && newbin make_torrent$myext make_torrent
-
- newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
- fperms 600 /etc/conf.d/mldonkey
- newinitd "${FILESDIR}/mldonkey.initd" mldonkey
- fi
-
- if use gtk; then
- for i in mlgui mlguistarter; do
- newbin $i$myext $i
- done
- make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
- newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
- fi
-
- if use doc ; then
- cd "${S}"/distrib
- dodoc ChangeLog *.txt
-
- 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 -1 /home/p2p users
- fi
-}
-
-pkg_postinst() {
- if ! use guionly; then
- echo
- 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
- else
- echo
- einfo "Simply run mlgui to start the chosen MLDonkey gui."
- einfo "It puts its config files into ~/.mldonkey"
- fi
-}
diff --git a/net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild b/net-p2p/mldonkey/mldonkey-3.1.7.ebuild
index c79384659d71..e74b093c8948 100644
--- a/net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild
+++ b/net-p2p/mldonkey/mldonkey-3.1.7.ebuild
@@ -1,37 +1,55 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
-inherit versionator flag-o-matic eutils autotools toolchain-funcs user
-
-IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt upnp"
+inherit autotools desktop flag-o-matic toolchain-funcs
DESCRIPTION="Multi-network P2P application written in Ocaml, with Gtk, web & telnet interface"
-HOMEPAGE="http://mldonkey.sourceforge.net/"
-SRC_URI="https://github.com/ygrek/mldonkey/releases/download/release-$(replace_all_version_separators '-')/${P}.tar.bz2"
+HOMEPAGE="http://mldonkey.sourceforge.net/ https://github.com/ygrek/mldonkey"
+SRC_URI="https://github.com/ygrek/mldonkey/releases/download/release-${PV//./-}-2/${P}-2.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ppc ~ppc64 x86"
+
+IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt upnp"
+
+REQUIRED_USE="guionly? ( gtk )"
RDEPEND="dev-lang/perl
dev-ml/camlp4:=
- guionly? ( >=gnome-base/librsvg-2.4.0
- >=dev-ml/lablgtk-2.6 )
- gtk? ( >=gnome-base/librsvg-2.4.0
- >=dev-ml/lablgtk-2.6[svg] )
- gd? ( >=media-libs/gd-2.0.28[truetype] )
+ gd? ( media-libs/gd[truetype] )
+ gtk? (
+ gnome-base/librsvg
+ dev-ml/lablgtk:2=[svg]
+ )
+ guionly? (
+ gnome-base/librsvg
+ dev-ml/lablgtk:2=[svg]
+ )
magic? ( sys-apps/file )
- upnp? ( net-libs/miniupnpc:= net-libs/libnatpmp:= )
+ upnp? (
+ net-libs/libnatpmp
+ net-libs/miniupnpc:=
+ )
+ !guionly? ( acct-user/p2p )
"
-
+# Can't yet use newer OCaml
+# -unsafe-string usage:
+# https://github.com/ygrek/mldonkey/issues/46
DEPEND="${RDEPEND}
- >=dev-lang/ocaml-3.10.2[ocamlopt?]"
+ <dev-lang/ocaml-4.10:=[ocamlopt?]
+ bittorrent? (
+ || (
+ <dev-lang/ocaml-4.06[ocamlopt?]
+ dev-ml/num
+ )
+ )"
RESTRICT="!ocamlopt? ( strip )"
-MLUSER="p2p"
+S="${WORKDIR}/${P}-2"
pkg_setup() {
if use gtk; then
@@ -56,31 +74,29 @@ pkg_setup() {
}
src_prepare() {
- cd "${S}"/config
+ cd config || die
eautoconf
- cd "${S}"
- use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
+ cd .. || die
+ if ! use ocamlopt; then
+ sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
+ fi
default
}
src_configure() {
- # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
-
- # onlygui Disable all nets support, build only chosen GUI
+ local myconf=()
- if use gtk || use guionly; then
- myconf="--enable-gui=newgui2"
+ if use gtk; then
+ myconf+=( --enable-gui=newgui2 )
else
- myconf="--disable-gui"
+ myconf+=( --disable-gui )
fi
if use guionly; then
- myconf="${myconf} --disable-multinet --disable-donkey"
+ myconf+=( --disable-multinet --disable-donkey )
fi
- cd "${S}"
-
local my_extra_libs
if use gd; then
my_extra_libs="-lpng"
@@ -100,26 +116,26 @@ src_configure() {
$(use_enable magic) \
$(use_enable upnp upnp-natpmp) \
--disable-force-upnp-natpmp \
- ${myconf}
+ ${myconf[@]}
}
src_compile() {
export OCAMLRUNPARAM="l=256M"
- emake
+ emake -j1 # Upstream bug #48
if ! use guionly; then
emake utils
- fi;
+ fi
}
src_install() {
- local myext=""
+ local myext i
use ocamlopt || myext=".byte"
if ! use guionly; then
for i in mlnet mld_hash get_range copysources subconv; do
- newbin $i$myext $i
+ newbin "${i}${myext}" "${i}"
done
- use bittorrent && newbin make_torrent$myext make_torrent
+ use bittorrent && newbin "make_torrent${myext}" make_torrent
newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
fperms 600 /etc/conf.d/mldonkey
@@ -128,35 +144,25 @@ src_install() {
if use gtk; then
for i in mlgui mlguistarter; do
- newbin $i$myext $i
+ newbin "${i}${myext}" "${i}"
done
make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
- newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
+ newicon "${S}"/packages/rpm/mldonkey-icon-48.png "${PN}.png"
fi
if use doc ; then
- cd "${S}"/distrib
- dodoc ChangeLog *.txt
+ docompress -x "/usr/share/doc/${PF}/scripts" "/usr/share/doc/${PF}/html"
- insinto /usr/share/doc/${PF}/scripts
- doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
+ dodoc distrib/ChangeLog distrib/*.txt docs/*.txt docs/*.tex docs/*.pdf docs/developers/*.{txt,tex}
- cd "${S}"/docs
- dodoc *.txt *.tex *.pdf
- dohtml *.html
+ docinto scripts
+ dodoc distrib/{kill_mldonkey,mldonkey_command,mldonkey_previewer,make_buginfo}
- cd "${S}"/docs/developers
- dodoc *.txt *.tex
+ docinto html
+ dodoc docs/*.html
- cd "${S}"/docs/images
- insinto /usr/share/doc/${PF}/html/images
- doins *
- fi
-}
-
-pkg_preinst() {
- if ! use guionly; then
- enewuser ${MLUSER} -1 -1 /home/p2p users
+ docinto html/images
+ dodoc docs/images/*
fi
}