summary refs log tree commit diff
path: root/gnu/packages/kerberos.scm
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-08-25 10:29:25 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-09-20 11:15:07 +0000
commit784865adfe704d622da0c63c2e2ee865e01c6c67 (patch)
tree75e572f942936b8ff8f36c8b68656a2a2398e526 /gnu/packages/kerberos.scm
parent0bff68e44d65493bad50b6c07e7c1cfc93846986 (diff)
downloadguix-784865adfe704d622da0c63c2e2ee865e01c6c67.tar.gz
gnu: heimdal: Find tools when cross-compiling.
* gnu/packages/kerberos.scm
  (heimdal)[arguments]<#:configure-flags>: Set --with-cross-tools.
  (heimdal)[arguments]<#:phases>{pre-configure}: Override
  ac_cv_PROG_COMPILE_ET.
Diffstat (limited to 'gnu/packages/kerberos.scm')
-rw-r--r--gnu/packages/kerberos.scm51
1 files changed, 32 insertions, 19 deletions
diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 126cdf4342..85f54a4acc 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -50,6 +50,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
@@ -207,28 +208,33 @@ After installation, the system administrator should generate keys using
                   #t))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags (list
-                          ;; Avoid 7 MiB of .a files.
-                          "--disable-static"
+     `(#:configure-flags
+       ,#~(list
+           ;; Avoid 7 MiB of .a files.
+           "--disable-static"
 
-                          ;; Do not build libedit.
-                          (string-append
-                           "--with-readline-lib="
-                           (assoc-ref %build-inputs "readline") "/lib")
-                          (string-append
-                           "--with-readline-include="
-                           (assoc-ref %build-inputs "readline") "/include")
+           ;; Do not build libedit.
+           (string-append
+            "--with-readline-lib="
+            (assoc-ref %build-inputs "readline") "/lib")
+           (string-append
+            "--with-readline-include="
+            (assoc-ref %build-inputs "readline") "/include")
 
-                          ;; Do not build sqlite.
-                          (string-append
-                           "--with-sqlite3="
-                           (assoc-ref %build-inputs "sqlite"))
+           ;; Do not build sqlite.
+           (string-append
+            "--with-sqlite3="
+            (assoc-ref %build-inputs "sqlite"))
 
-                          ;; The configure script is too pessimistic.
-                          ;; Setting this also resolves a linking error.
-                          ,@(if (%current-target-system)
-                                '("ac_cv_func_getpwnam_r_posix=yes")
-                                '()))
+           #$@(if (%current-target-system)
+                  ;; The configure script is too pessimistic.
+                  ;; Setting this also resolves a linking error.
+                  #~("ac_cv_func_getpwnam_r_posix=yes"
+                     ;; Allow 'slc' and 'asn1_compile' to be found.
+                     (string-append "--with-cross-tools="
+                                    #+(file-append this-package
+                                                   "/libexec/heimdal")))
+                  #~()))
        #:phases (modify-phases %standard-phases
                   (add-before 'configure 'pre-configure
                     ;; TODO(core-updates): Unconditionally use the
@@ -240,6 +246,13 @@ After installation, the system administrator should generate keys using
                           '(#:key inputs #:allow-other-keys)
                           '_)
                      ,@(if (%current-target-system)
+                           `((substitute* "configure"
+                               ;; Our 'compile_et' is not in --with-cross-tools,
+                               ;; which confuses heimdal.
+                               (("ac_cv_prog_COMPILE_ET=\\$\\{with_cross_tools\\}compile_et")
+                                "ac_cv_PROG_COMPILE_ET=compile_et")))
+                           '())
+                     ,@(if (%current-target-system)
                            '((substitute* '("appl/afsutil/pagsh.c" "appl/su/su.c")
                                (("/bin/sh")
                                 (search-input-file inputs "bin/sh"))