diff options
Diffstat (limited to '3rdParty/Unbound')
-rw-r--r-- | 3rdParty/Unbound/01_android_fixes.diff | 13 | ||||
-rw-r--r-- | 3rdParty/Unbound/SConscript | 108 | ||||
-rwxr-xr-x | 3rdParty/Unbound/prepare_unbound.sh | 5 |
3 files changed, 126 insertions, 0 deletions
diff --git a/3rdParty/Unbound/01_android_fixes.diff b/3rdParty/Unbound/01_android_fixes.diff new file mode 100644 index 0000000..c8144ad --- /dev/null +++ b/3rdParty/Unbound/01_android_fixes.diff @@ -0,0 +1,13 @@ +--- a/3rdParty/Unbound/src/unbound/libunbound/libunbound.c ++++ b/3rdParty/Unbound/src/unbound/libunbound/libunbound.c +@@ -812,6 +812,10 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname) + char* parse, *addr; + int r; + ++#ifdef __ANDROID__ ++ ub_ctx_set_fwd(ctx, "8.8.8.8"); ++ ub_ctx_set_fwd(ctx, "8.8.4.4"); ++#endif + if(fname == NULL) { + #if !defined(UB_ON_WINDOWS) || !defined(HAVE_WINDOWS_H) + fname = "/etc/resolv.conf";
\ No newline at end of file diff --git a/3rdParty/Unbound/SConscript b/3rdParty/Unbound/SConscript new file mode 100644 index 0000000..99cd6a3 --- /dev/null +++ b/3rdParty/Unbound/SConscript @@ -0,0 +1,108 @@ +Import("env") + +if env.get("UNBOUND_BUNDLED", False) : + + if env["PLATFORM"] == "win32" : + cppflags = ["/I" + Dir("#/3rdParty/Unbound/src/unbound").abspath] + else : + cppflags = [("-isystem", Dir("#/3rdParty/Unbound/src/unbound").abspath)] + + +################################################################################ +# Flags +################################################################################ + + if env["SCONS_STAGE"] == "flags" : + env["UNBOUND_FLAGS"] = { + "CPPPATH": [Dir("src/unbound/libunbound")], + "CPPFLAGS": cppflags, + "LIBPATH": [env.Dir(".")], + "LIBS": ["Swiften_Unbound"], + } + if env["target"] == "android" : + env["UNBOUND_FLAGS"]["CPPPATH"].append(Dir("src/android/compat")) + +################################################################################ +# Build +################################################################################ + + if env["SCONS_STAGE"] == "build" : + myenv = env.Clone() + myenv.Append(CPPDEFINES = [("UNBOUND_STATICLIB")]) + myenv.Append(CPPPATH = ["../Ldns/src/ldns", "src/unbound", "."]) + if env["target"] == "android" : + myenv.Append(CPPPATH = ["src/android/compat", "src/android/config"]) + myenv.Append(CPPPATH = ["../Ldns/src/android"]) + myenv.UseFlags(env["OPENSSL_FLAGS"]) + + unbound_objects = [ + "src/unbound/daemon/acl_list.c", + "src/unbound/daemon/cachedump.c", + "src/unbound/daemon/daemon.c", + "src/unbound/daemon/remote.c", + "src/unbound/daemon/stats.c", + "src/unbound/daemon/unbound.c", + # duplicate symbols: "src/src/daemon/worker.c", + "src/unbound/iterator/iter_delegpt.c", + "src/unbound/iterator/iter_donotq.c", + "src/unbound/iterator/iter_fwd.c", + "src/unbound/iterator/iter_hints.c", + "src/unbound/iterator/iter_priv.c", + "src/unbound/iterator/iter_resptype.c", + "src/unbound/iterator/iter_scrub.c", + "src/unbound/iterator/iter_utils.c", + "src/unbound/iterator/iterator.c", + "src/unbound/libunbound/context.c", + "src/unbound/libunbound/libunbound.c", + "src/unbound/libunbound/libworker.c", + "src/unbound/services/cache/dns.c", + "src/unbound/services/cache/infra.c", + "src/unbound/services/cache/rrset.c", + "src/unbound/services/listen_dnsport.c", + "src/unbound/services/localzone.c", + "src/unbound/services/mesh.c", + "src/unbound/services/modstack.c", + "src/unbound/services/outbound_list.c", + "src/unbound/services/outside_network.c", + "src/unbound/util/alloc.c", + "src/unbound/util/config_file.c", + "src/unbound/util/configlexer.c", + "src/unbound/util/configparser.c", + "src/unbound/util/data/dname.c", + "src/unbound/util/data/msgencode.c", + "src/unbound/util/data/msgparse.c", + "src/unbound/util/data/msgreply.c", + "src/unbound/util/data/packed_rrset.c", + "src/unbound/util/fptr_wlist.c", + "src/unbound/util/locks.c", + "src/unbound/util/log.c", + "src/unbound/util/mini_event.c", + "src/unbound/util/module.c", + "src/unbound/util/net_help.c", + "src/unbound/util/netevent.c", + "src/unbound/util/random.c", + "src/unbound/util/rbtree.c", + "src/unbound/util/regional.c", + "src/unbound/util/rtt.c", + "src/unbound/util/storage/dnstree.c", + "src/unbound/util/storage/lookup3.c", + "src/unbound/util/storage/lruhash.c", + "src/unbound/util/storage/slabhash.c", + "src/unbound/util/timehist.c", + "src/unbound/util/tube.c", + #src/unbound/util/winsock_event.c + "src/unbound/validator/autotrust.c", + "src/unbound/validator/val_anchor.c", + "src/unbound/validator/val_kcache.c", + "src/unbound/validator/val_kentry.c", + "src/unbound/validator/val_neg.c", + "src/unbound/validator/val_nsec.c", + "src/unbound/validator/val_nsec3.c", + "src/unbound/validator/val_secalgo.c", + "src/unbound/validator/val_sigcrypt.c", + "src/unbound/validator/val_utils.c", + "src/unbound/validator/validator.c", + ] + if env["target"] == "android" : + unbound_objects.append("src/android/compat/glob.c") + env["UNBOUND_OBJECTS"] = myenv.SwiftenObject(unbound_objects) diff --git a/3rdParty/Unbound/prepare_unbound.sh b/3rdParty/Unbound/prepare_unbound.sh new file mode 100755 index 0000000..b506ae4 --- /dev/null +++ b/3rdParty/Unbound/prepare_unbound.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +curl -o src/unbound-1.4.20.tar.gz http://www.unbound.net/downloads/unbound-1.4.20.tar.gz +cd src +tar -xf unbound-1.4.20.tar.gz +mv unbound-1.4.20 unbound
\ No newline at end of file |