-
-
Save douglasgreyling/92c673316c0a69a7d67fb5547fd81314 to your computer and use it in GitHub Desktop.
Brew Wxmac Formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wxmac < Formula | |
desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)" | |
homepage "https://www.wxwidgets.org" | |
url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2" | |
sha256 "d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224" | |
license "wxWindows" | |
revision 1 | |
head "https://github.com/wxWidgets/wxWidgets.git" | |
livecheck do | |
url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2" | |
strategy :github_latest | |
end | |
bottle do | |
sha256 cellar: :any, arm64_big_sur: "f8d6ccae11c8d99b893e2605ca272a376a374faac8864304d1cdf544c6152421" | |
sha256 cellar: :any, big_sur: "3ca3a19a14b407d0cdda507a7930c2e84ae1c8e74f946e0144d2fa7d881f1a94" | |
sha256 cellar: :any, catalina: "110aa0b2134d8bff1647de0cd8500f160133794b347f789bba3e1894b991b788" | |
sha256 cellar: :any, mojave: "5f703423fc3f1e36d647a2d8be2d271a92f5d60f49ceba8e3478391bbd4f5303" | |
sha256 cellar: :any, high_sierra: "1de8aa03e1c50af387888ffa51cfa4e0c99d158f25edb0acbf312e10c629a31d" | |
end | |
depends_on "jpeg" | |
depends_on "libpng" | |
depends_on "libtiff" | |
on_linux do | |
depends_on "pkg-config" => :build | |
end | |
def install | |
args = [ | |
"--prefix=#{prefix}", | |
"--enable-clipboard", | |
"--enable-controls", | |
"--enable-dataviewctrl", | |
"--enable-display", | |
"--enable-dnd", | |
"--enable-graphics_ctx", | |
"--enable-std_string", | |
"--enable-svg", | |
"--enable-unicode", | |
"--enable-webview", | |
"--with-expat", | |
"--with-libjpeg", | |
"--with-libpng", | |
"--with-libtiff", | |
"--with-opengl", | |
"--with-osx_cocoa", | |
"--with-zlib", | |
"--disable-precomp-headers", | |
# This is the default option, but be explicit | |
"--disable-monolithic", | |
# Set with-macosx-version-min to avoid configure defaulting to 10.5 | |
"--with-macosx-version-min=#{MacOS.version}", | |
"--enable-compat28" | |
] | |
system "./configure", *args | |
system "make", "install" | |
# wx-config should reference the public prefix, not wxmac's keg | |
# this ensures that Python software trying to locate wxpython headers | |
# using wx-config can find both wxmac and wxpython headers, | |
# which are linked to the same place | |
inreplace "#{bin}/wx-config", prefix, HOMEBREW_PREFIX | |
end | |
test do | |
system bin/"wx-config", "--libs" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment