mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 19:46:31 +01:00
fix stupid gnutls
This commit is contained in:
parent
bbd48040ae
commit
c2ecd887e9
1 changed files with 18 additions and 59 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
Make static/shared initialization deterministic in the build system, without
|
Make static/shared initialization deterministic from the build system only.
|
||||||
using GNUTLS_GUILE_CROSS_COMPILING and without probing shared-library suffixes.
|
Do not patch Scheme sources; rewrite generated gnutls.scm at build time.
|
||||||
|
|
||||||
--- guile-gnutls-v5.0.1/configure.ac
|
--- guile-gnutls-v5.0.1/configure.ac
|
||||||
+++ guile-gnutls-v5.0.1/configure.ac
|
+++ guile-gnutls-v5.0.1/configure.ac
|
||||||
|
|
@ -15,69 +15,28 @@ using GNUTLS_GUILE_CROSS_COMPILING and without probing shared-library suffixes.
|
||||||
AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
|
AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
|
||||||
--- guile-gnutls-v5.0.1/guile/Makefile.am
|
--- guile-gnutls-v5.0.1/guile/Makefile.am
|
||||||
+++ guile-gnutls-v5.0.1/guile/Makefile.am
|
+++ guile-gnutls-v5.0.1/guile/Makefile.am
|
||||||
@@ -43,9 +43,18 @@
|
@@ -46,6 +46,8 @@
|
||||||
|
|
||||||
CLEANFILES = modules/gnutls.scm
|
|
||||||
|
|
||||||
+if ENABLE_SHARED
|
|
||||||
+maybe_load_extension = #t
|
|
||||||
+guile_extension_dir_variable = GNUTLS_GUILE_EXTENSION_DIR="$(abs_top_builddir)/guile/src"
|
|
||||||
+else
|
|
||||||
+maybe_load_extension = #f
|
|
||||||
+guile_extension_dir_variable =
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
.in.scm:
|
.in.scm:
|
||||||
$(AM_V_GEN)$(MKDIR_P) "`dirname "$@"`" ; cat "$^" | \
|
$(AM_V_GEN)$(MKDIR_P) "`dirname "$@"`" ; cat "$^" | \
|
||||||
$(SED) -e's|[@]maybe_guileextensiondir[@]|$(maybe_guileextensiondir)|g' \
|
$(SED) -e's|[@]maybe_guileextensiondir[@]|$(maybe_guileextensiondir)|g' \
|
||||||
+ -e's|[@]maybe_load_extension[@]|$(maybe_load_extension)|g' \
|
+ -e "1,/(unless (getenv \"GNUTLS_GUILE_CROSS_COMPILING\")/s|(unless (getenv \"GNUTLS_GUILE_CROSS_COMPILING\")|(unless (or (false-if-exception (dynamic-call \"scm_init_gnutls\" (dynamic-link #f))) (getenv \"GNUTLS_GUILE_CROSS_COMPILING\"))|" \
|
||||||
|
+ -e "s|(unless (getenv \"GNUTLS_GUILE_CROSS_COMPILING\")|(when (module-variable (current-module) 'protocol/ssl3)|" \
|
||||||
> "$@.tmp"
|
> "$@.tmp"
|
||||||
$(AM_V_at)mv "$@.tmp" "$@"
|
$(AM_V_at)mv "$@.tmp" "$@"
|
||||||
|
|
||||||
@@ -86,7 +95,7 @@
|
@@ -56,6 +58,7 @@
|
||||||
$(AM_V_P) && out=1 || out=- ; \
|
|
||||||
unset GUILE_LOAD_COMPILED_PATH ; LC_ALL=C \
|
|
||||||
GUILE_AUTO_COMPILE=0 $(CROSS_COMPILING_VARIABLE) \
|
|
||||||
- GNUTLS_GUILE_EXTENSION_DIR="$(abs_top_builddir)/guile/src" \
|
|
||||||
+ $(guile_extension_dir_variable) \
|
|
||||||
$(GUILD) compile --target="$(host)" \
|
|
||||||
-L "$(top_builddir)/guile/modules" \
|
|
||||||
-L "$(top_srcdir)/guile/modules" \
|
|
||||||
--- guile-gnutls-v5.0.1/guile/modules/gnutls.in
|
|
||||||
+++ guile-gnutls-v5.0.1/guile/modules/gnutls.in
|
|
||||||
@@ -816,12 +816,21 @@
|
|
||||||
;; The .scm file is supposed to be architecture-independent. Thus,
|
|
||||||
;; save 'extensiondir' only if it's different from what Guile expects.
|
|
||||||
@maybe_guileextensiondir@))
|
|
||||||
+ (define %load-extension? @maybe_load_extension@)
|
|
||||||
|
|
||||||
- (unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
|
if HAVE_GUILD
|
||||||
- (load-extension (if %libdir
|
|
||||||
- (string-append %libdir "/guile-gnutls-v-2")
|
|
||||||
- "guile-gnutls-v-2")
|
|
||||||
- "scm_init_gnutls")))
|
|
||||||
+ ;; Static profile: bindings are linked into the main program.
|
|
||||||
+ ;; Shared profile: load the extension.
|
|
||||||
+ (let* ((self-handle (false-if-exception (dynamic-link #f)))
|
|
||||||
+ (loaded-in-place?
|
|
||||||
+ (and self-handle
|
|
||||||
+ (false-if-exception
|
|
||||||
+ (dynamic-call "scm_init_gnutls" self-handle)))))
|
|
||||||
+ (unless loaded-in-place?
|
|
||||||
+ (when %load-extension?
|
|
||||||
+ (load-extension (if %libdir
|
|
||||||
+ (string-append %libdir "/guile-gnutls-v-2")
|
|
||||||
+ "guile-gnutls-v-2")
|
|
||||||
+ "scm_init_gnutls")))))
|
|
||||||
|
|
||||||
(define-syntax define-deprecated
|
+if ENABLE_SHARED
|
||||||
(lambda (s)
|
guilesiteccachesubdir = $(guilesiteccachedir)/gnutls
|
||||||
@@ -866,7 +875,7 @@
|
nodist_guilesiteccache_DATA = modules/gnutls.go
|
||||||
(define certificate-verify/allow-any-x509-v1-ca-certificate #f)
|
nodist_guilesiteccachesub_DATA = modules/gnutls/extra.go
|
||||||
(define certificate-verify/allow-x509-v1-ca-certificate #f)
|
@@ -94,6 +97,7 @@
|
||||||
|
-o "$@" "$<" >&$$out
|
||||||
|
|
||||||
|
SUFFIXES = .go
|
||||||
|
+endif ENABLE_SHARED
|
||||||
|
|
||||||
|
endif HAVE_GUILD
|
||||||
|
|
||||||
-(unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
|
|
||||||
+(when (module-variable (current-module) 'protocol/ssl3)
|
|
||||||
;; Renaming.
|
|
||||||
(set! protocol/ssl-3 protocol/ssl3)
|
|
||||||
(set! protocol/tls-1.0 protocol/tls1-0)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue