Commit 0a43e019 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Kateryna Kostiuk

fixes for the macOS build

- Adds a "fail" function parameter to execute_script (default is True).
- Disables failing for brew unlink execution.
- Unlinks gnutls, nettle, and msgpack which cause failed building
  when using homebrew cellar versions.
- Adds --enable-restbed when calling bootstrap on macOS.

Change-Id: I96449aaad57683f3bc778235376051a1f6ce69b1
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent af8336e7
......@@ -144,7 +144,7 @@ OSX_DEPENDENCIES = [
OSX_DEPENDENCIES_UNLINK = [
'autoconf*', 'cmake*', 'gettext*', 'pkg-config*', 'qt*', 'qt@5.*',
'libtool*', 'yasm*', 'automake*'
'libtool*', 'yasm*', 'automake*', 'gnutls*', 'nettle*', 'msgpack*'
]
IOS_DEPENDENCIES = [
......@@ -211,7 +211,8 @@ def run_dependencies(args):
elif args.distribution == OSX_DISTRIBUTION_NAME:
execute_script(
BREW_UNLINK_SCRIPT,
{"packages": ' '.join(OSX_DEPENDENCIES_UNLINK)}
{"packages": ' '.join(OSX_DEPENDENCIES_UNLINK)},
False
)
execute_script(
BREW_INSTALL_SCRIPT,
......@@ -221,7 +222,8 @@ def run_dependencies(args):
elif args.distribution == IOS_DISTRIBUTION_NAME:
execute_script(
BREW_UNLINK_SCRIPT,
{"packages": ' '.join(IOS_DEPENDENCIES_UNLINK)}
{"packages": ' '.join(IOS_DEPENDENCIES_UNLINK)},
False
)
execute_script(
BREW_INSTALL_SCRIPT,
......@@ -369,18 +371,16 @@ def run_run(args):
def run_stop(args):
execute_script(STOP_SCRIPT)
def execute_script(script, settings=None):
def execute_script(script, settings=None, fail=True):
if settings == None:
settings = {}
for line in script:
line = line % settings
rv = os.system(line)
if rv != 0:
if rv != 0 and fail == True:
print('Error executing script! Exit code: %s' % rv, file=sys.stderr)
sys.exit(1)
def validate_args(parsed_args):
"""Validate the args values, exit if error is found"""
......
......@@ -61,7 +61,10 @@ DAEMON="$(pwd)"
cd contrib
mkdir -p native
cd native
../bootstrap
if [[ "$OSTYPE" == "darwin"* ]]; then
enableRestbed="--enable-restbed"
fi
../bootstrap $enableRestbed
make
cd "${DAEMON}"
./autogen.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment