From patchwork Sun Sep 18 21:32:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Gradl X-Patchwork-Id: 15756 Received: (qmail 77949 invoked by uid 89); 18 Sep 2016 21:33:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Password, PHC, phc X-Spam-Status: No, score=-4.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 18 Sep 2016 21:32:54 +0000 Received: from localhost ([::1]:51549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bljhj-0002xx-A5 for patchwork@sourceware.org; Sun, 18 Sep 2016 17:32:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bljhe-0002xq-16 for guix-devel@gnu.org; Sun, 18 Sep 2016 17:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bljhZ-0003DQ-Mj for guix-devel@gnu.org; Sun, 18 Sep 2016 17:32:45 -0400 Received: from smtp8.openmailbox.org ([62.4.1.42]:55535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bljhZ-0003CK-8l for guix-devel@gnu.org; Sun, 18 Sep 2016 17:32:41 -0400 Received: by mail2.openmailbox.org (Postfix, from userid 1001) id 5F38710178D; Sun, 18 Sep 2016 23:32:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1474234358; bh=aCSJEp0lY/tX+82hyQ7QGaJEIwtVkRHh5zWbRTInAxk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=PVy2Ub73jTKYJXd8iyetyrxM4TMjGSM1CyH8FcBL5kJaF+PIarw4lWQNoO5FkPMbG 1s6+vDK2EaBov2XIcBVmjqYzYQUiKJiJO97Qw1I4TPdrA0MiDSsVd9/lY9qCY9xIYC v8EPVHpVl9xkDV68Y+8LyT45fgMbJskjAYH2Ocbs= From: Lukas Gradl DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1474234356; bh=aCSJEp0lY/tX+82hyQ7QGaJEIwtVkRHh5zWbRTInAxk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DubTdcwSDHFvccesPvipEXXW87ITOb4ZhHsAePBwdLhRT+GdRvt0XbcDMC6VL75UX 6LRQyJ7PCY73t+Wv8A/Dev96jV9+bWfpVJBupwZon4WEPsGUiNthGo25t3p+epgOfi 2joyQRbzh8IPoKakut0NLdYsnUWHpZ3ddn6/TolY= To: Danny Milosavljevic Subject: Re: [Patch 4/10] argon2: Install pkg-config file. References: <87mvjc1quq.fsf@openmailbox.org> <8737l41qnj.fsf@openmailbox.org> <20160915232412.6bcd757b@scratchpost.org> <871t0ixykh.fsf@openmailbox.org> Date: Sun, 18 Sep 2016 16:32:17 -0500 In-Reply-To: <871t0ixykh.fsf@openmailbox.org> (Lukas Gradl's message of "Sat, 17 Sep 2016 11:47:58 -0500") Message-ID: <87lgyosxlq.fsf@openmailbox.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 62.4.1.42 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" >>> + (zero? (system* "ln" "-s" >>> + (string-append out "/lib/libargon2.so") >>> + (string-append out "/lib/libargon2.so.0"))) >> >> The result of this will be ignored. Did you mean "(and ...)"? > > Oops! Yes, I will send an updated patch later today. > A patch fixing this is attached. Thank you! Best, Lukas From 2fe4bfef5d9d006e2afb982d0eddd5e280d7e559 Mon Sep 17 00:00:00 2001 From: Lukas Gradl Date: Tue, 9 Aug 2016 16:49:19 -0500 Subject: [PATCH 04/10] gnu: argon2: Install pkg-config file. * gnu/packages/password-utils.scm (argon2)[source]: Create pkg-config file. [arguments]: Install it. --- gnu/packages/password-utils.scm | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 7288da6..c0d3168 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -311,6 +311,21 @@ through the pass command.") "https://codeload.github.com/P-H-C/phc-winner-" name "/tar.gz/" version)) (file-name (string-append name "-" version ".tar.gz")) + (snippet + '(let ((p (open-file "argon2.pc" "a"))) + (begin + (display + (string-append "prefix=/usr/local\n" + "exec_prefix=${prefix}\n" + "includedir=${prefix}/include\n" + "libdir=${prefix}/lib\n\n" + "Name: Argon2\n" + "Description: " + "The Argon2 password hashing algorithm\n" + "Version: 1.0.0\n" + "Cflags: -I${includedir}/\n" + "Libs: -L${libdir} -largon2\n") p) + (close-output-port p)))) (sha256 (base32 "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv")))) @@ -321,14 +336,29 @@ through the pass command.") #:phases (modify-phases %standard-phases (delete 'configure) + (add-after 'unpack 'fix-pkg-config + (lambda _ + (substitute* "argon2.pc" + (("/usr/local") + (assoc-ref %outputs "out"))))) (replace 'install (lambda _ (let ((out (assoc-ref %outputs "out"))) - (install-file "argon2" (string-append out "/bin")) - (install-file "libargon2.a" (string-append out "/lib")) - (install-file "libargon2.so" (string-append out "/lib")) - (copy-recursively "include" - (string-append out "/include")))))))) + (and + (install-file "argon2" (string-append out "/bin")) + (install-file "libargon2.a" (string-append out "/lib")) + (install-file "libargon2.so" (string-append out "/lib")) + (install-file "argon2.pc" + (string-append out "/lib/pkgconfig")) + (copy-recursively "include" + (string-append out "/include")) + (zero? (system* "ln" "-s" + (string-append out "/lib/libargon2.so") + (string-append out "/lib/libargon2.so.0"))) + (zero? (system* ; Fix compatability for libtool based builds. + "ln" "-s" + (string-append out "/lib/libargon2.so") + (string-append out "/lib/libargon2.so.0.0.0")))))))))) (home-page "https://www.argon2.com/") (synopsis "Password hashing library") (description "Argon2 provides a key derivation function that was declared -- 2.9.0