diff --git a/generate3.xml b/generate3.xml
index df7591f..a96e467 100644
--- a/generate3.xml
+++ b/generate3.xml
@@ -136,7 +136,7 @@
-
+
@@ -158,13 +158,10 @@
-
-
-
@@ -375,7 +372,7 @@
-
+
@@ -389,7 +386,7 @@
-
+
@@ -415,27 +412,16 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -604,19 +590,16 @@
-
+
-
-
-
@@ -787,7 +770,7 @@
-
+
@@ -801,25 +784,21 @@
-
+
-
-
-
-
@@ -833,7 +812,6 @@
assert="ndebug" link="dynamic" optimization="size">
-
@@ -843,7 +821,6 @@
assert="ndebug" link="static" optimization="size">
-
@@ -855,7 +832,6 @@
preset="nix-gnu-debug-shared">
-
@@ -867,7 +843,6 @@
preset="nix-gnu-release-static-size">
-
@@ -879,7 +854,6 @@
preset="nix-gnu-release-shared-size">
-
@@ -891,7 +865,6 @@
-
@@ -902,7 +875,6 @@
assert="ndebug" link="static" optimization="debug">
-
@@ -1009,19 +981,16 @@
-
+
-
-
-
@@ -1234,19 +1203,16 @@
-
+
-
-
-
@@ -1422,19 +1388,16 @@
-
+
-
-
-
@@ -1595,7 +1558,7 @@
-
+
@@ -1607,30 +1570,19 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -1816,22 +1768,19 @@
-
+
-
+
-
-
-
@@ -2021,22 +1970,19 @@
-
+
-
+
-
-
-
diff --git a/generate4.xml b/generate4.xml
index 30c35c1..e775280 100644
--- a/generate4.xml
+++ b/generate4.xml
@@ -201,7 +201,7 @@
-
+
@@ -215,7 +215,7 @@
-
+
@@ -226,7 +226,7 @@
-
+
@@ -255,6 +255,7 @@
+
@@ -266,6 +267,7 @@
system="osx"
assert="ndebug" link="dynamic" optimization="size">
+
@@ -274,6 +276,7 @@
system="osx"
assert="ndebug" link="static" optimization="size">
+
@@ -285,6 +288,7 @@
preset="nix-gnu-debug-shared">
+
@@ -297,6 +301,7 @@
preset="nix-gnu-release-static">
+
@@ -308,6 +313,7 @@
preset="nix-gnu-release-shared">
+
@@ -319,6 +325,7 @@
coverage="true">
+
@@ -329,6 +336,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -416,7 +424,7 @@
-
+
@@ -430,7 +438,7 @@
-
+
@@ -471,6 +479,7 @@
+
@@ -481,6 +490,7 @@
assert="ndebug" link="dynamic" optimization="size">
+
@@ -489,6 +499,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -499,6 +510,7 @@
preset="nix-gnu-debug-shared">
+
@@ -509,6 +521,7 @@
preset="nix-gnu-release-static">
+
@@ -519,6 +532,7 @@
preset="nix-gnu-release-shared">
+
@@ -529,6 +543,7 @@
coverage="true">
+
@@ -538,6 +553,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -633,7 +649,7 @@
-
+
@@ -667,6 +683,7 @@
+
@@ -676,6 +693,7 @@
assert="ndebug" link="dynamic" optimization="size">
+
@@ -685,6 +703,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -696,6 +715,7 @@
preset="nix-gnu-debug-shared">
+
@@ -707,6 +727,7 @@
preset="nix-gnu-release-static">
+
@@ -718,6 +739,7 @@
preset="nix-gnu-release-shared">
+
@@ -729,6 +751,7 @@
+
@@ -739,6 +762,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -833,7 +857,7 @@
-
+
@@ -1027,7 +1051,7 @@
-
+
@@ -1247,12 +1271,14 @@
+
+
@@ -1261,6 +1287,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -1271,6 +1298,7 @@
preset="nix-gnu-debug-shared">
+
@@ -1282,6 +1310,7 @@
+
@@ -1293,6 +1322,7 @@
+
@@ -1303,6 +1333,7 @@
coverage="true">
+
@@ -1312,6 +1343,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -1452,6 +1484,7 @@
+
+
@@ -1468,6 +1502,7 @@
assert="ndebug" link="static" optimization="size">
+
@@ -1479,6 +1514,7 @@
preset="nix-gnu-debug-shared">
+
@@ -1490,6 +1526,7 @@
preset="nix-gnu-release-static">
+
@@ -1501,6 +1538,7 @@
preset="nix-gnu-release-shared">
+
@@ -1512,6 +1550,7 @@
coverage="true">
+
@@ -1522,6 +1561,7 @@
assert="ndebug" link="static" optimization="size">
+
diff --git a/maintenance/update-copyright-generators.sh b/maintenance/update-copyright-generators.sh
new file mode 100755
index 0000000..6c2163f
--- /dev/null
+++ b/maintenance/update-copyright-generators.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+
+YEAR=$(date +%Y)
+
+find . -path '*/.git' -prune -type f -o -type f -name '*' | xargs sed --in-place -e "s/Copyright (c) 20\([0-9][0-9]\)-20[0-9][0-9] \$(my.name)/Copyright (c) 20\1-$YEAR \$(my.name)/g"
diff --git a/maintenance/update-copyright.sh b/maintenance/update-copyright.sh
new file mode 100755
index 0000000..c7ce439
--- /dev/null
+++ b/maintenance/update-copyright.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+
+YEAR=$(date +%Y)
+
+find . -path '*/.git' -prune -type f -o -type f -name '*' | xargs sed --in-place -e "s/Copyright (c) 20\([0-9][0-9]\)-20[0-9][0-9] libbitcoin/Copyright (c) 20\1-$YEAR libbitcoin/g"
diff --git a/templates/gsl.CMakeLists.txt b/templates/gsl.CMakeLists.txt
index 7c8db3c..11d8709 100644
--- a/templates/gsl.CMakeLists.txt
+++ b/templates/gsl.CMakeLists.txt
@@ -335,8 +335,6 @@ function emit_dependencies(repository)
elsif (is_java_dependency(_dependency))
emit_java_dependency_option(_dependency, my.repository->configure, "")
elsif (is_python_dependency(_dependency))
- elsif (is_mbedtls_dependency(_dependency))
- emit_find_mbedtls_option(_dependency, my.repository->configure, "")
elsif (is_package_dependency(_dependency))
emit_find_dependency_option(_dependency, my.repository->configure, "")
elsif (is_pthread_dependency(_dependency))
@@ -1333,21 +1331,6 @@ $(my.indent)endif()
. endif
.endmacro # emit_find_dependency_option
.
-.macro emit_find_mbedtls_option(dependency, configure, indent)
-. define my.dependency = emit_find_mbedtls_option.dependency
-. define my.configure = emit_find_mbedtls_option.configure
-.
-. new configure as _dependencies
-. copy my.dependency to _dependencies
-. if (defined(_dependencies->dependency.version))
-. _dependencies->dependency.version = ""
-. endif
-.
-. emit_find_dependency_option(_dependencies->dependency, my.configure,\
- my.indent)
-. endnew
-.endmacro # emit_find_mbedtls_option
-.
.macro emit_java_dependency(dependency, configure, indent)
. define my.dependency = emit_java_dependency.dependency
. define my.configure = emit_java_dependency.configure
diff --git a/templates/gsl.configure.ac b/templates/gsl.configure.ac
index 8eebb98..9910fc4 100644
--- a/templates/gsl.configure.ac
+++ b/templates/gsl.configure.ac
@@ -941,59 +941,6 @@ AS_CASE([${enable_isystem}],[yes],
AC_MSG_NOTICE([$(my.cname)_BUILD_CPPFLAGS : ${$(my.cname)_BUILD_CPPFLAGS}])
-.endmacro
-.
-.#-----------------------------------------------------------------------------
-.# MBEDTLS
-.#-----------------------------------------------------------------------------
-.macro check_mbedtls_base(dependency, configure, indent, prefix, suffix)
-. define my.dependency = check_mbedtls.dependency
-. define my.configure = check_mbedtls.configure
-. require(my.dependency, "dependency", "name")
-. require(my.dependency, "dependency", "version")
-.
-. define my.name = my.dependency.name
-. define my.cname = "$(my.dependency.name:c)"
-.
-$(my.prefix)AC_SUBST([$(my.cname)_INCLUDEDIR], [])
-$(my.indent)AC_SUBST([$(my.cname)_OTHER_CPPFLAGS], [])
-$(my.indent)AC_SUBST([$(my.cname)_CPPFLAGS], [])
-$(my.indent)AC_SUBST([$(my.cname)_ISYS_CPPFLAGS], [])
-$(my.indent)AC_SUBST([$(my.cname)_LIBS], ["-lmbedtls -lmbedcrypto -lmbedx509"])
-$(my.indent)AC_MSG_NOTICE([$(my.cname) presumed, not detected - absence of -lmbedtls -lmbedcrypto -lmbedx509 may result in link error.])$(my.suffix)
-.endmacro
-.
-.macro check_mbedtls(dependency, configure)
-. define my.dependency = check_mbedtls.dependency
-. define my.configure = check_mbedtls.configure
-. require(my.dependency, "dependency", "name")
-. require(my.dependency, "dependency", "version")
-.
-. define my.name = my.dependency.name
-. define my.cname = "$(my.dependency.name:c)"
-. define my.version = my.dependency.version
-. define my.symbol = find_option_symbol(my.dependency, my.configure)?
-. heading2("Require $(my.name) of at least version $(my.version) and output ${$(my.cname)_CPPFLAGS/LIBS/PKG}.")
-. if (!is_empty(my.dependency.comment))
-. heading3("$(my.dependency.comment)")
-. endif
-.
-. if (is_empty(my.symbol))
-. check_mbedtls_base(my.dependency, my.configure, "", "", "")
-. elsif (is_empty(my.dependency.extract))
-AS_CASE([${$(my.symbol)}], [yes],
-. check_mbedtls_base(my.dependency, my.configure, " ", " [", "], [])")
-. else
-AS_CASE([${$(my.symbol)}], [yes],
-. check_mbedtls_base(my.dependency, my.configure, " ", " [", "], [])")
-. endif
-
-AS_CASE([${enable_isystem}],[yes],
- [AC_SUBST([$(my.cname)_BUILD_CPPFLAGS], [${$(my.cname)_ISYS_CPPFLAGS}])],
- [AC_SUBST([$(my.cname)_BUILD_CPPFLAGS], [${$(my.cname)_CPPFLAGS}])])
-
-AC_MSG_NOTICE([$(my.cname)_BUILD_CPPFLAGS : ${$(my.cname)_BUILD_CPPFLAGS}])
-
.endmacro
.
.#-----------------------------------------------------------------------------
@@ -1155,8 +1102,6 @@ for generate.repository by name as _repository
check_boost(_dependency)
elsif (is_boost_lib_dependency(_dependency))
check_boost_lib(_dependency, my.configure)
- elsif (is_mbedtls_dependency(_dependency))
- check_mbedtls(_dependency, my.configure)
elsif (is_java_dependency(_dependency))
check_java(_dependency, my.configure)
elsif (is_python_dependency(_dependency))
diff --git a/templates/gsl.developer_setup.sh b/templates/gsl.developer_setup.sh
index fc5da95..05dc20e 100644
--- a/templates/gsl.developer_setup.sh
+++ b/templates/gsl.developer_setup.sh
@@ -347,17 +347,6 @@ $(my.prefix)build_from_tarball $ZMQ_ARCHIVE . $PARALLEL "$BUILD_ZMQ" "${ZMQ_OPTI
export CPPFLAGS=$SAVE_CPPFLAGS
.endmacro # build_from_tarball_zmq
.
-.macro unpack_from_tarball_mbedtls(prefix)
-$(my.prefix)unpack_from_tarball $MBEDTLS_ARCHIVE $MBEDTLS_URL gzip "$BUILD_MBEDTLS"
-.endmacro # unpack_from_tarball_mbedtls
-.
-.macro build_from_tarball_mbedtls(prefix)
-local SAVE_CPPFLAGS="$CPPFLAGS"
-export CPPFLAGS="$CPPFLAGS ${MBEDTLS_FLAGS[@]}"
-$(my.prefix)build_from_tarball $MBEDTLS_ARCHIVE . $PARALLEL "$BUILD_MBEDTLS" "${MBEDTLS_OPTIONS[@]}" "$@"
-export CPPFLAGS=$SAVE_CPPFLAGS
-.endmacro # build_from_tarball_mbedtls
-.
.macro unpack_boost(prefix)
$(my.prefix)unpack_from_tarball $BOOST_ARCHIVE $BOOST_URL bzip2 "$BUILD_BOOST"
.endmacro # unpack_boost
@@ -371,14 +360,14 @@ export CPPFLAGS=$SAVE_CPPFLAGS
.
.macro create_github(build, prefix)
. define my.build = create_github.build
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
$(my.prefix)create_from_github $(my.build.github) $(my.build.repository) $(my.build.branch) "$(my.conditional)"
.endmacro # create_github
.
.macro build_github(build, prefix)
. define my.build = build_github.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -390,7 +379,7 @@ export CPPFLAGS=$SAVE_CPPFLAGS
.macro build_github_test(build, prefix)
. define my.build = build_github_test.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -418,10 +407,6 @@ create_local_copies()
if [[ $(test_produce_dependencies()) ]]; then
. unpack_from_tarball_zmq(my.prefix)
fi
-. elsif (is_mbedtls_build(_build))
- if [[ $(test_produce_dependencies()) ]]; then
-. unpack_from_tarball_mbedtls(my.prefix)
- fi
. elsif (is_boost_build(_build))
if [[ $(test_produce_dependencies()) ]]; then
. unpack_boost(my.prefix)
@@ -467,10 +452,6 @@ build_local_copies()
if [[ $(test_produce_dependencies()) ]]; then
. build_from_tarball_zmq(my.prefix)
fi
-. elsif (is_mbedtls_build(_build))
- if [[ $(test_produce_dependencies()) ]]; then
-. build_from_tarball_mbedtls(my.prefix)
- fi
. elsif (is_boost_build(_build))
if [[ $(test_produce_dependencies()) ]]; then
. build_boost(my.prefix)
@@ -542,7 +523,6 @@ function generate_setup(path_prefix)
define_build_variables(_repository)
define_icu(_install)
define_zmq(_install)
- define_mbedtls(_install)
define_boost(_install)
heading1("Define utility functions.")
diff --git a/templates/gsl.install-cmake.sh b/templates/gsl.install-cmake.sh
index 0035268..c63952f 100644
--- a/templates/gsl.install-cmake.sh
+++ b/templates/gsl.install-cmake.sh
@@ -138,14 +138,6 @@ handle_custom_options()
CUMULATIVE_FILTERED_ARGS_CMAKE+=" -Dwith-icu=yes"
fi
. endif
-. if (have_build(my.install, "mbedtls"))
-
- # Process MBEDTLS
- if [[ $WITH_MBEDTLS ]]; then
- CUMULATIVE_FILTERED_ARGS+=" --with-mbedtls"
- CUMULATIVE_FILTERED_ARGS_CMAKE+=" -Dwith-mbedtls=yes"
- fi
-. endif
.
}
@@ -343,14 +335,6 @@ make_jobs()
export CPPFLAGS=$SAVE_CPPFLAGS
.endmacro # build_zmq
.
-.macro build_from_tarball_mbedtls()
- unpack_from_tarball "$MBEDTLS_ARCHIVE" "$MBEDTLS_URL" gzip "$BUILD_MBEDTLS"
- local SAVE_CPPFLAGS="$CPPFLAGS"
- export CPPFLAGS="$CPPFLAGS ${MBEDTLS_FLAGS[@]}"
- build_from_tarball "$MBEDTLS_ARCHIVE" . "$PARALLEL" "$BUILD_MBEDTLS" "${MBEDTLS_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS
- export CPPFLAGS=$SAVE_CPPFLAGS
-.endmacro # build_mbedtls
-.
.macro build_boost()
unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -362,7 +346,7 @@ make_jobs()
.macro build_github(build)
. define my.build = build_github.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = is_true(my.build.conditional) ?? "$$(get_build_conditional_variable(my.build))" ? "yes"
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
create_from_github $(my.build.github) $(my.build.repository) $(my.build.branch) "$(my.conditional)"
@@ -379,7 +363,7 @@ make_jobs()
.macro build_github_cmake(build)
. define my.build = build_github_cmake.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
create_from_github $(my.build.github) $(my.build.repository) $(my.build.branch) "$(my.conditional)"
@@ -392,7 +376,7 @@ make_jobs()
.macro build_ci(build)
. define my.build = build_ci.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -427,8 +411,6 @@ build_all()
. build_from_tarball_icu()
. elsif (is_zmq_build(_build))
. build_from_tarball_zmq()
-. elsif (is_mbedtls_build(_build))
-. build_from_tarball_mbedtls()
. elsif (is_boost_build(_build))
. build_boost()
. elsif (is_github_build(_build))
@@ -490,7 +472,6 @@ function generate_installer_cmake(path_prefix)
define_build_variables(_repository)
define_icu(_install)
define_zmq(_install)
- define_mbedtls(_install)
define_boost(_install)
heading1("Define utility functions.")
diff --git a/templates/gsl.install-cmakepresets.sh b/templates/gsl.install-cmakepresets.sh
index 9b51d2a..6dcdeae 100644
--- a/templates/gsl.install-cmakepresets.sh
+++ b/templates/gsl.install-cmakepresets.sh
@@ -232,14 +232,6 @@ handle_custom_options()
CUMULATIVE_FILTERED_ARGS_CMAKE+=" -Dwith-icu=yes"
fi
. endif
-. if (have_build(my.repository->install, "mbedtls"))
-
- # Process MBEDTLS
- if [[ $WITH_MBEDTLS ]]; then
- CUMULATIVE_FILTERED_ARGS+=" --with-mbedtls"
- CUMULATIVE_FILTERED_ARGS_CMAKE+=" -Dwith-mbedtls=yes"
- fi
-. endif
.
}
@@ -441,14 +433,6 @@ make_jobs()
export CPPFLAGS=$SAVE_CPPFLAGS
.endmacro # build_zmq
.
-.macro build_from_tarball_mbedtls()
- unpack_from_tarball "$MBEDTLS_ARCHIVE" "$MBEDTLS_URL" gzip "$BUILD_MBEDTLS"
- local SAVE_CPPFLAGS="$CPPFLAGS"
- export CPPFLAGS="$CPPFLAGS ${MBEDTLS_FLAGS[@]}"
- build_from_tarball "$MBEDTLS_ARCHIVE" . "$PARALLEL" "$BUILD_MBEDTLS" "${MBEDTLS_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS
- export CPPFLAGS=$SAVE_CPPFLAGS
-.endmacro # build_mbedtls
-.
.macro build_boost()
unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -460,7 +444,7 @@ make_jobs()
.macro build_github(build)
. define my.build = build_github.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = is_true(my.build.conditional) ?? "$$(get_build_conditional_variable(my.build))" ? "yes"
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
create_from_github $(my.build.github) $(my.build.repository) $(my.build.branch) "$(my.conditional)"
@@ -478,7 +462,7 @@ make_jobs()
.macro build_github_cmake(build)
. define my.build = build_github_cmake.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
create_from_github $(my.build.github) $(my.build.repository) $(my.build.branch) "$(my.conditional)"
@@ -492,7 +476,7 @@ make_jobs()
.macro build_ci(build)
. define my.build = build_ci.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -529,8 +513,6 @@ build_all()
. build_from_tarball_icu()
. elsif (is_zmq_build(_build))
. build_from_tarball_zmq()
-. elsif (is_mbedtls_build(_build))
-. build_from_tarball_mbedtls()
. elsif (is_boost_build(_build))
. build_boost()
. elsif (is_github_build(_build))
@@ -595,7 +577,6 @@ function generate_installer_cmake(path_prefix)
define_build_variables(_repository)
define_icu(_install)
define_zmq(_install)
- define_mbedtls(_install)
define_boost(_install)
heading1("Define utility functions.")
diff --git a/templates/gsl.install.sh b/templates/gsl.install.sh
index abac3d5..f6176a0 100644
--- a/templates/gsl.install.sh
+++ b/templates/gsl.install.sh
@@ -182,14 +182,6 @@ make_jobs()
export CPPFLAGS=$SAVE_CPPFLAGS
.endmacro # build_zmq
.
-.macro build_from_tarball_mbedtls()
- unpack_from_tarball "$MBEDTLS_ARCHIVE" "$MBEDTLS_URL" gzip "$BUILD_MBEDTLS"
- local SAVE_CPPFLAGS="$CPPFLAGS"
- export CPPFLAGS="$CPPFLAGS ${MBEDTLS_FLAGS[@]}"
- build_from_tarball "$MBEDTLS_ARCHIVE" . "$PARALLEL" "$BUILD_MBEDTLS" "${MBEDTLS_OPTIONS[@]}" "$@"
- export CPPFLAGS=$SAVE_CPPFLAGS
-.endmacro # build_mbedtls
-.
.macro build_boost()
unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -201,7 +193,7 @@ make_jobs()
.macro build_github(build)
. define my.build = build_github.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
create_from_github $(my.build.github) $(my.build.repository) $(my.build.branch) "$(my.conditional)"
@@ -214,7 +206,7 @@ make_jobs()
.macro build_ci(build)
. define my.build = build_ci.build
. define my.parallel = is_true(my.build.parallel) ?? "$PARALLEL" ? "$SEQUENTIAL"
-. define my.conditional = is_true(my.build.conditional) ?? "$WITH_$(my.build.name:upper,c)" ? "yes"
+. define my.conditional = get_conditional_parameter(my.build)
. define my.flags = "${$(my.build.name:upper,c)_FLAGS[@]}"
. define my.options = "${$(my.build.name:upper,c)_OPTIONS[@]}"
local SAVE_CPPFLAGS="$CPPFLAGS"
@@ -245,8 +237,6 @@ build_all()
. build_from_tarball_icu()
. elsif (is_zmq_build(_build))
. build_from_tarball_zmq()
-. elsif (is_mbedtls_build(_build))
-. build_from_tarball_mbedtls()
. elsif (is_boost_build(_build))
. build_boost()
. elsif (is_github_build(_build))
@@ -307,7 +297,6 @@ function generate_installer(path_prefix)
define_build_variables(_repository)
define_icu(_install)
define_zmq(_install)
- define_mbedtls(_install)
define_boost(_install)
heading1("Define utility functions.")
diff --git a/templates/gsl.package.pc.in b/templates/gsl.package.pc.in
index 6ce9731..44eda10 100644
--- a/templates/gsl.package.pc.in
+++ b/templates/gsl.package.pc.in
@@ -71,8 +71,7 @@ function define_library_variables(variables, library, make, configure, repositor
if (!defined(my.dependency))
abort "The packaged library has no dependency: $(my.name)"
endif
- define my.is_mbedtls = is_mbedtls_dependency(my.dependency)
- define my.is_package = is_package_dependency(my.dependency) & !my.is_mbedtls
+ define my.is_package = is_package_dependency(my.dependency)
define my.is_function = is_function_dependency(my.dependency)
define my.is_boost = is_boost_dependency(my.dependency)
define my.is_boost_lib = is_boost_lib_dependency(my.dependency)
@@ -87,14 +86,14 @@ function define_library_variables(variables, library, make, configure, repositor
if (my.is_boost)
my.variables.libs$(my.private) += " @$(my.cname)_LDFLAGS@"
endif
- if (my.is_boost_lib | my.is_common | my.is_function | my.is_mbedtls)
+ if (my.is_boost_lib | my.is_common | my.is_function)
my.variables.libs$(my.private) += " @$(my.cname)_LIBS@"
endif
if (my.is_package)
define my.package = format_conditional_pkg(my.dependency)
my.variables.requires$(my.private) += " $(my.package)"
endif
- if (my.is_boost | my.is_common | my.is_language | my.is_mbedtls)
+ if (my.is_boost | my.is_common | my.is_language)
my.variables.cflags += " @$(my.cname)_CPPFLAGS@"
endif
endif
diff --git a/templates/shared/common_install_shell_artifacts.gsl b/templates/shared/common_install_shell_artifacts.gsl
index d46ff51..2f41ea2 100644
--- a/templates/shared/common_install_shell_artifacts.gsl
+++ b/templates/shared/common_install_shell_artifacts.gsl
@@ -25,6 +25,48 @@ function get_archive_version(install, name)
return defined(my.build) ?? my.build.version
endfunction
+# Common install script functions.
+
+function get_build_conditional_prefix(build)
+ define my.build = get_build_conditional_prefix.build
+ return defined(my.build.option) ?? "with" ? "build"
+endfunction
+
+function get_build_conditional_name(build)
+ define my.build = get_build_conditional_name.build
+ return defined(my.build.option) ?? my.build.option ? my.build.name
+endfunction
+
+function get_build_conditional_variable_name(build)
+ define my.build = get_build_conditional_variable_name.build
+ return my.build.name
+endfunction
+
+function get_build_conditional_presentation_name(build)
+ define my.build = get_build_conditional_presentation_name.build
+ return defined(my.build.presentation) ?? my.build.presentation ? my.build.name
+endfunction
+
+function get_build_conditional_option(build)
+ define my.build = get_build_conditional_option.build
+ return "--$(get_build_conditional_prefix(my.build))-$(get_build_conditional_name(my.build))"
+endfunction
+
+function get_build_conditional_negated_option(build)
+ define my.build = get_build_conditional_negated_option.build
+ return starts_with(get_build_conditional_prefix(my.build), "with") ?? "--without-$(get_build_conditional_name(my.build))" ? ""
+endfunction
+
+function get_build_conditional_variable(build)
+ define my.build = get_build_conditional_variable.build
+ return "$(get_build_conditional_prefix(my.build):upper,c)_$(get_build_conditional_variable_name(my.build):upper,c)"
+endfunction
+
+function get_conditional_parameter(build)
+ define my.build = get_conditional_parameter.build
+ return is_true(my.build.conditional) ?? "$$(get_build_conditional_variable(my.build))" ? "yes"
+endfunction
+
# Functions with specific knowledge of ICU archive file name and URL structure.
function get_icu_file(install)
@@ -89,37 +131,6 @@ function get_zmq_url(install)
return my.url
endfunction
-# Functions with specific knowledge of MBEDTLS archive file name and URL structure.
-
-function get_mbedtls_file(install)
- define my.install = get_mbedtls_file.install
- define my.version = get_archive_version(my.install, "mbedtls")?
- if (!defined(my.version))
- trace1("get_mbedtls_file:get_archive_version() = []")
- return
- endif
- return "mbedtls-$(my.version)-apache.tgz"
-endfunction
-
-function get_mbedtls_url(install)
- trace1("get_mbedtls_url()")
- define my.install = get_mbedtls_url.install
- define my.version = get_archive_version(my.install, "mbedtls")?
- if (!defined(my.version))
- trace1("get_mbedtls_url:get_archive_version() = []")
- return
- endif
- define my.archive = get_mbedtls_file(my.install)?
- if (!defined(my.archive))
- trace1("get_mbedtls_url:get_mbedtls_file() = []")
- return
- endif
- define my.base_url = "https\://tls.mbed.org/download"
- define my.url = "$(my.base_url)/$(my.archive)"
- trace1("get_mbedtls_url = $(my.url)")
- return my.url
-endfunction
-
# Functions with specific knowledge of Boost archive file name and URL structure.
function get_boost_file(install)
@@ -180,10 +191,6 @@ endfunction
# use passphrase normalization this dependency can
# be avoided.
. endif
-. if (have_build(my.install, "mbedtls"))
-# --with-mbedtls Compile with MbedTLS Support
-# Provides a websockets implementation for query.
-. endif
. if (have_build(my.install, "icu"))
# --build-icu Builds ICU libraries.
. endif
@@ -193,9 +200,6 @@ endfunction
. if (have_build(my.install, "zmq"))
# --build-zmq Builds ZeroMQ libraries.
. endif
-. if (have_build(my.install, "mbedtls"))
-# --build-mbedtls Builds MbedTLS libraries.
-. endif
. custom_documentation(my.repository, my.install)
# --prefix= Library install location (defaults to /usr/local).
# --disable-shared Disables shared library builds.
@@ -217,6 +221,7 @@ endfunction
.macro define_help(repository, install, script_name)
. define my.repository = define_help.repository
. define my.install = define_help.install
+. define my.column = " "
display_help()
{
display_message "Usage: ./$(my.script_name).sh [OPTION]..."
@@ -238,22 +243,14 @@ display_help()
display_message " use passphrase normalization this dependency can "
display_message " be avoided."
. endif
-. if (have_build(my.install, "mbedtls"))
- display_message " --with-mbedtls Compile with MbedTLS Support"
- display_message " Provides a websockets implementation for query."
-. endif
-. if (have_build(my.install, "icu"))
- display_message " --build-icu Builds ICU libraries."
-. endif
-. if (have_build(my.install, "boost"))
- display_message " --build-boost Builds Boost libraries."
-. endif
-. if (have_build(my.install, "zmq"))
- display_message " --build-zmq Build ZeroMQ libraries."
-. endif
-. if (have_build(my.install, "mbedtls"))
- display_message " --build-mbedtls Builds MbedTLS libraries."
-. endif
+. for my.install.build as _build
+. if (is_true(_build.conditional))
+. define my.option = get_build_conditional_option(_build)
+. define my.spacer = difference(my.column, string.length(my.option))
+. define my.presentation = get_build_conditional_presentation_name(_build)
+ display_message " $(my.option)$(my.spacer)Build $(my.presentation) libraries."
+. endif
+. endfor _build
. custom_help(my.repository, my.install, my.script_name)
display_message " --prefix= Library install location (defaults to /usr/local)."
display_message " --disable-shared Disables shared library builds."
@@ -268,6 +265,7 @@ display_help()
.macro define_display_configuration(repository, install)
. define my.repository = define_display_configuration.repository
. define my.install = define_display_configuration.install
+. define my.column = " "
display_configuration()
{
display_message "$(my.repository.name) installer configuration."
@@ -284,18 +282,14 @@ display_configuration()
. if (have_build(my.install, "icu"))
display_message "WITH_ICU : $WITH_ICU"
. endif
-. if (have_build(my.install, "icu"))
- display_message "BUILD_ICU : $BUILD_ICU"
-. endif
-. if (have_build(my.install, "zmq"))
- display_message "BUILD_ZMQ : $BUILD_ZMQ"
-. endif
-. if (have_build(my.install, "mbedtls"))
- display_message "BUILD_MBEDTLS : $BUILD_MBEDTLS"
-. endif
-. if (have_build(my.install, "boost"))
- display_message "BUILD_BOOST : $BUILD_BOOST"
-. endif
+. for my.install.build as _build
+. if (is_true(_build.conditional))
+. define my.variable_name = get_build_conditional_variable(_build)
+. define my.spacer = difference(my.column, string.length(my.variable_name))
+ display_message "$(my.variable_name)$(my.spacer): $$(my.variable_name)"
+. endif
+. endfor _build
+.
display_message "BOOST_ROOT : $BOOST_ROOT"
. custom_configuration(my.repository, my.install)
display_message "PREFIX : $PREFIX"
@@ -330,11 +324,6 @@ set_with_boost_prefix
. define my.install = define_parse_command_line_options.install
parse_command_line_options()
{
-. if (have_build(my.install, "bitcoin-consensus") &\
- !(my.repository.name = "libbitcoin-consensus"))
- WITH_BITCOIN_CONSENSUS="yes"
-
-. endif
for OPTION in "$@"; do
case $OPTION in
# Standard script options.
@@ -347,26 +336,21 @@ parse_command_line_options()
(--disable-static) DISABLE_STATIC="yes";;
# Common project options.
-. if (have_build(my.install, "bitcoin-consensus") &\
- !(my.repository.name = "libbitcoin-consensus"))
- (--with-consensus) WITH_BITCOIN_CONSENSUS="yes";;
- (--without-consensus) unset -f WITH_BITCOIN_CONSENSUS;;
-. endif
. if (have_build(my.install, "icu"))
(--with-icu) WITH_ICU="yes";;
. endif
- # Custom build options (in the form of --build-