From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Git subtree Date: Thu, 25 Oct 2018 22:26:33 +0200 Message-ID: <87mur1kc1y.fsf@ambrevar.xyz> References: <874ldakrez.fsf@ambrevar.xyz> <871s8ekq9h.fsf@ambrevar.xyz> 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]:44409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFmM7-0001U5-61 for guix-devel@gnu.org; Thu, 25 Oct 2018 16:35:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFmDK-0005YP-BN for guix-devel@gnu.org; Thu, 25 Oct 2018 16:26:45 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:47021) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFmDH-0005Wh-Ls for guix-devel@gnu.org; Thu, 25 Oct 2018 16:26:41 -0400 In-reply-to: <871s8ekq9h.fsf@ambrevar.xyz> 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: =?utf-8?Q?G=C3=A1bor?= Boskovits Cc: Guix-devel --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain I'll have limited Internet access for the upcoming days and I cannot test my git subtree patch. Can someone test it and merge? Thanks! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-git-Add-subtree-output.patch Content-Transfer-Encoding: quoted-printable From=20851c2d645229012c264b8679ec3517bdc5d9960c Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 25 Oct 2018 19:31:38 +0200 Subject: [PATCH] gnu: git: Add "subtree" output. * gnu/packages/version-control.scm (git)[outputs]: Add "subtree". =2D-- gnu/packages/version-control.scm | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-contro= l.scm index 14a18c8c3..622782e54 100644 =2D-- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -166,7 +166,11 @@ as well as the classic centralized workflow.") version ".tar.xz")) (sha256 (base32 =2D "1vn6pi9yvw7rnb9dvi1yjrvv39fqd1m9mwbaffqwizs3gaf91br7")))))) + "1vn6pi9yvw7rnb9dvi1yjrvv39fqd1m9mwbaffqwizs3gaf91br7")))) + ;; For subtree documentation. + ("asciidoc" ,asciidoc) + ("docbook-xsl" ,docbook-xsl) + ("xmlto" ,xmlto))) (inputs `(("curl" ,curl) ("expat" ,expat) @@ -198,6 +202,7 @@ as well as the classic centralized workflow.") "send-email" ; for git-send-email "svn" ; git-svn "credential-netrc" ; git-credential-netrc + "subtree" ; git-subtree "gui")) ; gitk, git gui (arguments `(#:make-flags `("V=3D1" ;more verbose compilat= ion @@ -256,6 +261,26 @@ as well as the classic centralized workflow.") ;; Add the "PM.stamp" to avoid "no rule to make target". (call-with-output-file "perl/PM.stamp" (const #t)) #t)) + (add-after 'build 'build-subtree + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "contrib/subtree" + (substitute* "Makefile" + ;; Apparently `xmlto' does not bother to looks up the styl= esheets + ;; specified in the XML, unlike the above substitution. I= nstead it + ;; uses a hard-coded URL. Work around it here, but if thi= s is + ;; common perhaps we should hardcode this path in xmlto it= self. + (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\) man") + (string-append "$(XMLTO) -x " + (string-append (assoc-ref inputs "docbook-= xsl") + "/xml/xsl/docbook-xsl-" + ,(package-version docbook-x= sl)) + "/manpages/docbook.xsl -m $(MANPAGE_XSL) m= an"))) + (invoke "make") + (invoke "make" "install") + (invoke "make" "install-doc") + (substitute* "git-subtree" + (("/bin/sh") (which "sh")))) + #t)) (add-before 'check 'patch-tests (lambda _ (let ((store-directory (%store-directory))) @@ -317,6 +342,14 @@ as well as the classic centralized workflow.") `("PERL5LIB" ":" prefix (,(string-append (assoc-ref outputs "out") "/share/perl5= ")))) #t))) + (add-after 'install 'install-subtree + (lambda* (#:key outputs #:allow-other-keys) + (let ((subtree (assoc-ref outputs "subtree"))) + (install-file "contrib/subtree/git-subtree" + (string-append subtree "/bin")) + (install-file "contrib/subtree/git-subtree.1" + (string-append subtree "/share/man/man1")) + #t))) (add-after 'install 'split (lambda* (#:key inputs outputs #:allow-other-keys) ;; Split the binaries to the various outputs. =2D-=20 2.19.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlvSJvkACgkQm9z0l6S7 zH8WxAgAkeAfYRTX4tsoGQZhwPsqpfo02NWa0Gpe/sjjTbCdCQAr1v6Uw/mtg3z/ IFtsFceZ7gaU/Kkk1ZHfw+neCDWM0zalMFDMlc+TBZzOTVVZf5aw08Je1KfoLTar 9BeUk2t9bq+/V0KG3tyBCi4Wx4O/TC34Rpi0K8UJSmjWiyww8Hx9AYO80h35gkG8 x3Pi4OsqCKd3IAhIAdCYPZhZAi/xzQbI8u3qUHLXLGMruiGp2D5uwbAuyqiPDP8q gM2pDDn3VRUiX7zVdnnvap7CDDUzkoWmJS7pZ0Y51PuK0tUSL920Sqj3SteTmgs7 G3tnt/o6gUH3N/Qw6gPAY4Vo4DpUzQ== =amrM -----END PGP SIGNATURE----- --==-=-=--