Message ID | 20191030161913.17691-1-mail@ambrevar.xyz |
---|---|
State | Accepted |
Headers | show |
Series | [bug#37994] gnu: git: Add PCRE support to "git grep". | expand |
Pierre, Pierre Neidhardt 写道: > * gnu/packages/version-control.scm (git)[inputs]: Add pcre2. > [arguments]: Add "USE_LIBPCRE2" to make-flags. > (git-minimal)[arguments]: Do not inherit "USE_LIBPCRE2" in > make-flags. What do you think of removing pcre2 from INPUTS as well? I'm a bit worried that upstream will grow auto-detection and/or change the default value of USE_LIBPCRE2 one day, and that would go unnoticed. > + ;; For PCRE support in git grep (USE_LIBPCRE2) Missing ‘.’. Otherwise GTM! T G-R
Tobias Geerinckx-Rice <me@tobias.gr> writes: > Pierre, > > Pierre Neidhardt 写道: >> * gnu/packages/version-control.scm (git)[inputs]: Add pcre2. >> [arguments]: Add "USE_LIBPCRE2" to make-flags. >> (git-minimal)[arguments]: Do not inherit "USE_LIBPCRE2" in >> make-flags. > > What do you think of removing pcre2 from INPUTS as well? git-minimal's input is defined explicitly, no need to remove pcre2 since it's not there. > I'm a bit worried that upstream will grow auto-detection and/or > change the default value of USE_LIBPCRE2 one day, and that would > go unnoticed. Found this: https://stackoverflow.com/a/49826828 Looks like the compile flags are here to stay :) >> + ;; For PCRE support in git grep (USE_LIBPCRE2) > > Missing ‘.’. You mean the trailing period? Actually I just noticed that about half of those comments in Git have trailing periods. I can fix it.
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 573fa6f8cc..1dad351ba1 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -183,6 +183,9 @@ as well as the classic centralized workflow.") ;; a problem in 'patch-shebangs'; see <https://bugs.gnu.org/31952>. ("bash-for-tests" ,bash) + ;; For PCRE support in git grep (USE_LIBPCRE2) + ("pcre" ,pcre2) + ;; For 'gitweb.cgi' ("perl-cgi" ,perl-cgi) @@ -216,6 +219,8 @@ as well as the classic centralized workflow.") (assoc-ref %build-inputs "bash-for-tests") "/bin/bash") + "USE_LIBPCRE2=yes" + ;; By default 'make install' creates hard links for ;; things in 'libexec/git-core', which leads to huge ;; nars; see <https://bugs.gnu.org/21949>. @@ -505,6 +510,8 @@ everything from small to very large projects with speed and efficiency.") (delete-file-recursively (string-append out "/share/gitweb")) #t))))) + ((#:make-flags flags) + `(delete "USE_LIBPCRE2=yes" ,flags)) ((#:configure-flags flags) ''()) ((#:disallowed-references lst '())