Re: [PATCH] perl/Makefile: use 'installsitelib' even with NO_PERL_MAKEMAKER
- From
- Nicholas 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