From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Gradl Subject: Re: [Patch 4/10] argon2: Install pkg-config file. Date: Sun, 18 Sep 2016 16:43:03 -0500 Message-ID: <87d1k0sx3s.fsf@openmailbox.org> References: <87mvjc1quq.fsf@openmailbox.org> <8737l41qnj.fsf@openmailbox.org> <20160915232412.6bcd757b@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bljrn-0003zQ-OD for guix-devel@gnu.org; Sun, 18 Sep 2016 17:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bljri-000852-KB for guix-devel@gnu.org; Sun, 18 Sep 2016 17:43:14 -0400 Received: from smtp13.openmailbox.org ([62.4.1.47]:46851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bljri-00084h-8n for guix-devel@gnu.org; Sun, 18 Sep 2016 17:43:10 -0400 In-Reply-To: <20160915232412.6bcd757b@scratchpost.org> (Danny Milosavljevic's message of "Thu, 15 Sep 2016 23:24:12 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Danny Milosavljevic writes: >> + (snippet >> + '(let ((p (open-file "argon2.pc" "a"))) > ... ^ why? Sorry, I took this without thinking from another place where I did similar things. This should be "w". The attached patch fixes that. Thank you! Best, Lukas --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0004-gnu-argon2-Install-pkg-config-file.patch Content-Transfer-Encoding: quoted-printable From=20eea1626e7ca44674d7430356a900665edefeb4ae 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. =2D-- 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..30e1206 100644 =2D-- 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" "w"))) + (begin + (display + (string-append "prefix=3D/usr/local\n" + "exec_prefix=3D${prefix}\n" + "includedir=3D${prefix}/include\n" + "libdir=3D${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"))) =2D (install-file "argon2" (string-append out "/bin")) =2D (install-file "libargon2.a" (string-append out "/lib")) =2D (install-file "libargon2.so" (string-append out "/lib")) =2D (copy-recursively "include" =2D (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 buil= ds. + "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 decla= red =2D-=20 2.9.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX3wpnAAoJEFP7dyh+2DCRo0gP/jh8pLWXmRtDYO4HmHD+GMeQ sdDSV6vpE0I+nOYe11jKQO9a7Vhh3kSvX82rBDSiQ/avhNqyClyJzuJjLngKHnPa KVmxZFD7AEIy37TvDLFZ4OkStigwmshpSz6YRnuZqbWvxlgHAE1YkjhnfGtfpLdO uyrlj6a+c5G3jTYDHrqbGJ+FV2l6jUejgyJkdbj61xtWji9jSmPSMVbd07sOU48C enZJnKdSMP2sdEL87Hml2G4vbwSfJgWu0kyls1lLbEH/Wt0gj49nMgVObHTmkh5g 9sRec48PzPv4jZ/XABscUgkAThkUF78SYXgTCxiIt2H+YyjwRwX7bECWf8dZVvse Y8IvPzguNtZh4ip21egPvcwFZeqvaAz9YfYy/2fw17w8nO50f7dFkwpjSN+nsep2 AKiEwALoC+0qyv8FcloJ26h+FAtGZ2pBOI1Nv+cdBnhB0n17xmY9UIQdwA3f5q74 UjKsiMyv+7gGVmaBDU6KFuF3Tmo7NYST+dfZ1uOimjTnYJGg54JZHnK+dvZxcKru lr1lWV+luRwTIqBKewch/1IbOe3IohJ8sfjKT3KCMUUzOecY/NfXV8tVuuLA/Vgz KYK9xl4NLm9lYE3CGUvS742qODVfJAtpkghx47vgfBe09eBtruZhSW6i5jhYZCQE gZ6ykHuTgu98GaEDymZ2 =rwO9 -----END PGP SIGNATURE----- --==-=-=--