[packages/tcpreplay] - fix building on x32 - rel 2

baggins baggins at pld-linux.org
Sat Mar 30 20:35:09 CET 2019


commit a1f285b9ca6a88acfcd6160f517ed50992a98a8b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Mar 30 20:34:43 2019 +0100

    - fix building on x32
    - rel 2

 tcpreplay.spec |  4 +++-
 x32.patch      | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/tcpreplay.spec b/tcpreplay.spec
index f5b9d89..3f45291 100644
--- a/tcpreplay.spec
+++ b/tcpreplay.spec
@@ -1,11 +1,12 @@
 Summary:	Replay captured network traffic
 Name:		tcpreplay
 Version:	4.3.2
-Release:	1
+Release:	2
 License:	GPL v3
 Group:		Applications/Networking
 Source0:	https://github.com/appneta/tcpreplay/releases/download/v%{version}/%{name}-%{version}.tar.xz
 # Source0-md5:	084d6162a01a0be2cd61624f010002a0
+Patch0:		x32.patch
 URL:		http://tcpreplay.appneta.com/
 BuildRequires:	libdnet-devel
 BuildRequires:	libpcap-devel >= 0.8.0
@@ -21,6 +22,7 @@ which provides basic information about capture files.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..43641b8
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,38 @@
+--- tcpreplay-4.3.2/configure.ac~	2019-03-12 20:46:23.000000000 +0100
++++ tcpreplay-4.3.2/configure.ac	2019-03-30 20:33:13.916245547 +0100
+@@ -627,7 +627,7 @@
+         LPCAPINCDIR=${testdir}
+         if test $dynamic_link = yes; then
+             for ext in .dylib .so .tbd ; do
+-                for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
++                for dir in . lib lib64 libx32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
+                     sharefile=$(ls ${testdir}/$dir/libpcap${ext}* 2> /dev/null | sort | head -n1)
+                     if test -n "${sharefile}"; then
+                         LPCAPLIB="-L$(dirname ${sharefile}) -lpcap"
+@@ -645,7 +645,7 @@
+             dnl If dynamic library not found, try static
+             dnl
+             for ext in ${libext} .a .A.tbd ; do
+-                for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
++                for dir in . lib lib64 libx32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
+                     staticfile=$(ls ${testdir}/$dir/libpcap${ext} 2> /dev/null | sort | head -n1)
+                     if test -n "${staticfile}"; then
+                         LPCAPLIB="${staticfile}"
+@@ -756,7 +756,7 @@
+                 LPCAPINCDIR="${testdir}/include"
+                 if test $dynamic_link = yes; then
+                     for ext in .dylib .so .tbd; do
+-                        for dir in . lib lib64 ${host_cpu} lib/${host_cpu} ${host_cpu}-${host_os} lib/${host_cpu}-${host_os} ${MULTIARCH} lib/${MULTIARCH}; do
++                        for dir in . lib lib64 libx32 ${host_cpu} lib/${host_cpu} ${host_cpu}-${host_os} lib/${host_cpu}-${host_os} ${MULTIARCH} lib/${MULTIARCH}; do
+                             sharefile=$(ls "${testdir}/$dir/libpcap${ext}" 2> /dev/null | sort | head -n1)
+                             if test -n "${sharefile}"; then
+                                 LPCAPLIB="-L$(dirname ${sharefile}) -lpcap"
+@@ -775,7 +775,7 @@
+                     dnl If dynamic library not found, try static
+                     dnl
+                     for ext in ${libext} .a .A.tbd ; do
+-                        for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
++                        for dir in . lib lib64 libx32 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
+                             staticfile=$(ls "${testdir}/$dir/libpcap${ext}" 2> /dev/null | sort | head -n1)
+                             if test -n "${staticfile}"; then
+                                 LPCAPLIB="${staticfile}"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tcpreplay.git/commitdiff/a1f285b9ca6a88acfcd6160f517ed50992a98a8b



More information about the pld-cvs-commit mailing list