Download raw body.
net/tcpflow: fix build
On Sat, 08 Jun 2024 23:35:32 +0100,
Kirill A. Korinsky <kirill@korins.ky> wrote:
>
> Probably it worth to add an -extra flavor with all features.
>
Here small update for net/tcpflow which includes:
- add textproc/tre to enjoy regexes;
- extended flavor to use cairo and exiv2.
I don't enable X11-related stuff by default to allow use it on machines
without installed x11 sets.
The diff:
diff --git net/tcpflow/Makefile net/tcpflow/Makefile
index 094dcec0696..2e539a179ad 100644
--- net/tcpflow/Makefile
+++ net/tcpflow/Makefile
@@ -3,6 +3,7 @@ COMMENT= tool for capturing data from TCP connections
V= 1.6.1
DISTNAME= tcpflow-${V}
CATEGORIES= net
+REVISION= 0
SITES= https://github.com/simsong/tcpflow/releases/download/tcpflow-${V}/
@@ -13,16 +14,26 @@ MAINTAINER= Kirill A. Korinsky <kirill@korins.ky>
# GPLv3
PERMIT_PACKAGE= Yes
-WANTLIB += ${COMPILER_LIBCXX} c crypto m pcap sqlite3 ssl z
+WANTLIB += ${COMPILER_LIBCXX} c crypto m tre pcap sqlite3 ssl z
COMPILER= base-clang ports-gcc
BUILD_DEPENDS= devel/boost
-LIB_DEPENDS= databases/sqlite3
-
-# a test for cairo has a side effect which brokes pcap test
-# when it can't find cairo, so, disable it.
+LIB_DEPENDS= databases/sqlite3 \
+ textproc/tre
+
+FLAVORS= extended
+FLAVOR?=
+
+# allow using tcpflow on machine without X11 set by default
+.if ${FLAVOR:Mextended}
+WANTLIB += bz2 cairo expat fontconfig freetype pixman-1
+LIB_DEPENDS+= archivers/bzip2 \
+ graphics/cairo \
+ graphics/exiv2
+.else
CONFIGURE_ARGS= --enable-cairo=false
+.endif
AUTOCONF_VERSION= 2.71
AUTOMAKE_VERSION= 1.16
diff --git net/tcpflow/patches/patch-configure_ac net/tcpflow/patches/patch-configure_ac
index a9e99810a6d..97353f53303 100644
--- net/tcpflow/patches/patch-configure_ac
+++ net/tcpflow/patches/patch-configure_ac
@@ -1,6 +1,15 @@
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
+@@ -77,7 +77,7 @@ esac
+ if test x"${mingw}" == "xno" ; then
+ # Bring additional directories where things might be found into our
+ # search path. I don't know why autoconf doesn't do this by default
+- for spfx in /usr/local /opt/local /sw /usr/local/ssl /usr/boost/include ; do
++ for spfx in /usr/local /opt/local /sw /usr/local/ssl /usr/boost/include /usr/X11R6 ; do
+ AC_MSG_NOTICE([checking ${spfx}/include])
+ if test -d ${spfx}/include; then
+ CPPFLAGS="-I${spfx}/include $CPPFLAGS"
@@ -490,36 +490,6 @@ AC_CHECK_TYPES([sa_family_t], [], [],
]]
)
--
wbr, Kirill
net/tcpflow: fix build