From: Alexander Tsoy Date: Wed, 29 Apr 2020 17:00:03 +0000 (+0300) Subject: net-p2p/amule: Sync 2.3.2 with live ebuild X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8eb110137a6b823d357e5dc888a5dc3cfa367b9f;p=gentoo.git net-p2p/amule: Sync 2.3.2 with live ebuild * Added missing dependencies on sys-devel/gettext, virtual/libintl, sys-libs/readline. * Added MimeType handler to a .desktop file (this also justifies added dependency on dev-util/desktop-file-utils and xdg-utils eclass usage). Signed-off-by: Alexander Tsoy Signed-off-by: Joonas Niilola --- diff --git a/net-p2p/amule/amule-2.3.2-r5.ebuild b/net-p2p/amule/amule-2.3.2-r5.ebuild new file mode 100644 index 000000000000..50397fafc6db --- /dev/null +++ b/net-p2p/amule/amule-2.3.2-r5.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +WX_GTK_VER="3.0-gtk3" + +inherit wxwidgets xdg-utils + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/amule-project/amule" + inherit autotools git-r3 +else + MY_P="${PN/m/M}-${PV}" + SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz" + S="${WORKDIR}/${MY_P}" + KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +fi + +DESCRIPTION="aMule, the all-platform eMule p2p client" +HOMEPAGE="http://www.amule.org/" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="daemon debug geoip nls remote stats upnp +X" + +RDEPEND=" + dev-libs/boost:= + dev-libs/crypto++:= + sys-libs/binutils-libs:0= + sys-libs/readline:0= + sys-libs/zlib + >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X?] + daemon? ( acct-user/amule ) + geoip? ( dev-libs/geoip ) + nls? ( virtual/libintl ) + remote? ( + acct-user/amule + media-libs/libpng:0= + ) + stats? ( media-libs/gd:=[jpeg,png] ) + upnp? ( net-libs/libupnp:0 ) +" +DEPEND="${RDEPEND} + X? ( dev-util/desktop-file-utils ) +" +BDEPEND=" + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.3.2-fix-crash-shared-dir-utf8.patch" + "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-1.patch" + "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-2.patch" + "${FILESDIR}/${PN}-2.3.2-cryptopp-6.patch" + "${FILESDIR}/${PN}-2.3.2-disable-version-check.patch" + "${FILESDIR}/${PN}-2.3.2-fix-crash-when-shared-files-changed.patch" + "${FILESDIR}/${PN}-2.3.2-libupnp-1.8.patch" + "${FILESDIR}/${PN}-2.3.2-libupnp-1.6.patch" + "${FILESDIR}/${PN}-2.3.2-Fixed-compilation-with-newer-bfd.patch" + "${FILESDIR}/${PN}-2.3.2-desktop-mimetype.patch" +) + +pkg_setup() { + setup-wxwidgets +} + +src_prepare() { + default + + if [[ ${PV} == 9999 ]]; then + ./autogen.sh || die + fi +} + +src_configure() { + local myconf=( + --with-denoise-level=0 + --with-wx-config="${WX_CONFIG}" + --enable-amulecmd + --with-boost + $(use_enable debug) + $(use_enable daemon amule-daemon) + $(use_enable geoip) + $(use_enable nls) + $(use_enable remote webserver) + $(use_enable stats cas) + $(use_enable stats alcc) + $(use_enable upnp) + ) + + if use X; then + myconf+=( + $(use_enable remote amule-gui) + $(use_enable stats alc) + $(use_enable stats wxcas) + ) + else + myconf+=( + --disable-monolithic + --disable-amule-gui + --disable-alc + --disable-wxcas + ) + fi + + econf "${myconf[@]}" +} + +src_install() { + default + + if use daemon; then + newconfd "${FILESDIR}"/amuled.confd-r1 amuled + newinitd "${FILESDIR}"/amuled.initd amuled + fi + if use remote; then + newconfd "${FILESDIR}"/amuleweb.confd-r1 amuleweb + newinitd "${FILESDIR}"/amuleweb.initd amuleweb + fi + + if use daemon || use remote; then + keepdir /var/lib/${PN} + fowners amule:amule /var/lib/${PN} + fperms 0750 /var/lib/${PN} + fi +} + +pkg_postinst() { + local ver + + if use daemon || use remote; then + for ver in ${REPLACING_VERSIONS}; do + if ver_test ${ver} -lt "2.3.2-r4"; then + elog "Default user under which amuled and amuleweb daemons are started" + elog "have been changed from p2p to amule. Default home directory have been" + elog "changed as well." + echo + elog "If you want to preserve old download/share location, you can create" + elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust" + elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in" + elog "/etc/conf.d/{amuled,amuleweb} to the old values." + + break + fi + done + fi + + use X && xdg_desktop_database_update +} + +pkg_postrm() { + use X && xdg_desktop_database_update +} diff --git a/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch b/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch new file mode 100644 index 000000000000..cd8ba4c2fc50 --- /dev/null +++ b/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch @@ -0,0 +1,30 @@ +From 048e86d44e09ef9dc1897c432660a712109b263a Mon Sep 17 00:00:00 2001 +From: Werner Mahr +Date: Mon, 29 Apr 2019 18:37:35 +0200 +Subject: [PATCH] Added imetype-handler for amule ed2k-links. Patch taken from + debian. + +--- + amule.desktop | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/amule.desktop b/amule.desktop +index 70be367af..1cfb38010 100644 +--- a/amule.desktop ++++ b/amule.desktop +@@ -1,6 +1,6 @@ + [Desktop Entry] + Name=aMule +-Exec=amule ++Exec=amule %u + Icon=amule + Terminal=false + Type=Application +@@ -8,3 +8,4 @@ Categories=Network;P2P; + Comment=A client for the eD2k network + Comment[fr]=Un client pour le réseau eD2k + Comment[tr]=eD2k ağı için istemci ++MimeType=x-scheme-handler/ed2k; +-- +2.26.2 +