summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Slater <jslater@windriver.com>2014-12-10 14:37:08 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-12-19 20:10:55 +0100
commit2a1cbf5ca9e5aa9d49bc8779a625f93d70b59487 (patch)
tree4d029b5791e0bb03feb6ac3192d456314d6970ba
parentedcf03b5fb576dbeae3784471aec8c2b7a9a04a8 (diff)
downloadmeta-openembedded-2a1cbf5ca9e5aa9d49bc8779a625f93d70b59487.tar.gz
tcpreplay: improve search for libpcap
Add a test to find libpcap if testdir/.. is a sysroot. Upstream-Status: Pending Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch33
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb1
2 files changed, 34 insertions, 0 deletions
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 0000000000..50f024c67b
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
@@ -0,0 +1,33 @@
1tcpreplay: improve search for libpcap
2
3Add a test which will find libpcap if $testdir/.. is a sysroot.
4
5Upstream-Status: Pending
6
7Signed-off-by: Joe Slater <joe.slater@windriver.com>
8
9
10--- a/configure.ac
11+++ b/configure.ac
12@@ -350,14 +350,20 @@ for testdir in $trypcapdir /usr/local /o
13 if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
14 LPCAPINC="${testdir}/include/pcap.h"
15 LPCAPINCDIR="${testdir}/include"
16+ # If testdir/.. is a sysroot, then sDir should point to where the libraries are.
17+ sDir=$(readlink -m ${testdir}/../${libdir})
18 if test $dynamic_link = yes; then
19- if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
20+ if test -f "${sDir}/libpcap${shrext_cmds}" ; then
21+ LPCAPLIB="-L${sDir} -lpcap"
22+ elif test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
23 LPCAPLIB="-L${testdir}/lib64 -lpcap"
24 elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
25 LPCAPLIB="-L${testdir}/lib -lpcap"
26 else
27 AC_ERROR([Unable to find libpcap in ${testdir}])
28 fi
29+ elif test -f "${sDir}/libpcap.${libext}" ; then
30+ LPCAPLIB="${sDir}/libpcap.${libext}"
31 elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
32 LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
33 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 4bce270e4b..9ecb695fde 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
10 file://tcpreplay-3.4.4-cross-compile.patch \ 10 file://tcpreplay-3.4.4-cross-compile.patch \
11 file://tcpreplay-3.4.4-no-bfp-support.patch \ 11 file://tcpreplay-3.4.4-no-bfp-support.patch \
12 file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \ 12 file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \
13 file://tcpreplay-3.4.4-improve-search-for-libpcap.patch \
13 " 14 "
14SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180" 15SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180"
15SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f" 16SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f"