wxmac@3.0 3.0.5.1 (new formula)

This is the long-term support version of wxWidgets. This version is
needed by some formulae that currently depend on `wxmac`.
master
Carlo Cabrera 2021-06-22 17:03:49 +01:00 committed by BrewTestBot
parent 2bf5d4e329
commit 93e31ace7a
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
2 changed files with 91 additions and 1 deletions

89
Formula/wxmac@3.0.rb Normal file
View File

@ -0,0 +1,89 @@
class WxmacAT30 < Formula
desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS) - Stable Release"
homepage "https://www.wxwidgets.org"
url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5.1/wxWidgets-3.0.5.1.tar.bz2"
sha256 "440f6e73cf5afb2cbf9af10cec8da6cdd3d3998d527598a53db87099524ac807"
license "wxWindows"
livecheck do
url :stable
regex(/^v?(\d+\.\d*[02468](?:\.\d+)*)$/i)
end
depends_on "jpeg"
depends_on "libpng"
depends_on "libtiff"
on_linux do
depends_on "pkg-config" => :build
depends_on "gtk+"
depends_on "libsm"
depends_on "mesa-glu"
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-webkit",
"--enable-webview",
"--with-expat",
"--with-libjpeg",
"--with-libpng",
"--with-libtiff",
"--with-opengl",
"--with-zlib",
"--disable-precomp-headers",
# This is the default option, but be explicit
"--disable-monolithic",
]
on_macos do
# Set with-macosx-version-min to avoid configure defaulting to 10.5
args << "--with-macosx-version-min=#{MacOS.version}"
args << "--with-osx_cocoa"
args << "--with-libiconv"
end
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
# Move some files out of the way to prevent conflict with `wxmac`
bin.install "#{bin}/wx-config" => "wx-config-#{version.major_minor}"
(bin/"wxrc").unlink
(share/"wx"/version.major_minor).install share/"aclocal", share/"bakefile"
Dir.glob(share/"locale/**/*.mo") { |file| add_suffix file, version.major_minor }
end
def add_suffix(file, suffix)
dir = File.dirname(file)
ext = File.extname(file)
base = File.basename(file, ext)
File.rename file, "#{dir}/#{base}-#{suffix}#{ext}"
end
def caveats
<<~EOS
To avoid conflicts with the wxmac formula, `wx-config` and `wxrc`
have been installed as `wx-config-#{version.major_minor}` and `wxrc-#{version.major_minor}`.
EOS
end
test do
system bin/"wx-config-#{version.major_minor}", "--libs"
end
end

View File

@ -22,5 +22,6 @@
"pangomm@2.46",
"pyqt@5",
"python@3.9",
"python-tk@3.9"
"python-tk@3.9",
"wxmac@3.0"
]