From 36f4f9da1ef22df5c14b53f9c0b223fa2018dbcf Mon Sep 17 00:00:00 2001 From: jhoyt4 Date: Sun, 24 Nov 2024 08:50:42 -0500 Subject: [PATCH] p5-dbd-mysql: Fix variant conflicts issues Fix issue where mulitple variant conflicts were being set as a single conflict. Fixing this also allowed for the removal of the active_vartiants workaround. - fix variant conflicts - remove active variants workaround - add mariab10_2 for legacy compatability - fix typos Closes: https://trac.macports.org/ticket/60517 Closes: https://trac.macports.org/ticket/71360 Closes: https://trac.macports.org/ticket/71381 --- perl/p5-dbd-mysql/Portfile | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/perl/p5-dbd-mysql/Portfile b/perl/p5-dbd-mysql/Portfile index 917338ffe3758..7764311e69268 100644 --- a/perl/p5-dbd-mysql/Portfile +++ b/perl/p5-dbd-mysql/Portfile @@ -49,6 +49,7 @@ array set db_variants { mariadb10_6 mariadb-10.6 mariadb10_5 mariadb-10.5 mariadb10_4 mariadb-10.4 + mariadb10_2 mariadb-10.2 percona "" } @@ -87,7 +88,7 @@ checksums rmd160 [lindex [array get $install_version rmd160] size [lindex [array get $install_version size] 1] # version gets set to the "current version" values to prevenet constant upgraing by port upgrade version [perl5_convert_version [lindex [array get version_current version] 1]] -revision 0 +revision 1 if {${perl5.major} != ""} { depends_build-append \ @@ -99,17 +100,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 foratted 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 @@ -125,21 +121,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