summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-07-31 22:03:37 +0200
committerDavid Seifert <soap@gentoo.org>2022-07-31 22:03:37 +0200
commita2cf9a7cef43fef557f78fe86c16034e2d165802 (patch)
tree804db6021f663528f9162379190e07ab617ab8cc /app-misc/tpipe
parentapp-misc/timestamp: update EAPI 6 -> 8 (diff)
downloadgentoo-a2cf9a7cef43fef557f78fe86c16034e2d165802.tar.gz
gentoo-a2cf9a7cef43fef557f78fe86c16034e2d165802.tar.bz2
gentoo-a2cf9a7cef43fef557f78fe86c16034e2d165802.zip
app-misc/tpipe: update EAPI 6 -> 8
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-misc/tpipe')
-rw-r--r--app-misc/tpipe/files/tpipe-1.6-Wimplicit-function-declaration.patch21
-rw-r--r--app-misc/tpipe/files/tpipe-1.6-makefile.patch32
-rw-r--r--app-misc/tpipe/tpipe-1.6-r2.ebuild (renamed from app-misc/tpipe/tpipe-1.6-r1.ebuild)20
3 files changed, 63 insertions, 10 deletions
diff --git a/app-misc/tpipe/files/tpipe-1.6-Wimplicit-function-declaration.patch b/app-misc/tpipe/files/tpipe-1.6-Wimplicit-function-declaration.patch
new file mode 100644
index 000000000000..9a8a094f06b7
--- /dev/null
+++ b/app-misc/tpipe/files/tpipe-1.6-Wimplicit-function-declaration.patch
@@ -0,0 +1,21 @@
+--- a/tap.c
++++ b/tap.c
+@@ -94,7 +94,7 @@
+ else
+ n = strtoul(argv[1],NULL,0);
+
+- if (!(n)&&(argv[1] != '\0')) {
++ if (!(n)&&(*argv[1] != '\0')) {
+ fprintf (stderr, "%s: Unreadable integer arg.; Assuming 1.\n",argv[0]);
+ n = 1;
+ }
+--- a/tpipe.c
++++ b/tpipe.c
+@@ -41,6 +41,7 @@
+
+ #include <stdio.h>
+ #include <string.h> /* strcmp() */
++#include <stdlib.h>
+
+ #ifndef VERSION
+ #define VERSION "1.6"
diff --git a/app-misc/tpipe/files/tpipe-1.6-makefile.patch b/app-misc/tpipe/files/tpipe-1.6-makefile.patch
new file mode 100644
index 000000000000..7ec3566b107f
--- /dev/null
+++ b/app-misc/tpipe/files/tpipe-1.6-makefile.patch
@@ -0,0 +1,32 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,27 +1,16 @@
+ # Change values of variables to adapt.
+-CC = gcc
+ PRG1 = tpipe
+ OBJS1 = $(PRG1).o
+ PRG2 = tap
+ OBJS2 =$(PRG2).o
+-OPTFLAGS= -ansi -pedantic -O4
+-CFLAGS = -Wall $(OPTFLAGS)
+-LDFLAGS = -L.
++OPTFLAGS= -pedantic
++CFLAGS += -Wall $(OPTFLAGS)
+ PREFIX = /usr/local
+ BINDIR = $(PREFIX)/bin
+ MANDIR = $(PREFIX)/man/man1
+
+ all: $(PRG1) $(PRG2)
+
+-.c.o:
+- $(CC) -c $(CFLAGS) -o $@ $<
+-
+-$(PRG1): $(OBJS1)
+- $(CC) $(CFLAGS) -o $(PRG1) $(OBJS1) $(LDFLAGS) $(LIBS)
+-
+-$(PRG2): $(OBJS2)
+- $(CC) $(CFLAGS) -o $(PRG2) $(OBJS2) $(LDFLAGS) $(LIBS)
+-
+ clean:
+ rm -f *~ *.o $(PRG1) $(PRG2)
+
diff --git a/app-misc/tpipe/tpipe-1.6-r1.ebuild b/app-misc/tpipe/tpipe-1.6-r2.ebuild
index 034575fcdaa3..8b37b96a2605 100644
--- a/app-misc/tpipe/tpipe-1.6-r1.ebuild
+++ b/app-misc/tpipe/tpipe-1.6-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit toolchain-funcs
@@ -13,17 +13,17 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
-DOCS=( README.txt )
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch
+)
-src_compile() {
- emake OPTFLAGS="-ansi -pedantic ${CFLAGS}" \
- PREFIX=/usr \
- CC="$(tc-getCC)" \
- LDFLAGS="${LDFLAGS}"
+src_configure() {
+ tc-export CC
}
src_install() {
- dobin "${PN}"
- doman "${PN}.1"
+ dobin tpipe
einstalldocs
+ doman tpipe.1
}