Bug 216465 - devel/cvsweb3 - broken with perl 5.24 due to use of 'defined'
Summary: devel/cvsweb3 - broken with perl 5.24 due to use of 'defined'
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-25 17:26 UTC by Vinny Abello
Modified: 2017-02-09 12:47 UTC (History)
1 user (show)

See Also:
amdmi3: maintainer-feedback-


Attachments
This is a patch for cvsweb.cgi to remove the use of 'defined' on line 2954. (326 bytes, text/plain)
2017-01-25 17:26 UTC, Vinny Abello
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vinny Abello 2017-01-25 17:26:16 UTC
Created attachment 179313 [details]
This is a patch for cvsweb.cgi to remove the use of 'defined' on line 2954.

In cvsweb.cgi on line 2954 it reads:

  if (defined @mytz) {

which causes an error in newer versions of perl including 5.24. I believe the use of 'defined' is deprecated and no longer supported in current versions of perl. I've modified this to be:

if (@mytz) {

which appears to correct the problem and be the proper syntax. It appears this was also fixed in other distros, but not FreeBSD's ports tree for cvsweb3 as of yet.

I'm attaching a diff of the simple change that worked for me. Someone more experienced might have a different or better solution as I have very little programming or perl experience.
Comment 1 Dmitry Marakasov freebsd_committer 2017-02-09 11:42:34 UTC
Maintainer timeout
Comment 2 commit-hook freebsd_committer 2017-02-09 12:47:38 UTC
A commit references this bug:

Author: amdmi3
Date: Thu Feb  9 12:47:09 UTC 2017
New revision: 433725
URL: https://svnweb.freebsd.org/changeset/ports/433725

Log:
  - Fix with perl 5.24
  - While here, add LICENSE, NO_ARCH and regenerate patches

  PR:		216465
  Submitted by:	vinny.abello@nttdata.com
  Approved by:	maintainer timeout (noackjr@alumni.rice.edu, 2 weeks)

Changes:
  head/devel/cvsweb3/Makefile
  head/devel/cvsweb3/files/patch-cvsweb.cgi
  head/devel/cvsweb3/files/patch-cvsweb.conf