Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52358 closed defect (fixed)

skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function

Reported by: ptiLuc (Sebastian Becker) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc: aque (Allan Que)
Port: skey

Description

Hi all,

just a minor thin in the fixpaths file for skey:
Define(@array) is deprecated so the compiler runs into errors under macOS sierra.

Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at ./fixpaths line 10.
Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at ./fixpaths line 29.

I just removed the defined in these two line and that does the trick.

I'm just a normal user so I have no idea how to bring that into the code/upstream so maybe here is someone who is willing to help ...

Thanks, Sebastian

Attachments (4)

Portfile.diff (1.5 KB) - added by aque (Allan Que) 8 years ago.
patch-defined.diff (445 bytes) - added by aque (Allan Que) 8 years ago.
Portfile.2.diff (1.5 KB) - added by aque (Allan Que) 8 years ago.
corrected patch file name
patch-fixpaths.diff (445 bytes) - added by aque (Allan Que) 8 years ago.
corrected patch file name

Download all attachments as: .zip

Change History (15)

comment:1 in reply to:  description Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: sierra haspatch added

Thanks.

Replying to beckers@…:

I'm just a normal user so I have no idea how to bring that into the code/upstream so maybe here is someone who is willing to help ...

skey 1.1.5 is over 15 years old, so there might not be an upstream anymore.

comment:2 Changed 8 years ago by ptiLuc (Sebastian Becker)

But still in use ... so will there be a way that this can be fixed for macports?

comment:3 Changed 8 years ago by aque (Allan Que)

I don't know Perl but I hacked the source following http://perldoc.perl.org/functions/defined.html and it seemed to build fine and work under Sierra.

I also removed mirror.mcs.anl.gov from master_sites since they shut down, and updated the link to de-mirror.org.

Changed 8 years ago by aque (Allan Que)

Attachment: Portfile.diff added

Changed 8 years ago by aque (Allan Que)

Attachment: patch-defined.diff added

comment:4 Changed 8 years ago by aque (Allan Que)

Cc: allan.que@… added

Cc Me!

comment:5 Changed 8 years ago by aque (Allan Que)

Sorry. I should have called the patch file patch-fixpaths.diff per the standard.

Changed 8 years ago by aque (Allan Que)

Attachment: Portfile.2.diff added

corrected patch file name

Changed 8 years ago by aque (Allan Que)

Attachment: patch-fixpaths.diff added

corrected patch file name

comment:6 Changed 8 years ago by larryv (Lawrence Velázquez)

Keywords: sierra removed
Owner: changed from macports-tickets@… to larryv@…
Status: newassigned
Summary: skey: Can't use 'defined(%hash)'skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function

Not a Sierra problem, I am seeing the same failure on El Capitan. Might have to do with the version of Perl used to invoke fixpaths.

/opt/local/bin/perl ./fixpaths -D/etc/skeykeys=/opt/local/etc/skeykeys -D/usr/bin/perl=/opt/local/bin/perl -D/usr/lib/sendmail=/usr/sbin/sendmail ./skey.1

My /opt/local/bin/perl is 5.22, while the system’s Perl is 5.18.

% port installed perl5
The following ports are currently installed:
  perl5 @5.22.2_0+perl5_22 (active)
% /usr/bin/perl --version

This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

[...]

comment:7 Changed 8 years ago by dbevans (David B. Evans)

Both defined(@array) and defined(%hash) are no longer allowed in recent perl versions. Generally these can be replaced by just @array or %hash. To be specific, they are deprecated in 5.18 and will give a warning message. Beginning with 5.22 it's an error.

comment:8 Changed 8 years ago by dbevans (David B. Evans)

I suggest that you fix the port to use perl5.24 regardless of installed system version and remove the defined() in the two places where this occurs. As mentioned above, some of the master_sites listed are no longer active. They're really just gentoo mirrors so you can use the gentoo mirror_list instead. Homepage is also missing but there hasn't been any active development on this for more than a decade and there is really none available that I can find. I believe that gentoo, however, has specific patches that they apply.

comment:9 Changed 8 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

Fixed in r153579. Adding a dependency on perl5.24 seems like overkill because the build system calls one tiny script all of three times.

comment:10 Changed 8 years ago by dbevans (David B. Evans)

I was just suggesting a repeatable build. As is, any of system perl perl5.22 perl5.24 could be used depending on whether perl5 is installed and if so with which variant. Generally, we try to configure ports so they build the same way each time without regard to selected perl variants etc. If you don't want to install a MacPorts perl to build it, why don't you configure it to use the system perl?

comment:11 in reply to:  10 Changed 8 years ago by larryv (Lawrence Velázquez)

Just didn’t think of it. r153582

Note: See TracTickets for help on using tickets.