-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gnutls compile success p11-kit added as well
- Loading branch information
1 parent
8590a8b
commit 77013a3
Showing
9 changed files
with
610 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ jobs: | |
ToolName: gnutls | ||
RequiredDeps: | | ||
libtasn1 | ||
p11-kit | ||
zlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: p11-kit Tool Build | ||
on: | ||
push: | ||
branches-ignore: | ||
- trash | ||
schedule: | ||
- cron: '30 5 * * *' | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/tool_build.yml | ||
with: | ||
ToolName: p11-kit | ||
RequiredDeps: | | ||
libtasn1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#!/bin/bash | ||
set -e | ||
. "${WLB_SCRIPT_FOLDER:-$(dirname "$(readlink -f "$BASH_SOURCE")")}/helpers.sh" | ||
|
||
BLD_CONFIG_BUILD_NAME="p11-kit" | ||
BLD_CONFIG_OUR_LIB_DEPS=("libtasn1") | ||
BLD_CONFIG_OUR_LIB_BINS_PATH=("libtasn1") | ||
BLD_CONFIG_CONFIG_CMD_ADDL=( "--without-systemd" "--without-trust-paths" "--enable-debug=no" "--without-libffi" ) #for debug wil loverride with addl_debug | ||
BLD_CONFIG_CONFIG_CMD_ADDL_DEBUG=( "--enable-debug=yes" ) | ||
BLD_CONFIG_BUILD_ADDL_CFLAGS_STATIC=("-DASN1_STATIC") #doesnt get used as we force static off for now | ||
BLD_CONFIG_GNU_LIBS_ADD_TO_REPO=1 | ||
BLD_CONFIG_GNU_LIBS_ADDL=( "ssize_t" "getopt-gnu" ) | ||
|
||
|
||
#BLD_CONFIG_VCPKG_DEPS=( "libffi" ) | ||
|
||
# BLD_CONFIG_BUILD_FOLDER_NAME="myapp2"; #if you want it compiling in a diff folder | ||
# BLD_CONFIG_BUILD_DEBUG=1 | ||
|
||
if [[ $BLD_CONFIG_PREFER_STATIC_LINKING -eq 1 ]]; then | ||
BLD_CONFIG_BUILD_ADDL_CFLAGS=( "${BLD_CONFIG_BUILD_ADDL_CFLAGS_STATIC[@]}" ) #need this to still prevent static | ||
BLD_CONFIG_PREFER_STATIC_LINKING=0 #they manually prevent static linking due to having to call their init?? | ||
fi | ||
|
||
|
||
|
||
function ourmain() { | ||
startcommon; | ||
|
||
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/p11-glue/p11-kit . | ||
#sed -i -E 's#build/##' configure.ac part of our patch now | ||
#sed -i -E 's#NEED_READPASSPHRASE#!OS_WIN32#' common/Makefile.am #macro only defined is os=unix | ||
fi | ||
|
||
if [[ -z $SKIP_STEP || $SKIP_STEP == "our_patch" ]]; then | ||
if [[ $BLD_CONFIG_GNU_LIBS_ADD_TO_REPO -eq "1" ]]; then | ||
git restore --staged gnulib .gitmodules #we need to unstage them from our clone | ||
fi | ||
apply_our_repo_patch; # Applies from patches folder repo_BUILD_NAME.patch to the sources | ||
cp gnulib/build-aux/bootstrap . | ||
cp gnulib/build-aux/bootstrap.conf . | ||
mkdir -p m4 | ||
cp build/m4/ld-version-script.m4 m4/ | ||
echo "gnulib_tool_option_extras=\" --without-tests --symlink --m4-base=m4 --lib=libp11kit --source-base=lib --cache-modules\"" >> bootstrap.conf | ||
git_staging_add bootstrap bootstrap.conf | ||
if [[ $BLD_CONFIG_GNU_LIBS_ADD_TO_REPO -eq "1" ]]; then | ||
git_staging_add .gitmodules gnulib | ||
fi | ||
fi | ||
|
||
if [[ $BLD_CONFIG_GNU_LIBS_USED -eq "1" ]]; then | ||
if [[ -z $SKIP_STEP || $SKIP_STEP == "gnulib" ]]; then | ||
gnulib_switch_to_master_and_patch; | ||
fi | ||
cd $BLD_CONFIG_SRC_FOLDER | ||
if [[ -z $SKIP_STEP || $SKIP_STEP == "bootstrap" ]]; then | ||
gnulib_add_addl_modules_and_bootstrap; | ||
autoreconf --symlink --verbose --install --force #needed to get libtool | ||
gnulib_ensure_buildaux_scripts_copied --forced | ||
libtool_fixes | ||
|
||
fi | ||
fi | ||
if [[ -z $SKIP_STEP || $SKIP_STEP == "autoconf" ]]; then #not empty allowed as if we bootstrapped above we dont need to run nautoconf | ||
gnulib_ensure_buildaux_scripts_copied | ||
autoreconf --symlink --verbose --install | ||
libtool_fixes | ||
autoreconf --verbose #update for libtool fixes | ||
SKIP_STEP="" | ||
fi | ||
|
||
if [[ -z $SKIP_STEP || $SKIP_STEP == "vcpkg" ]]; then | ||
vcpkg_install_package | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
diff --git a/build-aux/ar-lib b/build-aux/ar-lib | ||
index 1521987496..edcc491b70 100644 | ||
index 1521987496..855ab90a27 100644 | ||
--- a/build-aux/ar-lib | ||
+++ b/build-aux/ar-lib | ||
@@ -1,6 +1,11 @@ | ||
@@ -1,6 +1,10 @@ | ||
#! /bin/sh | ||
# Wrapper for Microsoft lib.exe | ||
+set -eo pipefail | ||
|
||
+# Wrapper for compilers which do not understand '-c -o'. | ||
+if [[ $GNU_BUILD_WRAPPER_DEBUG -eq 1 || -v COLOR_MAJOR ]]; then #if COLOR_MAJOR is set we want to include the wrapper so we can unset it otherwise would screw cmd output | ||
+ . "$(dirname "$(readlink -f "$0")")/wrapper_helper.sh" "$@" | ||
+fi | ||
me=ar-lib | ||
scriptversion=2024-06-19.01; # UTC | ||
|
||
@@ -29,6 +34,14 @@ scriptversion=2024-06-19.01; # UTC | ||
@@ -29,6 +33,14 @@ scriptversion=2024-06-19.01; # UTC | ||
# bugs to <[email protected]> or send patches to | ||
# <[email protected]>. | ||
|
||
|
@@ -29,7 +28,7 @@ index 1521987496..edcc491b70 100644 | |
|
||
# func_error message | ||
func_error () | ||
@@ -49,6 +62,10 @@ func_file_conv () | ||
@@ -49,6 +61,10 @@ func_file_conv () | ||
/ | /[!/]*) # absolute file, and not a UNC file | ||
if test -z "$file_conv"; then | ||
# lazily determine how to convert abs files | ||
|
@@ -40,24 +39,24 @@ index 1521987496..edcc491b70 100644 | |
case `uname -s` in | ||
MINGW*) | ||
file_conv=mingw | ||
@@ -60,6 +77,7 @@ func_file_conv () | ||
@@ -60,6 +76,7 @@ func_file_conv () | ||
file_conv=wine | ||
;; | ||
esac | ||
+ fi | ||
fi | ||
case $file_conv in | ||
mingw) | ||
@@ -92,7 +110,7 @@ func_at_file () | ||
@@ -92,7 +109,7 @@ func_at_file () | ||
|
||
for member | ||
do | ||
- $AR -NOLOGO $operation:"$member" "$archive" || exit $? | ||
+ func_ar_run $operation:"$member" "$archive" | ||
+ func_ar_run $operation:"${COLOR_MINOR2}$member${COLOR_NONE}" "$archive" | ||
done | ||
} | ||
|
||
@@ -199,7 +217,7 @@ esac | ||
@@ -199,7 +216,7 @@ esac | ||
|
||
if test -n "$delete"; then | ||
if test ! -f "$orig_archive"; then | ||
|
@@ -66,7 +65,7 @@ index 1521987496..edcc491b70 100644 | |
fi | ||
for member | ||
do | ||
@@ -209,14 +227,14 @@ if test -n "$delete"; then | ||
@@ -209,14 +226,14 @@ if test -n "$delete"; then | ||
;; | ||
*) | ||
func_file_conv "$1" | ||
|
@@ -83,7 +82,7 @@ index 1521987496..edcc491b70 100644 | |
fi | ||
if test $# -gt 0; then | ||
for member | ||
@@ -227,15 +245,15 @@ elif test -n "$extract"; then | ||
@@ -227,15 +244,15 @@ elif test -n "$extract"; then | ||
;; | ||
*) | ||
func_file_conv "$1" | ||
|
@@ -98,11 +97,11 @@ index 1521987496..edcc491b70 100644 | |
| while read member | ||
do | ||
- $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? | ||
+ func_ar_run -EXTRACT:"$member" "$archive" | ||
+ func_ar_run -EXTRACT:${COLOR_MINOR2}"$member"${COLOR_NONE} "$archive" | ||
done | ||
fi | ||
|
||
@@ -266,14 +284,14 @@ elif test -n "$quick$replace"; then | ||
@@ -266,14 +283,14 @@ elif test -n "$quick$replace"; then | ||
done | ||
|
||
if test -n "$orig_archive"; then | ||
|
@@ -122,7 +121,7 @@ index 1521987496..edcc491b70 100644 | |
+ func_ar_run -LIST ${COLOR_MAJOR}"$archive"${COLOR_NONE} | ||
fi | ||
diff --git a/build-aux/compile b/build-aux/compile | ||
index c3e8760e96..55eb76649e 100644 | ||
index c3e8760e96..d0df0ab4ff 100644 | ||
--- a/build-aux/compile | ||
+++ b/build-aux/compile | ||
@@ -1,5 +1,10 @@ | ||
|
@@ -353,7 +352,7 @@ index c3e8760e96..55eb76649e 100644 | |
shift | ||
;; | ||
*) | ||
@@ -225,8 +316,29 @@ func_cl_wrapper () | ||
@@ -225,8 +316,31 @@ func_cl_wrapper () | ||
if test -n "$linker_opts"; then | ||
linker_opts="-link$linker_opts" | ||
fi | ||
|
@@ -368,6 +367,8 @@ index c3e8760e96..55eb76649e 100644 | |
+ ;; | ||
+ \/*) #strip slash commands | ||
+ ;; | ||
+ -D*) #any defines | ||
+ ;; | ||
+ *) | ||
+ FINAL_ARR+=($VAL) | ||
+ ;; | ||
|
@@ -387,14 +388,14 @@ index c3e8760e96..55eb76649e 100644 | |
eat= | ||
diff --git a/build-aux/ld-link b/build-aux/ld-link | ||
new file mode 100644 | ||
index 0000000000..3b57d4e63b | ||
index 0000000000..a8bc17a1a8 | ||
--- /dev/null | ||
+++ b/build-aux/ld-link | ||
@@ -0,0 +1,45 @@ | ||
@@ -0,0 +1,44 @@ | ||
+#!/bin/bash | ||
+set -eo pipefail | ||
+ | ||
+# Wrapper for compilers which do not understand '-c -o'. | ||
+#wrapper around windows 'ld' aka link.exe. Primarily just colorization, path conversion, and making sure the MSVC link.exe is called NOT *nix link. | ||
+if [[ $GNU_BUILD_WRAPPER_DEBUG -eq 1 || -v COLOR_MAJOR ]]; then #if COLOR_MAJOR is set we want to include the wrapper so we can unset it otherwise would screw cmd output | ||
+ . "$(dirname "$(readlink -f "$0")")/wrapper_helper.sh" "$@" | ||
+fi | ||
|
@@ -407,7 +408,7 @@ index 0000000000..3b57d4e63b | |
+ echo $WPATH | ||
+} | ||
+ | ||
+# with the other wrappers you can use cl or lib as they genreally wont collide with msys but link.exe does | ||
+# with the other wrappers you can use cl or lib as they generally wont collide with msys but link.exe does | ||
+if [[ ! -v MS_LINK ]]; then | ||
+ MS_LINK=`cygpath.exe -m "$VCToolsInstallDir"` | ||
+ MS_LINK="${LINK_PATH}bin/HostX64/x64/link.exe" | ||
|
@@ -430,25 +431,29 @@ index 0000000000..3b57d4e63b | |
+ set -- "$@" "$file" | ||
+ shift | ||
+done | ||
+echo "HI MSLINK IS: $MS_LINK" | ||
+if [[ $GNU_BUILD_WRAPPER_DEBUG -eq 1 ]]; then | ||
+ wrapper_exec "$MS_LINK" -NOLOGO "$@" | ||
+else | ||
+ exec "$MS_LINK" -NOLOGO "$@" | ||
+fi | ||
diff --git a/build-aux/wrapper_helper.sh b/build-aux/wrapper_helper.sh | ||
new file mode 100644 | ||
index 0000000000..4ff5b73c53 | ||
index 0000000000..7f3bc6c350 | ||
--- /dev/null | ||
+++ b/build-aux/wrapper_helper.sh | ||
@@ -0,0 +1,57 @@ | ||
@@ -0,0 +1,62 @@ | ||
+#!/bin/bash | ||
+set -eo pipefail | ||
+shopt -s inherit_errexit | ||
+ | ||
+function clear_colors { | ||
+ unset COLOR_MINOR COLOR_MINOR2 COLOR_MAJOR COLOR_NONE | ||
+} | ||
+function safer_color_echo { | ||
+ local STR="${@//\\/\\\\}" | ||
+ #prevent escape sequences other than \e[ so we dont get accidental escapes | ||
+ echo -e "${STR//\\\\e[/\\e[}" 1>&2 | ||
+} | ||
+ | ||
+CALLER_NAME=`basename ${0^^}` | ||
+if [[ $GNU_BUILD_WRAPPER_DEBUG -eq 1 ]]; then | ||
|
@@ -460,7 +465,7 @@ index 0000000000..4ff5b73c53 | |
+ else | ||
+ clear_colors; | ||
+ fi | ||
+ echo -e ${COLOR_MINOR}GNU ${CALLER_NAME} INPUT${COLOR_NONE}: "$@" 1>&2 | ||
+ safer_color_echo "${COLOR_MINOR}GNU ${CALLER_NAME} INPUT${COLOR_NONE}: $@" | ||
+else | ||
+ clear_colors; | ||
+fi | ||
|
@@ -483,7 +488,7 @@ index 0000000000..4ff5b73c53 | |
+ echo -e "${@//'\e'\[*([0-9;])m/}" >> "$GNU_BUILD_CMD_FILE" | ||
+ fi | ||
+ if [[ $GNU_BUILD_WRAPPER_DEBUG -eq 1 ]]; then | ||
+ echo -e "${COLOR_MINOR}GNU ${CALLER_NAME} OUTPUT${COLOR_NONE}: " "$@" $STD_DECLARE $linker_opts 1>&2 | ||
+ safer_color_echo "${COLOR_MINOR}GNU ${CALLER_NAME} OUTPUT${COLOR_NONE}: $@" | ||
+ fi | ||
+ declare -a WLB_RUN_CMD=("$@") | ||
+ | ||
|
Oops, something went wrong.