1 |
commit: 0a0f328f896c6dcaab28fa11f9f358dc3ec839e4 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 28 11:40:57 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 28 11:53:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a0f328f |
7 |
|
8 |
net-libs/nDPI: Hack around PACKAGE* autoheader definitions |
9 |
|
10 |
autogen.sh patches the autogenerated configure script to hide the |
11 |
PACKAGE* variables from ndpi_config.h, and so should we. |
12 |
|
13 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
14 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=704074 |
15 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
16 |
|
17 |
net-libs/nDPI/nDPI-3.0-r2.ebuild | 53 ++++++++++++++++++++++++++++++++++++++++ |
18 |
1 file changed, 53 insertions(+) |
19 |
|
20 |
diff --git a/net-libs/nDPI/nDPI-3.0-r2.ebuild b/net-libs/nDPI/nDPI-3.0-r2.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000000..50396b2d9db |
23 |
--- /dev/null |
24 |
+++ b/net-libs/nDPI/nDPI-3.0-r2.ebuild |
25 |
@@ -0,0 +1,53 @@ |
26 |
+# Copyright 1999-2020 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=7 |
30 |
+inherit autotools multilib |
31 |
+ |
32 |
+DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit" |
33 |
+HOMEPAGE="https://www.ntop.org/" |
34 |
+SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="GPL-3" |
37 |
+SLOT="0/$(ver_cut 1)" |
38 |
+KEYWORDS="~amd64 ~x86" |
39 |
+IUSE="static-libs" |
40 |
+ |
41 |
+DEPEND=" |
42 |
+ dev-libs/json-c:= |
43 |
+ net-libs/libpcap |
44 |
+" |
45 |
+RDEPEND=" |
46 |
+ ${DEPEND} |
47 |
+" |
48 |
+ |
49 |
+src_prepare() { |
50 |
+ # Taken from autogen.sh (bug #704074): |
51 |
+ sed \ |
52 |
+ -e "s/@NDPI_MAJOR@/$(ver_cut 1)/g" \ |
53 |
+ -e "s/@NDPI_MINOR@/$(ver_cut 2)/g" \ |
54 |
+ -e "s/@NDPI_PATCH@/$(ver_cut 3)/g" \ |
55 |
+ -e "s/@NDPI_VERSION_SHORT@/${PV}/g" \ |
56 |
+ < "${S}/configure.seed" \ |
57 |
+ > "${S}/configure.ac" || die |
58 |
+ |
59 |
+ sed -i \ |
60 |
+ -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir = \${prefix}/$(get_libdir)%" \ |
61 |
+ src/lib/Makefile.in || die |
62 |
+ |
63 |
+ default |
64 |
+ eautoreconf |
65 |
+ |
66 |
+ # Taken from autogen.sh (bug #704074): |
67 |
+ sed -i \ |
68 |
+ -e "s/#define PACKAGE/#define NDPI_PACKAGE/g" \ |
69 |
+ -e "s/#define VERSION/#define NDPI_VERSION/g" \ |
70 |
+ configure || die |
71 |
+} |
72 |
+ |
73 |
+src_install() { |
74 |
+ default |
75 |
+ if ! use static-libs; then |
76 |
+ rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die |
77 |
+ fi |
78 |
+} |