Skip to content

Commit

Permalink
Cleanup bootstrap scripts for allow defined as 0 variables
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Dec 19, 2023
1 parent 76f3aef commit 64300ab
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bootstrap-carla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# everything after this point requires Qt or PyQt

if [ -n "${PAWPAW_SKIP_QT}" ]; then
if [ -n "${PAWPAW_SKIP_QT}" ] && [ "${PAWPAW_SKIP_QT}" -eq 1 ]; then
exit 0
fi

Expand Down
14 changes: 7 additions & 7 deletions bootstrap-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fi
download libogg "${LIBOGG_VERSION}" "${LIBOGG_URL}"
build_autoconf libogg "${LIBOGG_VERSION}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make libogg "${LIBOGG_VERSION}" "check -j 1"
fi

Expand All @@ -303,7 +303,7 @@ LIBVORBIS_EXTRAFLAGS="--disable-examples"
download libvorbis "${LIBVORBIS_VERSION}" "${LIBVORBIS_URL}"
build_autoconf libvorbis "${LIBVORBIS_VERSION}" "${LIBVORBIS_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make libvorbis "${LIBVORBIS_VERSION}" "check -j 1"
fi

Expand Down Expand Up @@ -334,7 +334,7 @@ fi
download flac "${FLAC_VERSION}" "${FLAC_URL}" "tar.xz"
build_autoconf flac "${FLAC_VERSION}" "${FLAC_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make flac "${FLAC_VERSION}" "check -j 1"
fi

Expand All @@ -358,7 +358,7 @@ fi
download opus "${OPUS_VERSION}" "${OPUS_URL}"
build_autoconf opus "${OPUS_VERSION}" "${OPUS_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make opus "${OPUS_VERSION}" check
fi

Expand Down Expand Up @@ -396,14 +396,14 @@ download libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_URL}" "tar.xz"

build_autoconf libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make libsndfile "${LIBSNDFILE_VERSION}" check
fi

# ---------------------------------------------------------------------------------------------------------------------
# libsamplerate

if [ -z "${PAWPAW_SKIP_SAMPLERATE}" ]; then
if [ -z "${PAWPAW_SKIP_SAMPLERATE}" ] && [ "${PAWPAW_SKIP_SAMPLERATE}" -eq 1 ]; then

LIBSAMPLERATE_EXTRAFLAGS="--disable-fftw"

Expand All @@ -415,7 +415,7 @@ fi
download libsamplerate "${LIBSAMPLERATE_VERSION}" "${LIBSAMPLERATE_URL}"
build_autoconf libsamplerate "${LIBSAMPLERATE_VERSION}" "${LIBSAMPLERATE_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ "${MACOS}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ "${MACOS}" -eq 0 ] && [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make libsamplerate "${LIBSAMPLERATE_VERSION}" check
fi

Expand Down
2 changes: 1 addition & 1 deletion bootstrap-mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ build_waf lvtk1 "${LVTK1_VERSION}" "${LVTK1_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------

if [ -n "${PAWPAW_SKIP_PYTHON_MODULES}" ]; then
if [ -n "${PAWPAW_SKIP_PYTHON_MODULES}" ] && [ "${PAWPAW_SKIP_PYTHON_MODULES}" -eq 1 ]; then
exit 0
fi

Expand Down
44 changes: 22 additions & 22 deletions bootstrap-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# skip fluidsynth if glib is not wanted (fluidsynth requires glib)

if [ -n "${PAWPAW_SKIP_GLIB}" ]; then
if [ -n "${PAWPAW_SKIP_GLIB}" ] && [ "${PAWPAW_SKIP_GLIB}" -eq 1 ]; then
PAWPAW_SKIP_FLUIDSYNTH=1
fi

Expand All @@ -43,7 +43,7 @@ if [ -z "${autoconf}" ]; then
exit 2
fi

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then
if [ -z "${meson}" ]; then
echo "missing 'meson' program, cannot continue!"
exit 2
Expand Down Expand Up @@ -78,7 +78,7 @@ fi
download libpng "${LIBPNG_VERSION}" "${LIBPNG_URL}" "tar.xz"
build_autoconf libpng "${LIBPNG_VERSION}" "${LIBPNG_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make libpng "${LIBPNG_VERSION}" "check -j 1"
fi

Expand Down Expand Up @@ -122,7 +122,7 @@ download pixman "${PIXMAN_VERSION}" "${PIXMAN_URL}"
build_autoconf pixman "${PIXMAN_VERSION}" "${PIXMAN_EXTRAFLAGS}"

# FIXME tests fail on i686 CI builds
if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ] && [ "x${LINUX_TARGET}" != "xlinux-i686" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ] && [ "x${LINUX_TARGET}" != "xlinux-i686" ]; then
run_make pixman "${PIXMAN_VERSION}" check
fi

Expand Down Expand Up @@ -178,7 +178,7 @@ download fontconfig "${FONTCONFIG_VERSION}" "${FONTCONFIG_URL}"
build_autoconf fontconfig "${FONTCONFIG_VERSION}" "${FONTCONFIG_EXTRAFLAGS}"

# tests fail on stable release, see https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/177
# if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
# if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
# run_make fontconfig "${FONTCONFIG_VERSION}" check
# fi

Expand Down Expand Up @@ -276,14 +276,14 @@ download cairo "${CAIRO_VERSION}" "${CAIRO_URL}" "tar.xz"
build_autoconf cairo "${CAIRO_VERSION}" "${CAIRO_EXTRAFLAGS}"

# FIXME tests are failing :(
# if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
# if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
# run_make cairo "${CAIRO_VERSION}" "check -j 1"
# fi

# ---------------------------------------------------------------------------------------------------------------------
# fftw

if [ -z "${PAWPAW_SKIP_FFTW}" ]; then
if [ -z "${PAWPAW_SKIP_FFTW}" ] && [ "${PAWPAW_SKIP_FFTW}" -eq 1 ]; then

# fftw is not compatible with LTO
if [ -z "${PAWPAW_SKIP_LTO}" ] || [ "${PAWPAW_SKIP_LTO}" -eq 0 ]; then
Expand Down Expand Up @@ -312,7 +312,7 @@ fi
download fftw "${FFTW_VERSION}" "${FFTW_URL}"
build_autoconf fftw "${FFTW_VERSION}" "${FFTW_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make fftw "${FFTW_VERSION}" check
fi

Expand All @@ -321,7 +321,7 @@ fi # PAWPAW_SKIP_FFTW
# ---------------------------------------------------------------------------------------------------------------------
# fftwf

if [ -z "${PAWPAW_SKIP_FFTW}" ]; then
if [ -z "${PAWPAW_SKIP_FFTW}" ] && [ "${PAWPAW_SKIP_FFTW}" -eq 1 ]; then

# fftw is not compatible with LTO
if [ -z "${PAWPAW_SKIP_LTO}" ] || [ "${PAWPAW_SKIP_LTO}" -eq 0 ]; then
Expand All @@ -340,7 +340,7 @@ fi
copy_download fftw fftwf "${FFTW_VERSION}"
build_autoconf fftwf "${FFTW_VERSION}" "${FFTWF_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ]; then
run_make fftwf "${FFTW_VERSION}" check
fi

Expand All @@ -367,7 +367,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# glib

if [ -z "${PAWPAW_SKIP_GLIB}" ]; then
if [ -z "${PAWPAW_SKIP_GLIB}" ] && [ "${PAWPAW_SKIP_GLIB}" -eq 1 ]; then

if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then
GLIB_EXTRAFLAGS="--disable-rebuilds"
Expand Down Expand Up @@ -408,7 +408,7 @@ fi # PAWPAW_SKIP_GLIB

LIBLO_EXTRAFLAGS="--enable-threads --disable-examples --disable-tools"

if [ "${CROSS_COMPILING}" -eq 1 ]; then
if [ -z "${PAWPAW_SKIP_TESTS}" ] || [ "${PAWPAW_SKIP_TESTS}" -ne 1 ]; then
LIBLO_EXTRAFLAGS+=" --disable-tests"
fi

Expand All @@ -424,14 +424,14 @@ download liblo "${LIBLO_VERSION}" "${LIBLO_URL}"
build_autoconf liblo "${LIBLO_VERSION}" "${LIBLO_EXTRAFLAGS}"

# FIXME tests fail on macOS
if [ "${CROSS_COMPILING}" -eq 0 ] && [ -z "${PAWPAW_SKIP_TESTS}" ] && [ "${MACOS}" -eq 0 ]; then
if [ -n "${PAWPAW_SKIP_TESTS}" ] && [ "${PAWPAW_SKIP_TESTS}" -eq 1 ] && [ "${MACOS}" -eq 0 ]; then
run_make liblo "${LIBLO_VERSION}" check
fi

# ---------------------------------------------------------------------------------------------------------------------
# serd

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

if [ "${CROSS_COMPILING}" -eq 1 ] && [ "${LINUX}" -eq 0 ] && [ -z "${EXE_WRAPPER}" ]; then
SERD_EXTRAFLAGS="-Dtools=disabled"
Expand All @@ -447,7 +447,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# sord

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

if [ "${CROSS_COMPILING}" -eq 1 ] && [ "${LINUX}" -eq 0 ] && [ -z "${EXE_WRAPPER}" ]; then
SORD_EXTRAFLAGS="-Dtools=disabled"
Expand All @@ -461,7 +461,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# lv2

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

git_clone lv2 "${LV2_VERSION}" "${LV2_URL}"
build_meson lv2 "${LV2_VERSION}" "-Dlv2dir=${PAWPAW_PREFIX}/lib/lv2 -Dplugins=disabled"
Expand All @@ -471,7 +471,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# sratom

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

download sratom "${SRATOM_VERSION}" "${SRATOM_URL}" "tar.xz"
build_meson sratom "${SRATOM_VERSION}" "-Ddefault_library=static -Ddocs=disabled"
Expand All @@ -481,7 +481,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# lilv

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

if [ "${CROSS_COMPILING}" -eq 1 ] && [ "${LINUX}" -eq 0 ]; then
LILV_EXTRAFLAGS="-Dtests=disabled -Dtools=disabled"
Expand All @@ -495,7 +495,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# lv2lint

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

if [ "${LV2LINT_SUPPORTED}" -eq 1 ]; then
download lv2lint "${LV2LINT_VERSION}" "${LV2LINT_URL}"
Expand All @@ -508,7 +508,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# kxstudio lv2 extensions

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

git_clone kxstudio-lv2-extensions "${KXSTUDIO_LV2_EXTENSIONS_VERSION}" "${KXSTUDIO_LV2_EXTENSIONS_URL}"
build_make kxstudio-lv2-extensions "${KXSTUDIO_LV2_EXTENSIONS_VERSION}"
Expand All @@ -518,7 +518,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# MOD lv2 extensions

if [ -z "${PAWPAW_SKIP_LV2}" ]; then
if [ -z "${PAWPAW_SKIP_LV2}" ] && [ "${PAWPAW_SKIP_LV2}" -eq 1 ]; then

git_clone mod-sdk "${MOD_SDK_VERSION}" "${MOD_SDK_URL}"
build_make mod-sdk "${MOD_SDK_VERSION}"
Expand All @@ -528,7 +528,7 @@ fi # PAWPAW_SKIP_LV2
# ---------------------------------------------------------------------------------------------------------------------
# fluidsynth

if [ -z "${PAWPAW_SKIP_FLUIDSYNTH}" ]; then
if [ -z "${PAWPAW_SKIP_FLUIDSYNTH}" ] && [ "${PAWPAW_SKIP_FLUIDSYNTH}" -eq 1 ]; then

FLUIDSYNTH_EXTRAFLAGS="-Denable-floats=ON"
FLUIDSYNTH_EXTRAFLAGS+=" -Denable-alsa=OFF"
Expand Down
4 changes: 4 additions & 0 deletions setup/check_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,7 @@ function check_target() {
}

check_target

if [ "${CROSS_COMPILING}" -eq 1 ]; then
PAWPAW_SKIP_TESTS=${PAWPAW_SKIP_TESTS:=1}
fi

0 comments on commit 64300ab

Please sign in to comment.