Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#46057 closed enhancement (fixed)

p5-sgmlspm @1.03ii.0 remove old versions of perl5

Reported by: lockhart (Thomas Lockhart) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch maintainer Cc: mojca (Mojca Miklavec), dbevans (David B. Evans)
Port: p5-sgmlspm

Description

Remove 5.8, 5.10, 5.12, and 5.14 from the list of supported perl5 versions. Mark variants as incompatible since some files are installed in /opt/local/lib/perl5/ which does not distinguish minor versions.

Attachments (2)

Portfile.diff (1.3 KB) - added by lockhart (Thomas Lockhart) 9 years ago.
Updated to fix specification of perl versions per comments in ticket. Add a default perl branch. Also update comment regarding hinky version number.
patch-p5-sgmlspm.diff (3.9 KB) - added by dbevans (David B. Evans) 9 years ago.
Patch to Portfile to resolve remaining issues

Download all attachments as: .zip

Change History (14)

comment:1 Changed 9 years ago by lockhart (Thomas Lockhart)

#46054 raises a problem installing pre-built binaries. It is not clear that this patch would help with that, but a local build works fine using this patch.

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Like all perl ports, p5.X-sgmlspm are not variants, but actual ports.

comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

You don't need to delete things from perl5.branches that aren't there.

comment:4 in reply to:  3 Changed 9 years ago by lockhart (Thomas Lockhart)

Replying to ryandesign@…:

You don't need to delete things from perl5.branches that aren't there.

Ah, will repost a patch. It looks like there is not a default set of values for perl5.branches. Would that be useful to help ports support a "recommended set" of versions?

Changed 9 years ago by lockhart (Thomas Lockhart)

Attachment: Portfile.diff added

Updated to fix specification of perl versions per comments in ticket. Add a default perl branch. Also update comment regarding hinky version number.

comment:5 Changed 9 years ago by mf2k (Frank Schima)

This patch still incorrectly uses variants.

comment:6 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

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

Cc: devans@… added

Cc Me!

Changed 9 years ago by dbevans (David B. Evans)

Attachment: patch-p5-sgmlspm.diff added

Patch to Portfile to resolve remaining issues

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

As stated in comment5, the use of variants to try and resolve activation conflicts between the various subports is inappropriate. In addition, the specification of a perl default is redundant as this is already handled by the perl5 portgroup.

The more traditional way to resolve the conflicts is to fix the port to install any binaries in ${perl5.bindir}. This variable's default is set by the perl5 portgroup to the versioned directory ${prefix}/libexec/perl${perl5.major}. When binaries exist in this directory, the portgroup automatically creates versioned symbolic links to them in ${prefix}/bin resolving possible conflicts.

In addition, there are some miscellaneous issues with the port's Makefile that can be handled more simply by patching the Makefile directly. These include the creation of required installation directories in ${destroot} and enabling the installation of html documentation which is currently commented out in the distributed Makefile.

The attached patch (relative to svn r130129), uses this approach to simplify the Portfile and use the perl5 portgroup to greatest advantage.

The included patch-Makefile.diff, patches the Makefile to replace the various hard coded user options with symbols that can be uniquely replaced with the desired values during the post-patch phase. In addition, the commented install-html target is enabled as a dependency of the install target and fixups to the various install rules are made so that they behave as originally intended when installing into $destroot, including installing necessary directories where required.

The post-patch phase then replaces the patched symbolic values with appropriate paths expected by the perl5 port group. Attempts to fixup DOC/Makefile have been removed because, although this Makefile is invoked during the install target, it does nothing because pre-generated copies of the HTML documentation are included in the distributed tarball.

Since everything that is done in the Makefile occurs during the execution of the install target, the build phase is disabled by replacing it with a dummy version. Note that previous attempts to set the various user options by passing them as command line arguments in the build phase were ineffective since the Makefile hard codes these values and ignores any command line arguments. The complete install process now is invoked during the destroot phase only, using the user options specified during post-patch.

Because the installed file layout is changed from previous versions, the port revision is incremented.

This patch works for me and allows the installation of the various subports simultaneously without conflict. If this works for you, I'd be glad to commit it and close the ticket. The issue of removing old subports has already been accomplished by mojca in r130129.

Last edited 9 years ago by dbevans (David B. Evans) (previous) (diff)

comment:9 Changed 9 years ago by mf2k (Frank Schima)

Keywords: haspatch, maintainerhaspatch maintainer
Version: 2.3.3

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

Resolution: fixed
Status: newclosed

Most recent patch committed (a bit prematurely, sorry) in r130876 but I think it fixes the outstanding issues.

comment:11 Changed 9 years ago by mojca (Mojca Miklavec)

Did the fix also address any of the following issues? #44418 #46054

comment:12 in reply to:  11 Changed 9 years ago by dbevans (David B. Evans)

Replying to mojca@…:

Did the fix also address any of the following issues? #44418 #46054

Yes, I think so.

Note: See TracTickets for help on using tickets.