Skip to content

Commit

Permalink
Merge pull request Homebrew#164755 from Homebrew/wxpython-doxygen-bac…
Browse files Browse the repository at this point in the history
…kport

wxpython: backport `doxygen` fix
  • Loading branch information
BrewTestBot authored Mar 1, 2024
2 parents 5af6aee + fe2bedc commit 173de46
Showing 1 changed file with 18 additions and 33 deletions.
51 changes: 18 additions & 33 deletions Formula/w/wxpython.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,43 @@ class Wxpython < Formula
license "LGPL-2.0-or-later" => { with: "WxWindows-exception-3.1" }

bottle do
sha256 cellar: :any, arm64_sonoma: "62c0d6cffdb2355d9a4502e27f22d09522b54140d645bfc31506c480d758afea"
sha256 cellar: :any, arm64_ventura: "ecc9ba51d7c1ecccfa9e95a93e6dd9a1b3ae9389bcfd6c59ea78f64a516e21a2"
sha256 cellar: :any, arm64_monterey: "c4ec5d486f312f880810185ff172f3cf1ad6e29d3ae134bd35dd49aa435176c3"
sha256 cellar: :any, arm64_big_sur: "1efd83b12803dc94280d18db9faf7c7908b923a84443b2369af4661923690d47"
sha256 cellar: :any, sonoma: "f5655288035b399503299af5ebb480f57bdd793f1a74a028f22be08efe96d078"
sha256 cellar: :any, ventura: "9ead65dce312c062a772fad1589434665706e509b6ffd7aa5f320ec9476483e5"
sha256 cellar: :any, monterey: "79304e35ef5f033aa46da09e3f668ce0bb1651f482c6ee853719f34f12dca430"
sha256 cellar: :any, big_sur: "50bbd5fb5ebf30a376cd174829ece3d81be8432fc6ae872c4e69d0fbeb0bf1a7"
sha256 x86_64_linux: "2b0a727845e44862bd0f74d23e0c1e2e8c91959e32d85aebff3ead82a0a10fb5"
rebuild 1
sha256 cellar: :any, arm64_sonoma: "120938b86adb0a5317edec17ad9b8e9d490ce7988a9b0677c9fdf1f688e7ed59"
sha256 cellar: :any, arm64_ventura: "16bec214594988fe4ecc3828eda9c031daee2b5bd17a3d01a101bb6e52f7360b"
sha256 cellar: :any, arm64_monterey: "89e763016f0d5176f591072d1e13b78c2fa8b86ab5ecf2588a461b435c8f27cb"
sha256 cellar: :any, sonoma: "092cddd2dc534cbda892fba573c7b4062679e099b1b85ba18061608d2bcfec76"
sha256 cellar: :any, ventura: "7a61784a48ab5d9462492528c3c66b79542a9c319226c9e92bffc64612778584"
sha256 cellar: :any, monterey: "370c1dd9ade8b71d481a5ea8bea50babefc8baeba38303fb5232c4d18c783224"
sha256 x86_64_linux: "87d2e67b3a6d57d840c286949e73781feba27ba7007055344687b332349322ad"
end

# FIXME: Build is currently broken with Doxygen 1.9.7+.
# FIXME: depends_on "doxygen" => :build
depends_on "bison" => :build # for `doxygen` resource
depends_on "cmake" => :build # for `doxygen` resource
depends_on "doxygen" => :build
depends_on "python-setuptools" => :build
depends_on "sip" => :build
depends_on "numpy"
depends_on "pillow"
depends_on "python@3.11"
depends_on "python@3.12"
depends_on "six"
depends_on "wxwidgets"
uses_from_macos "flex" => :build, since: :big_sur # for `doxygen` resource

on_linux do
depends_on "pkg-config" => :build
depends_on "gtk+3"
end

# Build is broken with Doxygen 1.9.7+.
# TODO: Try to use Homebrew `doxygen` at next release.
resource "doxygen" do
url "https://doxygen.nl/files/doxygen-1.9.6.src.tar.gz"
mirror "https://downloads.sourceforge.net/project/doxygen/rel-1.9.6/doxygen-1.9.6.src.tar.gz"
sha256 "297f8ba484265ed3ebd3ff3fe7734eb349a77e4f95c8be52ed9977f51dea49df"
# Backport fix for doxygen 1.9.7+. Remove in the next release.
patch do
url "https://github.com/wxWidgets/Phoenix/commit/0b21230ee21e5e5d0212871b96a6d2fefd281038.patch?full_index=1"
sha256 "befd2a9594a2fa41f926edf412476479f2f311b4088c4738a867c5e7ca6c0f82"
end

def python
"python3.11"
"python3.12"
end

def install
odie "Check if `doxygen` resource can be removed!" if build.bottle? && version > "4.2.1"
# TODO: Try removing the block below at the next release.
resource("doxygen").stage do
system "cmake", "-S", ".", "-B", "build",
"-DPYTHON_EXECUTABLE=#{which(python)}",
*std_cmake_args(install_prefix: buildpath/".brew_home")
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

ENV["DOXYGEN"] = buildpath/".brew_home/bin/doxygen" # Formula["doxygen"].opt_bin/"doxygen"
ENV.cxx11
ENV["DOXYGEN"] = Formula["doxygen"].opt_bin/"doxygen"
system python, "-u", "build.py", "dox", "touch", "etg", "sip", "build_py",
"--release",
"--use_syswx",
Expand Down

0 comments on commit 173de46

Please sign in to comment.