gnu: openldap: Fix build.
* gnu/packages/openldap.scm (openldap): Update quoting to use gexps. Remove
reference to libldap_r.la, which no longer exists, and remove custom install
of libldap_r.so. Remove again a phase already removed in commit
0de5e6d653.
Signed-off-by: Andreas Enge <andreas@enge.fr>
			
			
This commit is contained in:
		
							parent
							
								
									60594711e9
								
							
						
					
					
						commit
						1b28cde6a5
					
				
					 1 changed files with 21 additions and 39 deletions
				
			
		| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 | 
					;;; Copyright © 2013, 2023 Andreas Enge <andreas@enge.fr>
 | 
				
			||||||
;;; Copyright © 2016, 2021 Leo Famulari <leo@famulari.name>
 | 
					;;; Copyright © 2016, 2021 Leo Famulari <leo@famulari.name>
 | 
				
			||||||
;;; Copyright © 2017, 2018, 2019, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
 | 
					;;; Copyright © 2017, 2018, 2019, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
 | 
				
			||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
					;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,7 @@
 | 
				
			||||||
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 | 
					;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 | 
				
			||||||
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 | 
					;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 | 
				
			||||||
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 | 
					;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 | 
				
			||||||
 | 
					;;; Copyright © 2023 Brian Cully <bjc@spork.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -87,44 +88,25 @@
 | 
				
			||||||
    (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt zlib))
 | 
					    (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt zlib))
 | 
				
			||||||
    (native-inputs (list libtool groff bdb-5.3))
 | 
					    (native-inputs (list libtool groff bdb-5.3))
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:tests? #f
 | 
					     (list
 | 
				
			||||||
 | 
					      #:tests? #f
 | 
				
			||||||
      #:configure-flags
 | 
					      #:configure-flags
 | 
				
			||||||
       '("--disable-static"
 | 
					      #~(list "--disable-static"
 | 
				
			||||||
         ,@(if (%current-target-system)
 | 
					              #$@(if (%current-target-system)
 | 
				
			||||||
                     '("--with-yielding_select=yes"
 | 
					                     '("--with-yielding_select=yes"
 | 
				
			||||||
                       "ac_cv_func_memcmp_working=yes")
 | 
					                       "ac_cv_func_memcmp_working=yes")
 | 
				
			||||||
                     '()))
 | 
					                     '()))
 | 
				
			||||||
      ;; Disable install stripping as it breaks cross-compiling.
 | 
					      ;; Disable install stripping as it breaks cross-compiling.
 | 
				
			||||||
       #:make-flags '("STRIP=")
 | 
					      #:make-flags
 | 
				
			||||||
 | 
					      #~(list "STRIP=")
 | 
				
			||||||
      #:phases
 | 
					      #:phases
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
         ,@(if (%current-target-system)
 | 
					          #$@(if (%current-target-system)
 | 
				
			||||||
                 '((add-before 'configure 'fix-cross-gcc
 | 
					                 '((add-before 'configure 'fix-cross-gcc
 | 
				
			||||||
                     (lambda* (#:key target #:allow-other-keys)
 | 
					                     (lambda* (#:key target #:allow-other-keys)
 | 
				
			||||||
                       (setenv "CC" (string-append target "-gcc"))
 | 
					                       (setenv "CC" (string-append target "-gcc"))
 | 
				
			||||||
                       (setenv "STRIP" (string-append target "-strip")))))
 | 
					                       (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
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
               ;; 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 )~%"))))))))
 | 
					 | 
				
			||||||
    (synopsis "Implementation of the Lightweight Directory Access Protocol")
 | 
					    (synopsis "Implementation of the Lightweight Directory Access Protocol")
 | 
				
			||||||
    (description
 | 
					    (description
 | 
				
			||||||
     "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
 | 
					     "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue