All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/1] tcpreplay: improve search for libpcap
@ 2014-12-10 22:37 Joe Slater
  2014-12-12 16:33 ` Randy MacLeod
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Slater @ 2014-12-10 22:37 UTC (permalink / raw)
  To: openembedded-devel

Add a test to find libpcap if testdir/.. is a sysroot.

Upstream-Status: Pending

Signed-off-by: Joe Slater <jslater@windriver.com>
---
 ...cpreplay-3.4.4-improve-search-for-libpcap.patch |   33 ++++++++++++++++++++
 .../recipes-support/tcpreplay/tcpreplay_3.4.4.bb   |    1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch

diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
new file mode 100644
index 0000000..50f024c
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
@@ -0,0 +1,33 @@
+tcpreplay: improve search for libpcap
+
+Add a test which will find libpcap if $testdir/.. is a sysroot.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -350,14 +350,20 @@ for testdir in $trypcapdir /usr/local /o
+     if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
+         LPCAPINC="${testdir}/include/pcap.h"
+         LPCAPINCDIR="${testdir}/include"
++        # If testdir/.. is a sysroot, then sDir should point to where the libraries are.
++        sDir=$(readlink -m ${testdir}/../${libdir})
+         if test $dynamic_link = yes; then
+-            if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
++            if test -f "${sDir}/libpcap${shrext_cmds}" ; then
++                LPCAPLIB="-L${sDir} -lpcap"
++            elif test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
+                 LPCAPLIB="-L${testdir}/lib64 -lpcap"
+             elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
+                 LPCAPLIB="-L${testdir}/lib -lpcap"
+             else
+                 AC_ERROR([Unable to find libpcap in ${testdir}])
+             fi
++        elif test -f "${sDir}/libpcap.${libext}" ; then
++            LPCAPLIB="${sDir}/libpcap.${libext}"
+         elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
+             LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
+         elif test -f "${testdir}/lib/libpcap.${libext}" ; then
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
index 4bce270..9ecb695 100644
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
@@ -10,6 +10,7 @@ SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.ta
            file://tcpreplay-3.4.4-cross-compile.patch \
            file://tcpreplay-3.4.4-no-bfp-support.patch \
            file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \
+           file://tcpreplay-3.4.4-improve-search-for-libpcap.patch \
            "
 SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180"
 SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-networking][PATCH 1/1] tcpreplay: improve search for libpcap
  2014-12-10 22:37 [meta-networking][PATCH 1/1] tcpreplay: improve search for libpcap Joe Slater
@ 2014-12-12 16:33 ` Randy MacLeod
  0 siblings, 0 replies; 2+ messages in thread
From: Randy MacLeod @ 2014-12-12 16:33 UTC (permalink / raw)
  To: Joe Slater, openembedded-devel, Hatle, Mark


build for cav-octeon3

merged:
To ssh://git.wrs.com/git/layers/meta-networking
    7f702c5..75228f4  wr-7.0-20141118 -> wr-7.0-20141118

I'm away for a while so please mind the build Mark.

../Randy


On 2014-12-10 05:37 PM, Joe Slater wrote:
> Add a test to find libpcap if testdir/.. is a sysroot.
>
> Upstream-Status: Pending
>
> Signed-off-by: Joe Slater <jslater@windriver.com>
> ---
>   ...cpreplay-3.4.4-improve-search-for-libpcap.patch |   33 ++++++++++++++++++++
>   .../recipes-support/tcpreplay/tcpreplay_3.4.4.bb   |    1 +
>   2 files changed, 34 insertions(+)
>   create mode 100644 meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
>
> diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
> new file mode 100644
> index 0000000..50f024c
> --- /dev/null
> +++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
> @@ -0,0 +1,33 @@
> +tcpreplay: improve search for libpcap
> +
> +Add a test which will find libpcap if $testdir/.. is a sysroot.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Joe Slater <joe.slater@windriver.com>
> +
> +
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -350,14 +350,20 @@ for testdir in $trypcapdir /usr/local /o
> +     if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
> +         LPCAPINC="${testdir}/include/pcap.h"
> +         LPCAPINCDIR="${testdir}/include"
> ++        # If testdir/.. is a sysroot, then sDir should point to where the libraries are.
> ++        sDir=$(readlink -m ${testdir}/../${libdir})
> +         if test $dynamic_link = yes; then
> +-            if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
> ++            if test -f "${sDir}/libpcap${shrext_cmds}" ; then
> ++                LPCAPLIB="-L${sDir} -lpcap"
> ++            elif test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
> +                 LPCAPLIB="-L${testdir}/lib64 -lpcap"
> +             elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
> +                 LPCAPLIB="-L${testdir}/lib -lpcap"
> +             else
> +                 AC_ERROR([Unable to find libpcap in ${testdir}])
> +             fi
> ++        elif test -f "${sDir}/libpcap.${libext}" ; then
> ++            LPCAPLIB="${sDir}/libpcap.${libext}"
> +         elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
> +             LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
> +         elif test -f "${testdir}/lib/libpcap.${libext}" ; then
> diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
> index 4bce270..9ecb695 100644
> --- a/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
> +++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
> @@ -10,6 +10,7 @@ SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.ta
>              file://tcpreplay-3.4.4-cross-compile.patch \
>              file://tcpreplay-3.4.4-no-bfp-support.patch \
>              file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \
> +           file://tcpreplay-3.4.4-improve-search-for-libpcap.patch \
>              "
>   SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180"
>   SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f"
>


-- 
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-12 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 22:37 [meta-networking][PATCH 1/1] tcpreplay: improve search for libpcap Joe Slater
2014-12-12 16:33 ` Randy MacLeod

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.