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

Re: [PATCH] perl/Makefile: use 'installsitelib' even with NO_PERL_MAKEMAKER

From
NHNicholas Harteau <nrh@ikami.com>
Date
Feb 6, 2012, 19:38 UTC
Message-ID
<7328033C-8A11-452D-A927-E81E2DC4ABD6@spotify.com>
In-Reply-To
<24482D02-B773-4FE3-8FC7-92B8B4D8C0FA@spotify.com>
This is a boring patch, I know, but it affects anyone doing a vanilla git installation on an os that bundles perl but not ExtUtils::MakeMaker, which is quite common.  Git's own utilities in perl can use Git.pm, but any other perl programs will fail to 'use Git;'
Any takers?
On Jan 30, 2012, at 11:51 AM, Nicholas Harteau wrote:
Show 39 quoted lines
> 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
> 
> 
> 
> 

-- nicholas harteau nrh@spotify.com

Previous: Nicholas HarteauNext: Jeff King
Message 2 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.