Bug 213494 - devel/git: fails to build with PERL option and non-default LOCALBASE
Summary: devel/git: fails to build with PERL option and non-default LOCALBASE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Renato Botelho
Depends on:
Reported: 2016-10-15 03:24 UTC by Erick Turnquist
Modified: 2016-12-01 16:00 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (garga)

patch (586 bytes, patch)
2016-10-15 03:24 UTC, Erick Turnquist
no flags Details | Diff
[patch] use --with-perl to specify perl command (411 bytes, patch)
2016-11-30 14:59 UTC, John Hein
jcfyecrayz: maintainer-approval? (garga)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erick Turnquist 2016-10-15 03:24:10 UTC
Created attachment 175773 [details]

Upstream commit 259f22af explicitly sets the make variable PERL_PATH to /usr/local/bin/perl. For some reason this overrides the PERL_PATH we set in the port Makefile. The configure script provides a --with-perl, which works properly.

Patch is attached.
Comment 1 John Hein 2016-11-30 14:59:38 UTC
Created attachment 177539 [details]
[patch] use --with-perl to specify perl command

I hit this, too.

Attached is my patch.  I leave it to the maintainer whether to bump PORTREVISION.  If perl was not found, the build fails.  But it's possible that the wrong perl could be found and the build succeeds.  It's probably correct to bump PORTREVISION, but more than likely very few people are affected.
Comment 2 John Hein 2016-11-30 17:30:31 UTC
Just for further clarification... config.make.uname sets PERL_PATH to /usr/local/bin/perl.  Putting PERL_PATH in the environment (MAKE_ENV) is not enough to override that Makefile variable assignment (the make var takes precedence over the env var in this case).  Using --with-perl, however, overrides the default setting in config.mak.uname (in config.mak.autogen).  So that's why using --with-perl is a better substitute for putting PERL_PATH in the environment.
Comment 3 John Hein 2016-12-01 14:51:58 UTC
QA info with attachment 177539 [details] applied:

 - portlint ok (no new warnings, no errors)
 - stage-qa ok (no new warnings)
 - poudriere testport ok (tested on stable-10/64)
Comment 4 commit-hook freebsd_committer 2016-12-01 15:25:00 UTC
A commit references this bug:

Author: garga
Date: Thu Dec  1 15:24:06 UTC 2016
New revision: 427505
URL: https://svnweb.freebsd.org/changeset/ports/427505

  - Fix build with PERL and non-default LOCALBASE [1]
  - Fix build with DEVELOPER=yes [2]
  - Do not install ZSH completion [3]
  	- ZSH installs a better version itself
  - Fix PLIST

  PR:		213494 [1]
  		214009 [2]
  		214870 [3] (based on)
  Submitted by:	John Hein <z7dr6ut7gs@snkmail.com> [1] [3]
  		Michael Zuo <muh.muhten@gmail.com>
  Sponsored by:	Rubicon Communications (Netgate)