Skip to content

Commit

Permalink
contrib: update install_db4 to integrate previous backport contents
Browse files Browse the repository at this point in the history
contains portions of:
- bitcoin@1ac454a
- bitcoin@3352da8
- bitcoin@fac86ac
- bitcoin@8c9b8a3

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
  • Loading branch information
kwvg and UdjinM6 committed May 27, 2023
1 parent 46c6038 commit d243609
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions contrib/install_db4.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
#!/bin/sh
# Copyright (c) 2017-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

# Install libdb4.8 (Berkeley DB).

export LC_ALL=C
set -e

if [ -z "${1}" ]; then
echo "Usage: ./install_db4.sh <base-dir> [<extra-bdb-configure-flag> ...]"
echo "Usage: $0 <base-dir> [<extra-bdb-configure-flag> ...]"
echo
echo "Must specify a single argument: the directory in which db4 will be built."
echo "This is probably \`pwd\` if you're at the root of the dash repository."
exit 1
fi

expand_path() {
echo "$(cd "${1}" && pwd -P)"
cd "${1}" && pwd -P
}

BDB_PREFIX="$(expand_path ${1})/db4"; shift;
Expand All @@ -22,7 +26,7 @@ BDB_HASH='12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef'
BDB_URL="https://download.oracle.com/berkeley-db/${BDB_VERSION}.tar.gz"

check_exists() {
which "$1" >/dev/null 2>&1
command -v "$1" >/dev/null
}

sha256_check() {
Expand Down Expand Up @@ -94,7 +98,9 @@ make install
echo
echo "db4 build complete."
echo
# shellcheck disable=SC2016
echo 'When compiling dashd, run `./configure` in the following way:'
echo
echo " export BDB_PREFIX='${BDB_PREFIX}'"
# shellcheck disable=SC2016
echo ' ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...'

0 comments on commit d243609

Please sign in to comment.