#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)
Change History (14)
comment:1 Changed 10 years ago by lockhart (Thomas Lockhart)
comment:2 Changed 10 years ago by mf2k (Frank Schima)
Like all perl ports, p5.X-sgmlspm are not variants, but actual ports.
comment:3 follow-up: 4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
You don't need to delete
things from perl5.branches
that aren't there.
comment:4 Changed 10 years ago by lockhart (Thomas Lockhart)
Replying to ryandesign@…:
You don't need to
delete
things fromperl5.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 10 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.
Changed 10 years ago by dbevans (David B. Evans)
Attachment: | patch-p5-sgmlspm.diff added |
---|
Patch to Portfile to resolve remaining issues
comment:8 Changed 10 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.
comment:9 Changed 10 years ago by mf2k (Frank Schima)
Keywords: | haspatch, maintainer → haspatch maintainer |
---|---|
Version: | 2.3.3 |
comment:10 Changed 10 years ago by dbevans (David B. Evans)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Most recent patch committed (a bit prematurely, sorry) in r130876 but I think it fixes the outstanding issues.
#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.