From a7506471d51a6b05a21801e5e230ee375ab78d55 Mon Sep 17 00:00:00 2001 From: Chris Kleeschulte Date: Wed, 29 Jul 2015 12:05:01 -0400 Subject: [PATCH] Copied headers. --- bin/build-libbitcoind | 18 ++++++++++++++---- binding.gyp | 6 +++--- platform/os.sh | 8 ++++++++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/bin/build-libbitcoind b/bin/build-libbitcoind index beb45d08..afbd35f7 100755 --- a/bin/build-libbitcoind +++ b/bin/build-libbitcoind @@ -7,10 +7,20 @@ os_dir=$(${root_dir}/platform/os.sh osdir) host=$(${root_dir}/platform/os.sh host) btc_dir="${root_dir}/libbitcoind" ext=$($root_dir/platform/os.sh ext) +artifacts_dir=$($root_dir/platform/os.sh artifacts_dir) echo "Using BTC directory: ${btc_dir}" cd "${root_dir}" +copy_header_files () { + if [[ -d "${artifacts_dir}" && -d "${h_and_a_dir}" && -d "${btc_dir}" ]]; then + mkdir -p "${artifacts_dir}/include" > /dev/null 2>&1 + pushd "${root_dir}" + find libbitcoind -name \*.h -print0 | xargs -0 -I{} rsync -R {} "${artifacts_dir}"/include + popd + fi +} + build_dependencies () { if [ -d "${btc_dir}" ]; then pushd "${depends_dir}" @@ -69,7 +79,7 @@ else last_patch_file_sha=$(cat "${os_dir}"/patch_sha.txt) fi shared_file_built=false -if [ "${last_patch_file_sha}" == "${patch_file_sha}" ]; then +if [[ "${last_patch_file_sha}" == "${patch_file_sha}" && -d "${artifacts_dir}/include" ]]; then shared_file_built=true fi @@ -104,8 +114,6 @@ apply the current patch from "${root_dir}"/etc/bitcoin.patch? (y/N): " fi fi - set -e - if [ "${only_make}" = false ]; then echo "Cloning, patching, and building libbitcoind..." get_patch_file @@ -152,7 +160,9 @@ apply the current patch from "${root_dir}"/etc/bitcoin.patch? (y/N): " cp -P "${btc_dir}"/src/.libs/libbitcoind.so* "${os_dir}/" fi echo "Creating the sha marker for the patching in libbitcoind..." - echo -n `shasum -a 256 "${root_dir}"/etc/bitcoin.patch | awk '{print $1}'` > "${os_dir}"/patch_sha.txt + echo -n `shasum -a 256 "${root_dir}"/etc/bitcoin.patch | awk '{print $1}'` > "${artifacts_dir}"/patch_sha.txt + echo "Copying the header files in order to be cached..." + copy_header_files fi echo 'Build finished successfully.' else diff --git a/binding.gyp b/binding.gyp index e14e98b9..61a90f6b 100755 --- a/binding.gyp +++ b/binding.gyp @@ -3,9 +3,9 @@ 'target_name': 'bitcoindjs', 'include_dirs' : [ '