Copied headers.

This commit is contained in:
Chris Kleeschulte 2015-07-29 12:05:01 -04:00
parent b798ea918d
commit a7506471d5
3 changed files with 25 additions and 7 deletions

View File

@ -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

View File

@ -3,9 +3,9 @@
'target_name': 'bitcoindjs',
'include_dirs' : [
'<!(node -e "require(\'nan\')")',
'<!(./platform/os.sh h_and_a_dir)/include',
'./libbitcoind/src/leveldb/include',
'./libbitcoind/src',
'<!(./platform/os.sh artifacts_dir)/include/libbitcoind/src',
'<!(./platform/os.sh artifacts_dir)/include/libbitcoind/depends/<!(./platform/os.sh host)/include',
'<!(./platform/os.sh artifacts_dir)/include/libbitcoind/src/leveldb'
],
'sources': [
'./src/bitcoindjs.cc',

View File

@ -102,6 +102,14 @@ if test -z "$1" -o x"$1" = x'load_archive'; then
fi
fi
if test -z "$1" -o x"$1" = x'artifacts_dir'; then
if [ "${os}" == "osx" ]; then
echo -n "${os_dir}/lib"
else
echo -n "${os_dir}"
fi
fi
if test -z "$1" -o x"$1" = x'lib'; then
if test -e "${os_dir}/libbitcoind.${ext}" -o -e "${os_dir}/lib/libbitcoind.${ext}"; then
if test -e "${os_dir}/lib/libbitcoind.${ext}"; then