1 |
commit: 48ec37935d83870204e2bd1fa557d65b7c41eddc |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Sat Jan 2 12:40:00 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 2 12:40:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48ec3793 |
7 |
|
8 |
net-misc/aget: Port to EAPI 7 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/18907 |
11 |
Closes: https://bugs.gentoo.org/707432 |
12 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
13 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
14 |
|
15 |
net-misc/aget/aget-0.4.1-r2.ebuild | 11 +--- |
16 |
net-misc/aget/files/aget-0.4.1-fno-common.patch | 66 ++++++++++++++++++++++ |
17 |
...et-0.4.1-r1.patch => aget-0.4.1-overflow.patch} | 4 +- |
18 |
3 files changed, 71 insertions(+), 10 deletions(-) |
19 |
|
20 |
diff --git a/net-misc/aget/aget-0.4.1-r2.ebuild b/net-misc/aget/aget-0.4.1-r2.ebuild |
21 |
index ed4438eb35f..98c7c8837fa 100644 |
22 |
--- a/net-misc/aget/aget-0.4.1-r2.ebuild |
23 |
+++ b/net-misc/aget/aget-0.4.1-r2.ebuild |
24 |
@@ -1,7 +1,7 @@ |
25 |
# Copyright 1999-2018 Gentoo Foundation |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
|
28 |
-EAPI=6 |
29 |
+EAPI=7 |
30 |
|
31 |
inherit toolchain-funcs |
32 |
|
33 |
@@ -12,17 +12,12 @@ SRC_URI="http://www.enderunix.org/${PN}/${P}.tar.gz" |
34 |
LICENSE="BSD" |
35 |
SLOT="0" |
36 |
KEYWORDS="amd64 ~arm ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux" |
37 |
-IUSE="" |
38 |
|
39 |
PATCHES=( |
40 |
- "${FILESDIR}"/aget-0.4.1-r1.patch |
41 |
+ "${FILESDIR}"/${P}-overflow.patch |
42 |
+ "${FILESDIR}"/${P}-fno-common.patch |
43 |
) |
44 |
|
45 |
src_compile() { |
46 |
emake CC="$(tc-getCC)" |
47 |
} |
48 |
- |
49 |
-src_install() { |
50 |
- emake DESTDIR="${ED}" install |
51 |
- dodoc AUTHORS ChangeLog README* THANKS TODO |
52 |
-} |
53 |
|
54 |
diff --git a/net-misc/aget/files/aget-0.4.1-fno-common.patch b/net-misc/aget/files/aget-0.4.1-fno-common.patch |
55 |
new file mode 100644 |
56 |
index 00000000000..e881cc39b88 |
57 |
--- /dev/null |
58 |
+++ b/net-misc/aget/files/aget-0.4.1-fno-common.patch |
59 |
@@ -0,0 +1,66 @@ |
60 |
+--- a/Aget.c |
61 |
++++ b/Aget.c |
62 |
+@@ -33,6 +33,8 @@ extern pthread_t hthread; |
63 |
+ #include <errno.h> |
64 |
+ extern int errno; |
65 |
+ |
66 |
++extern time_t t_start, t_finish; |
67 |
++ |
68 |
+ |
69 |
+ void get(struct request *req) |
70 |
+ { |
71 |
+--- a/Head.c |
72 |
++++ b/Head.c |
73 |
+@@ -34,6 +34,8 @@ |
74 |
+ extern int errno; |
75 |
+ extern int h_errno; |
76 |
+ |
77 |
++time_t t_start, t_finish; |
78 |
++ |
79 |
+ #ifdef SOLARIS |
80 |
+ extern const char *hstrerror(int); |
81 |
+ #endif |
82 |
+--- a/Misc.h |
83 |
++++ b/Misc.h |
84 |
+@@ -24,7 +24,7 @@ void Log(char *, ...); /* Log */ |
85 |
+ void updateProgressBar(float, float); |
86 |
+ void handleHttpRetcode(char *); |
87 |
+ |
88 |
+-time_t t_start, t_finish; |
89 |
++extern time_t t_start, t_finish; |
90 |
+ |
91 |
+ #endif |
92 |
+ |
93 |
+--- a/Signal.c |
94 |
++++ b/Signal.c |
95 |
+@@ -16,6 +16,8 @@ extern struct request *req; |
96 |
+ extern int bwritten; |
97 |
+ extern pthread_mutex_t bwritten_mutex; |
98 |
+ |
99 |
++sigset_t signal_set; |
100 |
++ |
101 |
+ void * signal_waiter(void *arg) |
102 |
+ { |
103 |
+ int signal; |
104 |
+--- a/Signal.h |
105 |
++++ b/Signal.h |
106 |
+@@ -4,7 +4,7 @@ |
107 |
+ #include <signal.h> |
108 |
+ #include <pthread.h> |
109 |
+ |
110 |
+-sigset_t signal_set; |
111 |
++extern sigset_t signal_set; |
112 |
+ |
113 |
+ void * signal_waiter(void *arg); |
114 |
+ void sigint_handler(void); |
115 |
+--- a/main.c |
116 |
++++ b/main.c |
117 |
+@@ -15,6 +15,8 @@ |
118 |
+ #include "main.h" |
119 |
+ #include <errno.h> |
120 |
+ |
121 |
++extern sigset_t signal_set; |
122 |
++ |
123 |
+ int main(int argc, char **argv) |
124 |
+ { |
125 |
+ extern char *optarg; |
126 |
|
127 |
diff --git a/net-misc/aget/files/aget-0.4.1-r1.patch b/net-misc/aget/files/aget-0.4.1-overflow.patch |
128 |
similarity index 95% |
129 |
rename from net-misc/aget/files/aget-0.4.1-r1.patch |
130 |
rename to net-misc/aget/files/aget-0.4.1-overflow.patch |
131 |
index fe804901528..998dc128e3d 100644 |
132 |
--- a/net-misc/aget/files/aget-0.4.1-r1.patch |
133 |
+++ b/net-misc/aget/files/aget-0.4.1-overflow.patch |
134 |
@@ -37,8 +37,8 @@ than setting GETRECVSIZ bytes to the value of 0. By Kevin Pyle. |
135 |
dr = recv(sd, rbuf, GETRECVSIZ, 0); |
136 |
if ((td->offset + dr) > foffset) |
137 |
dw = pwrite(td->fd, rbuf, foffset - td->offset, td->offset); |
138 |
---- aget-0.4.1/Head.c 2010-09-20 03:41:27.236019179 +0200 |
139 |
-+++ aget-0.4.1/Head.c 2010-09-20 03:43:00.087098655 +0200 |
140 |
+--- aget-0.4.1/Head.c |
141 |
++++ aget-0.4.1/Head.c |
142 |
@@ -1,5 +1,4 @@ |
143 |
#ifndef SOLARIS |
144 |
-#define _XOPEN_SOURCE 500 |