Bug 213494

Summary: devel/git: fails to build with PERL option and non-default LOCALBASE
Product: Ports & Packages Reporter: Erick Turnquist <jhujhiti>
Component: Individual Port(s)Assignee: Renato Botelho <garga>
Status: Closed FIXED    
Severity: Affects Some People CC: garga, jcfyecrayz
Priority: --- Flags: bugzilla: maintainer-feedback? (garga)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
[patch] use --with-perl to specify perl command jcfyecrayz: maintainer-approval? (garga)

Description Erick Turnquist 2016-10-15 03:24:10 UTC
Created attachment 175773 [details]
patch

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 freebsd_triage 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

Log:
  - 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
  - Bump PORTREVISION

  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)

Changes:
  head/devel/git/Makefile
  head/devel/git/pkg-plist