Download raw body.
net/tcpflow: fix build
On Sun, Jun 09, 2024 at 11:21:58PM +0100, Kirill A. Korinsky wrote:
> Hi,
>
> Thanks for reply.
>
> On Sun, 09 Jun 2024 18:04:32 +0100,
> Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
> >
> > On Sun, Jun 09, 2024 at 11:03:54AM +0100, Kirill A. Korinsky wrote:
> > > 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.
> >
> > tcpflow isn't linked against libexiv2 and its header files aren't
> > included because HAVE_EXIV2 isn't defined. portcheck warns about it.
> > So exiv2 doesn't bring any feature and it doesn't make sense to add
> > it as a dep.
>
> Frankly speaking the last 30 minutes I spent to dig why here missed
> HAVE_EXIV2, and my investigation lead to quite large commit without any
> exaplanation: [1] the commit where check for header was introduced and [2]
> the commit where such HAVE_EXIV2 was introduced.
>
> I doubt that it was tested by anyone, and this code seems to be out of use.
>
> Thus, in future version of dfxml such dependency was removed, so, no need to
> keep note about it.
>
> > Regarding cairo support I don't know if it is useful. What bothers me
> > is that configure.ac adds a bunch of other libraries because upstream
> > uses a static link there on mingw. Self-inflicted pain, and extra
> > libs look extra. LIB_DEPENDS=archivers/bzip2 just look bogus, cairo
> > doesn't depend on it in our tree.
> >
> > To me this all looks fragile and I wouldn't link a privileged tool to
> > such libraries. You don't *have* to ship such a FLAVOR.
>
> Thanks. I absolutley agree that cairo and other stuff looks fragile and
> wired, special for that software.
>
> > So that leaves the addition of textproc/tre (I didn't look)
>
> I jsut spent antoher hour into this code to figuring out how to use it to
> test. I do not understand. All cases inside different scanners which should
> configure it, simple hasn't got a way to do it.
>
> Nor any documentation about it.
>
> Seems that it also useless here.
I see this in configure.ac:
|## regex support
|## there are several options
|## tre is better than regex
I'm not sure what to think about it, but it has to be handled one way
or the other: currently it's going to be picked up and will cause
random errors in bulk builds. See proposal below.
> > and theneed to add --without-o3 because the build currently uses -O3
> > instead of respecting CFLAGS.
>
> Very good point.
>
> Also, I abit tired from created report.xml by tcpflow when using it with -c
> and suggested a patch to upstream to avoid that [3] which I've included into
> updated diff.
Looking at the tool (I don't use it myself) I suspect you could use
tcpflow -X /dev/null -c. Is this really something where you want to
deviate from upstream? If so, I can add that patch too (I have
committed the rest).
Updated diff with REVISION fixed.
? patches/patch-src_tcpflow_cpp
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/tcpflow/Makefile,v
diff -u -p -r1.29 Makefile
--- Makefile 8 Jun 2024 21:53:45 -0000 1.29
+++ Makefile 10 Jun 2024 11:53:25 -0000
@@ -3,6 +3,7 @@ COMMENT= tool for capturing data from T
V= 1.6.1
DISTNAME= tcpflow-${V}
CATEGORIES= net
+REVISION= 0
SITES= https://github.com/simsong/tcpflow/releases/download/tcpflow-${V}/
@@ -20,13 +21,14 @@ 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.
-CONFIGURE_ARGS= --enable-cairo=false
+CONFIGURE_STYLE= autoreconf
+CONFIGURE_ARGS= --enable-cairo=false \
+ --without-o3
+# Forcefully disable detection of unwanted optional deps
+CONFIGURE_ENV= ac_cv_header_tre_tre_h=no \
+ ac_cv_lib_tre_tre_regcomp=no
AUTOCONF_VERSION= 2.71
AUTOMAKE_VERSION= 1.16
-
-CONFIGURE_STYLE= autoreconf
.include <bsd.port.mk>
--
jca
net/tcpflow: fix build