aboutsummaryrefslogtreecommitdiff
path: root/contrib/depends/packages
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/depends/packages')
-rw-r--r--contrib/depends/packages/bdb.mk31
-rw-r--r--contrib/depends/packages/boost.mk41
-rw-r--r--contrib/depends/packages/cmake/conf/mxe-conf.cmake.in67
-rw-r--r--contrib/depends/packages/cmake/conf/target-cmake.in29
-rw-r--r--contrib/depends/packages/cmake/test/CMakeLists.txt18
-rw-r--r--contrib/depends/packages/cppzmq.mk15
-rw-r--r--contrib/depends/packages/expat.mk22
-rw-r--r--contrib/depends/packages/graphviz.mk30
-rw-r--r--contrib/depends/packages/icu4c.mk32
-rw-r--r--contrib/depends/packages/ldns.mk28
-rw-r--r--contrib/depends/packages/libICE.mk23
-rw-r--r--contrib/depends/packages/libSM.mk23
-rw-r--r--contrib/depends/packages/libevent.mk30
-rw-r--r--contrib/depends/packages/libiconv.mk17
-rw-r--r--contrib/depends/packages/miniupnpc.mk28
-rw-r--r--contrib/depends/packages/native_biplist.mk20
-rw-r--r--contrib/depends/packages/native_ccache.mk25
-rw-r--r--contrib/depends/packages/native_cctools.mk65
-rw-r--r--contrib/depends/packages/native_cdrkit.mk26
-rw-r--r--contrib/depends/packages/native_ds_store.mk17
-rw-r--r--contrib/depends/packages/native_libdmg-hfsplus.mk22
-rw-r--r--contrib/depends/packages/native_mac_alias.mk21
-rw-r--r--contrib/depends/packages/openssl.mk78
-rw-r--r--contrib/depends/packages/packages.mk21
-rw-r--r--contrib/depends/packages/pcsc-lite.mk26
-rw-r--r--contrib/depends/packages/protobuf.mk29
-rw-r--r--contrib/depends/packages/qt.mk150
-rw-r--r--contrib/depends/packages/readline.mk33
-rw-r--r--contrib/depends/packages/sodium.mk23
-rw-r--r--contrib/depends/packages/unbound.mk28
-rw-r--r--contrib/depends/packages/unwind.mk22
-rw-r--r--contrib/depends/packages/xproto.mk21
-rw-r--r--contrib/depends/packages/zeromq.mk34
-rw-r--r--contrib/depends/packages/zlib.mk27
34 files changed, 1122 insertions, 0 deletions
diff --git a/contrib/depends/packages/bdb.mk b/contrib/depends/packages/bdb.mk
new file mode 100644
index 000000000..6c9876c2c
--- /dev/null
+++ b/contrib/depends/packages/bdb.mk
@@ -0,0 +1,31 @@
+package=bdb
+$(package)_version=4.8.30
+$(package)_download_path=http://download.oracle.com/berkeley-db
+$(package)_file_name=db-$($(package)_version).NC.tar.gz
+$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
+$(package)_build_subdir=build_unix
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
+$(package)_config_opts_mingw32=--enable-mingw
+$(package)_config_opts_linux=--with-pic
+$(package)_cxxflags=-std=c++11
+endef
+
+define $(package)_preprocess_cmds
+ sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \
+ sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist
+endef
+
+define $(package)_config_cmds
+ ../dist/$($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) libdb_cxx-4.8.a libdb-4.8.a
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
+endef
diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
new file mode 100644
index 000000000..89db5a415
--- /dev/null
+++ b/contrib/depends/packages/boost.mk
@@ -0,0 +1,41 @@
+package=boost
+$(package)_version=1_64_0
+$(package)_download_path=https://dl.bintray.com/boostorg/release/1.64.0/source/
+$(package)_file_name=$(package)_$($(package)_version).tar.bz2
+$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
+
+define $(package)_set_vars
+$(package)_config_opts_release=variant=release
+$(package)_config_opts_debug=variant=debug
+$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
+$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
+$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
+$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
+$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
+$(package)_config_opts_x86_64_mingw32=address-model=64
+$(package)_config_opts_i686_mingw32=address-model=32
+$(package)_config_opts_i686_linux=address-model=32 architecture=x86
+$(package)_toolset_$(host_os)=gcc
+$(package)_archiver_$(host_os)=$($(package)_ar)
+$(package)_toolset_darwin=darwin
+$(package)_archiver_darwin=$($(package)_libtool)
+$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
+$(package)_cxxflags=-std=c++11 -fvisibility=hidden
+$(package)_cxxflags_linux=-fPIC
+endef
+
+define $(package)_preprocess_cmds
+ echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STR IP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
+endef
+
+define $(package)_config_cmds
+ ./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
+endef
+
+define $(package)_build_cmds
+ ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
+endef
+
+define $(package)_stage_cmds
+ ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
+endef
diff --git a/contrib/depends/packages/cmake/conf/mxe-conf.cmake.in b/contrib/depends/packages/cmake/conf/mxe-conf.cmake.in
new file mode 100644
index 000000000..8bd4cf1f7
--- /dev/null
+++ b/contrib/depends/packages/cmake/conf/mxe-conf.cmake.in
@@ -0,0 +1,67 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+# https://cmake.org/cmake/help/latest
+
+# Can't set `cmake_minimum_required` or `cmake_policy` in toolchain
+# since toolchain is read before CMakeLists.txt
+# See `target-cmake.in` for CMAKE_POLICY_DEFAULT_CMPNNNN
+
+# Check if we are using mxe supplied version
+# - toolchain is included multiple times so set a guard in
+# environment to suppress duplicate messages
+if(NOT ${CMAKE_COMMAND} STREQUAL @PREFIX@/@BUILD@/bin/cmake AND NOT DEFINED ENV{_MXE_CMAKE_TOOLCHAIN_INCLUDED})
+ message(WARNING "
+** Warning: direct use of toolchain file is deprecated
+** Please use prefixed wrapper script instead:
+ @TARGET@-cmake [options] <path-to-source>
+ - uses mxe supplied cmake version @CMAKE_VERSION@
+ - loads toolchain
+ - loads common run results
+ - sets various policy defaults
+ ")
+ set(ENV{_MXE_CMAKE_TOOLCHAIN_INCLUDED} TRUE)
+endif()
+
+## General configuration
+set(CMAKE_SYSTEM_NAME Windows)
+set(MSYS 1)
+set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON)
+# Workaround for https://www.cmake.org/Bug/view.php?id=14075
+set(CMAKE_CROSS_COMPILING ON)
+
+
+## Library config
+set(BUILD_SHARED_LIBS @CMAKE_SHARED_BOOL@ CACHE BOOL "BUILD_SHARED_LIBS" FORCE)
+set(BUILD_STATIC_LIBS @CMAKE_STATIC_BOOL@ CACHE BOOL "BUILD_STATIC_LIBS" FORCE)
+set(BUILD_SHARED @CMAKE_SHARED_BOOL@ CACHE BOOL "BUILD_SHARED" FORCE)
+set(BUILD_STATIC @CMAKE_STATIC_BOOL@ CACHE BOOL "BUILD_STATIC" FORCE)
+set(LIBTYPE @LIBTYPE@)
+
+
+## Paths etc.
+set(CMAKE_FIND_ROOT_PATH @PREFIX@/@TARGET@)
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_PREFIX_PATH @PREFIX@/@TARGET@)
+set(CMAKE_INSTALL_PREFIX @PREFIX@/@TARGET@ CACHE PATH "Installation Prefix")
+# For custom mxe FindPackage scripts
+set(CMAKE_MODULE_PATH "@PREFIX@/share/cmake/modules" ${CMAKE_MODULE_PATH})
+
+
+## Programs
+set(CMAKE_C_COMPILER @PREFIX@/bin/@TARGET@-gcc)
+set(CMAKE_CXX_COMPILER @PREFIX@/bin/@TARGET@-g++)
+set(CMAKE_Fortran_COMPILER @PREFIX@/bin/@TARGET@-gfortran)
+set(CMAKE_RC_COMPILER @PREFIX@/bin/@TARGET@-windres)
+# CMAKE_RC_COMPILE_OBJECT is defined in:
+# <cmake root>/share/cmake-X.Y/Modules/Platform/Windows-windres.cmake
+set(CPACK_NSIS_EXECUTABLE @TARGET@-makensis)
+
+## Individual package configuration
+file(GLOB mxe_cmake_files
+ "@CMAKE_TOOLCHAIN_DIR@/*.cmake"
+)
+foreach(mxe_cmake_file ${mxe_cmake_files})
+ include(${mxe_cmake_file})
+endforeach()
diff --git a/contrib/depends/packages/cmake/conf/target-cmake.in b/contrib/depends/packages/cmake/conf/target-cmake.in
new file mode 100644
index 000000000..a78bcf58d
--- /dev/null
+++ b/contrib/depends/packages/cmake/conf/target-cmake.in
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+echo "== Using MXE wrapper: @PREFIX@/bin/@TARGET@-cmake"
+
+# https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html
+# https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.html
+POLICIES=(0017,0020)
+
+unset NO_MXE_TOOLCHAIN
+if echo -- "$@" | grep -Ewq "(--build|-E|--system-information)" ; then
+ NO_MXE_TOOLCHAIN=1
+fi
+if [[ "$NO_MXE_TOOLCHAIN" == "1" ]]; then
+ echo "== Skip using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@"
+ # see https://github.com/mxe/mxe/issues/932
+ exec "@PREFIX@/@BUILD@/bin/cmake" "$@"
+else
+ echo " - cmake version @CMAKE_VERSION@"
+ echo " - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored"
+ echo "== Using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@"
+ echo "== Using MXE runresult: @CMAKE_RUNRESULT_FILE@"
+ if ! ( echo "$@" | grep --silent "DCMAKE_BUILD_TYPE" ) ; then
+ echo '== Adding "-DCMAKE_BUILD_TYPE=Release"'
+ set -- "-DCMAKE_BUILD_TYPE=Release" "$@"
+ fi
+ exec "@PREFIX@/@BUILD@/bin/cmake" \
+ -DCMAKE_TOOLCHAIN_FILE="@CMAKE_TOOLCHAIN_FILE@" \
+ `eval echo -DCMAKE_POLICY_DEFAULT_CMP{$POLICIES}=NEW` \
+ -C"@CMAKE_RUNRESULT_FILE@" "$@"
+fi
diff --git a/contrib/depends/packages/cmake/test/CMakeLists.txt b/contrib/depends/packages/cmake/test/CMakeLists.txt
new file mode 100644
index 000000000..6075a8f5a
--- /dev/null
+++ b/contrib/depends/packages/cmake/test/CMakeLists.txt
@@ -0,0 +1,18 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+# 2.8.9 is Debian Wheezy version
+cmake_minimum_required(VERSION 2.8.9)
+
+# use default C and CXX languages
+project(mxe)
+
+# see cmake --help-policy <cmp> for details
+cmake_policy(SET CMP0017 NEW)
+if (POLICY CMP0020)
+ cmake_policy(SET CMP0020 NEW)
+endif()
+
+# so we can find pkg-test.cmake files to include
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../.. ${CMAKE_MODULE_PATH})
+
+include(${PKG}-test)
diff --git a/contrib/depends/packages/cppzmq.mk b/contrib/depends/packages/cppzmq.mk
new file mode 100644
index 000000000..6c0faf084
--- /dev/null
+++ b/contrib/depends/packages/cppzmq.mk
@@ -0,0 +1,15 @@
+package=cppzmq
+$(package)_version=4.2.3
+$(package)_download_path=https://github.com/zeromq/cppzmq/archive/
+$(package)_file_name=v$($(package)_version).tar.gz
+$(package)_sha256_hash=3e6b57bf49115f4ae893b1ff7848ead7267013087dc7be1ab27636a97144d373
+$(package)_dependencies=zeromq
+
+define $(package)_stage_cmds
+ mkdir $($(package)_staging_prefix_dir)/include &&\
+ cp zmq.hpp $($(package)_staging_prefix_dir)/include
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf bin share
+endef
diff --git a/contrib/depends/packages/expat.mk b/contrib/depends/packages/expat.mk
new file mode 100644
index 000000000..bd2cea1b6
--- /dev/null
+++ b/contrib/depends/packages/expat.mk
@@ -0,0 +1,22 @@
+package=expat
+$(package)_version=2.2.4
+$(package)_download_path=https://downloads.sourceforge.net/project/expat/expat/$($(package)_version)
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=03ad85db965f8ab2d27328abcf0bc5571af6ec0a414874b2066ee3fdd372019e
+
+define $(package)_set_vars
+$(package)_config_opts=--enable-static
+$(package)_config_opts+=--prefix=$(host_prefix)
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/graphviz.mk b/contrib/depends/packages/graphviz.mk
new file mode 100644
index 000000000..1c4bc1b71
--- /dev/null
+++ b/contrib/depends/packages/graphviz.mk
@@ -0,0 +1,30 @@
+package=graphviz
+$(package)_version=2.40.1
+$(package)_download_path=www.graphviz.org/pub/graphviz/stable/SOURCES/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421
+
+define $(package)_preprocess_cmds
+ ./autogen.sh
+endef
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --enable-multibye --without-purify --without-curses
+ $(package)_config_opts_release=--disable-debug-mode
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
diff --git a/contrib/depends/packages/icu4c.mk b/contrib/depends/packages/icu4c.mk
new file mode 100644
index 000000000..7e092425e
--- /dev/null
+++ b/contrib/depends/packages/icu4c.mk
@@ -0,0 +1,32 @@
+package=icu4c
+$(package)_version=55.1
+$(package)_download_path=https://github.com/TheCharlatan/icu4c/archive
+$(package)_file_name=55.1.tar.gz
+$(package)_sha256_hash=1f912c54035533fb4268809701d65c7468d00e292efbc31e6444908450cc46ef
+$(package)_patches=icu-001-dont-build-static-dynamic-twice.patch
+
+define $(package)_set_vars
+ $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 --std=gnu++0x -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC"
+endef
+
+define $(package)_config_cmds
+ patch -p1 < $($(package)_patch_dir)/icu-001-dont-build-static-dynamic-twice.patch &&\
+ mkdir builda &&\
+ mkdir buildb &&\
+ cd builda &&\
+ sh ../source/runConfigureICU Linux &&\
+ make &&\
+ cd ../buildb &&\
+ sh ../source/$($(package)_autoconf) --enable-static=yes --enable-shared=yes --disable-layoutex --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\
+ $(MAKE) $($(package)_build_opts)
+endef
+
+#define $(package)_build_cmds
+# cd source &&\
+ $(MAKE) $($((package)_build_opts) `nproc`
+#endef
+
+define $(package)_stage_cmds
+ cd buildb &&\
+ $(MAKE) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/*
+endef
diff --git a/contrib/depends/packages/ldns.mk b/contrib/depends/packages/ldns.mk
new file mode 100644
index 000000000..a9565a581
--- /dev/null
+++ b/contrib/depends/packages/ldns.mk
@@ -0,0 +1,28 @@
+package=ldns
+$(package)_version=1.6.17
+$(package)_download_path=http://www.nlnetlabs.nl/downloads/ldns/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd
+$(package)_dependencies=openssl
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --enable-static --disable-dane-ta-usage --with-drill
+ $(package)_config_opts=--with-ssl=$(host_prefix)
+ $(package)_config_opts_release=--disable-debug-mode
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-h install-lib
+endef
+
+define $(package)_postprocess_cmds
+endef
diff --git a/contrib/depends/packages/libICE.mk b/contrib/depends/packages/libICE.mk
new file mode 100644
index 000000000..fc60323b1
--- /dev/null
+++ b/contrib/depends/packages/libICE.mk
@@ -0,0 +1,23 @@
+package=libICE
+$(package)_version=1.0.9
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
+$(package)_dependencies=xtrans xproto
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/libSM.mk b/contrib/depends/packages/libSM.mk
new file mode 100644
index 000000000..0f9307ca7
--- /dev/null
+++ b/contrib/depends/packages/libSM.mk
@@ -0,0 +1,23 @@
+package=libSM
+$(package)_version=1.2.2
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
+$(package)_dependencies=xtrans xproto libICE
+
+define $(package)_set_vars
+ $(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/libevent.mk b/contrib/depends/packages/libevent.mk
new file mode 100644
index 000000000..5f622f8e6
--- /dev/null
+++ b/contrib/depends/packages/libevent.mk
@@ -0,0 +1,30 @@
+package=libevent
+$(package)_version=2.1.8-stable
+$(package)_download_path=https://github.com/libevent/libevent/archive/
+$(package)_file_name=release-$($(package)_version).tar.gz
+$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
+
+define $(package)_preprocess_cmds
+ ./autogen.sh
+endef
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
+ $(package)_config_opts_release=--disable-debug-mode
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
diff --git a/contrib/depends/packages/libiconv.mk b/contrib/depends/packages/libiconv.mk
new file mode 100644
index 000000000..87e30b208
--- /dev/null
+++ b/contrib/depends/packages/libiconv.mk
@@ -0,0 +1,17 @@
+package=libiconv
+$(package)_version=1.15
+$(package)_download_path=https://ftp.gnu.org/gnu/libiconv
+$(package)_file_name=libiconv-$($(package)_version).tar.gz
+$(package)_sha256_hash=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
+
+define $(package)_config_cmds
+ $($(package)_autoconf) --disable-nls --enable-static --disable-shared
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/miniupnpc.mk b/contrib/depends/packages/miniupnpc.mk
new file mode 100644
index 000000000..1bb8cb5d2
--- /dev/null
+++ b/contrib/depends/packages/miniupnpc.mk
@@ -0,0 +1,28 @@
+package=miniupnpc
+$(package)_version=2.0.20170509
+$(package)_download_path=http://miniupnp.free.fr/files
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a
+
+define $(package)_set_vars
+$(package)_build_opts=CC="$($(package)_cc)"
+$(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)"
+$(package)_build_opts_mingw32=-f Makefile.mingw
+$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
+endef
+
+define $(package)_preprocess_cmds
+ mkdir dll && \
+ sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \
+ sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw
+endef
+
+define $(package)_build_cmds
+ $(MAKE) libminiupnpc.a $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\
+ install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\
+ install libminiupnpc.a $($(package)_staging_prefix_dir)/lib
+endef
diff --git a/contrib/depends/packages/native_biplist.mk b/contrib/depends/packages/native_biplist.mk
new file mode 100644
index 000000000..3c6e8900f
--- /dev/null
+++ b/contrib/depends/packages/native_biplist.mk
@@ -0,0 +1,20 @@
+package=native_biplist
+$(package)_version=0.9
+$(package)_download_path=https://pypi.python.org/packages/source/b/biplist
+$(package)_file_name=biplist-$($(package)_version).tar.gz
+$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604
+$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
+$(package)_patches=sorted_list.patch
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/sorted_list.patch
+endef
+
+define $(package)_build_cmds
+ python setup.py build
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_install_libdir) && \
+ python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+endef
diff --git a/contrib/depends/packages/native_ccache.mk b/contrib/depends/packages/native_ccache.mk
new file mode 100644
index 000000000..966804ce8
--- /dev/null
+++ b/contrib/depends/packages/native_ccache.mk
@@ -0,0 +1,25 @@
+package=native_ccache
+$(package)_version=3.3.4
+$(package)_download_path=https://samba.org/ftp/ccache
+$(package)_file_name=ccache-$($(package)_version).tar.bz2
+$(package)_sha256_hash=fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567
+
+define $(package)_set_vars
+$(package)_config_opts=
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf lib include
+endef
diff --git a/contrib/depends/packages/native_cctools.mk b/contrib/depends/packages/native_cctools.mk
new file mode 100644
index 000000000..44d238cc4
--- /dev/null
+++ b/contrib/depends/packages/native_cctools.mk
@@ -0,0 +1,65 @@
+package=native_cctools
+$(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6
+$(package)_download_path=https://github.com/theuni/cctools-port/archive
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a
+$(package)_build_subdir=cctools
+$(package)_clang_version=3.7.1
+$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version)
+$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
+$(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz
+$(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9
+$(package)_extra_sources=$($(package)_clang_file_name)
+
+define $(package)_fetch_cmds
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash))
+endef
+
+define $(package)_extract_cmds
+ mkdir -p $($(package)_extract_dir) && \
+ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_clang_sha256_hash) $($(package)_source_dir)/$($(package)_clang_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \
+ tar --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \
+ rm -f toolchain/lib/libc++abi.so* && \
+ echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \
+ echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \
+ chmod +x toolchain/bin/$(host)-dsymutil && \
+ tar --strip-components=1 -xf $($(package)_source)
+endef
+
+define $(package)_set_vars
+$(package)_config_opts=--target=$(host) --disable-lto-support
+$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
+$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang
+$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++
+endef
+
+define $(package)_preprocess_cmds
+ cd $($(package)_build_subdir); ./autogen.sh && \
+ sed -i.old "/define HAVE_PTHREADS/d" ld64/src/ld/InputFiles.h
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install && \
+ cd $($(package)_extract_dir)/toolchain && \
+ mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include && \
+ mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \
+ cp bin/clang $($(package)_staging_prefix_dir)/bin/ &&\
+ cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\
+ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
+ cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \
+ cp bin/llvm-dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
+ if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \
+ if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi
+endef
diff --git a/contrib/depends/packages/native_cdrkit.mk b/contrib/depends/packages/native_cdrkit.mk
new file mode 100644
index 000000000..cf694edb3
--- /dev/null
+++ b/contrib/depends/packages/native_cdrkit.mk
@@ -0,0 +1,26 @@
+package=native_cdrkit
+$(package)_version=1.1.11
+$(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c
+$(package)_file_name=cdrkit-$($(package)_version).tar.bz2
+$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
+$(package)_patches=cdrkit-deterministic.patch
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch
+endef
+
+define $(package)_config_cmds
+ cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) genisoimage
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install
+endef
+
+define $(package)_postprocess_cmds
+ rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump
+endef
diff --git a/contrib/depends/packages/native_ds_store.mk b/contrib/depends/packages/native_ds_store.mk
new file mode 100644
index 000000000..49f5829ac
--- /dev/null
+++ b/contrib/depends/packages/native_ds_store.mk
@@ -0,0 +1,17 @@
+package=native_ds_store
+$(package)_version=1.1.0
+$(package)_download_path=https://bitbucket.org/al45tair/ds_store/get
+$(package)_download_file=v$($(package)_version).tar.bz2
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=921596764d71d1bbd3297a90ef6d286f718794d667e4f81d91d14053525d64c1
+$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
+$(package)_dependencies=native_biplist
+
+define $(package)_build_cmds
+ python setup.py build
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_install_libdir) && \
+ python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+endef
diff --git a/contrib/depends/packages/native_libdmg-hfsplus.mk b/contrib/depends/packages/native_libdmg-hfsplus.mk
new file mode 100644
index 000000000..a4ffb6046
--- /dev/null
+++ b/contrib/depends/packages/native_libdmg-hfsplus.mk
@@ -0,0 +1,22 @@
+package=native_libdmg-hfsplus
+$(package)_version=0.1
+$(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive
+$(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz
+$(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3
+$(package)_build_subdir=build
+
+define $(package)_preprocess_cmds
+ mkdir build
+endef
+
+define $(package)_config_cmds
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin ..
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -C dmg
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install
+endef
diff --git a/contrib/depends/packages/native_mac_alias.mk b/contrib/depends/packages/native_mac_alias.mk
new file mode 100644
index 000000000..85a8a402b
--- /dev/null
+++ b/contrib/depends/packages/native_mac_alias.mk
@@ -0,0 +1,21 @@
+package=native_mac_alias
+$(package)_version=1.1.0
+$(package)_download_path=https://bitbucket.org/al45tair/mac_alias/get
+$(package)_download_file=v$($(package)_version).tar.bz2
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=87ad827e66790028361e43fc754f68ed041a9bdb214cca03c853f079b04fb120
+$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
+$(package)_patches=python3.patch
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/python3.patch
+endef
+
+define $(package)_build_cmds
+ python setup.py build
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_install_libdir) && \
+ python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+endef
diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk
new file mode 100644
index 000000000..5ee9f17a6
--- /dev/null
+++ b/contrib/depends/packages/openssl.mk
@@ -0,0 +1,78 @@
+package=openssl
+$(package)_version=1.0.1k
+$(package)_download_path=https://www.openssl.org/source
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c
+
+define $(package)_set_vars
+$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
+$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl
+$(package)_config_opts+=no-camellia
+$(package)_config_opts+=no-capieng
+$(package)_config_opts+=no-cast
+$(package)_config_opts+=no-comp
+$(package)_config_opts+=no-dso
+$(package)_config_opts+=no-dtls1
+$(package)_config_opts+=no-ec_nistp_64_gcc_128
+$(package)_config_opts+=no-gost
+$(package)_config_opts+=no-gmp
+$(package)_config_opts+=no-heartbeats
+$(package)_config_opts+=no-idea
+$(package)_config_opts+=no-jpake
+$(package)_config_opts+=no-krb5
+$(package)_config_opts+=no-libunbound
+$(package)_config_opts+=no-md2
+$(package)_config_opts+=no-mdc2
+$(package)_config_opts+=no-rc4
+$(package)_config_opts+=no-rc5
+$(package)_config_opts+=no-rdrand
+$(package)_config_opts+=no-rfc3779
+$(package)_config_opts+=no-rsax
+$(package)_config_opts+=no-sctp
+$(package)_config_opts+=no-seed
+$(package)_config_opts+=no-sha0
+$(package)_config_opts+=no-shared
+$(package)_config_opts+=no-ssl-trace
+$(package)_config_opts+=no-ssl2
+$(package)_config_opts+=no-ssl3
+$(package)_config_opts+=no-static_engine
+$(package)_config_opts+=no-store
+$(package)_config_opts+=no-unit-test
+$(package)_config_opts+=no-weak-ssl-ciphers
+$(package)_config_opts+=no-whirlpool
+$(package)_config_opts+=no-zlib
+$(package)_config_opts+=no-zlib-dynamic
+$(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags)
+$(package)_config_opts_linux=-fPIC -Wa,--noexecstack
+$(package)_config_opts_x86_64_linux=linux-x86_64
+$(package)_config_opts_i686_linux=linux-generic32
+$(package)_config_opts_arm_linux=linux-generic32
+$(package)_config_opts_aarch64_linux=linux-generic64
+$(package)_config_opts_mipsel_linux=linux-generic32
+$(package)_config_opts_mips_linux=linux-generic32
+$(package)_config_opts_powerpc_linux=linux-generic32
+$(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
+$(package)_config_opts_x86_64_mingw32=mingw64
+$(package)_config_opts_i686_mingw32=mingw
+endef
+
+define $(package)_preprocess_cmds
+ sed -i.old "/define DATE/d" util/mkbuildinf.pl && \
+ sed -i.old "s|engines apps test|engines|" Makefile.org
+endef
+
+define $(package)_config_cmds
+ ./Configure $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -j1 build_libs libcrypto.pc libssl.pc openssl.pc
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share bin etc
+endef
diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
new file mode 100644
index 000000000..28eaf34c5
--- /dev/null
+++ b/contrib/depends/packages/packages.mk
@@ -0,0 +1,21 @@
+packages:=boost openssl libevent zeromq cppzmq zlib expat ldns cppzmq readline libiconv qt sodium
+native_packages := native_ccache
+
+wallet_packages=bdb
+
+darwin_native_packages = native_biplist native_ds_store native_mac_alias
+
+ifeq ($(host_os),linux)
+packages += pcsc-lite
+packages += unwind
+endif
+ifeq ($(host_os),mingw32)
+packages += icu4c
+endif
+
+ifneq ($(build_os),darwin)
+darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
+packages += readline
+endif
+
+
diff --git a/contrib/depends/packages/pcsc-lite.mk b/contrib/depends/packages/pcsc-lite.mk
new file mode 100644
index 000000000..06be0e585
--- /dev/null
+++ b/contrib/depends/packages/pcsc-lite.mk
@@ -0,0 +1,26 @@
+package=pcsc-lite
+$(package)_version=1.8.23
+$(package)_download_path=https://pcsclite.apdu.fr/files
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=5a27262586eff39cfd5c19aadc8891dd71c0818d3d629539bd631b958be689c9
+
+define $(package)_set_vars
+ $(package)_build_opts=CC="$($(package)_cc)"
+ $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
+ $(package)_config_opts=--prefix=$(host_prefix)
+ $(package)_config_opts_release=--disable-debug-mode --disable-libsystemd --disable-libudev --enable-static --disable-shared --disable-libusb
+ $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
+endef
+
+define $(package)_config_cmds
+ ./bootstrap &&\
+ $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/protobuf.mk b/contrib/depends/packages/protobuf.mk
new file mode 100644
index 000000000..54d3fd924
--- /dev/null
+++ b/contrib/depends/packages/protobuf.mk
@@ -0,0 +1,29 @@
+package=protobuf
+$(package)_version=$(native_$(package)_version)
+$(package)_download_path=$(native_$(package)_download_path)
+$(package)_file_name=$(native_$(package)_file_name)
+$(package)_sha256_hash=$(native_$(package)_sha256_hash)
+$(package)_dependencies=native_$(package)
+$(package)_cxxflags=-std=c++11
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -C src libprotobuf.la
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/libprotoc.a
+endef
diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk
new file mode 100644
index 000000000..32ca4a84c
--- /dev/null
+++ b/contrib/depends/packages/qt.mk
@@ -0,0 +1,150 @@
+PACKAGE=qt
+$(package)_version=5.7.1
+$(package)_download_path=http://download.qt.io/official_releases/qt/5.7/$($(package)_version)/submodules
+$(package)_suffix=opensource-src-$($(package)_version).tar.gz
+$(package)_file_name=qtbase-$($(package)_suffix)
+$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
+$(package)_dependencies=openssl zlib
+$(package)_build_subdir=qtbase
+$(package)_qt_libs=corelib
+$(package)_patches=pidlist_absolute.patch fix_qt_pkgconfig.patch qfixed-coretext.patch
+
+$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
+$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
+
+$(package)_qttools_file_name=qttools-$($(package)_suffix)
+$(package)_qttools_sha256_hash=22d67de915cb8cd93e16fdd38fa006224ad9170bd217c2be1e53045a8dd02f0f
+
+$(package)_extra_sources = $($(package)_qttranslations_file_name)
+$(package)_extra_sources += $($(package)_qttools_file_name)
+
+define $(package)_set_vars
+$(package)_config_opts_release = -release
+$(package)_config_opts_debug = -debug
+$(package)_config_opts += -bindir $(build_prefix)/bin
+$(package)_config_opts += -c++std c++11
+$(package)_config_opts += -confirm-license
+$(package)_config_opts += -dbus-runtime
+$(package)_config_opts += -no-alsa
+$(package)_config_opts += -no-audio-backend
+$(package)_config_opts += -no-cups
+$(package)_config_opts += -no-egl
+$(package)_config_opts += -no-eglfs
+$(package)_config_opts += -no-feature-style-windowsmobile
+$(package)_config_opts += -no-feature-style-windowsce
+$(package)_config_opts += -no-freetype
+$(package)_config_opts += -no-gif
+$(package)_config_opts += -no-glib
+$(package)_config_opts += -no-gstreamer
+$(package)_config_opts += -no-icu
+$(package)_config_opts += -no-iconv
+$(package)_config_opts += -no-kms
+$(package)_config_opts += -no-linuxfb
+$(package)_config_opts += -no-libudev
+$(package)_config_opts += -no-mitshm
+$(package)_config_opts += -no-mtdev
+$(package)_config_opts += -no-pulseaudio
+$(package)_config_opts += -no-openvg
+$(package)_config_opts += -no-reduce-relocations
+$(package)_config_opts += -no-qml-debug
+$(package)_config_opts += -no-sql-db2
+$(package)_config_opts += -no-sql-ibase
+$(package)_config_opts += -no-sql-oci
+$(package)_config_opts += -no-sql-tds
+$(package)_config_opts += -no-sql-mysql
+$(package)_config_opts += -no-sql-odbc
+$(package)_config_opts += -no-sql-psql
+$(package)_config_opts += -no-sql-sqlite
+$(package)_config_opts += -no-sql-sqlite2
+$(package)_config_opts += -no-use-gold-linker
+$(package)_config_opts += -no-xinput2
+$(package)_config_opts += -no-xrender
+$(package)_config_opts += -nomake examples
+$(package)_config_opts += -nomake tests
+$(package)_config_opts += -opensource
+$(package)_config_opts += -openssl-linked
+$(package)_config_opts += -optimized-qmake
+$(package)_config_opts += -pch
+$(package)_config_opts += -pkg-config
+$(package)_config_opts += -qt-libpng
+$(package)_config_opts += -qt-libjpeg
+$(package)_config_opts += -qt-pcre
+$(package)_config_opts += -system-zlib
+$(package)_config_opts += -reduce-exports
+$(package)_config_opts += -static
+$(package)_config_opts += -silent
+$(package)_config_opts += -v
+$(package)_config_opts += -no-feature-printer
+$(package)_config_opts += -no-feature-printdialog
+$(package)_config_opts += -no-gui
+$(package)_config_opts += -no-freetype
+$(package)_config_opts += -no-sm
+$(package)_config_opts += -no-fontconfig
+$(package)_config_opts += -no-opengl
+$(package)_config_opts += -no-xkb
+$(package)_config_opts += -no-xcb
+$(package)_config_opts += -no-xshape
+$(package)_build_env = QT_RCC_TEST=1
+endef
+
+define $(package)_fetch_cmds
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
+endef
+
+define $(package)_extract_cmds
+ mkdir -p $($(package)_extract_dir) && \
+ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ mkdir qtbase && \
+ tar --strip-components=1 -xf $($(package)_source) -C qtbase && \
+ mkdir qttranslations && \
+ tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
+ mkdir qttools && \
+ tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
+endef
+
+
+define $(package)_preprocess_cmds
+ sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
+ sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
+ patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
+ patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
+ patch -p1 < $($(package)_patch_dir)/qfixed-coretext.patch && \
+ echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf
+endef
+
+define $(package)_config_cmds
+ export PKG_CONFIG_SYSROOT_DIR=/ && \
+ export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
+ export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
+ ./configure $($(package)_config_opts) && \
+ echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \
+ echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
+ $(MAKE) sub-src-clean && \
+ cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
+ cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
+ cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
+ $(MAKE) -C ../qttools/src/linguist/lrelease && \
+ $(MAKE) -C ../qttranslations
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
+ $(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
+ $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
+ rm -f lib/lib*.la lib/*.prl plugins/*/*.prl
+endef
diff --git a/contrib/depends/packages/readline.mk b/contrib/depends/packages/readline.mk
new file mode 100644
index 000000000..826c1029e
--- /dev/null
+++ b/contrib/depends/packages/readline.mk
@@ -0,0 +1,33 @@
+package=readline
+$(package)_version=6.3
+$(package)_download_path=ftp://ftp.cwru.edu/pub/bash/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
+$(package)_patches=readline-1.patch
+
+define $(package)_set_vars
+ $(package)_build_opts=CC="$($(package)_cc)"
+ $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
+ $(package)_config_opts=--prefix=$(host_prefix)
+ $(package)_config_opts+=--disable-shared --enable-multibye --without-purify --without-curses
+ $(package)_config_opts_release=--disable-debug-mode
+ $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
+endef
+
+define $(package)_config_cmds
+ patch -p1 < $($(package)_patch_dir)/readline-1.patch &&\
+ export bash_cv_have_mbstate_t=yes &&\
+ export bash_cv_wcwidth_broken=yes &&\
+ ./configure $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
new file mode 100644
index 000000000..885b1ea19
--- /dev/null
+++ b/contrib/depends/packages/sodium.mk
@@ -0,0 +1,23 @@
+package=sodium
+$(package)_version=1.0.16
+$(package)_download_path=https://github.com/jedisct1/libsodium/archive
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=0c14604bbeab2e82a803215d65c3b6e74bb28291aaee6236d65c699ccfe1a98c
+
+define $(package)_set_vars
+$(package)_config_opts=--enable-static
+$(package)_config_opts+=--prefix=$(host_prefix)
+endef
+
+define $(package)_config_cmds
+ ./autogen.sh &&\
+ $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/unbound.mk b/contrib/depends/packages/unbound.mk
new file mode 100644
index 000000000..beeeb54c1
--- /dev/null
+++ b/contrib/depends/packages/unbound.mk
@@ -0,0 +1,28 @@
+package=unbound
+$(package)_version=1.6.8
+$(package)_download_path=http://www.unbound.net/downloads/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=e3b428e33f56a45417107448418865fe08d58e0e7fea199b855515f60884dd49
+$(package)_dependencies=openssl expat ldns
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix) --with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads
+ $(package)_config_opts_linux=--with-pic
+ $(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix)
+ $(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
diff --git a/contrib/depends/packages/unwind.mk b/contrib/depends/packages/unwind.mk
new file mode 100644
index 000000000..e1bcb35b2
--- /dev/null
+++ b/contrib/depends/packages/unwind.mk
@@ -0,0 +1,22 @@
+package=unwind
+$(package)_version=1.2
+$(package)_download_path=http://download.savannah.nongnu.org/releases/libunwind
+$(package)_file_name=lib$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=1de38ffbdc88bd694d10081865871cd2bfbb02ad8ef9e1606aee18d65532b992
+
+define $(package)_config_cmds
+ cp -f $(BASEDIR)/config.guess config/config.guess &&\
+ cp -f $(BASEDIR)/config.sub config/config.sub &&\
+ $($(package)_autoconf) --disable-shared --enable-static
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
diff --git a/contrib/depends/packages/xproto.mk b/contrib/depends/packages/xproto.mk
new file mode 100644
index 000000000..50a90b268
--- /dev/null
+++ b/contrib/depends/packages/xproto.mk
@@ -0,0 +1,21 @@
+package=xproto
+$(package)_version=7.0.26
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/contrib/depends/packages/zeromq.mk b/contrib/depends/packages/zeromq.mk
new file mode 100644
index 000000000..01146c26f
--- /dev/null
+++ b/contrib/depends/packages/zeromq.mk
@@ -0,0 +1,34 @@
+package=zeromq
+$(package)_version=4.1.5
+$(package)_download_path=https://github.com/zeromq/zeromq4-1/releases/download/v$($(package)_version)/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=04aac57f081ffa3a2ee5ed04887be9e205df3a7ddade0027460b8042432bdbcf
+$(package)_patches=9114d3957725acd34aa8b8d011585812f3369411.patch 9e6745c12e0b100cd38acecc16ce7db02905e27c.patch
+
+define $(package)_set_vars
+ $(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
+ $(package)_config_opts_linux=--with-pic
+ $(package)_cxxflags=-std=c++11
+endef
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/9114d3957725acd34aa8b8d011585812f3369411.patch && \
+ patch -p1 < $($(package)_patch_dir)/9e6745c12e0b100cd38acecc16ce7db02905e27c.patch && \
+ ./autogen.sh
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) libzmq.la
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf bin share
+endef
diff --git a/contrib/depends/packages/zlib.mk b/contrib/depends/packages/zlib.mk
new file mode 100644
index 000000000..589490800
--- /dev/null
+++ b/contrib/depends/packages/zlib.mk
@@ -0,0 +1,27 @@
+package=zlib
+$(package)_version=1.2.11
+$(package)_download_path=http://www.zlib.net
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
+
+define $(package)_set_vars
+$(package)_build_opts= CC="$($(package)_cc)"
+$(package)_build_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
+$(package)_build_opts+=RANLIB="$($(package)_ranlib)"
+$(package)_build_opts+=AR="$($(package)_ar)"
+$(package)_build_opts_darwin+=AR="$($(package)_libtool)"
+$(package)_build_opts_darwin+=ARFLAGS="-o"
+endef
+
+define $(package)_config_cmds
+ ./configure --static --prefix=$(host_prefix)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts) libz.a
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts)
+endef
+