diff --git a/.github/generate_workflows.csx b/.github/generate_workflows.csx index e575773..f3b97cf 100644 --- a/.github/generate_workflows.csx +++ b/.github/generate_workflows.csx @@ -5,12 +5,21 @@ foreach (var package in packages){ var pkg_name = arr[0]; if (String.IsNullOrWhiteSpace(pkg_name)) continue; - var deps =""; - if (arr.Length > 1){ - var dep_arr = arr[1].Split(new []{" "},StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); + var deps = arr.Length > 1 ? arr[1] : ""; + var noDebug=false; + if (deps.Contains("-NoDebug")){ + deps = deps.Replace("-NoDebug",""); + noDebug=true; + } + if (! string.IsNullOrWhiteSpace(deps)){ + var dep_arr = deps.Split(new []{" "},StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); var tabs=" "; + deps = $"RequiredDeps: |\n{tabs}" + string.Join("\n" + tabs,dep_arr); } + if (noDebug) + deps +="\n NoDebugBuild: true"; + deps = deps.Trim(); var cont = orig_cont.Replace("[NAME]",pkg_name).Replace("[DEPS]",deps); File.WriteAllText($"workflows/tool_{pkg_name}_build.yml", cont); } \ No newline at end of file diff --git a/.github/packages.txt b/.github/packages.txt index 4c2896f..cccf44c 100644 --- a/.github/packages.txt +++ b/.github/packages.txt @@ -1,14 +1,16 @@ -automake +automake: -NoDebug awk coreutils diffutils findutils gawk +gnutls: libtasn1 grep: pcre2 gzip highlight libhsts libpsl +libtasn1 make openssl patch @@ -17,7 +19,7 @@ pdcurses sed symlinks tar -wget: pcre2 libpsl zlib +wget: pcre2 libpsl zlib openssl wget2: pcre2 libpsl zlib libhsts wolfcrypt tar which wolfcrypt diff --git a/.github/workflows/tool_automake_build.yml b/.github/workflows/tool_automake_build.yml index 017117f..62de070 100644 --- a/.github/workflows/tool_automake_build.yml +++ b/.github/workflows/tool_automake_build.yml @@ -12,4 +12,3 @@ jobs: with: ToolName: automake NoDebugBuild: true - diff --git a/.github/workflows/tool_gnutls_build.yml b/.github/workflows/tool_gnutls_build.yml index 7f51afc..d2de0e0 100644 --- a/.github/workflows/tool_gnutls_build.yml +++ b/.github/workflows/tool_gnutls_build.yml @@ -11,4 +11,5 @@ jobs: uses: ./.github/workflows/tool_build.yml with: ToolName: gnutls - + RequiredDeps: | + libtasn1 diff --git a/.github/workflows/tool_libtasn1_build.yml b/.github/workflows/tool_libtasn1_build.yml new file mode 100644 index 0000000..d6c272b --- /dev/null +++ b/.github/workflows/tool_libtasn1_build.yml @@ -0,0 +1,14 @@ +name: libtasn1 Tool Build +on: + push: + branches-ignore: + - trash + schedule: + - cron: '30 5 * * *' + +jobs: + build: + uses: ./.github/workflows/tool_build.yml + with: + ToolName: libtasn1 + diff --git a/build/f_gnutls_build.sh b/build/f_gnutls_build.sh index 5839c12..a3d0a63 100644 --- a/build/f_gnutls_build.sh +++ b/build/f_gnutls_build.sh @@ -3,11 +3,14 @@ set -e . "${WLB_SCRIPT_FOLDER:-$(dirname "$(readlink -f "$BASH_SOURCE")")}/helpers.sh" BLD_CONFIG_BUILD_NAME="gnutls" -BLD_CONFIG_GNU_LIBS_ADDL=( "dirent" "getopt-gnu" ) -BLD_CONFIG_CONFIG_CMD_ADDL=( "--with-included-unistring" "--with-included-libtasn1" "--without-p11-kit" ) +BLD_CONFIG_GNU_LIBS_ADDL=( "dirent" "getopt-gnu" "opendir" "closedir" "readdir" ) +BLD_CONFIG_CONFIG_CMD_ADDL=( "--with-included-unistring" "--without-p11-kit" ) BLD_CONFIG_VCPKG_DEPS=( "gmp" "nettle" "brotli" "zstd" ) BLD_CONFIG_PKG_CONFIG_MANUAL_ADD=( "gmp" ) BLD_CONFIG_BUILD_ADDL_CFLAGS=( "-I../gl/" ) +BLD_CONFIG_BUILD_ADDL_CFLAGS_STATIC=("-DASN1_STATIC") +BLD_CONFIG_OUR_LIB_DEPS=("libtasn1") +BLD_CONFIG_OUR_LIB_BINS_PATH=("libtasn1") # BLD_CONFIG_BUILD_FOLDER_NAME="myapp2"; #if you want it compiling in a diff folder # BLD_CONFIG_BUILD_DEBUG=1 @@ -39,7 +42,7 @@ fi sed -i -E '/doc\//d;/GTK_DOC_CHECK/d' configure.ac fi if [[ $BLD_CONFIG_CONFIG_NO_PO -eq 1 ]]; then - sed -i -E '/SUBDIRS \+= po/d' Makefile.am + sed -i -E '/SUBDIRS \+= po/d' Makefile.am sed -i -E '/po\//d;' configure.ac fi if [[ -f "gl/override/doc/gendocs_template.diff" && $BLD_CONFIG_CONFIG_NO_DOCS -eq "1" ]]; then diff --git a/build/f_libtasn1_build.sh b/build/f_libtasn1_build.sh new file mode 100644 index 0000000..d3f089e --- /dev/null +++ b/build/f_libtasn1_build.sh @@ -0,0 +1,64 @@ +#!/bin/bash +set -e +. "${WLB_SCRIPT_FOLDER:-$(dirname "$(readlink -f "$BASH_SOURCE")")}/helpers.sh" + +BLD_CONFIG_BUILD_NAME="libtasn1" +BLD_CONFIG_BUILD_ADDL_CFLAGS_STATIC=("-DASN1_STATIC") +BLD_CONFIG_CONFIG_CMD_ADDL=("--disable-fuzzing") +BLD_CONFIG_CONFIG_CMD_ADDL_STATIC=("--enable-static") #removing the disable shared +# BLD_CONFIG_BUILD_FOLDER_NAME="myapp2"; #if you want it compiling in a diff folder +# BLD_CONFIG_BUILD_DEBUG=1 + +function ourmain() { + startcommon; + BLD_CONFIG_GNU_LIBS_EXCLUDE=("${BLD_CONFIG_GNU_LIBS_DEFAULT[@]}") +if test 5 -gt 100; then + echo "Just move the fi down as you want to skip steps, or pass the step to skip to (per below) as the first arg" +fi + if [[ -z $SKIP_STEP || $SKIP_STEP == "checkout" ]]; then + git_clone_and_add_ignore https://github.com/gnutls/libtasn1 . + fi + + if [[ $BLD_CONFIG_GNU_LIBS_USED -eq "1" ]]; then + if [[ -z $SKIP_STEP || $SKIP_STEP == "gnulib" ]]; then + gnulib_switch_to_master_and_patch; + if [[ $BLD_CONFIG_CONFIG_NO_TESTS -eq 1 ]]; then + sed -i -E '/SUBDIRS \+= tests/d;s#fuzz tests##' Makefile.am #when fuzz tests dont appear next to each other on the subdirs line we will need ot do something else + sed -i -E '/tests\//d;/fuzz\//d;' configure.ac + fi + if [[ $BLD_CONFIG_CONFIG_NO_DOCS -eq 1 ]]; then + sed -i -E '/enable-doc/d;/enable-gtk-doc/d;/SUBDIRS \+= doc/d;' Makefile.am + sed -i -E '/doc\//d;/GTK_DOC_CHECK/d' configure.ac + fi + if [[ $BLD_CONFIG_CONFIG_NO_PO -eq 1 ]]; then + sed -i -E '/SUBDIRS \+= po/d' Makefile.am + sed -i -E '/po\//d;' configure.ac + fi + if [[ -f "lib/gl/top/README-release.diff" ]]; then + git rm lib/gl/top/README-release.diff lib/gl/doc/gendocs_template.diff + fi + fi + cd $BLD_CONFIG_SRC_FOLDER + if [[ -z $SKIP_STEP || $SKIP_STEP == "bootstrap" ]]; then + gnulib_add_addl_modules_and_bootstrap; + fi + fi + + if [[ $SKIP_STEP == "autoconf" ]]; then #not empty allowed as if we bootstrapped above we dont need to run nautoconf + autoreconf --symlink --verbose --install + SKIP_STEP="" + fi + + cd $BLD_CONFIG_SRC_FOLDER + if [[ -z $SKIP_STEP || $SKIP_STEP == "configure" ]]; then + configure_apply_fixes_and_run; + else + setup_build_env; + fi + + run_make + make_install + + finalcommon; +} +ourmain;