diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/botan/configure | |
Diffstat (limited to 'vcpkg/ports/botan/configure')
| -rwxr-xr-x | vcpkg/ports/botan/configure | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/vcpkg/ports/botan/configure b/vcpkg/ports/botan/configure new file mode 100755 index 0000000..e125299 --- /dev/null +++ b/vcpkg/ports/botan/configure @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +set -e + +declare -a OUT_OPTIONS + +INTERPRETER=python3 + +LAST_SEEN= +COPY_OPTIONS=no +COPY_PREFIX=yes +BUILD_TYPE=RELEASE +for OPTION; do + case "${OPTION},${COPY_OPTIONS}" in + */configure.py,no) + OUT_OPTIONS+=("${OPTION}") + INTERPRETER="${LAST_SEEN}" + COPY_OPTIONS=yes + ;; + --prefix=*,yes) + if [ "${COPY_PREFIX}" = "yes" ] ; then + OUT_OPTIONS+=("${OPTION}") + COPY_PREFIX=no + fi + ;; + --*=*,yes) + OUT_OPTIONS+=("${OPTION}") + ;; + *=*) + ;; + *,yes) + OUT_OPTIONS+=("${OPTION}") + if [ "${OPTION}" = "--debug-mode" ] ; then + BUILD_TYPE=DEBUG + fi + ;; + esac + LAST_SEEN="${OPTION}" +done + +set -x +export CXXFLAGS="$CPPFLAGS $CXXFLAGS" +"${INTERPRETER}" "${OUT_OPTIONS[@]}" + +sed -e "1i\\ +ZLIB_LIBS = \$(ZLIB_LIBS_${BUILD_TYPE})" -i -- Makefile |