1 |
commit: 181d152380aa77d302585b7f5048df95775c0b4f |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 3 18:37:34 2018 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 3 18:37:34 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=181d1523 |
7 |
|
8 |
net-mail/safecat: Port to EAPI 6 |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
.../files/safecat-1.13-head-tail-POSIX.patch | 45 ++++++++++++++++++++++ |
13 |
net-mail/safecat/safecat-1.13.ebuild | 41 +++++++++----------- |
14 |
2 files changed, 64 insertions(+), 22 deletions(-) |
15 |
|
16 |
diff --git a/net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch b/net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..59bd33b0f76 |
19 |
--- /dev/null |
20 |
+++ b/net-mail/safecat/files/safecat-1.13-head-tail-POSIX.patch |
21 |
@@ -0,0 +1,45 @@ |
22 |
+--- a/make-compile.sh |
23 |
++++ b/make-compile.sh |
24 |
+@@ -1 +1 @@ |
25 |
+-echo exec "$CC" "`head -1 conf-includes`" -c '${1+"$@"}' |
26 |
++echo exec "$CC" "`head -n 1 conf-includes`" -c '${1+"$@"}' |
27 |
+--- a/Makefile |
28 |
++++ b/Makefile |
29 |
+@@ -17,8 +17,8 @@ |
30 |
+ auto-ccld.sh: \ |
31 |
+ conf-cc conf-ld warn-auto.sh |
32 |
+ ( cat warn-auto.sh; \ |
33 |
+- echo CC=\'`head -1 conf-cc`\'; \ |
34 |
+- echo LD=\'`head -1 conf-ld`\'; \ |
35 |
++ echo CC=\'`head -n 1 conf-cc`\'; \ |
36 |
++ echo LD=\'`head -n 1 conf-ld`\'; \ |
37 |
+ ) > auto-ccld.sh |
38 |
+ |
39 |
+ auto-str: \ |
40 |
+@@ -31,7 +31,7 @@ |
41 |
+ |
42 |
+ auto_home.c: \ |
43 |
+ auto-str conf-root |
44 |
+- ./auto-str auto_home `head -1 conf-root` > auto_home.c |
45 |
++ ./auto-str auto_home `head -n 1 conf-root` > auto_home.c |
46 |
+ |
47 |
+ auto_home.o: \ |
48 |
+ compile auto_home.c |
49 |
+@@ -161,7 +161,7 @@ |
50 |
+ maildir: \ |
51 |
+ warn-auto.sh maildir.sh conf-root |
52 |
+ cat warn-auto.sh maildir.sh \ |
53 |
+- | sed s}HOME}"`head -1 conf-root`"}g \ |
54 |
++ | sed s}HOME}"`head -n 1 conf-root`"}g \ |
55 |
+ > maildir |
56 |
+ chmod 755 maildir |
57 |
+ |
58 |
+@@ -407,7 +407,7 @@ |
59 |
+ version.h: \ |
60 |
+ conf-version |
61 |
+ @echo 'static const char *const version_string="$$Version:' \ |
62 |
+- `head -1 conf-version` 'built' `date +"%b %d, %Y"` at \ |
63 |
++ `head -n 1 conf-version` 'built' `date +"%b %d, %Y"` at \ |
64 |
+ `date +"%H:%M"`'$$";' > version.h |
65 |
+ |
66 |
+ writefile.o: \ |
67 |
|
68 |
diff --git a/net-mail/safecat/safecat-1.13.ebuild b/net-mail/safecat/safecat-1.13.ebuild |
69 |
index 78dc3a09942..7dbf9cc60c4 100644 |
70 |
--- a/net-mail/safecat/safecat-1.13.ebuild |
71 |
+++ b/net-mail/safecat/safecat-1.13.ebuild |
72 |
@@ -1,11 +1,11 @@ |
73 |
-# Copyright 1999-2011 Gentoo Foundation |
74 |
+# Copyright 1999-2018 Gentoo Foundation |
75 |
# Distributed under the terms of the GNU General Public License v2 |
76 |
|
77 |
-EAPI="3" |
78 |
+EAPI=6 |
79 |
|
80 |
-inherit fixheadtails eutils toolchain-funcs flag-o-matic |
81 |
+inherit toolchain-funcs |
82 |
|
83 |
-DESCRIPTION="Safecat implements qmail's maildir algorithm, copying standard input safely to a specified directory" |
84 |
+DESCRIPTION="Safecat implements qmail's maildir algorithm, safely copying standard input" |
85 |
HOMEPAGE="http://www.jeenyus.net/linux/software/safecat.html" |
86 |
SRC_URI="http://www.jeenyus.net/linux/software/${PN}/${P}.tar.gz" |
87 |
|
88 |
@@ -18,35 +18,32 @@ RESTRICT="test" |
89 |
DEPEND="sys-apps/groff" |
90 |
RDEPEND="" |
91 |
|
92 |
-src_prepare() { |
93 |
+PATCHES=( |
94 |
# applying maildir-patch |
95 |
- epatch "${FILESDIR}"/safecat-1.11-gentoo.patch |
96 |
- |
97 |
+ "${FILESDIR}"/safecat-1.11-gentoo.patch |
98 |
# Fix parallel make errors |
99 |
- epatch "${FILESDIR}"/${P}-makefile.patch |
100 |
+ "${FILESDIR}"/${P}-makefile.patch |
101 |
+ # Fix POSIX head/tail syntax |
102 |
+ "${FILESDIR}"/${P}-head-tail-POSIX.patch |
103 |
+) |
104 |
|
105 |
- ht_fix_file Makefile make-compile.sh |
106 |
+src_prepare() { |
107 |
+ default |
108 |
|
109 |
- sed -ni '/man\|doc/!p' hier.c |
110 |
+ sed -ni '/man\|doc/!p' hier.c || die |
111 |
|
112 |
# Fix implicit decleration |
113 |
- sed -i -e '/include <signal.h>/ a #include <stdlib.h>' \ |
114 |
- safecat.c |
115 |
+ sed '/include <signal.h>/ a #include <stdlib.h>' -i safecat.c || die |
116 |
} |
117 |
|
118 |
src_configure() { |
119 |
- # safecat segfaults on gcc-4.0 x86 with -Os, seems to be okay with -O2 |
120 |
- if [[ $(gcc-major-version).$(gcc-minor-version) == 4.0 ]]; then |
121 |
- replace-flags -Os -O2 |
122 |
- fi |
123 |
- |
124 |
- echo "${D}/usr" > conf-root |
125 |
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc |
126 |
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld |
127 |
+ echo "${D}/usr" > conf-root || die |
128 |
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die |
129 |
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die |
130 |
} |
131 |
|
132 |
src_install() { |
133 |
- emake setup check || die |
134 |
- dodoc CHANGES README |
135 |
+ emake setup check |
136 |
+ einstalldocs |
137 |
doman maildir.1 safecat.1 |
138 |
} |