net-analyzer/ntopng: Use PKG_CONFIG, drop test phase
authorJeroen Roovers <jer@gentoo.org>
Sun, 29 Dec 2019 14:46:59 +0000 (15:46 +0100)
committerJeroen Roovers <jer@gentoo.org>
Sun, 29 Dec 2019 15:20:22 +0000 (16:20 +0100)
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch [new file with mode: 0644]
net-analyzer/ntopng/ntopng-3.8.1-r1.ebuild [moved from net-analyzer/ntopng/ntopng-3.8.1.ebuild with 92% similarity]

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
new file mode 100644 (file)
index 0000000..91811d6
--- /dev/null
@@ -0,0 +1,95 @@
+--- a/configure.seed
++++ b/configure.seed
+@@ -6,6 +6,8 @@
+ AC_PROG_CXX
++PKG_PROG_PKG_CONFIG
++
+ dnl> Add /usr/local/ /opt/local
+ CFLAGS="-I${PWD} -I${PWD}/include"
+ CPPFLAGS="${CPPFLAGS} -I${PWD} -I${PWD}/include"
+@@ -179,10 +179,10 @@
+ fi
+ dnl finish: nDPI handling
+-if test -z `pkg-config --exists libssl`; then
++if ${PKG_CONFIG} --exists libssl; then
+  AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl"
+- SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto"
++ SSL_INC="`${PKG_CONFIG} --cflags libssl` -I/usr/include/openssl"
++ SSL_LIB="`${PKG_CONFIG} --libs libssl` -lssl -lcrypto"
+ fi
+ AC_MSG_CHECKING(for ntopng professional edition)
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -44,10 +44,10 @@
+ ######
+ LIBRRDTOOL_HOME=${PWD}/third-party/rrdtool-1.4.8
+-HAS_LIBRRDTOOL=$(shell pkg-config --atleast-version=1.4.8 librrd; echo $$?)
++HAS_LIBRRDTOOL=$(shell $(PKG_CONFIG) --atleast-version=1.4.8 librrd; echo $$?)
+ ifeq ($(HAS_LIBRRDTOOL), 0)
+-      LIBRRDTOOL_INC = $(shell pkg-config --cflags librrd)
+-      LIBRRDTOOL_LIB = $(shell pkg-config --libs librrd) # -lrrd_th
++      LIBRRDTOOL_INC = $(shell $(PKG_CONFIG) --cflags librrd)
++      LIBRRDTOOL_LIB = $(shell $(PKG_CONFIG) --libs librrd) # -lrrd_th
+ else
+       LIBRRDTOOL_INC=-I$(LIBRRDTOOL_HOME)/src/
+       ifeq ($(OS), $(filter $(OS), OpenBSD FreeBSD))
+@@ -70,10 +70,10 @@
+ ######
+-HAS_JSON=$(shell pkg-config --exists json-c; echo $$?)
++HAS_JSON=$(shell $(PKG_CONFIG) --exists json-c; echo $$?)
+ ifeq ($(HAS_JSON), 0)
+-      JSON_INC = $(shell pkg-config --cflags json-c)
+-      JSON_LIB = $(shell pkg-config --libs json-c)
++      JSON_INC = $(shell $(PKG_CONFIG) --cflags json-c)
++      JSON_LIB = $(shell $(PKG_CONFIG) --libs json-c)
+ else
+       JSON_HOME=${PWD}/third-party/json-c
+       JSON_INC=-I$(JSON_HOME)
+@@ -83,21 +83,21 @@
+ ######
+ ifeq (@NEDGE@, 0)
+- HAS_SODIUM=$(shell pkg-config --exists libsodium; echo $$?)
++ HAS_SODIUM=$(shell $(PKG_CONFIG) --exists libsodium; echo $$?)
+  ifeq ($(HAS_SODIUM), 0)
+-      SODIUM_INC = $(shell pkg-config --cflags libsodium)
+-      SODIUM_LIB = $(shell pkg-config --libs libsodium)
++      SODIUM_INC = $(shell $(PKG_CONFIG) --cflags libsodium)
++      SODIUM_LIB = $(shell $(PKG_CONFIG) --libs libsodium)
+  else
+       SODIUM_INC=
+       SODIUM_LIB=
+  endif
+- HAS_ZEROMQ=$(shell pkg-config --exists libzmq; echo $$?)
++ HAS_ZEROMQ=$(shell $(PKG_CONFIG) --exists libzmq; echo $$?)
+  ifeq ($(HAS_ZEROMQ), 0)
+-      ZEROMQ_INC = $(shell pkg-config --cflags libzmq)
++      ZEROMQ_INC = $(shell $(PKG_CONFIG) --cflags libzmq)
+       ZMQ_STATIC=/usr/local/lib/libzmq.a
+       ifeq ($(wildcard $(ZMQ_STATIC)),)
+-              ZEROMQ_LIB = $(shell pkg-config --libs libzmq)
++              ZEROMQ_LIB = $(shell $(PKG_CONFIG) --libs libzmq)
+       else
+               ZEROMQ_LIB = $(ZMQ_STATIC)
+       endif
+@@ -107,9 +107,9 @@
+       ZEROMQ_LIB=$(ZEROMQ_HOME)/.libs/libzmq.a
+  endif
+- HAS_ZSTD=$(shell pkg-config --exists libzstd; echo $$?)
++ HAS_ZSTD=$(shell $(PKG_CONFIG) --exists libzstd; echo $$?)
+  ifeq ($(HAS_ZSTD), 0)
+-      ZSTD_LIB = $(shell pkg-config --libs libzstd)
++      ZSTD_LIB = $(shell $(PKG_CONFIG) --libs libzstd)
+  endif
+ endif
similarity index 92%
rename from net-analyzer/ntopng/ntopng-3.8.1.ebuild
rename to net-analyzer/ntopng/ntopng-3.8.1-r1.ebuild
index 0e41d4cf7c9f627abcc55ac96a8289ca15560e28..fceffce2d779c31d6db2a0f124de631fc0d005d4 100644 (file)
@@ -34,12 +34,17 @@ RDEPEND="
        ${DEPEND}
        dev-db/redis
 "
+BDEPEND="
+       virtual/pkgconfig
+"
 PATCHES=(
+       "${FILESDIR}"/${PN}-3.8-missing-min.patch
        "${FILESDIR}"/${PN}-3.8-mysqltool.patch
        "${FILESDIR}"/${PN}-3.8-ndpi-includes.patch
-       "${FILESDIR}"/${PN}-3.8-missing-min.patch
+       "${FILESDIR}"/${PN}-3.8.1-PKG_CONFIG.patch
        "${FILESDIR}"/${PN}-3.8.1-parallel-make.patch
 )
+RESTRICT="test"
 
 pkg_setup() {
        enewuser ntopng
@@ -57,6 +62,11 @@ src_prepare() {
        eautoreconf
 }
 
+src_configure() {
+       tc-export PKG_CONFIG
+       default
+}
+
 src_install() {
        SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
        dodir ${SHARE_NTOPNG_DIR}