Bug 216465

Summary: devel/cvsweb3 - broken with perl 5.24 due to use of 'defined'
Product: Ports & Packages Reporter: Vinny Abello <vinny.abello>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Many People CC: noackjr
Priority: --- Flags: amdmi3: maintainer-feedback-
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
This is a patch for cvsweb.cgi to remove the use of 'defined' on line 2954. none

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 freebsd_triage 2017-02-09 11:42:34 UTC
Maintainer timeout
Comment 2 commit-hook freebsd_committer freebsd_triage 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