Skip to content

Commit

Permalink
libtans1 added for gnutls, also added NoDebug support to generate_wor…
Browse files Browse the repository at this point in the history
…kflows
  • Loading branch information
mitchcapper committed Dec 18, 2024
1 parent 16f6e43 commit d5203df
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 10 deletions.
15 changes: 12 additions & 3 deletions .github/generate_workflows.csx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
6 changes: 4 additions & 2 deletions .github/packages.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
automake
automake: -NoDebug
awk
coreutils
diffutils
findutils
gawk
gnutls: libtasn1
grep: pcre2
gzip
highlight
libhsts
libpsl
libtasn1
make
openssl
patch
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tool_automake_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ jobs:
with:
ToolName: automake
NoDebugBuild: true

3 changes: 2 additions & 1 deletion .github/workflows/tool_gnutls_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ jobs:
uses: ./.github/workflows/tool_build.yml
with:
ToolName: gnutls

RequiredDeps: |
libtasn1
14 changes: 14 additions & 0 deletions .github/workflows/tool_libtasn1_build.yml
Original file line number Diff line number Diff line change
@@ -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

9 changes: 6 additions & 3 deletions build/f_gnutls_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
64 changes: 64 additions & 0 deletions build/f_libtasn1_build.sh
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit d5203df

Please sign in to comment.