diff options
Diffstat (limited to '3rdParty/Ldns')
-rw-r--r-- | 3rdParty/Ldns/01_andoird_compilation_fixes.diff | 15 | ||||
-rw-r--r-- | 3rdParty/Ldns/SConscript | 70 | ||||
-rwxr-xr-x | 3rdParty/Ldns/prepare_ldns.sh | 5 |
3 files changed, 90 insertions, 0 deletions
diff --git a/3rdParty/Ldns/01_andoird_compilation_fixes.diff b/3rdParty/Ldns/01_andoird_compilation_fixes.diff new file mode 100644 index 0000000..9d6ec08 --- /dev/null +++ b/3rdParty/Ldns/01_andoird_compilation_fixes.diff @@ -0,0 +1,15 @@ +--- 3rdParty/Ldns/src/ldns/ldns/ldns.h 2013-04-12 14:30:16.000000000 +0200 ++++ 3rdParty/Ldns/src/ldns/ldns/ldns.h 2013-04-12 14:30:48.000000000 +0200 +@@ -123,6 +123,12 @@ + #include <ldns/sha1.h> + #include <ldns/sha2.h> + ++#ifdef __ANDROID__ ++#ifndef in_port_t ++#define in_port_t uint16_t ++#endif ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif diff --git a/3rdParty/Ldns/SConscript b/3rdParty/Ldns/SConscript new file mode 100644 index 0000000..a43bde7 --- /dev/null +++ b/3rdParty/Ldns/SConscript @@ -0,0 +1,70 @@ +Import("env") + +if env.get("LDNS_BUNDLED", False) : + + if env["PLATFORM"] == "win32" : + cppflags = ["/I" + Dir("#/3rdParty/Ldns/src/ldns").abspath] + else : + cppflags = [("-isystem", Dir("#/3rdParty/Ldns/src/ldns").abspath)] + + +################################################################################ +# Flags +################################################################################ + + if env["SCONS_STAGE"] == "flags" : + env["LDNS_FLAGS"] = { + "CPPPATH": [Dir("src/ldns")], + "CPPFLAGS": cppflags, + "LIBPATH": [env.Dir(".")], + "LIBS": ["Swiften_Ldns"], + } + if env["target"] == "android" : + env["LDNS_FLAGS"]["CPPPATH"].append(Dir("src/android")) + +################################################################################ +# Build +################################################################################ + + if env["SCONS_STAGE"] == "build" : + myenv = env.Clone() + myenv.Append(CPPDEFINES = [("LDNS_STATICLIB")]) + myenv.Append(CPPPATH = ["src/ldns", "."]) + if env["target"] == "android" : + myenv.Append(CPPPATH = ["src/android"]) + myenv.UseFlags(env["OPENSSL_FLAGS"]) + + env["LDNS_OBJECTS"] = myenv.SwiftenObject([ + "src/ldns/compat/b32_ntop.c", + "src/ldns/compat/b32_pton.c", + "src/ldns/compat/b64_ntop.c", + "src/ldns/compat/b64_pton.c", + "src/ldns/buffer.c", + "src/ldns/dname.c", + "src/ldns/dnssec_sign.c", + "src/ldns/dnssec_verify.c", + "src/ldns/dnssec_zone.c", + "src/ldns/dnssec.c", + "src/ldns/error.c", + "src/ldns/higher.c", + "src/ldns/host2str.c", + "src/ldns/host2wire.c", + "src/ldns/keys.c", + "src/ldns/linktest.c", + "src/ldns/net.c", + "src/ldns/packet.c", + "src/ldns/parse.c", + "src/ldns/rbtree.c", + "src/ldns/rdata.c", + "src/ldns/resolver.c", + "src/ldns/rr_functions.c", + "src/ldns/rr.c", + "src/ldns/sha1.c", + "src/ldns/sha2.c", + "src/ldns/str2host.c", + "src/ldns/tsig.c", + "src/ldns/update.c", + "src/ldns/util.c", + "src/ldns/wire2host.c", + "src/ldns/zone.c", + ]) diff --git a/3rdParty/Ldns/prepare_ldns.sh b/3rdParty/Ldns/prepare_ldns.sh new file mode 100755 index 0000000..e057301 --- /dev/null +++ b/3rdParty/Ldns/prepare_ldns.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +curl -o src/ldns-1.6.16.tar.gz http://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.16.tar.gz +cd src +tar -xf ldns-1.6.16.tar.gz +mv ldns-1.6.16 ldns
\ No newline at end of file |