From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Git subtree Date: Fri, 26 Oct 2018 00:08:06 +0200 Message-ID: <87o9bhkc3o.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]:42060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFnna-0006tS-Cp for guix-devel@gnu.org; Thu, 25 Oct 2018 18:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFnnW-0007z3-GS for guix-devel@gnu.org; Thu, 25 Oct 2018 18:08:14 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:43033) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFnnV-0007vc-33 for guix-devel@gnu.org; Thu, 25 Oct 2018 18:08:10 -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+LlsMPZAEJKvom9z0l6S7zH8FAlvSPsYACgkQm9z0l6S7 zH+NHwgAkduzJjQM2BXaeiQ2/HmRcH6IhatjCrJ7bUkqyVV7Gf0pt+pwcU+LjOaT /D/zKdN+QzqioT0o1yMkaZIn36lou+TtG+09eCmNi4ho0RP5mugj7pI/1OJGdpWR 32sBXmymNJhtmdIFBSkDbTzH5SIDhsz/YrYOiz1ksXND24TzDvhEMl+dummMOSTZ ctsq9Q9THUmt3oaFDnDmVSzbqNUZql9jPMAn+gCEQHpmgt9H+2N7hMILsmTGmsgo PaYon5OUtv1uuNCMoRBDOSHFkJR2XRe2jLS3tbhpHvcRY9CgrTv+qHmG/Aawxwru UMU5Gyo6H1EUppOCivLAHI1BSB70sA== =Y/AO -----END PGP SIGNATURE----- --==-=-=--