Skip to content

Commit

Permalink
ocrmypdf: fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Jan 13, 2025
1 parent d4b1566 commit 78fc1fc
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions textproc/ocrmypdf/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,23 @@ supported_archs noarch
platforms {darwin any}
license MPL-2

variant python310 conflicts python311 python312 python313 description "Use Python 3.10" {
python.default_version 310
set pyvers {310 311 312 313}
foreach pyver $pyvers {
set pyconflicts [lmap v [ldelete $pyvers $pyver] {string cat python${v}}]
variant python${pyver} conflicts {*}$pyconflicts description "Use Python 3.[string range $pyver 1 end]" {}
if {[variant_isset python${pyver}]} {
python.default_version ${pyver}
set any_py_variant_set 1
}
}

variant python311 conflicts python310 python312 python313 description "Use Python 3.11" {
python.default_version 311
}

variant python312 conflicts python310 python311 python313 description "Use Python 3.12" {
python.default_version 312
}

variant python313 conflicts python310 python311 python312 description "Use Python 3.13" {
if {![info exists any_py_variant_set]} {
default_variants +python313
python.default_version 313
}

if {![variant_isset python310] && ![variant_isset python311] && ![variant_isset python312]} {
default_variants +python313
}
python.pep517_backend hatch

depends_build-append \
port:py${python.version}-hatchling \
port:py${python.version}-hatch-vcs

depends_lib-append port:img2pdf \
Expand Down

0 comments on commit 78fc1fc

Please sign in to comment.