From patchwork Sat Apr 15 15:17:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 49180 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7B0EB1759B; Sat, 15 Apr 2023 16:18:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E0C4317570 for ; Sat, 15 Apr 2023 16:18:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnhfA-0003m3-EB; Sat, 15 Apr 2023 11:18:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnhf8-0003lo-Tg for guix-patches@gnu.org; Sat, 15 Apr 2023 11:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnhf8-0002eb-JC for guix-patches@gnu.org; Sat, 15 Apr 2023 11:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pnhf8-0003nM-ET for guix-patches@gnu.org; Sat, 15 Apr 2023 11:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62863] [PATCH core-updates] gnu: openldap: Fix build. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 Apr 2023 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62863 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62863@debbugs.gnu.org Cc: Josselin Poiret X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168157185814555 (code B ref -1); Sat, 15 Apr 2023 15:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Apr 2023 15:17:38 +0000 Received: from localhost ([127.0.0.1]:49984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnhek-0003mf-4t for submit@debbugs.gnu.org; Sat, 15 Apr 2023 11:17:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:33356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnheh-0003mX-CC for submit@debbugs.gnu.org; Sat, 15 Apr 2023 11:17:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnheh-0003j6-6H for guix-patches@gnu.org; Sat, 15 Apr 2023 11:17:35 -0400 Received: from jpoiret.xyz ([206.189.101.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnheT-0002ZU-Mz for guix-patches@gnu.org; Sat, 15 Apr 2023 11:17:34 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 9F5BE1851E0; Sat, 15 Apr 2023 15:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1681571838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3in4BKNHQuHM5d/mWEH6CNiTSVEOZmImJL2iyAvLHvE=; b=mP1oiv27tVsBd8KZzv2QCoWF64g0vRzb/NF7ILsRdT4pP9ua0Oj7ppFoIkB6GA8gEfkPgD 3EqbVTGxn2MPaAdIASOhpW12te/Tp57MEHW8fdSMwUOojIqs++cCEa/MHMVsI1nHIgkZLu Cw4jfDNA+v2MSf6hlEf1wBOA+SgOblXnii/8tzjCKRGw18xG6xEu9S7ii7uNgoYOVtDiXJ 6q9jjn2VGu9CPhmjNBRW0JZ+jJrACToUNIeS6IpgYbEHwE/h2n8M6nmUSjJg4mM6Cuaoxt I+fLDbZx+0khMzrLNmNVwTd4PvfGjyUqRZ0YCrVCTnd9CSlW5/KNNBbABZ8+Qg== Date: Sat, 15 Apr 2023 17:17:11 +0200 Message-Id: <1127358858c069da42652a37105f542991757304.1681571782.git.dev@jpoiret.xyz> MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: ++++ Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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.")