Skip to content

Commit c42748c

Browse files
committed
Update extension dependencies
1 parent e3769ed commit c42748c

File tree

4 files changed

+112
-30
lines changed

4 files changed

+112
-30
lines changed

.github/deps/imagick/g/glib.rb

+10-15
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ class Glib < Formula
33

44
desc "Core application library for C"
55
homepage "https://docs.gtk.org/glib/"
6-
url "https://download.gnome.org/sources/glib/2.82/glib-2.82.5.tar.xz"
7-
sha256 "05c2031f9bdf6b5aba7a06ca84f0b4aced28b19bf1b50c6ab25cc675277cbc3f"
6+
url "https://download.gnome.org/sources/glib/2.84/glib-2.84.0.tar.xz"
7+
sha256 "f8823600cb85425e2815cfad82ea20fdaa538482ab74e7293d58b3f64a5aff6a"
88
license "LGPL-2.1-or-later"
99

1010
bottle do
11-
sha256 arm64_sequoia: "1cb81bf4e51c9d5f2076bd25f048d54e3dfef275a56181ae556d0f00202134f9"
12-
sha256 arm64_sonoma: "0f59834321c70454c8287133ae3b6d299e5555fd1e90168ef800b8583e85f02c"
13-
sha256 arm64_ventura: "76c6ad473c539a960692819801a130d4b943d3228c45dfb5738ba6bdde2433d8"
14-
sha256 sonoma: "1617041c672d28d0689cfb148bea039d99ce5672e785ac668b05899de3cae025"
15-
sha256 ventura: "1f7cf7df88c97edde8ed504caa2fbf4930bd72306a639c7c75c79e628f9ecea6"
16-
sha256 x86_64_linux: "0db74b4ee32118ea223445f654487ca4b1349535e35be07b98d486cae80e1ebd"
11+
sha256 arm64_sequoia: "c14b2a422eb32d66ba0275d4ee81d86a2dd9b3ed5336a233ab4cdf7a28087046"
12+
sha256 arm64_sonoma: "0f66f5851b23b9c3b223bdaf92aa7f4afbd5fa6a0906fb0794d1a141e514bb57"
13+
sha256 arm64_ventura: "8950974ac91b8a5d8a9010221d4846d54a9ea334e59941d4600f2b586f595104"
14+
sha256 sonoma: "8ba82d08116bcb2654b786ff252c7884397e7f7b04b3082a50493c4cc90836e8"
15+
sha256 ventura: "dd204b1bc47c2d3e39821d27d0db8a028dbdf606fd223f82319bf64443dc4fd2"
16+
sha256 x86_64_linux: "1e5b90aeceeb13cc06d3511ba1eb36062bb0e5d71b04f1517bbcf35675d58b9d"
1717
end
1818

1919
depends_on "bison" => :build # for gobject-introspection
@@ -22,10 +22,11 @@ class Glib < Formula
2222
depends_on "ninja" => :build
2323
depends_on "pkgconf" => :build
2424
depends_on "pcre2"
25+
depends_on "python-setuptools"
2526

2627
uses_from_macos "flex" => :build # for gobject-introspection
2728
uses_from_macos "libffi", since: :catalina
28-
uses_from_macos "python", since: :catalina
29+
uses_from_macos "python"
2930
uses_from_macos "zlib"
3031

3132
on_macos do
@@ -55,12 +56,6 @@ class Glib < Formula
5556
sha256 "0f5a4c1908424bf26bc41e9361168c363685080fbdb87a196c891c8401ca2f09"
5657
end
5758

58-
# Backport PATH python shebang rather than manually rewriting
59-
patch do
60-
url "https://gitlab.gnome.org/GNOME/glib/-/commit/160e55575e2183464dbf5aa733d6c2df3c674c4c.diff"
61-
sha256 "29b178b53a9a636ca9538ee97e20838b9942d24018d6679d3cc29e59b3b6c0c1"
62-
end
63-
6459
# replace several hardcoded paths with homebrew counterparts
6560
patch do
6661
url "https://raw.githubusercontent.com/Homebrew/formula-patches/b46d8deae6983110b4e39bb2971bcbd10bb59716/glib/hardcoded-paths.diff"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
class PythonSetuptools < Formula
2+
desc "Easily download, build, install, upgrade, and uninstall Python packages"
3+
homepage "https://setuptools.pypa.io/"
4+
url "https://files.pythonhosted.org/packages/32/d2/7b171caf085ba0d40d8391f54e1c75a1cda9255f542becf84575cfd8a732/setuptools-76.0.0.tar.gz"
5+
sha256 "43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4"
6+
license "MIT"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, all: "602a29810aaaf5ee6c0487878f4fe579e49349efd44542706becbc8034720be8"
10+
end
11+
12+
depends_on "python@3.12" => [:build, :test]
13+
depends_on "python@3.13" => [:build, :test]
14+
15+
def pythons
16+
deps.map(&:to_formula)
17+
.select { |f| f.name.match?(/^python@\d\.\d+$/) }
18+
.map { |f| f.opt_libexec/"bin/python" }
19+
end
20+
21+
def install
22+
inreplace_paths = %w[
23+
_distutils/compilers/C/unix.py
24+
_vendor/platformdirs/unix.py
25+
tests/test_easy_install.py
26+
]
27+
28+
pythons.each do |python|
29+
system python, "-m", "pip", "install", *std_pip_args, "."
30+
31+
# Ensure uniform bottles
32+
setuptools_site_packages = prefix/Language::Python.site_packages(python)/"setuptools"
33+
inreplace setuptools_site_packages/"_vendor/platformdirs/macos.py", "/opt/homebrew", HOMEBREW_PREFIX
34+
35+
inreplace_files = inreplace_paths.map { |file| setuptools_site_packages/file }
36+
inreplace_files += setuptools_site_packages.glob("_vendor/platformdirs-*dist-info/METADATA")
37+
inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX
38+
end
39+
end
40+
41+
test do
42+
pythons.each do |python|
43+
system python, "-c", "import setuptools"
44+
end
45+
end
46+
end

.github/deps/vips/g/glib.rb

+10-15
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ class Glib < Formula
33

44
desc "Core application library for C"
55
homepage "https://docs.gtk.org/glib/"
6-
url "https://download.gnome.org/sources/glib/2.82/glib-2.82.5.tar.xz"
7-
sha256 "05c2031f9bdf6b5aba7a06ca84f0b4aced28b19bf1b50c6ab25cc675277cbc3f"
6+
url "https://download.gnome.org/sources/glib/2.84/glib-2.84.0.tar.xz"
7+
sha256 "f8823600cb85425e2815cfad82ea20fdaa538482ab74e7293d58b3f64a5aff6a"
88
license "LGPL-2.1-or-later"
99

1010
bottle do
11-
sha256 arm64_sequoia: "1cb81bf4e51c9d5f2076bd25f048d54e3dfef275a56181ae556d0f00202134f9"
12-
sha256 arm64_sonoma: "0f59834321c70454c8287133ae3b6d299e5555fd1e90168ef800b8583e85f02c"
13-
sha256 arm64_ventura: "76c6ad473c539a960692819801a130d4b943d3228c45dfb5738ba6bdde2433d8"
14-
sha256 sonoma: "1617041c672d28d0689cfb148bea039d99ce5672e785ac668b05899de3cae025"
15-
sha256 ventura: "1f7cf7df88c97edde8ed504caa2fbf4930bd72306a639c7c75c79e628f9ecea6"
16-
sha256 x86_64_linux: "0db74b4ee32118ea223445f654487ca4b1349535e35be07b98d486cae80e1ebd"
11+
sha256 arm64_sequoia: "c14b2a422eb32d66ba0275d4ee81d86a2dd9b3ed5336a233ab4cdf7a28087046"
12+
sha256 arm64_sonoma: "0f66f5851b23b9c3b223bdaf92aa7f4afbd5fa6a0906fb0794d1a141e514bb57"
13+
sha256 arm64_ventura: "8950974ac91b8a5d8a9010221d4846d54a9ea334e59941d4600f2b586f595104"
14+
sha256 sonoma: "8ba82d08116bcb2654b786ff252c7884397e7f7b04b3082a50493c4cc90836e8"
15+
sha256 ventura: "dd204b1bc47c2d3e39821d27d0db8a028dbdf606fd223f82319bf64443dc4fd2"
16+
sha256 x86_64_linux: "1e5b90aeceeb13cc06d3511ba1eb36062bb0e5d71b04f1517bbcf35675d58b9d"
1717
end
1818

1919
depends_on "bison" => :build # for gobject-introspection
@@ -22,10 +22,11 @@ class Glib < Formula
2222
depends_on "ninja" => :build
2323
depends_on "pkgconf" => :build
2424
depends_on "pcre2"
25+
depends_on "python-setuptools"
2526

2627
uses_from_macos "flex" => :build # for gobject-introspection
2728
uses_from_macos "libffi", since: :catalina
28-
uses_from_macos "python", since: :catalina
29+
uses_from_macos "python"
2930
uses_from_macos "zlib"
3031

3132
on_macos do
@@ -55,12 +56,6 @@ class Glib < Formula
5556
sha256 "0f5a4c1908424bf26bc41e9361168c363685080fbdb87a196c891c8401ca2f09"
5657
end
5758

58-
# Backport PATH python shebang rather than manually rewriting
59-
patch do
60-
url "https://gitlab.gnome.org/GNOME/glib/-/commit/160e55575e2183464dbf5aa733d6c2df3c674c4c.diff"
61-
sha256 "29b178b53a9a636ca9538ee97e20838b9942d24018d6679d3cc29e59b3b6c0c1"
62-
end
63-
6459
# replace several hardcoded paths with homebrew counterparts
6560
patch do
6661
url "https://raw.githubusercontent.com/Homebrew/formula-patches/b46d8deae6983110b4e39bb2971bcbd10bb59716/glib/hardcoded-paths.diff"
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
class PythonSetuptools < Formula
2+
desc "Easily download, build, install, upgrade, and uninstall Python packages"
3+
homepage "https://setuptools.pypa.io/"
4+
url "https://files.pythonhosted.org/packages/32/d2/7b171caf085ba0d40d8391f54e1c75a1cda9255f542becf84575cfd8a732/setuptools-76.0.0.tar.gz"
5+
sha256 "43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4"
6+
license "MIT"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, all: "602a29810aaaf5ee6c0487878f4fe579e49349efd44542706becbc8034720be8"
10+
end
11+
12+
depends_on "python@3.12" => [:build, :test]
13+
depends_on "python@3.13" => [:build, :test]
14+
15+
def pythons
16+
deps.map(&:to_formula)
17+
.select { |f| f.name.match?(/^python@\d\.\d+$/) }
18+
.map { |f| f.opt_libexec/"bin/python" }
19+
end
20+
21+
def install
22+
inreplace_paths = %w[
23+
_distutils/compilers/C/unix.py
24+
_vendor/platformdirs/unix.py
25+
tests/test_easy_install.py
26+
]
27+
28+
pythons.each do |python|
29+
system python, "-m", "pip", "install", *std_pip_args, "."
30+
31+
# Ensure uniform bottles
32+
setuptools_site_packages = prefix/Language::Python.site_packages(python)/"setuptools"
33+
inreplace setuptools_site_packages/"_vendor/platformdirs/macos.py", "/opt/homebrew", HOMEBREW_PREFIX
34+
35+
inreplace_files = inreplace_paths.map { |file| setuptools_site_packages/file }
36+
inreplace_files += setuptools_site_packages.glob("_vendor/platformdirs-*dist-info/METADATA")
37+
inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX
38+
end
39+
end
40+
41+
test do
42+
pythons.each do |python|
43+
system python, "-c", "import setuptools"
44+
end
45+
end
46+
end

0 commit comments

Comments
 (0)