1 |
commit: 51abeb57143e77e3c5751f6be5e3cd543c8fde1f |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 4 16:40:19 2019 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 4 16:50:27 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51abeb57 |
7 |
|
8 |
net-misc/l7-protocols: bugfixes and cleanup |
9 |
|
10 |
- Bump to EAPI 7. |
11 |
- l7-protocols is only useful with l7-filter-userspace, so drop |
12 |
keywords not supported by l7-filter-userspace --- they are |
13 |
remnants from the long gone l7-filter-kernel package. |
14 |
- Install helper binaries to /usr/lib/$PN instead of |
15 |
/usr/share/$PN. |
16 |
|
17 |
Closes: https://bugs.gentoo.org/305255 |
18 |
Closes: https://bugs.gentoo.org/697240 |
19 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
20 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
21 |
|
22 |
.../l7-protocols/l7-protocols-2009.05.28-r1.ebuild | 66 ++++++++++++++++++++++ |
23 |
1 file changed, 66 insertions(+) |
24 |
|
25 |
diff --git a/net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild b/net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..2508abfe201 |
28 |
--- /dev/null |
29 |
+++ b/net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild |
30 |
@@ -0,0 +1,66 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit eutils fixheadtails toolchain-funcs |
37 |
+ |
38 |
+IUSE="" |
39 |
+ |
40 |
+MY_P=${PN}-${PV//./-} |
41 |
+ |
42 |
+DESCRIPTION="Protocol definitions of l7-filter kernel modules" |
43 |
+HOMEPAGE="http://l7-filter.sourceforge.net/protocols" |
44 |
+ |
45 |
+SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz" |
46 |
+ |
47 |
+LICENSE="GPL-2" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~arm ~x86" |
50 |
+S=${WORKDIR}/${MY_P} |
51 |
+ |
52 |
+src_prepare() { |
53 |
+ sed -e "s|gcc.*\-o|$(tc-getCC) ${CFLAGS} ${LDFLAGS} -o|" \ |
54 |
+ -e "s|g++.*\-o|$(tc-getCXX) ${CFLAGS} ${LDFLAGS} -o|" \ |
55 |
+ -i testing/Makefile || die |
56 |
+ sed -e "s|f in data|f in ${EPREFIX}/usr/share/l7-protocols/data|" \ |
57 |
+ testing/timeit.sh || die |
58 |
+ ht_fix_file testing/*.sh |
59 |
+ eapply_user |
60 |
+} |
61 |
+ |
62 |
+src_compile() { |
63 |
+ emake -C testing |
64 |
+} |
65 |
+ |
66 |
+# NOTE Testing mechanism is currently broken: |
67 |
+# stack smashing attack in function main() |
68 |
+ |
69 |
+# Is also extraordinarly inefficent getting random data. |
70 |
+# |
71 |
+#src_test() { |
72 |
+# cd testing |
73 |
+# find ${S} -name \*.pat -print -exec ./test_match.sh {} \; \ |
74 |
+# -exec ./timeit.sh {} \; || die "failed tests" |
75 |
+# einfo "patterns past testing" |
76 |
+#} |
77 |
+ |
78 |
+src_install() { |
79 |
+ dodir /usr/{share,lib}/${PN} |
80 |
+ mv testing/data example_traffic "${ED}"/usr/share/${PN} || die |
81 |
+ |
82 |
+ pushd testing >/dev/null || die |
83 |
+ cp -pPR randprintable randchars test_speed-{kernel,userspace} README \ |
84 |
+ match_kernel *.sh "${ED}"/usr/lib/${PN} || die |
85 |
+ popd >/dev/null || die |
86 |
+ |
87 |
+ dodoc README CHANGELOG HOWTO WANTED |
88 |
+ for dir in extra file_types malware ; do |
89 |
+ newdoc ${dir}/README README.${dir} |
90 |
+ done |
91 |
+ rm -rf README CHANGELOG HOWTO LICENSE Makefile WANTED */README testing || die |
92 |
+ |
93 |
+ dodir /etc/l7-protocols |
94 |
+ cp -R * "${ED}"/etc/l7-protocols || die |
95 |
+ chown -R root:0 "${ED}" || die |
96 |
+} |