Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ntopng/, net-analyzer/ntopng/files/
Date: Sun, 29 Dec 2019 15:20:30
Message-Id: 1577632822.919a2b7edd0ef2ed9763ccbb7022336fdba5b8a0.jer@gentoo
1 commit: 919a2b7edd0ef2ed9763ccbb7022336fdba5b8a0
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 29 14:46:59 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 29 15:20:22 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=919a2b7e
7
8 net-analyzer/ntopng: Use PKG_CONFIG, drop test phase
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 .../ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch | 95 ++++++++++++++++++++++
14 ...{ntopng-3.8.1.ebuild => ntopng-3.8.1-r1.ebuild} | 12 ++-
15 2 files changed, 106 insertions(+), 1 deletion(-)
16
17 diff --git a/net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch b/net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch
18 new file mode 100644
19 index 00000000000..91811d66bbd
20 --- /dev/null
21 +++ b/net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch
22 @@ -0,0 +1,95 @@
23 +--- a/configure.seed
24 ++++ b/configure.seed
25 +@@ -6,6 +6,8 @@
26 +
27 + AC_PROG_CXX
28 +
29 ++PKG_PROG_PKG_CONFIG
30 ++
31 + dnl> Add /usr/local/ /opt/local
32 + CFLAGS="-I${PWD} -I${PWD}/include"
33 + CPPFLAGS="${CPPFLAGS} -I${PWD} -I${PWD}/include"
34 +@@ -179,10 +179,10 @@
35 + fi
36 + dnl finish: nDPI handling
37 +
38 +-if test -z `pkg-config --exists libssl`; then
39 ++if ${PKG_CONFIG} --exists libssl; then
40 + AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
41 +- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl"
42 +- SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto"
43 ++ SSL_INC="`${PKG_CONFIG} --cflags libssl` -I/usr/include/openssl"
44 ++ SSL_LIB="`${PKG_CONFIG} --libs libssl` -lssl -lcrypto"
45 + fi
46 +
47 + AC_MSG_CHECKING(for ntopng professional edition)
48 +--- a/Makefile.in
49 ++++ b/Makefile.in
50 +@@ -44,10 +44,10 @@
51 +
52 + ######
53 + LIBRRDTOOL_HOME=${PWD}/third-party/rrdtool-1.4.8
54 +-HAS_LIBRRDTOOL=$(shell pkg-config --atleast-version=1.4.8 librrd; echo $$?)
55 ++HAS_LIBRRDTOOL=$(shell $(PKG_CONFIG) --atleast-version=1.4.8 librrd; echo $$?)
56 + ifeq ($(HAS_LIBRRDTOOL), 0)
57 +- LIBRRDTOOL_INC = $(shell pkg-config --cflags librrd)
58 +- LIBRRDTOOL_LIB = $(shell pkg-config --libs librrd) # -lrrd_th
59 ++ LIBRRDTOOL_INC = $(shell $(PKG_CONFIG) --cflags librrd)
60 ++ LIBRRDTOOL_LIB = $(shell $(PKG_CONFIG) --libs librrd) # -lrrd_th
61 + else
62 + LIBRRDTOOL_INC=-I$(LIBRRDTOOL_HOME)/src/
63 + ifeq ($(OS), $(filter $(OS), OpenBSD FreeBSD))
64 +@@ -70,10 +70,10 @@
65 +
66 + ######
67 +
68 +-HAS_JSON=$(shell pkg-config --exists json-c; echo $$?)
69 ++HAS_JSON=$(shell $(PKG_CONFIG) --exists json-c; echo $$?)
70 + ifeq ($(HAS_JSON), 0)
71 +- JSON_INC = $(shell pkg-config --cflags json-c)
72 +- JSON_LIB = $(shell pkg-config --libs json-c)
73 ++ JSON_INC = $(shell $(PKG_CONFIG) --cflags json-c)
74 ++ JSON_LIB = $(shell $(PKG_CONFIG) --libs json-c)
75 + else
76 + JSON_HOME=${PWD}/third-party/json-c
77 + JSON_INC=-I$(JSON_HOME)
78 +@@ -83,21 +83,21 @@
79 + ######
80 +
81 + ifeq (@NEDGE@, 0)
82 +- HAS_SODIUM=$(shell pkg-config --exists libsodium; echo $$?)
83 ++ HAS_SODIUM=$(shell $(PKG_CONFIG) --exists libsodium; echo $$?)
84 + ifeq ($(HAS_SODIUM), 0)
85 +- SODIUM_INC = $(shell pkg-config --cflags libsodium)
86 +- SODIUM_LIB = $(shell pkg-config --libs libsodium)
87 ++ SODIUM_INC = $(shell $(PKG_CONFIG) --cflags libsodium)
88 ++ SODIUM_LIB = $(shell $(PKG_CONFIG) --libs libsodium)
89 + else
90 + SODIUM_INC=
91 + SODIUM_LIB=
92 + endif
93 +
94 +- HAS_ZEROMQ=$(shell pkg-config --exists libzmq; echo $$?)
95 ++ HAS_ZEROMQ=$(shell $(PKG_CONFIG) --exists libzmq; echo $$?)
96 + ifeq ($(HAS_ZEROMQ), 0)
97 +- ZEROMQ_INC = $(shell pkg-config --cflags libzmq)
98 ++ ZEROMQ_INC = $(shell $(PKG_CONFIG) --cflags libzmq)
99 + ZMQ_STATIC=/usr/local/lib/libzmq.a
100 + ifeq ($(wildcard $(ZMQ_STATIC)),)
101 +- ZEROMQ_LIB = $(shell pkg-config --libs libzmq)
102 ++ ZEROMQ_LIB = $(shell $(PKG_CONFIG) --libs libzmq)
103 + else
104 + ZEROMQ_LIB = $(ZMQ_STATIC)
105 + endif
106 +@@ -107,9 +107,9 @@
107 + ZEROMQ_LIB=$(ZEROMQ_HOME)/.libs/libzmq.a
108 + endif
109 +
110 +- HAS_ZSTD=$(shell pkg-config --exists libzstd; echo $$?)
111 ++ HAS_ZSTD=$(shell $(PKG_CONFIG) --exists libzstd; echo $$?)
112 + ifeq ($(HAS_ZSTD), 0)
113 +- ZSTD_LIB = $(shell pkg-config --libs libzstd)
114 ++ ZSTD_LIB = $(shell $(PKG_CONFIG) --libs libzstd)
115 + endif
116 + endif
117 +
118
119 diff --git a/net-analyzer/ntopng/ntopng-3.8.1.ebuild b/net-analyzer/ntopng/ntopng-3.8.1-r1.ebuild
120 similarity index 92%
121 rename from net-analyzer/ntopng/ntopng-3.8.1.ebuild
122 rename to net-analyzer/ntopng/ntopng-3.8.1-r1.ebuild
123 index 0e41d4cf7c9..fceffce2d77 100644
124 --- a/net-analyzer/ntopng/ntopng-3.8.1.ebuild
125 +++ b/net-analyzer/ntopng/ntopng-3.8.1-r1.ebuild
126 @@ -34,12 +34,17 @@ RDEPEND="
127 ${DEPEND}
128 dev-db/redis
129 "
130 +BDEPEND="
131 + virtual/pkgconfig
132 +"
133 PATCHES=(
134 + "${FILESDIR}"/${PN}-3.8-missing-min.patch
135 "${FILESDIR}"/${PN}-3.8-mysqltool.patch
136 "${FILESDIR}"/${PN}-3.8-ndpi-includes.patch
137 - "${FILESDIR}"/${PN}-3.8-missing-min.patch
138 + "${FILESDIR}"/${PN}-3.8.1-PKG_CONFIG.patch
139 "${FILESDIR}"/${PN}-3.8.1-parallel-make.patch
140 )
141 +RESTRICT="test"
142
143 pkg_setup() {
144 enewuser ntopng
145 @@ -57,6 +62,11 @@ src_prepare() {
146 eautoreconf
147 }
148
149 +src_configure() {
150 + tc-export PKG_CONFIG
151 + default
152 +}
153 +
154 src_install() {
155 SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
156 dodir ${SHARE_NTOPNG_DIR}