Page MenuHomeFreeBSD

devel/git: Fix build with PERL option disabled
ClosedPublic

Authored by koobs on Dec 4 2016, 8:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 9:16 PM
Unknown Object (File)
Mon, Apr 8, 9:15 PM
Unknown Object (File)
Feb 13 2024, 9:12 PM
Unknown Object (File)
Feb 13 2024, 5:50 PM
Unknown Object (File)
Feb 3 2024, 6:04 AM
Unknown Object (File)
Dec 24 2023, 2:45 PM
Unknown Object (File)
Dec 20 2023, 1:41 AM
Unknown Object (File)
Dec 14 2023, 2:29 AM
Subscribers

Details

Summary
devel/git: Fix build with PERL option disabled

configure.ac defines a macro (GIT_ARG_SET_PATH), which takes an optional
'allow-without' parameter, which if not specified (in configure.ac),
causes --without-foo/--with-foo=no not to be checked/allowed.

allow-without is set for python, but not for perl in configure.ac:

# Define PYTHON_PATH to provide path to Python.
# GIT_ARG_SET_PATH(python, allow-without)

# GIT_ARG_SET_PATH(perl)

The non-presence of the optional second macro argument results in the
following error when --without-perl is specified by
PERL_CONFIGURE_WITH=perl=${PERL}

  configure:4065: error: You cannot use git without perl

This change adds:

 * allow-without to allow --without-perl to work.
 * USES=autoreconf to regenerate configure

PR: 215038
Reviewed_by: garga (maintainer)
Approved_by: garga (maintainer)
DiffRev: DXXXX
Test Plan
  • portlint: OK (no change pre/post patch)
  • testport: OK (poudriere: 103amd64 PERL option disabled)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

koobs retitled this revision from to devel/git: Fix build with PERL option disabled.
koobs updated this object.
koobs edited the test plan for this revision. (Show Details)
koobs added a reviewer: garga.
koobs updated this object.
koobs updated this object.

devel/git: Add comment to patch-configure header

devel/git: Remove 'perl' from Makefile header (typo)

ehaupt added a reviewer: ehaupt.
ehaupt added a subscriber: ehaupt.

I can confirm that this patch fixes both git and git-lite.

This revision is now accepted and ready to land.Dec 4 2016, 3:49 PM
garga edited edge metadata.

Thanks

This revision was automatically updated to reflect the committed changes.

@garga Ahh, I missed the accepted review here, so missed adding your login to reviewed/approved by. Sorry! I was super engrossed in making sure the commit and the log message was perfect :D

No problems @koobs. BTW, do you plan to submit the fix upstream?

In D8709#180600, @garga wrote:

No problems @koobs. BTW, do you plan to submit the fix upstream?

I had not, and only added a Comment/TODO in the patch header for the following reasons:

  1. I'm not sure whether it was upstreams intent to make perl compulsory or whether this was an oversight or an actual bug.
  2. There are other issues with conditional dependencies associated with the port and the upstream configure. Other issues may be related to, or due to the same underlying bugs (macro use for multiple configure options) as that which was fixed here.
  3. I did not exhaustively confirm/check all of the above issues, but they should all be checked/validated in both the --with and --without cases. In particular iconv/gettext/expat/other 3rd-party-libs
  4. A full/complete upstream patch may include further changes/improvements. See Also my comment on Issue #215038 [1]

Personally, I would strongly recommend/request upstream removal of this extra secret knob to allow disabling of options/dependencies. Compulsory dependencies are compulsory, and shouldn't have options to disable them, and configure should explicitly fail if the dependency is not met.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215038