1 |
commit: db59f2bc06cf445ea11088c033a179ab246ce726 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 16 13:58:34 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 16 13:58:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db59f2bc |
7 |
|
8 |
app-misc/srm: port to EAPI 8 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/714026 |
11 |
Closes: https://bugs.gentoo.org/722320 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
app-misc/srm/files/srm-1.2.15-cflags.patch | 14 +++++++++++--- |
15 |
app-misc/srm/files/srm-1.2.15-musl.patch | 17 +++++++++++++++++ |
16 |
app-misc/srm/srm-1.2.15.ebuild | 19 +++++++++++-------- |
17 |
3 files changed, 39 insertions(+), 11 deletions(-) |
18 |
|
19 |
diff --git a/app-misc/srm/files/srm-1.2.15-cflags.patch b/app-misc/srm/files/srm-1.2.15-cflags.patch |
20 |
index 0a45bdc1252..22710b8af38 100644 |
21 |
--- a/app-misc/srm/files/srm-1.2.15-cflags.patch |
22 |
+++ b/app-misc/srm/files/srm-1.2.15-cflags.patch |
23 |
@@ -1,6 +1,14 @@ |
24 |
---- srm-1.2.15/configure.ac |
25 |
-+++ srm-1.2.15/configure.ac |
26 |
-@@ -42,7 +42,6 @@ |
27 |
+--- a/configure.ac |
28 |
++++ b/configure.ac |
29 |
+@@ -9,6 +9,7 @@ |
30 |
+ |
31 |
+ AC_PROG_INSTALL |
32 |
+ AC_PROG_RANLIB |
33 |
++AM_PROG_AR |
34 |
+ |
35 |
+ dnl enable 64bit file ops |
36 |
+ AC_SYS_LARGEFILE |
37 |
+@@ -42,7 +43,6 @@ |
38 |
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging |
39 |
[default=$debug_default]],, enable_debug=$debug_default) |
40 |
if test "x$enable_debug" = "xyes"; then |
41 |
|
42 |
diff --git a/app-misc/srm/files/srm-1.2.15-musl.patch b/app-misc/srm/files/srm-1.2.15-musl.patch |
43 |
new file mode 100644 |
44 |
index 00000000000..e22c5efcc8b |
45 |
--- /dev/null |
46 |
+++ b/app-misc/srm/files/srm-1.2.15-musl.patch |
47 |
@@ -0,0 +1,17 @@ |
48 |
+musl doesn't have an internal __sighandler_t type, |
49 |
+and only makes sighandler_t visible if _GNU_SOURCE |
50 |
+is defined. |
51 |
+https://bugs.gentoo.org/714026 |
52 |
+ |
53 |
+--- a/src/sunlink.c |
54 |
++++ b/src/sunlink.c |
55 |
+@@ -102,9 +102,6 @@ |
56 |
+ static volatile int SIGINT_received = 0; |
57 |
+ #if defined(__unix__) |
58 |
+ #include <signal.h> |
59 |
+-#if defined(__linux__) && !defined(__USE_GNU) |
60 |
+-typedef __sighandler_t sighandler_t; |
61 |
+-#endif |
62 |
+ #if defined(__FreeBSD__) || defined(__OpenBSD__) |
63 |
+ typedef sig_t sighandler_t; |
64 |
+ #endif |
65 |
|
66 |
diff --git a/app-misc/srm/srm-1.2.15.ebuild b/app-misc/srm/srm-1.2.15.ebuild |
67 |
index a086636c204..cedaa944e3f 100644 |
68 |
--- a/app-misc/srm/srm-1.2.15.ebuild |
69 |
+++ b/app-misc/srm/srm-1.2.15.ebuild |
70 |
@@ -1,9 +1,9 @@ |
71 |
# Copyright 1999-2021 Gentoo Authors |
72 |
# Distributed under the terms of the GNU General Public License v2 |
73 |
|
74 |
-EAPI=5 |
75 |
+EAPI=8 |
76 |
|
77 |
-inherit autotools epatch |
78 |
+inherit autotools flag-o-matic |
79 |
|
80 |
DESCRIPTION="A command-line compatible rm which destroys file contents before unlinking" |
81 |
HOMEPAGE="https://sourceforge.net/projects/srm/" |
82 |
@@ -14,23 +14,26 @@ SLOT="0" |
83 |
KEYWORDS="amd64 ppc ~ppc64 x86" |
84 |
IUSE="debug" |
85 |
|
86 |
-DEPEND="!app-misc/secure-delete |
87 |
- sys-kernel/linux-headers |
88 |
-" |
89 |
+DEPEND="sys-kernel/linux-headers" |
90 |
|
91 |
-DOCS=( AUTHORS ChangeLog NEWS README TODO ) |
92 |
+PATCHES=( |
93 |
+ "${FILESDIR}"/${PN}-1.2.15-cflags.patch |
94 |
+ "${FILESDIR}"/${PN}-1.2.15-musl.patch |
95 |
+) |
96 |
|
97 |
src_prepare() { |
98 |
- epatch "${FILESDIR}/${PN}-1.2.15-cflags.patch" |
99 |
+ default |
100 |
eautoreconf |
101 |
} |
102 |
|
103 |
src_configure() { |
104 |
+ # enable the sighandler_t decl on glibc and musl |
105 |
+ append-cppflags -D_GNU_SOURCE |
106 |
econf $(use_enable debug) |
107 |
} |
108 |
|
109 |
pkg_postinst() { |
110 |
ewarn "Please note that srm will not work as expected with any journaled file" |
111 |
ewarn "system (e.g., reiserfs, ext3)." |
112 |
- ewarn "See: ${EROOT%/}/usr/share/doc/${PF}/README" |
113 |
+ ewarn "See: ${EROOT}/usr/share/doc/${PF}/README" |
114 |
} |