@@ -4,7 +4,8 @@ class Gnutls < Formula
4
4
url "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.14.tar.xz"
5
5
mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.6/gnutls-3.6.14.tar.xz"
6
6
sha256 "5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63"
7
- license "LGPL-2.1"
7
+ # license "LGPL-2.1-or-later AND GPL-3.0-only" - review syntax after resolving https://github.com/Homebrew/brew/pull/8260
8
+ license "GPL-3.0-only"
8
9
9
10
bottle do
10
11
sha256 "ed76b5d22e195a797c2d01ab2f4a8e769a023b056b17e86f11cb6b9af200babe" => :catalina
@@ -16,6 +17,7 @@ class Gnutls < Formula
16
17
depends_on "automake" => :build
17
18
depends_on "pkg-config" => :build
18
19
depends_on "gmp"
20
+ depends_on "guile"
19
21
depends_on "libidn2"
20
22
depends_on "libtasn1"
21
23
depends_on "libunistring"
@@ -35,7 +37,9 @@ def install
35
37
--prefix=#{ prefix }
36
38
--sysconfdir=#{ etc }
37
39
--with-default-trust-store-file=#{ pkgetc } /cert.pem
38
- --disable-guile
40
+ --with-guile-site-dir=#{ share } /guile/site/3.0
41
+ --with-guile-site-ccache-dir=#{ lib } /guile/3.0/site-ccache
42
+ --with-guile-extension-dir=#{ lib } /guile/3.0/extensions
39
43
--disable-heartbeat-support
40
44
--with-p11-kit
41
45
]
@@ -74,7 +78,29 @@ def post_install
74
78
( pkgetc /"cert.pem" ) . atomic_write ( valid_certs . join ( "\n " ) )
75
79
end
76
80
81
+ def caveats
82
+ <<~EOS
83
+ If you are going to use the Guile bindings you will need to add the following
84
+ to your .bashrc or equivalent in order for Guile to find the TLS certificates
85
+ database:
86
+ export GUILE_TLS_CERTIFICATE_DIRECTORY=/usr/local/etc/gnutls/
87
+ EOS
88
+ end
89
+
77
90
test do
78
91
system bin /"gnutls-cli" , "--version"
92
+
93
+ gnutls = testpath /"gnutls.scm"
94
+ gnutls . write <<~EOS
95
+ (use-modules (gnutls))
96
+ (gnutls-version)
97
+ EOS
98
+
99
+ ENV [ "GUILE_AUTO_COMPILE" ] = "0"
100
+ ENV [ "GUILE_LOAD_PATH" ] = HOMEBREW_PREFIX /"share/guile/site/3.0"
101
+ ENV [ "GUILE_LOAD_COMPILED_PATH" ] = HOMEBREW_PREFIX /"lib/guile/3.0/site-ccache"
102
+ ENV [ "GUILE_SYSTEM_EXTENSIONS_PATH" ] = HOMEBREW_PREFIX /"lib/guile/3.0/extensions"
103
+
104
+ system "guile" , gnutls
79
105
end
80
106
end
0 commit comments