git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] use 'installsitelib' even with NO_PERL_MAKEMAKER

From
NHNicholas Harteau <nrh@spotify.com>
Date
Jan 30, 2012, 10:51 UTC
Message-ID
<24482D02-B773-4FE3-8FC7-92B8B4D8C0FA@spotify.com>

perl/Makefile installs Git.pm into $prefix/lib when ExtUtils::MakeMaker is not present. perl can't "use Git;" in that scenario, as $prefix/lib isn't in perl's include path.

This patch installs Git.pm into perl's 'installsitelib', generally $prefix/lib/perl5/site_perl, so that even when ExtUtils::MakeMaker isn't present, Git.pm gets installed in a location where 'use Git;' just works.

for some additional discussion, see:
https://github.com/mxcl/homebrew/pull/8643
https://github.com/mxcl/homebrew/issues/8620
---
 perl/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/perl/Makefile b/perl/Makefile
index b2977cd..2199eb1 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -21,7 +21,7 @@ clean:
 	$(RM) $(makfile).old
 
 ifdef NO_PERL_MAKEMAKER
-instdir_SQ = $(subst ','\'',$(prefix)/lib)
+instdir_SQ = $(subst ','\'',$(subst installsitelib=,'',$(shell $(PERL_PATH_SQ) -V:installsitelib)))
 $(makfile): ../GIT-CFLAGS Makefile
 	echo all: private-Error.pm Git.pm > $@
 	echo '	mkdir -p blib/lib' >> $@
-- 
1.7.8.3

--
nicholas harteau
nrh@spotify.com
Next: Nicholas Harteau
Message 1 of 5 in “use 'installsitelib' even with NO_PERL_MAKEMAKER”
  1. use 'installsitelib' even with NO_PERL_MAKEMAKERNicholas Harteau, Jan 30, 2012
  2. Nicholas HarteauFeb 6, 2012
  3. Jeff KingFeb 6, 2012
  4. Nicholas HarteauFeb 6, 2012
  5. Jeff KingFeb 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.