Skip to content

Commit

Permalink
libpqxx: modify python handling
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Aug 23, 2024
1 parent 6aab9d9 commit 951f618
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions databases/libpqxx/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ if {!$any_variant_set} {

depends_build path:bin/pkg-config:pkgconfig

set py_ver 3.12
set py_ver_nodot [string map {. {}} ${py_ver}]

if {${os.platform} eq "darwin" && ${os.major} < 20} {
depends_build-append port:python311
depends_build-append port:python${py_ver_nodot}

post-patch {
fs-traverse f ${worksrcpath} {
if {[string match *.py ${f}]} {
reinplace -q "s| /usr/bin/env python3|${prefix}/bin/python3.11|" ${f}
reinplace -q "s| /usr/bin/env python3|${prefix}/bin/python${py_ver}|" ${f}
}
}
}
Expand Down

0 comments on commit 951f618

Please sign in to comment.