gdb: add Python 3 option (#24524)
This commit is contained in:
parent
d502357a52
commit
0037aff090
1 changed files with 10 additions and 3 deletions
|
@ -13,13 +13,14 @@ class Gdb < Formula
|
|||
|
||||
deprecated_option "with-brewed-python" => "with-python@2"
|
||||
deprecated_option "with-guile" => "with-guile@2.0"
|
||||
deprecated_option "with-python" => "with-python@2"
|
||||
|
||||
option "with-python", "Use the Homebrew version of Python; by default system Python is used"
|
||||
option "with-python@2", "Use the Homebrew version of Python 2; by default system Python is used"
|
||||
option "with-version-suffix", "Add a version suffix to program"
|
||||
option "with-all-targets", "Build with support for all targets"
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "python" => :optional
|
||||
depends_on "python@2" => :optional
|
||||
depends_on "guile@2.0" => :optional
|
||||
|
||||
|
@ -49,8 +50,14 @@ class Gdb < Formula
|
|||
args << "--with-guile" if build.with? "guile@2.0"
|
||||
args << "--enable-targets=all" if build.with? "all-targets"
|
||||
|
||||
if build.with? "python@2"
|
||||
args << "--with-python=#{Formula["python"].opt_libexec}/bin"
|
||||
if build.with?("python@2") && build.with?("python")
|
||||
odie "Options --with-python and --with-python@2 are mutually exclusive."
|
||||
elsif build.with?("python@2")
|
||||
args << "--with-python=#{Formula["python@2"].opt_bin}/python2"
|
||||
ENV.append "CPPFLAGS", "-I#{Formula["python@2"].opt_libexec}"
|
||||
elsif build.with?("python")
|
||||
args << "--with-python=#{Formula["python"].opt_bin}/python3"
|
||||
ENV.append "CPPFLAGS", "-I#{Formula["python"].opt_libexec}"
|
||||
else
|
||||
args << "--with-python=/usr"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue