Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#43193 closed enhancement (fixed)

perl PortGroup: add support for multiple Perl versions

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jul_bsd@…, gjasny@…, ryandesign (Ryan Carsten Schmidt), jmroot (Joshua Root), blair (Blair Zajac), pixilla (Bradley Giesbrecht), ghosthound, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), larryv (Lawrence Velázquez), markemer (Mark Anderson), cooljeanius (Eric Gallager), mf2k (Frank Schima)
Port: perl5

Description

Perl recently switched to +perl5_16. Now there's a lot of ports with hardcoded dependencies on Perl 5.12. It would be nice to remove those and use variants instead (similar to what is done for python, even though the situation is a tiny bit different there).

Related tickets:

From intltool:

# TODO: This perlver cruft should be done in the perl5 PortGroup
if {[variant_isset perl5_8]} {
    set perlver 5.8
} elseif {[variant_isset perl5_10]} {
    set perlver 5.10
} elseif {[variant_isset perl5_12]} {
    set perlver 5.12
} elseif {[variant_isset perl5_14]} {
    set perlver 5.14
} elseif {[variant_isset perl5_18]} {
    set perlver 5.18
} else {
    set perlver 5.16
    default_variants +perl5_16
}

variant perl5_8 conflicts perl5_10 perl5_12 perl5_14 perl5_16 perl5_18 description {use perl 5.8} {}
variant perl5_10 conflicts perl5_8 perl5_12 perl5_14 perl5_16 perl5_18 description {use perl 5.10} {}
variant perl5_12 conflicts perl5_8 perl5_10 perl5_14 perl5_16 perl5_18 description {use perl 5.12} {}
variant perl5_14 conflicts perl5_8 perl5_10 perl5_12 perl5_16 perl5_18 description {use perl 5.14} {}
variant perl5_16 conflicts perl5_8 perl5_10 perl5_12 perl5_14 perl5_18 description {use perl 5.16} {}
variant perl5_18 conflicts perl5_8 perl5_10 perl5_12 perl5_14 perl5_16 description {use perl 5.18} {}

Attachments (2)

patch-port-group-perl5-add-variants.diff (2.8 KB) - added by pixilla (Bradley Giesbrecht) 10 years ago.
Add variant creation to perl5 port group.
patch-devel-git-add-perl-port-group-variants.diff (2.8 KB) - added by pixilla (Bradley Giesbrecht) 10 years ago.
Git Portfile example of using perl5 port group variant creation.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by mojca (Mojca Miklavec)

And here's a ticket I opened a while ago requesting different Python variants: #40734

comment:2 Changed 10 years ago by jul_bsd@…

same problem w rrdtool #42498 but was not even linked to a defined perl version

comment:3 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 10 years ago by mojca (Mojca Miklavec)

See also #44405.

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

Cc: mf2k@… added

Cc Me!

Changed 10 years ago by pixilla (Bradley Giesbrecht)

Add variant creation to perl5 port group.

Changed 10 years ago by pixilla (Bradley Giesbrecht)

Git Portfile example of using perl5 port group variant creation.

comment:6 Changed 10 years ago by pixilla (Bradley Giesbrecht)

Resolution: fixed
Status: newclosed

I believe r125264 addresses this tickets issue.

comment:7 Changed 10 years ago by mojca (Mojca Miklavec)

Thank you very much. (Next time when you upload patches please drop a note, otherwise nobody notices the uploads.)

Did you already change any of the perl modules/programs using these patches?

comment:8 in reply to:  7 Changed 10 years ago by pixilla (Bradley Giesbrecht)

Replying to mojca@…:

Thank you very much. (Next time when you upload patches please drop a note, otherwise nobody notices the uploads.)

I was not aware and surprised no one commented on the patches.

Did you already change any of the perl modules/programs using these patches?

Locally yes. I have another option to add to the port group to "require" one of the available perl variants. I try to get this in tonight or tomorrow.

comment:9 Changed 10 years ago by pixilla (Bradley Giesbrecht)

See r126932 for perl5.create_variants usage example.

Note: See TracTickets for help on using tickets.