Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15
STALE3715d

[PATCH] gitweb: respect $GITPERLLIB

From: Lea Wiemann <hidden>
Date: 2016-06-15 22:44:47
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

gitweb/gitweb.cgi now respects $GITPERLLIB, like the Perl-based Git
commands.

Signed-off-by: Lea Wiemann <redacted>
---
Junio C Hamano wrote in <http://mid.gmane.org/7vfxrwa008.fsf@gitster.siamese.dyndns.org>:
The real fix to the issue [is] to fix the build
procedure of gitweb/gitweb.perl so that the above script rewriting is also
applied to it.
I've now implemented this, since it's becoming necessary for the
Mechanize tests.  However, I'm not totally confident that what I wrote
is (a) correct and (b) a good idea -- I simply copy-and-pasted from
the previous Makefile entry, since I'm not very proficient with sed.

Comments appreciated!

-- Lea

 Makefile |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index b003e3e..c5c6ac7 100644
--- a/Makefile
+++ b/Makefile
@@ -1081,7 +1081,14 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
 
 gitweb/gitweb.cgi: gitweb/gitweb.perl
 	$(QUIET_GEN)$(RM) $@ $@+ && \
-	sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+	sed -e '1{' \
+	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+	    -e '	h' \
+	    -e '	s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
+	    -e '	H' \
+	    -e '	x' \
+	    -e '}' \
+	    -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
 	    -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
 	    -e 's|++GIT_BINDIR++|$(bindir)|g' \
 	    -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
-- 
1.5.6.31.gcbcff.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help