summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-07-31 22:03:27 +0200
committerDavid Seifert <soap@gentoo.org>2022-07-31 22:03:27 +0200
commit0f6504be54b3199f7ed43664f9189be3f9e5d365 (patch)
tree3083a292ffc73b6b0eca1898008523987de6c5b9 /app-misc/leave
parentapp-misc/joy2key: update EAPI 6 -> 8 (diff)
downloadgentoo-0f6504be54b3199f7ed43664f9189be3f9e5d365.tar.gz
gentoo-0f6504be54b3199f7ed43664f9189be3f9e5d365.tar.bz2
gentoo-0f6504be54b3199f7ed43664f9189be3f9e5d365.zip
app-misc/leave: update EAPI 6 -> 8
Closes: https://bugs.gentoo.org/714020 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-misc/leave')
-rw-r--r--app-misc/leave/files/leave-20100918-makefile.patch8
-rw-r--r--app-misc/leave/files/leave-20100918-posix.patch55
-rw-r--r--app-misc/leave/files/leave-fix-makefile.diff20
-rw-r--r--app-misc/leave/leave-20100918-r2.ebuild (renamed from app-misc/leave/leave-20100918-r1.ebuild)21
4 files changed, 72 insertions, 32 deletions
diff --git a/app-misc/leave/files/leave-20100918-makefile.patch b/app-misc/leave/files/leave-20100918-makefile.patch
new file mode 100644
index 00000000000..464795a2732
--- /dev/null
+++ b/app-misc/leave/files/leave-20100918-makefile.patch
@@ -0,0 +1,8 @@
+--- a/Makefile
++++ b/Makefile
+@@ -3,4 +3,4 @@
+
+ PROG= leave
+
+-.include <bsd.prog.mk>
++all: $(PROG)
diff --git a/app-misc/leave/files/leave-20100918-posix.patch b/app-misc/leave/files/leave-20100918-posix.patch
new file mode 100644
index 00000000000..3ce788d8634
--- /dev/null
+++ b/app-misc/leave/files/leave-20100918-posix.patch
@@ -0,0 +1,55 @@
+--- a/leave.c
++++ b/leave.c
+@@ -42,7 +42,6 @@
+ static char sccsid[] = "@(#)leave.c 8.1 (Berkeley) 6/6/93";
+ #endif
+ #endif /* not lint */
+-#include <sys/cdefs.h>
+
+ #include <err.h>
+ #include <ctype.h>
+@@ -52,7 +51,7 @@
+ #include <time.h>
+ #include <unistd.h>
+
+-void doalarm(u_int);
++void doalarm(unsigned);
+ static void usage(void);
+
+ /*
+@@ -65,7 +64,7 @@
+ int
+ main(int argc, char **argv)
+ {
+- u_int secs;
++ unsigned secs;
+ int hours, minutes;
+ char c, *cp = NULL;
+ struct tm *t;
+@@ -136,7 +135,7 @@
+ }
+
+ void
+-doalarm(u_int secs)
++doalarm(unsigned secs)
+ {
+ int bother;
+ time_t daytime;
+@@ -150,7 +149,7 @@
+ printf("Alarm set for %s. (pid %d)\n", tb, pid);
+ exit(0);
+ }
+- sleep((u_int)2); /* let parent print set message */
++ sleep((unsigned)2); /* let parent print set message */
+ if (secs >= 2)
+ secs -= 2;
+
+@@ -177,7 +176,7 @@
+
+ #define MSG4 "\07\07Time to leave!\n"
+ for (bother = 10; bother--;) {
+- sleep((u_int)ONEMIN);
++ sleep((unsigned)ONEMIN);
+ if (write(STDOUT_FILENO, MSG4, sizeof(MSG4) - 1) != sizeof(MSG4) - 1)
+ exit(0);
+ }
diff --git a/app-misc/leave/files/leave-fix-makefile.diff b/app-misc/leave/files/leave-fix-makefile.diff
deleted file mode 100644
index 772add57d6f..00000000000
--- a/app-misc/leave/files/leave-fix-makefile.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/Makefile.orig 2004-10-16 23:04:50.144563171 -0400
-+++ b/Makefile 2004-10-16 23:57:27.639495962 -0400
-@@ -2,5 +2,16 @@
- # $FreeBSD: /repoman/r/ncvs/src/usr.bin/leave/Makefile,v 1.5 2002/02/08 22:31:41 markm Exp $
-
- PROG= leave
-+CC ?= gcc
-+CFLAGS=
-+LDFLAGS=
-
--.include <bsd.prog.mk>
-+#.include <bsd.prog.mk>
-+
-+all: $(PROG)
-+$(PROG): leave.o
-+ $(CC) $(LDFLAGS) leave.o -o $(PROG)
-+leave.o:
-+ $(CC) $(CFLAGS) -c leave.c
-+clean:
-+ rm -f $(PROG) *.o
diff --git a/app-misc/leave/leave-20100918-r1.ebuild b/app-misc/leave/leave-20100918-r2.ebuild
index b5046a2f965..d8ba499f34e 100644
--- a/app-misc/leave/leave-20100918-r1.ebuild
+++ b/app-misc/leave/leave-20100918-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit toolchain-funcs
@@ -14,19 +14,16 @@ SLOT="0"
KEYWORDS="amd64 ppc x86"
PATCHES=(
- "${FILESDIR}/${PN}-fix-makefile.diff"
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-posix.patch
)
-src_compile() {
- cp -v "${FILESDIR}/README" . || die
- emake \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- LDFLAGS="${LDFLAGS}"
+src_configure() {
+ tc-export CC
}
src_install() {
- dobin "${PN}"
- doman "${PN}.1"
- einstalldocs
+ dobin leave
+ doman leave.1
+ dodoc "${FILESDIR}"/README
}