commit:     48ec37935d83870204e2bd1fa557d65b7c41eddc
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Sat Jan  2 12:40:00 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jan  2 12:40:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48ec3793

net-misc/aget: Port to EAPI 7

Closes: https://github.com/gentoo/gentoo/pull/18907
Closes: https://bugs.gentoo.org/707432
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 net-misc/aget/aget-0.4.1-r2.ebuild                 | 11 +---
 net-misc/aget/files/aget-0.4.1-fno-common.patch    | 66 ++++++++++++++++++++++
 ...et-0.4.1-r1.patch => aget-0.4.1-overflow.patch} |  4 +-
 3 files changed, 71 insertions(+), 10 deletions(-)

diff --git a/net-misc/aget/aget-0.4.1-r2.ebuild 
b/net-misc/aget/aget-0.4.1-r2.ebuild
index ed4438eb35f..98c7c8837fa 100644
--- a/net-misc/aget/aget-0.4.1-r2.ebuild
+++ b/net-misc/aget/aget-0.4.1-r2.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit toolchain-funcs
 
@@ -12,17 +12,12 @@ SRC_URI="http://www.enderunix.org/${PN}/${P}.tar.gz";
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="amd64 ~arm ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
-IUSE=""
 
 PATCHES=(
-       "${FILESDIR}"/aget-0.4.1-r1.patch
+       "${FILESDIR}"/${P}-overflow.patch
+       "${FILESDIR}"/${P}-fno-common.patch
 )
 
 src_compile() {
        emake CC="$(tc-getCC)"
 }
-
-src_install() {
-       emake DESTDIR="${ED}" install
-       dodoc AUTHORS ChangeLog README* THANKS TODO
-}

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
new file mode 100644
index 00000000000..e881cc39b88
--- /dev/null
+++ b/net-misc/aget/files/aget-0.4.1-fno-common.patch
@@ -0,0 +1,66 @@
+--- a/Aget.c
++++ b/Aget.c
+@@ -33,6 +33,8 @@ extern pthread_t hthread;
+ #include <errno.h>
+ extern int errno;
+ 
++extern time_t  t_start, t_finish;
++
+ 
+ void get(struct request *req)
+ {
+--- a/Head.c
++++ b/Head.c
+@@ -34,6 +34,8 @@
+ extern int errno;
+ extern int h_errno;
+ 
++time_t  t_start, t_finish;
++
+ #ifdef SOLARIS
+ extern const char *hstrerror(int);
+ #endif
+--- a/Misc.h
++++ b/Misc.h
+@@ -24,7 +24,7 @@ void Log(char *, ...);                               /* Log  
                                        */
+ void updateProgressBar(float, float);
+ void handleHttpRetcode(char *);
+ 
+-time_t  t_start, t_finish;
++extern time_t  t_start, t_finish;
+ 
+ #endif
+ 
+--- a/Signal.c
++++ b/Signal.c
+@@ -16,6 +16,8 @@ extern struct request *req;
+ extern int bwritten;
+ extern pthread_mutex_t bwritten_mutex;
+ 
++sigset_t signal_set;
++
+ void * signal_waiter(void *arg)
+ {
+       int signal;
+--- a/Signal.h
++++ b/Signal.h
+@@ -4,7 +4,7 @@
+ #include <signal.h>
+ #include <pthread.h>
+ 
+-sigset_t signal_set;
++extern sigset_t signal_set;
+ 
+ void * signal_waiter(void *arg);
+ void sigint_handler(void);
+--- a/main.c
++++ b/main.c
+@@ -15,6 +15,8 @@
+ #include "main.h"
+ #include <errno.h>
+ 
++extern sigset_t signal_set;
++
+ int main(int argc, char **argv)
+ {
+       extern char *optarg;

diff --git a/net-misc/aget/files/aget-0.4.1-r1.patch 
b/net-misc/aget/files/aget-0.4.1-overflow.patch
similarity index 95%
rename from net-misc/aget/files/aget-0.4.1-r1.patch
rename to net-misc/aget/files/aget-0.4.1-overflow.patch
index fe804901528..998dc128e3d 100644
--- a/net-misc/aget/files/aget-0.4.1-r1.patch
+++ b/net-misc/aget/files/aget-0.4.1-overflow.patch
@@ -37,8 +37,8 @@ than setting GETRECVSIZ bytes to the value of 0. By Kevin 
Pyle.
                dr = recv(sd, rbuf, GETRECVSIZ, 0);
                if ((td->offset + dr) > foffset)
                        dw = pwrite(td->fd, rbuf, foffset - td->offset, 
td->offset);
---- aget-0.4.1/Head.c  2010-09-20 03:41:27.236019179 +0200
-+++ aget-0.4.1/Head.c  2010-09-20 03:43:00.087098655 +0200
+--- aget-0.4.1/Head.c
++++ aget-0.4.1/Head.c
 @@ -1,5 +1,4 @@
  #ifndef SOLARIS
 -#define _XOPEN_SOURCE 500

Reply via email to