Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p5-dbd-mysql: Fix variant conflicts issues #26725

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion perl/p5-capture-tiny/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PortSystem 1.0
PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
perl5.setup Capture-Tiny 0.50 ../../authors/id/D/DA/DAGOLDEN
revision 0
maintainers nomaintainer
Expand Down
41 changes: 14 additions & 27 deletions perl/p5-dbd-mysql/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup perl5 1.0
PortGroup active_variants 1.1

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
license {Artistic-1 GPL}
maintainers nomaintainer
description DBD::mysql - MySQL driver for the Perl5 Database Interface (DBI)
Expand All @@ -13,7 +13,7 @@ long_description {*}${description}
###############################################################################
# Create an array of DBD:MYSQL versions
###############################################################################
# "DBD:MYSQL Major Verion" {
# "DBD:MYSQL Major Version" {
# version DBD:MYSQL version
# rmd160 value
# sha256 value
Expand Down Expand Up @@ -51,6 +51,13 @@ array set db_variants {
mariadb10_4 mariadb-10.4
percona ""
}
# mariadb-10.2 does not build on Sequoia (macOS 15 / darin 24) and
# likely will not get updated as it is end of life. Add it only
# for OS versions earlier than Sequoia for legacy support
if {${os.platform} eq "darwin" && ${os.major} < 24} {
append db_variants(mariadb10_2) mariadb-10.2
}


# check to see if a variant was set by the user
set any_sql no
Expand Down Expand Up @@ -85,9 +92,9 @@ perl5.setup DBD-mysql [lindex [array get $install_version versio
checksums rmd160 [lindex [array get $install_version rmd160] 1] \
sha256 [lindex [array get $install_version sha256] 1] \
size [lindex [array get $install_version size] 1]
# version gets set to the "current version" values to prevenet constant upgraing by port upgrade
# version gets set to the "current version" values to prevent constant upgrading by port upgrade
version [perl5_convert_version [lindex [array get version_current version] 1]]
revision 0
revision 1

if {${perl5.major} != ""} {
depends_build-append \
Expand All @@ -99,17 +106,12 @@ if {${perl5.major} != ""} {
port:p${perl5.major}-dbi

# loop over the array creating the specified variants
# with the multiple versioning change, the conflicts lists no longer apepears
# to be enforced, so this will be handled later in the pre-fetch stage with
# active_vaiants. The conflicts list is left here so the user gets the approprate
# warning when running port variant
# the {*} is necessary to break out the conflict_list into multiple variants vs.
# one single incorrectly formatted conflict
foreach variant_name [array names db_variants] {
set idx [lsearch [array names db_variants] $variant_name]
set conflict_list [lreplace [array names db_variants] $idx $idx]
variant $variant_name conflicts $conflict_list description "build with $variant_name" {}
if {[variant_isset $variant_name]} {
set active_conflicts $conflict_list
}
variant $variant_name conflicts {*}$conflict_list description "build with $variant_name" {}
}

# add the build dependencies, this must be done outside the variant call to work
Expand All @@ -125,21 +127,6 @@ if {${perl5.major} != ""} {
}
}

# Use active_variants to enforce that only one variant can be installed at any given time
pre-fetch {
if {![catch {set result [active_variants p${perl5.major}-dbd-mysql $active_conflicts ""]}]} {
ui_error "
****
**** p${perl5.major}-dbd-mysql can only have one active variant installed
**** If you need this vaiant, deactivate the previously installed one with
**** port deactivate p${perl5.major}-dbd-mysql
**** or uninstall is with
**** sudo port uninstall p${perl5.major}-dbd-mysql
****"
error "Error: p${perl5.major}-dbd-mysql variant already installed"
}
}

# livecheck workaround due to MetaCPAN indexing failure
livecheck.type regex
livecheck.url https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN
Expand Down
2 changes: 1 addition & 1 deletion perl/p5-dbi/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PortSystem 1.0
PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
perl5.setup DBI 1.646 ../../authors/id/H/HM/HMBRAND
license {Artistic-1 GPL}
maintainers nomaintainer
Expand Down
2 changes: 1 addition & 1 deletion perl/p5-devel-checklib/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PortSystem 1.0
PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
perl5.setup Devel-CheckLib 1.16
revision 1
license {Artistic-1 GPL}
Expand Down
2 changes: 1 addition & 1 deletion perl/p5-mock-config/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PortSystem 1.0
PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
perl5.setup Mock-Config 0.03 ../../authors/id/R/RU/RURBAN
revision 0
license {Artistic-1 GPL}
Expand Down
2 changes: 1 addition & 1 deletion perl/p5-test-deep/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PortSystem 1.0
PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
perl5.setup Test-Deep 1.204
revision 0
license {Artistic-1 GPL}
Expand Down
2 changes: 1 addition & 1 deletion perl/p5-time-hires/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PortSystem 1.0
PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.branches 5.28 5.30 5.32 5.34 5.36 5.38
perl5.setup Time-HiRes 1.9764
revision 0
license {Artistic-1 GPL}
Expand Down