Hi Peter,

On Fri, 27 Oct 2023 at 22:40, Peter Kjellerstedt
<[email protected]> wrote:
>
> > -----Original Message-----
> > From: [email protected] 
> > <[email protected]> On Behalf Of Clément Péron
> > Sent: den 27 oktober 2023 21:49
> > To: [email protected]
> > Cc: Clément Péron <[email protected]>
> > Subject: [oe] [PATCH v2] connectivity: add pcapplusplus recipe
>
> A more standard subject would be something like:
>
> pcapplusplus: Add recipe
>
> >
> > Add PcapPlusPlus 23.09 recipe.
> >
> > Signed-off-by: Clément Péron <[email protected]>
> > ---
> >  .../pcapplusplus/pcapplusplus_23.09.bb        | 21 +++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >  create mode 100644 
> > meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb
> >
> > diff --git a/meta-oe/recipes-
> > connectivity/pcapplusplus/pcapplusplus_23.09.bb 
> > b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb
> > new file mode 100644
> > index 000000000..39c6942c8
> > --- /dev/null
> > +++ b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb
> > @@ -0,0 +1,21 @@
> > +SUMMARY = "A multiplatform C++ library for capturing, parsing and crafting 
> > of network packets"
> > +HOMEPAGE = "https://pcapplusplus.github.io/";
> > +BUGTRACKER = "https://github.com/seladb/PcapPlusPlus/issues";
> > +SECTION = "libs/network"
> > +LICENSE = "Unlicense"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f"
> > +
> > +DEPENDS = "libpcap"
> > +
> > +SRC_URI = 
> > "git://github.com/seladb/PcapPlusPlus.git;protocol=https;branch=master"
> > +SRCREV = "4cf8ed44f9dd145f874dc1dd747dfefcfcab75be"
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +inherit cmake
> > +
> > +PACKAGECONFIG ??= ""
> > +PACKAGECONFIG[examples] = 
> > "-DPCAPPP_BUILD_EXAMPLES=ON,-DPCAPPP_BUILD_EXAMPLES=OFF"
> > +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF"
>
> Did you really mean to not enable the "shared" PACAKEGCONFIG,
> and thus only build static libraries? That seems very odd.

Thanks for your feedback, indeed in my application I only use a small
part of Pcap++ and don't want to have all the Pcap++ shared library.

Also the shared library is not the default behavior on PcapPP repo as
they are some issues with Windows DLL.

>
> > +PACKAGECONFIG[tests] = "-DPCAPPP_BUILD_TESTS=ON,-DPCAPPP_BUILD_TESTS=OFF"
> > +PACKAGECONFIG[zstd] = "-DLIGHT_PCAPNG_ZSTD=ON,-DLIGHT_PCAPNG_ZSTD=OFF,zstd"
>
> Since it is unlikely that anyone wants to enable the examples and
> only build statically, I would suggest replacing the first two
> PACKAGECONFIGs above with:

Examples may be bad naming. It's more like "Tools" which binaries like
Arping, DnsSpoofing, HttpAnalyzer, etc...

Then inside these Examples there are trivial ones that are called "Tutorials"
which the configuration is not configurable here.

>
> EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DPCAPPP_BUILD_EXAMPLES=OFF"
>
> And unless you plan on adding ptest support, you may as well remove the
> tests PACKAGECONFIG too, and make that:
>
> EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DPCAPPP_BUILD_EXAMPLES=OFF 
> -DPCAPPP_BUILD_TESTS=OFF"
>
> And if either of those three matches the upstream defaults,
> you can of course remove it altogether.

So you prefer to have everything defined with EXTRA_OECMAKE.

Why not let the user have this configurable through packageconfig if
it's possible and doesn't cost?

Thanks
Clement

>
> > --
> > 2.39.3 (Apple Git-145)
>
> //Peter
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#105785): 
https://lists.openembedded.org/g/openembedded-devel/message/105785
Mute This Topic: https://lists.openembedded.org/mt/102228837/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to