From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: [PATCH 5/5] gnu: libextractor: Move .a files to output "static". Date: Thu, 02 Feb 2017 09:13:10 -0800 Message-ID: <87d1f0a53t.fsf@gmail.com> References: <20170131133501.30273-1-contact.ng0@cryptolab.net> <20170131133501.30273-6-contact.ng0@cryptolab.net> 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]:46648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZKwe-00073o-U2 for guix-devel@gnu.org; Thu, 02 Feb 2017 12:13:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZKwd-0000BS-Tm for guix-devel@gnu.org; Thu, 02 Feb 2017 12:13:16 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:32865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZKwd-0000B4-Nz for guix-devel@gnu.org; Thu, 02 Feb 2017 12:13:15 -0500 Received: by mail-pg0-x244.google.com with SMTP id 194so2328326pgd.0 for ; Thu, 02 Feb 2017 09:13:15 -0800 (PST) In-Reply-To: <20170131133501.30273-6-contact.ng0@cryptolab.net> (contact's message of "Tue, 31 Jan 2017 13:35:01 +0000") 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: contact.ng0@cryptolab.net Cc: guix-devel@gnu.org, ng0 --=-=-= Content-Type: text/plain Hi ng0, contact.ng0@cryptolab.net writes: > From: ng0 > > * gnu/packages/gnunet.scm (libextractor): Move .a files to "static" output. > [arguments](phases): New phase for moving .a files to output "static". > --- > gnu/packages/gnunet.scm | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm > index f7da12ad5..a4514a7f4 100644 > --- a/gnu/packages/gnunet.scm > +++ b/gnu/packages/gnunet.scm > @@ -115,13 +115,30 @@ > ("zlib" ,zlib))) > (native-inputs > `(("pkg-config" ,pkg-config))) > + (outputs '("out" > + "static")) ; 396 KiB .a files > (arguments > `(#:configure-flags > (list (string-append "--with-ltdl=" > (assoc-ref %build-inputs "libltdl")) > (string-append "--with-tidy=" > (assoc-ref %build-inputs "tidy-html"))) > - #:parallel-tests? #f)) > + #:parallel-tests? #f > + #:phases > + (modify-phases %standard-phases > + (add-after 'install 'move-static-libraries > + (lambda* (#:key outputs #:allow-other-keys) > + ;; Move static libraries to the "static" output. > + (let* ((out (assoc-ref outputs "out")) > + (lib (string-append out "/lib")) > + (static (assoc-ref outputs "static")) > + (slib (string-append static "/lib"))) > + (mkdir-p slib) > + (for-each (lambda (file) > + (install-file file slib) > + (delete-file file)) > + (find-files lib "\\.a$")) > + #t)))))) > (synopsis "Library to extract meta-data from media files") > (description > "GNU libextractor is a library for extracting metadata from files. It I've reviewed this patch series and didn't see anything wrong. Looking at how often you strip the ".a" static libraries into a separate output, maybe it'd be worth the effort of adding an automatic way of doing so in the gnu build system? I'm thinking it could work in a way similar to adding debug symbols: simply add a "static" output and the rest is taken care of automagically. Thanks for all the packaging work! Maxim --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAliTaKYACgkQEmDkZILm NWKeqA/7BU6qeJU73sZ/N2e5R7YzxBsZ6aWNuK3vF26q/DSxIhOmtO2HObFO2e+c VhPn1YQAoxVufDCW7JaiQJXMHKUMf8iRZPPjds0oV3NV1w6QAS3bRlcAhaQVge1g ANOH8NjuNPhcLsK8fNEXrZKxoq1VA0py8LC1sYVFSELgWgHPNTRLF16VHMvplSCX uh9OhXpYatNv0OW5v6/WLyLi5dPFS81eMC3U75e7W2L4E5Ju8E92TW8NciDsL69y uysvTYqQ1gfn8tL5MyW7XuKHD2Um3ioul2q1UsVNdHLCmrkG+SQ3oCt3JCaEKDk2 Axjv5JjWCJeRxtmTJH1FyHiZC4dZ+09dC+tAB56Bp5aH0ugh1fUglj0MWeQQfFc6 awr7gr778uf7OCwVk63RuCWfVAjUoRweaxZvGU/6QXZGIy6G4oU55CCHPCHQpvdE 5nJU0jvSg0c+ApENv8aFG9s3ouzQLCxr861rTbI1ycPE/LYFZnVgZAcUgrJT2+3m pLN/+DPRtWtAlYz+mt7IBPilRehcqBEH75E1nVsLyeVfQCVKLc4jEtwXuR27zqes T2qUxDClf3XNCMhOJ/VLZullAkxOUDlkGeQLamgAKi9bgFa/VvaJr9s7A+7OWEh5 bdzal4CwNj6WALgawwP9GZCyoOAoFJeQ3mpFTkKA5rxj4iiRnVQ= =cnnq -----END PGP SIGNATURE----- --=-=-=--