summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2008-11-08 18:44:50 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2008-11-08 18:44:50 (GMT)
commit687088511a3016c281156e776cca96401b2e9928 (patch)
tree8e4bb1915ddff8af8a1622057cfff416f80528fc /src
parentacf98417a7719db1fdac6e104875f907f0ebe90d (diff)
downloadmxe-687088511a3016c281156e776cca96401b2e9928.zip
mxe-687088511a3016c281156e776cca96401b2e9928.tar.gz
mxe-687088511a3016c281156e776cca96401b2e9928.tar.bz2
translated package: libdnet
Diffstat (limited to 'src')
-rw-r--r--src/libdnet.mk31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/libdnet.mk b/src/libdnet.mk
new file mode 100644
index 0000000..6e3314d
--- /dev/null
+++ b/src/libdnet.mk
@@ -0,0 +1,31 @@
+# libdnet
+# http://libdnet.sourceforge.net/
+
+PKG := libdnet
+$(PKG)_VERSION := 1.11
+$(PKG)_SUBDIR := libdnet-$($(PKG)_VERSION)
+$(PKG)_FILE := libdnet-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libdnet/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc winpcap
+
+define $(PKG)_UPDATE
+ wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=36243&package_id=28560' | \
+ grep 'libdnet-' | \
+ $(SED) -n 's,.*libdnet-\([0-9][^>]*\)\.tar.*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ $(SED) 's,CYGWIN=no,CYGWIN=yes,g' -i '$(1)/configure'
+ $(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,-lpacket,-lpacket -lws2_32,g' -i '$(1)/configure'
+ $(SED) 's,/usr/include,$(PREFIX)/$(TARGET)/include,g' -i '$(1)/configure'
+ cd '$(1)' && ./configure \
+ --host='$(TARGET)' \
+ --disable-shared \
+ --prefix='$(PREFIX)/$(TARGET)'
+ $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+endef