all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lukas Gradl <lgradl@openmailbox.org>
To: guix-devel@gnu.org
Subject: [Patch 4/10] argon2: Install pkg-config file.
Date: Mon, 12 Sep 2016 21:26:24 -0500	[thread overview]
Message-ID: <8737l41qnj.fsf@openmailbox.org> (raw)
In-Reply-To: <87mvjc1quq.fsf@openmailbox.org> (Lukas Gradl's message of "Mon, 12 Sep 2016 21:22:05 -0500")


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0004-gnu-argon2-Install-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 3265 bytes --]

From 9850d4ef481b134d43d2380904b5db8e0d7fdd98 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
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 | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..42b116f 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,28 @@ 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"))
+               (install-file "argon2.pc"
+                             (string-append out "/lib/pkgconfig"))
                (copy-recursively "include"
-                                 (string-append out "/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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  parent reply	other threads:[~2016-09-13  2:26 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  2:22 [Patch 0/10] Add Ring Lukas Gradl
2016-09-13  2:23 ` [Patch 1/10] Add pjproject Lukas Gradl
2016-09-19  7:41   ` Ricardo Wurmus
2016-09-20  5:39     ` Lukas Gradl
2016-09-22  2:46       ` Ricardo Wurmus
2016-09-26  6:41         ` Lukas Gradl
2016-11-05 22:25           ` Ricardo Wurmus
2016-11-05 22:49             ` Mathieu Lirzin
2016-11-05 22:54               ` Ricardo Wurmus
2016-09-13  2:24 ` [Patch 2/10] Add dbus-c++ Lukas Gradl
2016-09-28  9:09   ` Ludovic Courtès
2016-09-13  2:25 ` [Patch 3/10] Add gsm Lukas Gradl
2016-09-28  9:16   ` Ludovic Courtès
2016-09-13  2:26 ` Lukas Gradl [this message]
2016-09-15 21:24   ` [Patch 4/10] argon2: Install pkg-config file Danny Milosavljevic
2016-09-17 16:47     ` Lukas Gradl
2016-09-18 21:32       ` Lukas Gradl
2016-09-18 21:43     ` Lukas Gradl
2016-09-19 19:15       ` Danny Milosavljevic
2016-09-25 22:45         ` Lukas Gradl
2016-09-25 23:13           ` Danny Milosavljevic
2016-09-25 23:32             ` Lukas Gradl
2016-09-28  9:18               ` Ludovic Courtès
2016-09-13  2:27 ` [Patch 5/10] opendht: Propagate argon2 Lukas Gradl
2016-09-25 22:54   ` Lukas Gradl
2016-09-25 23:24     ` Danny Milosavljevic
2016-09-25 23:43       ` Lukas Gradl
2016-09-13  2:28 ` [Patch 6/10] telephony: Add license prefix Lukas Gradl
2016-09-15 21:25   ` Danny Milosavljevic
2016-09-28  9:25   ` Ludovic Courtès
2016-09-13  2:29 ` [Patch 7/10] opendht: Propagate msgpack Lukas Gradl
2016-09-28  9:48   ` Ludovic Courtès
2016-09-13  2:30 ` [Patch 8/10] Add libring Lukas Gradl
2016-11-05 22:30   ` Ricardo Wurmus
2016-09-13  2:30 ` [Patch 9/10] Add libringclient Lukas Gradl
2016-09-13  2:31 ` [Patch 10/10] Add ring-client-gnome Lukas Gradl
2016-09-15 21:27   ` Danny Milosavljevic
2016-09-17 16:38     ` Lukas Gradl
2016-09-25 23:23       ` Lukas Gradl
2016-09-25 23:35       ` GNOME Settings Schemas - How are they searched for? Danny Milosavljevic
2016-10-23 15:36         ` Pjotr Prins
2016-11-05  4:59 ` [Patch 0/10] Add Ring Chris Marusich
2016-11-09 18:07   ` Lukas Gradl
2016-11-09 22:43     ` Leo Famulari
2016-11-12 23:39       ` Lukas Gradl
2016-11-13  0:52     ` Mike Gerwitz
2016-11-13 21:00       ` Lukas Gradl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737l41qnj.fsf@openmailbox.org \
    --to=lgradl@openmailbox.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.