Browse Source

gnu: git: Add "svn" output for 'git-svn'.

* gnu/packages/version-control.scm (git): Add SUBVERSION as an input.
  Add 'split' phase.
Ludovic Courtès 8 years ago
1 changed files with 41 additions and 2 deletions
  1. +41

+ 41
- 2
gnu/packages/version-control.scm View File

@ -90,7 +90,11 @@ from a command line or use a GUI application.")
("openssl" ,openssl)
("perl" ,perl)
("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
("zlib" ,zlib)))
("zlib" ,zlib)
;; For 'git-svn'.
("subversion" ,subversion)))
(outputs '("out" "svn"))
`(#:make-flags `("V=1") ; more verbose compilation
#:test-target "test"
@ -105,7 +109,42 @@ from a command line or use a GUI application.")
(("/bin/sh") (which "sh"))
(("/usr/bin/perl") (which "perl"))
(("/usr/bin/python") (which "python"))))))
'install 'split
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(svn (assoc-ref outputs "svn"))
(git-svn (string-append out "/libexec/git-core/git-svn"))
(git-svn* (string-append svn "/libexec/git-core/git-svn")))
(mkdir-p (string-append svn "/libexec/git-core"))
(copy-file git-svn git-svn*)
(delete-file git-svn)
(chmod git-svn* #o555)
;; Tell 'git-svn' where Subversion is.
(wrap-program git-svn*
`("PATH" ":" prefix
(,(string-append (assoc-ref inputs "subversion")
;; Tell 'git' to look for core programs in the user's profile.
;; This allows user to install other outputs of this package and
;; have them transparently taken into account. There's a
;; 'GIT_EXEC_PATH' environment variable, but it's supposed to
;; specify a single directory, not a search path.
(wrap-program (string-append out "/bin/git")
`("PATH" ":" prefix
`("PERL5LIB" ":" prefix
(,(string-append (assoc-ref inputs "subversion")
;; XXX: The .so for SVN/ lacks a RUNPATH, so
;; help it find ''.
`("LD_LIBRARY_PATH" ":" prefix
(,(string-append (assoc-ref inputs "subversion")
(synopsis "Distributed version control system")
"Git is a free distributed version control system designed to handle