From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAiuz-0002qM-IU for guix-patches@gnu.org; Tue, 16 May 2017 16:18:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAiuw-0006hi-F3 for guix-patches@gnu.org; Tue, 16 May 2017 16:18:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46487) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dAiuw-0006hc-B8 for guix-patches@gnu.org; Tue, 16 May 2017 16:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dAiuw-0001EI-1W for guix-patches@gnu.org; Tue, 16 May 2017 16:18:02 -0400 Subject: bug#26941: New font-build-system Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87bbe3e5.AEAAKL2r-KIAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZGcQo@mailjet.com> Date: Tue, 16 May 2017 22:17:00 +0200 In-Reply-To: <87bbe3e5.AEAAKL2r-KIAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZGcQo@mailjet.com> (Arun Isaac's message of "Mon, 15 May 2017 20:36:49 +0530") Message-ID: <87y3tw4kw3.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: 26941@debbugs.gnu.org Hi Arun, Arun Isaac skribis: > Here is a WIP patchset creating a 'font-build-system', and packaging a > few font packages with it. I just copied the emacs-build-system and made > necessary changes. Please review and provide feedback. That=E2=80=99s a great initiative! > Currently, the font-build-system only installs ttf and otf files to > /share/fonts/truetype and /share/fonts/opentype respectively. It does > not install any documentation. But, do we really need to install README > files, a copy of the license, etc.? It would be nice to install README, COPYING, and LICENSE if they exist. It=E2=80=99s okay to not do that as a first step though. > From 3bf34a68e110d4821b40c43c6388c132d71cb443 Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Mon, 15 May 2017 20:08:57 +0530 > Subject: [PATCH 1/5] build: Add 'font-build-system'. Nitpick: the =E2=80=9Cbuild:=E2=80=9D prefix in subject line is meant to re= fer to the configure/Makefile machinery of Guix itself. I would use build-system: Add 'font-build-system'. > * Makefile.am (MODULES): Add 'guix/build-system/font.scm' and > 'guix/build/font-build-system.scm'. > * guix/build-system/font.scm: New file. > * guix/build/font-build-system.scm: New file. [...] > +(define* (lower name > + #:key source inputs native-inputs outputs system target > + #:allow-other-keys > + #:rest arguments) > + "Return a bag for NAME." > + (define private-keywords > + '(#:target #:inputs #:native-inputs)) > + > + (and (not target) ;XXX: no cross-compila= tion > + (bag > + (name name) > + (system system) > + (host-inputs `(,@(if source > + `(("source" ,source)) > + '()) > + ,@inputs > + > + ;; Keep the standard inputs of 'gnu-build-system= '. > + ,@(standard-packages))) > + (build-inputs native-inputs) > + (outputs outputs) > + (build font-build) > + (arguments (strip-keyword-arguments private-keywords arguments)= )))) I would remove (and (not target) =E2=80=A6). After all, we know that the r= esult is architecture-independent data, so we can build it natively regardless of whether TARGET is true. Also, (standard-packages) is way more than needed (it includes the whole toolchain, etc.; see build-system/gnu.scm). Here all we need is tar, gzip, bzip2, and xz. Could you updated it accordingly? > +(define* (install #:key outputs #:allow-other-keys) > + "Install the package contents." > + (let* ((out (assoc-ref outputs "out")) > + (src-dir (getcwd)) > + (fonts-dir (string-append out "/share/fonts"))) I=E2=80=99d avoid abbreviations in identifiers. So =E2=80=9Csource=E2=80= =9D or =E2=80=9Csource-directory=E2=80=9D, etc. One last thing: could you add an entry for =E2=80=98font-build-system=E2=80= =99 in guix.texi under =E2=80=9CBuild Systems=E2=80=9D? Otherwise LGTM! > From d5a745fddf7b6512e4b5c317c19dc8cd3f9a8efe Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Mon, 15 May 2017 20:16:04 +0530 > Subject: [PATCH 2/5] gnu: font-inconsolata: Use 'font-build-system'. > > * gnu/packages/fonts.scm (font-inconsolata): Switch to 'font-build-system= '. [...] > From e0af4ce17f0e99f72926f93b5d5ed99df57cf06a Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Mon, 15 May 2017 20:18:08 +0530 > Subject: [PATCH 3/5] gnu: font-ubuntu: Use 'font-build-system'. > > * gnu/packages/fonts.scm (font-ubuntu): Switch to 'font-build-system'. [...] > From c557da3c5167de0cb5714c5f545b07ac8cd55dae Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Mon, 15 May 2017 20:19:33 +0530 > Subject: [PATCH 4/5] gnu: font-dejavu: Use 'font-build-system'. > > * gnu/packages/fonts.scm (font-dejavu): Switch to 'font-build-system'. [...] > From f302764eb627726548a89438b8c3b6a8ff5988d4 Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Mon, 15 May 2017 20:20:26 +0530 > Subject: [PATCH 5/5] gnu: font-bitstream-vera: Use 'font-build-system'. > > * gnu/packages/fonts.scm (font-bitstream-vera): Switch to 'font-build-sys= tem'. > --- > gnu/packages/fonts.scm | 33 +-------------------------------- > 1 file changed, 1 insertion(+), 32 deletions(-) Really pleasant to see all these deletions. :-) Thank you! Ludo=E2=80=99.