bugfixes for libdnet/winpcap

This commit is contained in:
Volker Grabsch 2009-11-10 13:22:42 +01:00
parent 2b583864f8
commit c62a4db55c
3 changed files with 12 additions and 12 deletions

View File

@ -41,9 +41,11 @@ define $(PKG)_BUILD
$(SED) 's,cat /proc/sys/kernel/ostype,,g' -i '$(1)/configure'
$(SED) 's,test -d /usr/include/mingw,true,' -i '$(1)/configure'
$(SED) 's,Iphlpapi,iphlpapi,g' -i '$(1)/configure'
$(SED) 's,packet.lib,libpacket.a,' -i '$(1)/configure'
$(SED) 's,packet32\.h,Packet32.h,g' -i '$(1)/configure'
$(SED) 's,packet\.lib,libpacket.a,' -i '$(1)/configure'
$(SED) 's,-lpacket,-lpacket -lws2_32,g' -i '$(1)/configure'
$(SED) 's,/usr/include,$(PREFIX)/$(TARGET)/include,g' -i '$(1)/configure'
$(SED) 's,#include <Ntddndis.h>,#include <ddk/ntddndis.h>,' -i '$(1)/src/eth-win32.c'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \

View File

@ -43,9 +43,6 @@ define $(PKG)_BUILD
$(SED) 's,\(SUBLANG_ROMANIAN_ROMANIA\t\)0x01,\10x00,' -i '$(1)/include/winnt.h'
# fix incompatibilities with jpeg
$(SED) 's,typedef unsigned char boolean;,,' -i '$(1)/include/rpcndr.h'
# fix missing definitions for WinPcap and libdnet
$(SED) '1i\#include <wtypes.h>' -i '$(1)/include/iphlpapi.h'
$(SED) '1i\#include <wtypes.h>' -i '$(1)/include/wincrypt.h'
$(INSTALL) -d '$(PREFIX)/$(TARGET)'
cp -rpv '$(1)/include' '$(1)/lib' '$(PREFIX)/$(TARGET)'
endef

View File

@ -37,22 +37,23 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
mv '$(1)/Common' '$(1)/common'
mv '$(1)/packetNtx/Dll/strsafe.h' '$(1)/packetNtx/Dll/StrSafe.h'
-cp '$(1)/common/Packet32.h' '$(1)/common/packet32.h'
$(SED) '/#include/ s,\\,/,g' -i '$(1)/packetNtx/Dll/Packet32.c'
$(SED) 's,#include <Iphlpapi\.h>,,' -i '$(1)/packetNtx/Dll/Packet32.c'
$(SED) 's,#include <IPIfCons\.h>,,' -i '$(1)/packetNtx/Dll/Packet32.c'
cd '$(1)' && $(TARGET)-gcc -Icommon -IpacketNtx/Dll -O -c '$(1)/packetNtx/Dll/Packet32.c'
$(SED) '/#include/ s,\\,/,g' -i '$(1)/packetNtx/Dll/Packet32.c'
$(SED) 's,#include <packet32\.h>,#include <Packet32.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
$(SED) 's,#include <StrSafe\.h>,#include <strsafe.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
$(SED) 's,#include <Iphlpapi\.h>,#include <iphlpapi.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
$(SED) 's,#include <IPIfCons\.h>,#include <ipifcons.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
cd '$(1)' && $(TARGET)-gcc -ICommon -IpacketNtx/Dll -O -c '$(1)/packetNtx/Dll/Packet32.c'
$(TARGET)-ar rc '$(1)/libpacket.a' '$(1)/Packet32.o'
$(TARGET)-ranlib '$(1)/libpacket.a'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/common'/*.h '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -m644 '$(1)/Common'/*.h '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m644 '$(1)/libpacket.a' '$(PREFIX)/$(TARGET)/lib/'
mv '$(1)/wpcap/libpcap/Win32/Include/ip6_misc.h' '$(1)/wpcap/libpcap/Win32/Include/IP6_misc.h'
$(SED) 's,#include <packet32\.h>,#include <Packet32.h>,' -i '$(1)/wpcap/Win32-Extensions/Win32-Extensions.c'
$(SED) 's,(char\*)tUstr +=,tUstr +=,' -i '$(1)/wpcap/libpcap/inet.c'
$(SED) 's,-DHAVE_AIRPCAP_API,,' -i '$(1)/wpcap/PRJ/GNUmakefile'
$(SED) 's,/common,/Common,' -i '$(1)/wpcap/PRJ/GNUmakefile'
echo -e 'libwpcap.a: $${OBJS}' >> '$(1)/wpcap/PRJ/GNUmakefile'
echo -e '\t$${AR} rc $$@ $${OBJS}' >> '$(1)/wpcap/PRJ/GNUmakefile'
echo -e '\t$${RANLIB} $$@' >> '$(1)/wpcap/PRJ/GNUmakefile'