all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#62863] [PATCH core-updates] gnu: openldap: Fix build.
@ 2023-04-15 15:17 Josselin Poiret via Guix-patches via
  2023-04-16  5:00 ` John Kehayias via Guix-patches via
  0 siblings, 1 reply; 2+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-04-15 15:17 UTC (permalink / raw)
  To: 62863; +Cc: Josselin Poiret

* gnu/packages/openldap.scm (openldap): Switch arguments to g-exps.  Also, do
not try to patch libldap_r.la which doesn't exist anymore.
---
 gnu/packages/openldap.scm | 67 +++++++++++++++++++--------------------
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index 7409848795..42fc8269ac 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -84,47 +84,46 @@ (define-public openldap
                (base32
                 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj"))))
     (build-system gnu-build-system)
-    (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt zlib))
+    (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt mit-krb5 zlib))
     (native-inputs (list libtool groff bdb-5.3))
     (arguments
-     `(#:tests? #f
-       #:configure-flags
-       '("--disable-static"
+     (list
+      #:tests? #f
+      #:configure-flags
+      `'("--disable-static"
          ,@(if (%current-target-system)
                '("--with-yielding_select=yes"
                  "ac_cv_func_memcmp_working=yes")
                '()))
-       ;; Disable install stripping as it breaks cross-compiling.
-       #:make-flags '("STRIP=")
-       #:phases
-       (modify-phases %standard-phases
-         ,@(if (%current-target-system)
-               '((add-before 'configure 'fix-cross-gcc
-                   (lambda* (#:key target #:allow-other-keys)
-                     (setenv "CC" (string-append target "-gcc"))
-                     (setenv "STRIP" (string-append target "-strip")))))
-               '())
-         (add-after 'install 'patch-sasl-path
-           ;; Give -L arguments for cyrus-sasl to avoid propagation.
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (krb5 (assoc-ref inputs "mit-krb5"))) ;propagated from cyrus-sasl
+      ;; Disable install stripping as it breaks cross-compiling.
+      #:make-flags ''("STRIP=")
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(if (%current-target-system)
+                 #~((add-before 'configure 'fix-cross-gcc
+                      (lambda _
+                        (setenv "CC" #$(cc-for-target))
+                        (setenv "STRIP" #$(string-append (%current-target-system) "-strip")))))
+                 #~())
+          (add-after 'install 'patch-sasl-path
+            ;; Give -L arguments for cyrus-sasl to avoid propagation.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((krb5-lib (basename (search-input-file inputs "lib/libkrb5.so"))))
 
-               ;; The ancient Libtool bundled with OpenLDAP copies the linker flags
-               ;; from Cyrus-SASL and embeds them into its own .la files.  Add an
-               ;; absolute reference to Kerberos so it does not have to be propagated.
-               (substitute* (map (lambda (f) (string-append out "/" f))
-                                 '("lib/libldap.la" "lib/libldap_r.la"))
-                 (("-lkrb5" lib)
-                  (string-append "-L" krb5 "/lib " lib))))))
-         (add-after 'install 'provide-libldap_r
-           (lambda _
-             ;; The re-entrant libldap_r no longer exists since 2.6
-             ;; as it has become the default: provide a linker alias
-             ;; for now.
-             (call-with-output-file (string-append #$output "/lib/libldap_r.so")
-               (lambda (port)
-                 (format port "INPUT ( libldap.so )~%"))))))))
+                ;; The ancient Libtool bundled with OpenLDAP copies the linker flags
+                ;; from Cyrus-SASL and embeds them into its own .la files.  Add an
+                ;; absolute reference to Kerberos so it does not have to be propagated.
+                (substitute* (list (string-append #$output "/lib/libldap.la"))
+                  (("-lkrb5" lib)
+                   (string-append "-L" krb5-lib " " lib))))))
+          (add-after 'install 'provide-libldap_r
+            (lambda _
+              ;; The re-entrant libldap_r no longer exists since 2.6
+              ;; as it has become the default: provide a linker alias
+              ;; for now.
+              (call-with-output-file (string-append #$output "/lib/libldap_r.so")
+                (lambda (port)
+                  (format port "INPUT ( libldap.so )~%"))))))))
     (synopsis "Implementation of the Lightweight Directory Access Protocol")
     (description
      "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#62863] [PATCH core-updates] gnu: openldap: Fix build.
  2023-04-15 15:17 [bug#62863] [PATCH core-updates] gnu: openldap: Fix build Josselin Poiret via Guix-patches via
@ 2023-04-16  5:00 ` John Kehayias via Guix-patches via
  0 siblings, 0 replies; 2+ messages in thread
From: John Kehayias via Guix-patches via @ 2023-04-16  5:00 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 62863, Marius Bakke

Hi,

(sending to both related patches, not sure which will be applied and I'm
not familiar with openldap enough to finalize the fixes; also CC'ing
Marius as author of the related commit)

I think the patch-sasl-path phase was meant to be removed, as it was in
https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=0de5e6d6536a7bc94dd71047cf9573d71fa8d4b0
and I believe restored (erroneously I'm guessing) in the master merge in
January. So I think that can be dropped completely.

Hope this helps!
John





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-16  5:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-15 15:17 [bug#62863] [PATCH core-updates] gnu: openldap: Fix build Josselin Poiret via Guix-patches via
2023-04-16  5:00 ` John Kehayias via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.