Skip to content
Snippets Groups Projects
Commit 3e80a826 authored by Mohamed Chibani's avatar Mohamed Chibani
Browse files

build.py - add an option to disable libwrap

Add the build option '--no-libwrap' to disable libwrap.
If set, it will also set '--disable-shared' in daemon
configure options.

Change-Id: Ie252d574dd6fbe99019981c1cbfc0d1348544c74
parent 873c35ff
No related branches found
No related tags found
No related merge requests found
......@@ -381,6 +381,8 @@ def run_install(args):
install_args.append('-u')
if args.debug:
install_args.append('-d')
if args.no_libwrap:
install_args.append('-W')
if args.distribution == OSX_DISTRIBUTION_NAME:
# The `universal_newlines` parameter has been renamed to `text` in
......@@ -647,6 +649,9 @@ def parse_args():
help='Build the Qt client with the Qt path supplied')
ap.add_argument('--qtver', default=QT5_VERSION,
help='Sets the Qt version to build with')
ap.add_argument('--no-libwrap', dest='no_libwrap',
default=False, action='store_true',
help='Disable libwrap. Also set --disable-shared option to daemon configure')
dist = choose_distribution()
......
#!/usr/bin/env bash
# Build and install to a local prefix under this repository.
export OSTYPE
# Flags:
......@@ -9,6 +10,7 @@
# -c: client to build
# -p: number of processors to use
# -u: disable use of privileges (sudo) during install
# -W: disable libwrap and shared library
set -ex
......@@ -23,7 +25,9 @@ qt5ver=''
qt5path=''
proc='1'
priv_install=true
while getopts gsc:dq:Q:P:p:u OPT; do
enable_libwrap=true
while getopts gsc:dq:Q:P:p:uW OPT; do
case "$OPT" in
g)
global='true'
......@@ -52,6 +56,9 @@ while getopts gsc:dq:Q:P:p:u OPT; do
u)
priv_install='false'
;;
W)
enable_libwrap='false'
;;
\?)
exit 1
;;
......@@ -91,7 +98,13 @@ mkdir -p contrib/native
../bootstrap ${prefix:+"--prefix=$prefix"}
make -j"${proc}"
)
# Disable shared if requested
if [[ "$OSTYPE" != "darwin"* ]]; then
# Keep the shared libaries on MAC OSX.
if [ "${enable_libwrap}" == "false" ]; then
CONFIGURE_FLAGS+=( --disable-shared)
fi
fi
# Build the daemon itself.
test -f configure || ./autogen.sh
......@@ -138,7 +151,7 @@ lrc_cmake_flags=(-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}"
-DCMAKE_BUILD_TYPE=Debug
-DQT5_VER="${qt5ver}"
-DQT5_PATH="${qt5path}"
-DENABLE_LIBWRAP=true
-DENABLE_LIBWRAP="${enable_libwrap}"
$static)
if [ "${global}" = "true" ]; then
lrc_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment