1 |
Hi! |
2 |
|
3 |
I would like, within my capabilities, to contribute to Gentoo development. |
4 |
|
5 |
PREFACE |
6 |
While working on a new ebuild for app-misc/worker, I found that the |
7 |
program author set a repository in SourceForge. And I replaced SRC_URI |
8 |
with SourceForge's. In my opinion, it has advantages over the program |
9 |
homepage, because it is https (and the program homepage is only http) |
10 |
and also has a built-in antivirus. But then I found that there are no |
11 |
usual tar.gz in SourceForge, but only .zst. First I managed to install |
12 |
it with a dirty hack in src_unpack, but then I found unpacker.eclass |
13 |
and moved my changes there. Maybe they are not correct; I am still |
14 |
learning to contribute to Gentoo. Please comment, what do you think |
15 |
about it? |
16 |
|
17 |
PATCH: |
18 |
https://github.com/halcon74/unpack-eclass/commit/0c38a1db2db74502a8808dffdf656a1a8b0b4c1a |
19 |
|
20 |
HOW I TESTED IT |
21 |
Using this patched unpacker.eclass, I have successfully installed a |
22 |
new app-misc/worker version; the ebuild diff is so: |
23 |
|
24 |
--- worker-3.8.3.ebuild 2020-12-20 02:12:46.012800888 +0300 |
25 |
+++ worker-4.6.1.ebuild 2020-12-20 17:00:21.172571868 +0300 |
26 |
@@ -1,33 +1,47 @@ |
27 |
-# Copyright 1999-2019 Gentoo Authors |
28 |
+# Copyright 1999-2020 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
EAPI=6 |
32 |
|
33 |
-inherit eutils toolchain-funcs |
34 |
+inherit eutils toolchain-funcs unpacker |
35 |
|
36 |
DESCRIPTION="Worker Filemanager: Amiga Directory Opus 4 clone" |
37 |
HOMEPAGE="http://www.boomerangsworld.de/cms/worker/" |
38 |
-SRC_URI="http://www.boomerangsworld.de/cms/worker/downloads/${P}.tar.bz2" |
39 |
+SRC_URI="mirror://sourceforge/workerfm/${P}.tar.zst" |
40 |
|
41 |
-LICENSE="GPL-2" |
42 |
+LICENSE="GPL-2+" |
43 |
SLOT="0" |
44 |
-KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 x86" |
45 |
-IUSE="avfs debug dbus examples libnotify lua +magic xinerama xft" |
46 |
+KEYWORDS="~amd64 ~arm ~hppa ppc ~ppc64 x86" |
47 |
+IUSE="avfs debug dbus examples libnotify lua +magic openssl xinerama +xft" |
48 |
|
49 |
+RESTRICT="mirror" |
50 |
+ |
51 |
+# The author of worker indicated 5.3 in configure.ac explicitly, so, |
52 |
here should be: |
53 |
+# lua? ( >=dev-lang/lua-5.3 ) |
54 |
+# But 5.3 is masked in ::Gentoo |
55 |
RDEPEND="x11-libs/libX11 |
56 |
avfs? ( >=sys-fs/avfs-0.9.5 ) |
57 |
- dbus? ( dev-libs/dbus-glib ) |
58 |
- lua? ( dev-lang/lua:0 ) |
59 |
+ dbus? ( dev-libs/dbus-glib ) |
60 |
+ lua? ( =dev-lang/lua-5.1.5-r4 ) |
61 |
magic? ( sys-apps/file ) |
62 |
+ openssl? ( dev-libs/openssl ) |
63 |
xft? ( x11-libs/libXft ) |
64 |
xinerama? ( x11-libs/libXinerama )" |
65 |
DEPEND="${RDEPEND}" |
66 |
|
67 |
DOCS=( AUTHORS ChangeLog INSTALL NEWS README README_LARGEFILES THANKS ) |
68 |
|
69 |
+src_unpack() { |
70 |
+ if [[ -n "${A}" ]]; then |
71 |
+ unpack_zst "${A}" |
72 |
+ fi |
73 |
+} |
74 |
+ |
75 |
src_configure() { |
76 |
# there is no ./configure flag to disable libXinerama support |
77 |
export ac_cv_lib_Xinerama_XineramaQueryScreens=$(usex xinerama) |
78 |
+ # there is no ./configure flag to disable openssl support |
79 |
+ export ac_cv_header_openssl_sha_h=$(usex openssl) |
80 |
econf \ |
81 |
--without-hal \ |
82 |
--enable-utf8 \ |
83 |
|
84 |
(I had to add package.unmask to override the mask set in the main |
85 |
three; the explanation of a new USE flag openssl is in metadata.xml) |
86 |
|
87 |
My overlay is there: https://github.com/halcon74/halcon-overlay |
88 |
|
89 |
-- |
90 |
Best regards, |
91 |
Alex |