Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/ttysnoop/files/, app-misc/ttysnoop/
Date: Tue, 15 Sep 2020 19:53:09
Message-Id: 1600199556.a9374bd89c2a17d3a5f2d97409a5ccce93c9baa1.soap@gentoo
1 commit: a9374bd89c2a17d3a5f2d97409a5ccce93c9baa1
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 15 19:52:36 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 15 19:52:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9374bd8
7
8 app-misc/ttysnoop: Port to EAPI 7
9
10 Closes: https://bugs.gentoo.org/742071
11 Package-Manager: Portage-3.0.7, Repoman-3.0.1
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 app-misc/ttysnoop/files/pinkbyte_masking.patch | 4 ++--
15 app-misc/ttysnoop/files/ttysnoop-makefile.patch | 27 ++++++++++++++-------
16 app-misc/ttysnoop/ttysnoop-0.12d.ebuild | 32 ++++++++++++-------------
17 3 files changed, 35 insertions(+), 28 deletions(-)
18
19 diff --git a/app-misc/ttysnoop/files/pinkbyte_masking.patch b/app-misc/ttysnoop/files/pinkbyte_masking.patch
20 index a0539c239b0..8d944b21e3a 100644
21 --- a/app-misc/ttysnoop/files/pinkbyte_masking.patch
22 +++ b/app-misc/ttysnoop/files/pinkbyte_masking.patch
23 @@ -1,5 +1,5 @@
24 ---- ttysnoops.c 2009-08-13 17:11:30.705202250 +0400
25 -+++ ttysnoops.c 2009-08-13 17:17:29.989201055 +0400
26 +--- a/ttysnoops.c
27 ++++ b/ttysnoops.c
28 @@ -18,6 +18,7 @@
29 v0.12d 8-4-98 Carl Declerck - updated #includes a bit
30 k26 28-5-00 Vinicius Anselmo - added sound alert (demoniac) created by Stas
31
32 diff --git a/app-misc/ttysnoop/files/ttysnoop-makefile.patch b/app-misc/ttysnoop/files/ttysnoop-makefile.patch
33 index 54d04dd40a2..ba8d702e9e6 100644
34 --- a/app-misc/ttysnoop/files/ttysnoop-makefile.patch
35 +++ b/app-misc/ttysnoop/files/ttysnoop-makefile.patch
36 @@ -1,6 +1,15 @@
37 ---- Makefile 2004-06-07 04:27:40.000000000 +0400
38 -+++ Makefile 2011-07-21 11:50:22.580167326 +0400
39 -@@ -11,7 +11,7 @@
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -2,8 +2,6 @@
43 + # Makefile for the ttysnoop programs
44 + #
45 +
46 +-CC = gcc
47 +-
48 + # Without shadow support
49 +
50 + #CCOPTS = -O2
51 +@@ -11,7 +9,7 @@
52
53 # For shadow support
54
55 @@ -9,28 +18,28 @@
56 LIBS = -lcrypt
57 #LIBS = -lshadow
58
59 -@@ -24,19 +24,19 @@
60 +@@ -24,19 +22,19 @@
61 all: ttysnoops ttysnoop
62
63 ttysnoops: $(SERVEROBJS)
64 - $(CC) $(SERVEROBJS) -o ttysnoops $(LIBS)
65 -+ $(CC) $(SERVEROBJS) -o ttysnoops $(LDFLAGS) $(LIBS)
66 ++ $(CC) $(LDFLAGS) $(SERVEROBJS) -o ttysnoops $(LIBS)
67
68 ttysnoop: $(CLIENTOBJS)
69 - $(CC) $(CLIENTOBJS) -o ttysnoop $(LIBS)
70 -+ $(CC) $(CLIENTOBJS) -o ttysnoop $(LDFLAGS) $(LIBS)
71 ++ $(CC) $(LDFLAGS) $(CLIENTOBJS) -o ttysnoop $(LIBS)
72
73 ttysnoops.o: $(SERVERSRCS) $(INCLUDES)
74 - $(CC) $(CCOPTS) -c -o ttysnoops.o $(SERVERSRCS)
75 -+ $(CC) $(CCOPTS) $(CFLAGS) -c -o ttysnoops.o $(SERVERSRCS)
76 ++ $(CC) $(CCOPTS) $(CPPFLAGS) $(CFLAGS) -c -o ttysnoops.o $(SERVERSRCS)
77
78 ttysnoop.o: $(CLIENTSRCS) $(INCLUDES)
79 - $(CC) $(CCOPTS) -c -o ttysnoop.o $(CLIENTSRCS)
80 -+ $(CC) $(CCOPTS) $(CFLAGS) -c -o ttysnoop.o $(CLIENTSRCS)
81 ++ $(CC) $(CCOPTS) $(CPPFLAGS) $(CFLAGS) -c -o ttysnoop.o $(CLIENTSRCS)
82
83 common.o: common.c common.h
84 - $(CC) $(CCOPTS) -c -o common.o common.c
85 -+ $(CC) $(CCOPTS) $(CFLAGS) -c -o common.o common.c
86 ++ $(CC) $(CCOPTS) $(CPPFLAGS) $(CFLAGS) -c -o common.o common.c
87
88 clean:
89 rm -f *.o core ttysnoop ttysnoops
90
91 diff --git a/app-misc/ttysnoop/ttysnoop-0.12d.ebuild b/app-misc/ttysnoop/ttysnoop-0.12d.ebuild
92 index 400e1e6c2c6..ccbb8cd23f2 100644
93 --- a/app-misc/ttysnoop/ttysnoop-0.12d.ebuild
94 +++ b/app-misc/ttysnoop/ttysnoop-0.12d.ebuild
95 @@ -1,11 +1,11 @@
96 # Copyright 1999-2020 Gentoo Authors
97 # Distributed under the terms of the GNU General Public License v2
98
99 -EAPI="4"
100 +EAPI=7
101
102 MY_P="${P}.k26"
103
104 -inherit eutils toolchain-funcs
105 +inherit toolchain-funcs
106
107 DESCRIPTION="Tool to snoop on login tty's through another tty-device or pseudo-tty"
108 HOMEPAGE="http://sysd.org/stas/node/35"
109 @@ -14,30 +14,28 @@ SRC_URI="http://sysd.org/stas/files/active/0/${MY_P}.tar.gz"
110 LICENSE="GPL-2"
111 SLOT="0"
112 KEYWORDS="~amd64 ~x86"
113 -IUSE=""
114 -
115 -RDEPEND=""
116 -DEPEND="${RDEPEND}"
117
118 S="${WORKDIR}/${MY_P}"
119
120 -DOCS="README snooptab.dist"
121 -
122 -src_prepare() {
123 - epatch "${FILESDIR}"/pinkbyte_masking.patch
124 - epatch "${FILESDIR}"/"${PN}"-makefile.patch
125 -}
126 +PATCHES=(
127 + "${FILESDIR}"/pinkbyte_masking.patch
128 + "${FILESDIR}"/"${PN}"-makefile.patch
129 +)
130
131 -src_compile() {
132 - emake CC="$(tc-getCC)"
133 +src_configure() {
134 + tc-export CC
135 }
136
137 src_install() {
138 dodir /var/spool/ttysnoop
139 + keepdir /var/spool/ttysnoop
140 +
141 fperms o= /var/spool/ttysnoop
142 - dodoc ${DOCS}
143 - dosbin ttysnoop
144 - dosbin ttysnoops
145 +
146 + dosbin ttysnoop ttysnoops
147 +
148 + dodoc README snooptab.dist
149 +
150 doman ttysnoop.8
151 insinto /etc
152 newins snooptab.dist snooptab