Skip to content

Commit

Permalink
python39+: fix build on Tiger
Browse files Browse the repository at this point in the history
Upstream issue python/cpython#127614
  • Loading branch information
glebm committed Dec 4, 2024
1 parent aeefcc1 commit ca9071d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lang/python310/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ variant lto description {enable Link-Time Optimization} {
configure.args-append --with-lto
}

# Fixes the return type of `ttyname_r`
# See /~https://github.com/python/cpython/issues/127614
platform darwin 8 {
configure.cflags-append -D__DARWIN_UNIX03=1
}

platform darwin {
# Build failures on 10.9 and older
if {${os.major} > 11} {
Expand Down
6 changes: 6 additions & 0 deletions lang/python311/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ variant lto description {enable Link-Time Optimization} {
configure.args-append --with-lto
}

# Fixes the return type of `ttyname_r`
# See /~https://github.com/python/cpython/issues/127614
platform darwin 8 {
configure.cflags-append -D__DARWIN_UNIX03=1
}

platform darwin {
# Build failures on 10.9 and older
if {${os.major} > 11} {
Expand Down
6 changes: 6 additions & 0 deletions lang/python312/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ variant lto description {enable Link-Time Optimization} {
configure.args-append --with-lto
}

# Fixes the return type of `ttyname_r`
# See /~https://github.com/python/cpython/issues/127614
platform darwin 8 {
configure.cflags-append -D__DARWIN_UNIX03=1
}

platform darwin {
# Build failures on 10.9 and older
if {${os.major} > 11} {
Expand Down
6 changes: 6 additions & 0 deletions lang/python313/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ variant lto description {enable Link-Time Optimization} {
configure.args-append --with-lto
}

# Fixes the return type of `ttyname_r`
# See /~https://github.com/python/cpython/issues/127614
platform darwin 8 {
configure.cflags-append -D__DARWIN_UNIX03=1
}

platform darwin {
# Build failures on 10.10 and older
if {${os.major} > 11} {
Expand Down
6 changes: 6 additions & 0 deletions lang/python314-devel/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ variant lto description {enable Link-Time Optimization} {
configure.args-append --with-lto
}

# Fixes the return type of `ttyname_r`
# See /~https://github.com/python/cpython/issues/127614
platform darwin 8 {
configure.cflags-append -D__DARWIN_UNIX03=1
}

platform darwin {
# Build failures on 10.10 and older
if {${os.major} > 11} {
Expand Down
6 changes: 6 additions & 0 deletions lang/python39/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ variant lto description {enable Link-Time Optimization} {
configure.args-append --with-lto
}

# Fixes the return type of `ttyname_r`
# See /~https://github.com/python/cpython/issues/127614
platform darwin 8 {
configure.cflags-append -D__DARWIN_UNIX03=1
}

platform darwin {
# Build failures on 10.9 and older
if {${os.major} > 11} {
Expand Down

0 comments on commit ca9071d

Please sign in to comment.