Hi!

I would like, within my capabilities, to contribute to Gentoo development.

PREFACE
While working on a new ebuild for app-misc/worker, I found that the
program author set a repository in SourceForge. And I replaced SRC_URI
with SourceForge's. In my opinion, it has advantages over the program
homepage, because it is https (and the program homepage is only http)
and also has a built-in antivirus. But then I found that there are no
usual tar.gz in SourceForge, but only .zst. First I managed to install
it with a dirty hack in src_unpack, but then I found unpacker.eclass
and moved my changes there. Maybe they are not correct; I am still
learning to contribute to Gentoo. Please comment, what do you think
about it?

PATCH:
https://github.com/halcon74/unpack-eclass/commit/0c38a1db2db74502a8808dffdf656a1a8b0b4c1a

HOW I TESTED IT
Using this patched unpacker.eclass, I have successfully installed a
new app-misc/worker version; the ebuild diff is so:

--- worker-3.8.3.ebuild    2020-12-20 02:12:46.012800888 +0300
+++ worker-4.6.1.ebuild    2020-12-20 17:00:21.172571868 +0300
@@ -1,33 +1,47 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2

 EAPI=6

-inherit eutils toolchain-funcs
+inherit eutils toolchain-funcs unpacker

 DESCRIPTION="Worker Filemanager: Amiga Directory Opus 4 clone"
 HOMEPAGE="http://www.boomerangsworld.de/cms/worker/";
-SRC_URI="http://www.boomerangsworld.de/cms/worker/downloads/${P}.tar.bz2";
+SRC_URI="mirror://sourceforge/workerfm/${P}.tar.zst"

-LICENSE="GPL-2"
+LICENSE="GPL-2+"
 SLOT="0"
-KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 x86"
-IUSE="avfs debug dbus examples libnotify lua +magic xinerama xft"
+KEYWORDS="~amd64 ~arm ~hppa ppc ~ppc64 x86"
+IUSE="avfs debug dbus examples libnotify lua +magic openssl xinerama +xft"

+RESTRICT="mirror"
+
+# The author of worker indicated 5.3 in configure.ac explicitly, so,
here should be:
+# lua? ( >=dev-lang/lua-5.3 )
+# But 5.3 is masked in ::Gentoo
 RDEPEND="x11-libs/libX11
     avfs? ( >=sys-fs/avfs-0.9.5 )
-    dbus? (    dev-libs/dbus-glib )
-    lua? ( dev-lang/lua:0 )
+    dbus? ( dev-libs/dbus-glib )
+    lua? ( =dev-lang/lua-5.1.5-r4 )
     magic? ( sys-apps/file )
+    openssl? ( dev-libs/openssl )
     xft? ( x11-libs/libXft )
     xinerama? ( x11-libs/libXinerama )"
 DEPEND="${RDEPEND}"

 DOCS=( AUTHORS ChangeLog INSTALL NEWS README README_LARGEFILES THANKS )

+src_unpack() {
+    if [[ -n "${A}" ]]; then
+        unpack_zst "${A}"
+    fi
+}
+
 src_configure() {
     # there is no ./configure flag to disable libXinerama support
     export ac_cv_lib_Xinerama_XineramaQueryScreens=$(usex xinerama)
+    # there is no ./configure flag to disable openssl support
+    export ac_cv_header_openssl_sha_h=$(usex openssl)
     econf \
         --without-hal \
         --enable-utf8 \

(I had to add package.unmask to override the mask set in the main
three; the explanation of a new USE flag openssl is in metadata.xml)

My overlay is there: https://github.com/halcon74/halcon-overlay

-- 
Best regards,
Alex

Reply via email to