7 Commits
177 changed files with 12504 additions and 775 deletions
+6 -6
View File
@@ -1,13 +1,13 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
cask "android-platform-tools" do
os macos: "darwin", linux: "linux"
version "37.0.0"
sha256 arm: "094a1395683c509fd4d48667da0d8b5ef4d42b2abfcd29f2e8149e2f989357c7", x86_64: "094a1395683c509fd4d48667da0d8b5ef4d42b2abfcd29f2e8149e2f989357c7", x86_64_linux: "198ae156ab285fa555987219af237b31102fefe8b9d2bc274708a8d4f2865a07", arm64_linux: "198ae156ab285fa555987219af237b31102fefe8b9d2bc274708a8d4f2865a07"
version "37.0.1"
sha256 arm: "ee39ad5967e95c2a07f04dbcbde96b1a0c916ba376096db5d2f498b7727a5d1d",
x86_64: "ee39ad5967e95c2a07f04dbcbde96b1a0c916ba376096db5d2f498b7727a5d1d",
x86_64_linux: "d230f13842f60f782a8645f9c813f8f845bf36089ea7289f28c48f17979313f1",
arm64_linux: "d230f13842f60f782a8645f9c813f8f845bf36089ea7289f28c48f17979313f1"
url "https://homebrew.hyprnet/casks/android-platform-tools/android-platform-tools--platform-tools_r37.0.0-darwin.zip",
url "https://homebrew.hyprnet/cask/android-platform-tools/platform-tools_r37.0.1-darwin.zip",
verified: "google.com/android/repository/"
name "Android SDK Platform-Tools"
desc "Android SDK component"
+8 -6
View File
@@ -1,14 +1,14 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
cask "claude-code" do
arch arm: "arm64", intel: "x64"
os macos: "darwin", linux: "linux"
version "2.1.195"
sha256 arm: "86d8b820ad7eed50e50a130706d3dc5ef70696f91194de1b3897a842182afe3a", x86_64: "86d8b820ad7eed50e50a130706d3dc5ef70696f91194de1b3897a842182afe3a", arm64_linux: "341072395844b2b6d2846d8d61d551752b12a44433c920d0cc7fe6e7b5692a9b", x86_64_linux: "cf066bf360cbf7b51abeb8cb230012fc0f2fed4253b2ce305de48ccd6d49a39c"
version "2.1.220"
sha256 arm: "8addc857f3fe64d5a0368af9ee50321b50afb4a6918ba3ef018ab84f5dbbe081",
x86_64: "dca7be0aa7d3d924836d440e0c6d8e3d47ef3c8e61fa5809b54b9017170ce2f3",
arm64_linux: "159e4a51d796f3bf14677577100f7efb845611b1ceaf0c30cbd8d4650d942185",
x86_64_linux: "674f61f20ff306f3100cf9200e4c36c4b70278b5bef2884549819b942a89c863"
url "https://homebrew.hyprnet/casks/claude-code/claude-code--claude",
url "https://homebrew.hyprnet/cask/claude-code/claude",
verified: "downloads.claude.ai/claude-code-releases/"
name "Claude Code"
desc "Terminal-based AI coding assistant"
@@ -19,6 +19,8 @@ cask "claude-code" do
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
conflicts_with cask: "claude-code@latest"
binary "claude"
zap trash: [
+9 -12
View File
@@ -1,29 +1,26 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
cask "codex" do
arch arm: "aarch64", intel: "x86_64"
os macos: "apple-darwin", linux: "unknown-linux-musl"
version "0.142.5"
sha256 arm: "c81eaf1b4c9aee0e81e2b39dec1742a57b61be6c109f8811e7fcd41f55c2233d", intel: "c81eaf1b4c9aee0e81e2b39dec1742a57b61be6c109f8811e7fcd41f55c2233d", arm64_linux: "ec6c804d415e42dd28cc6f8c6cb5238b00c9af4bfb58b63be55e26ec4ee576c0", x86_64_linux: "48e591964d4bbaab7c0433daed41c65ea8f152fc0f1dd2334a42e3dd322a4906"
version "0.147.0"
sha256 arm: "17b2984eb22b607e3d0c25728252fc90f510e476bad39a6d9f45cdb1aa685432",
intel: "d91e59133daf923bc45d76e3da4af8ae9ef62a0231da18488da0cd573b6e9d63",
arm64_linux: "89cbf79bd5ae6f9c58da47e8079f311c84219350c9c43c070d42f3e9b2a81401",
x86_64_linux: "bd758d53d56e41dc65e045f4589df79a038ed197a011adcb52a258e6ad64cfda"
url "https://homebrew.hyprnet/casks/codex/codex--codex-aarch64-apple-darwin.tar.gz"
url "https://homebrew.hyprnet/cask/codex/codex-package-aarch64-apple-darwin.tar.gz"
name "Codex"
desc "OpenAI's coding agent that runs in your terminal"
homepage "https://github.com/openai/codex"
livecheck do
url :url
regex(/^rust-v?(\d+(?:\.\d+)+)$/i)
regex(/^rust[._-]v?(\d+(?:\.\d+)+)$/i)
strategy :github_latest
end
depends_on formula: "ripgrep"
binary "codex-#{arch}-#{os}", target: "codex"
generate_completions_from_executable "codex-#{arch}-#{os}", "completion", base_name: "codex"
binary "bin/codex"
generate_completions_from_executable "bin/codex", "completion"
zap rmdir: "~/.codex"
end
+5 -8
View File
@@ -1,11 +1,8 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
cask "macfuse" do
version "5.2.0"
sha256 "09a4b4c23c1930af45335fc119696797da41562dec1630602d2db637f4804f27"
version "5.3.3"
sha256 "7a0b7b66c0e7f8932707d1215dc9cf486e178d097ae0a2dcdf17d8530566aa15"
url "https://homebrew.hyprnet/casks/macfuse/macfuse--macfuse-5.2.0.dmg",
url "https://homebrew.hyprnet/cask/macfuse/macfuse-5.3.3.dmg",
verified: "github.com/macfuse/macfuse/"
name "macFUSE"
desc "File system integration"
@@ -24,8 +21,8 @@ cask "macfuse" do
pkg "Extras/macFUSE #{version}.pkg"
postflight do
set_ownership ["/usr/local/include", "/usr/local/lib"]
postflight_steps do
set_ownership ["/usr/local/include", "/usr/local/lib"], recursive: false
end
uninstall launchctl: [
+5 -6
View File
@@ -1,13 +1,11 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
cask "opencode-desktop" do
arch arm: "arm64", intel: "x64"
version "1.17.14"
sha256 arm: "deb8267728b08404beadc6b8225566b8ff618e2b134b19a46529ac42c95df95c", intel: "deb8267728b08404beadc6b8225566b8ff618e2b134b19a46529ac42c95df95c"
version "1.18.15"
sha256 arm: "2b29de799c37ec7466ba066d291addd7fa49bb45815cad10538adcd4d79aee96",
intel: "f191e75113f7fe0f1618526ed05c55ebb9dc84771983f217304e5c5b09a522e8"
url "https://homebrew.hyprnet/casks/opencode-desktop/opencode-desktop--opencode-desktop-mac-arm64.dmg",
url "https://homebrew.hyprnet/cask/opencode-desktop/opencode-desktop-mac-arm64.dmg",
verified: "github.com/anomalyco/opencode/"
name "OpenCode"
desc "AI coding agent desktop client"
@@ -27,6 +25,7 @@ cask "opencode-desktop" do
zap trash: [
"~/Library/Application Support/ai.opencode.desktop",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/ai.opencode.desktop.sfl*",
"~/Library/Caches/ai.opencode.desktop",
"~/Library/HTTPStorages/ai.opencode.desktop",
"~/Library/Logs/ai.opencode.desktop",
+76
View File
@@ -0,0 +1,76 @@
class Acl < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "cf320c35f8f78b11ae1d7dfcf0dcc8e4f532755ecb13d346cffa363e5eef7f2b"
end
desc "Commands for manipulating POSIX access control lists"
homepage "https://savannah.nongnu.org/projects/acl/"
url "https://download.savannah.nongnu.org/releases/acl/acl-2.4.0.tar.gz"
sha256 "73c853c3d44e1f693e5a96a986f1bd19d3d0dac2c7d453e796177774bc4e5f6a"
license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"]
livecheck do
url "https://download.savannah.nongnu.org/releases/acl/"
regex(/href=.*?acl[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "attr" => :build
depends_on :linux
def install
system "./configure", *std_configure_args, "--disable-silent-rules"
system "make", "install"
end
test do
assert_equal "getfacl #{version}", shell_output("#{bin}/getfacl --version").chomp
touch testpath/"test.txt"
chmod 0654, testpath/"test.txt"
assert_equal <<~EOS, shell_output("#{bin}/getfacl --omit-header test.txt").chomp
user::rw-
group::r-x
other::r--
EOS
user = ENV["USER"]
system bin/"setfacl", "--modify=u:#{user}:x", "test.txt"
assert_equal <<~EOS, shell_output("#{bin}/getfacl --omit-header test.txt").chomp
user::rw-
user:#{user}:--x
group::r-x
mask::r-x
other::r--
EOS
system bin/"chacl", "u::rwx,g::rw-,o::r-x", "test.txt"
assert_equal <<~EOS, shell_output("#{bin}/getfacl --omit-header test.txt").chomp
user::rwx
group::rw-
other::r-x
EOS
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <sys/acl.h>
int main() {
acl_t acl = acl_get_file("test.txt", ACL_TYPE_ACCESS);
if (acl == NULL) return 1;
char* acl_text = acl_to_text(acl, NULL);
acl_free(acl);
printf("%s\\n", acl_text);
acl_free(acl_text);
return 0;
}
C
system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lacl"
assert_equal <<~EOS, shell_output("./test").chomp
user::rwx
group::rw-
other::r-x
EOS
end
end
+88
View File
@@ -0,0 +1,88 @@
class AdaUrl < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "06292729cd3fcf7e6b73704be693e10010d8231e54fe26dac091b4f8ee1c547a"
sha256 cellar: :any, arm64_tahoe: "e3b125f42e888b49edb6b7a6b65f47585d7740e170d59965ff96a2930e2c58fd"
sha256 cellar: :any, x86_64_linux: "5d9e6918837a81b750fc65b4f9315e99af2a4d8d31846611b456706adf3115e1"
end
desc "WHATWG-compliant and fast URL parser written in modern C++"
homepage "https://ada-url.com"
url "https://github.com/ada-url/ada/archive/refs/tags/v4.0.0.tar.gz"
sha256 "6d6c7ef7dd2e329320d34eb2ab29ccdc879ee3935af9dfb894a6640e58dc381d"
license any_of: ["Apache-2.0", "MIT"]
compatibility_version 2
head "https://github.com/ada-url/ada.git", branch: "main"
depends_on "cmake" => :build
depends_on "cxxopts" => :build
depends_on "fmt"
uses_from_macos "python" => :build
on_macos do
depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500
end
fails_with :clang do
build 1500
cause "Requires C++20 support"
end
fails_with :gcc do
version "11"
cause "Requires C++20"
end
deny_network_access!
def install
# ld: unknown options: --gc-sections
if OS.mac? && DevelopmentTools.clang_build_version <= 1500
inreplace "tools/cli/CMakeLists.txt", 'target_link_options(adaparse PRIVATE "-Wl,--gc-sections")', ""
end
# Do not statically link to libstdc++
inreplace "tools/cli/CMakeLists.txt", 'target_link_options(adaparse PRIVATE "-static-libstdc++")', "" if OS.linux?
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
-DBUILD_SHARED_LIBS=ON
-DADA_TOOLS=ON
-DCPM_LOCAL_PACKAGES_ONLY=ON
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.cpp").write <<~CPP
#include "ada.h"
#include <iostream>
int main(int , char *[]) {
auto url = ada::parse<ada::url_aggregator>("https://www.github.com/ada-url/ada");
url->set_protocol("http");
std::cout << url->get_protocol() << std::endl;
return EXIT_SUCCESS;
}
CPP
system ENV.cxx, "test.cpp", "-std=c++20", "-I#{include}", "-L#{lib}", "-lada", "-o", "test"
assert_equal "http:", shell_output("./test").chomp
if OS.mac?
output = shell_output("#{bin}/adaparse -d http://www.google.com/bal?a==11#fddfds")
else
require "pty"
PTY.spawn(bin/"adaparse", "-d", "http://www.google.com/bal?a==11#fddfds") do |r, _w, pid|
Process.wait(pid)
output = r.read_nonblock(1024)
end
end
assert_match "search_start 25", output
end
end
+41
View File
@@ -0,0 +1,41 @@
class AlsaLib < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "4324d90988f149a55f5f00b2990177981677e3edbf3196793fbba3b6ad66675f"
end
desc "Provides audio and MIDI functionality to the Linux operating system"
homepage "https://www.alsa-project.org/"
url "https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.16.1.tar.bz2"
sha256 "f740db7f488255944ffd4428416ee3390a96742856916433df468c281436480e"
license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"]
compatibility_version 1
livecheck do
url "https://www.alsa-project.org/files/pub/lib/"
regex(/href=.*?alsa-lib[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on :linux
def install
system "./configure", "--disable-silent-rules", *std_configure_args
system "make", "install"
prefix.install "aserver/COPYING" => "COPYING-aserver"
end
test do
(testpath/"test.c").write <<~C
#include <alsa/asoundlib.h>
int main(void)
{
snd_ctl_card_info_t *info;
snd_ctl_card_info_alloca(&info);
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-lasound", "-o", "test"
system "./test"
end
end
+63
View File
@@ -0,0 +1,63 @@
class Aom < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "9f6b4e0c537a11f17c28133df343f1057bc9d403c697400f199955ec6ff96661"
sha256 cellar: :any, arm64_tahoe: "beaab63a4f1daa53422eff4e1d005b95d2240ddcd3b8bffef91a72a7ed87ade3"
sha256 cellar: :any_skip_relocation, x86_64_linux: "0161fc263c240948a6075475224a8748a3c359ab7f88d88c4a24cf913c8186fd"
end
desc "Codec library for encoding and decoding AV1 video streams"
homepage "https://aomedia.googlesource.com/aom"
url "https://aomedia.googlesource.com/aom.git",
tag: "v3.14.1",
revision: "03087864cf4bea6abb0d28f95cf7843511413d8f"
license "BSD-2-Clause"
head "https://aomedia.googlesource.com/aom.git", branch: "main"
depends_on "cmake" => :build
depends_on "pkgconf" => :build
depends_on "libvmaf"
on_intel do
depends_on "nasm" => :build
end
def install
ENV.runtime_cpu_detection
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
-DENABLE_DOCS=OFF
-DENABLE_EXAMPLES=ON
-DENABLE_TESTDATA=OFF
-DENABLE_TESTS=OFF
-DENABLE_TOOLS=OFF
-DBUILD_SHARED_LIBS=ON
-DCONFIG_TUNE_VMAF=1
]
system "cmake", "-S", ".", "-B", "brewbuild", *args, *std_cmake_args
system "cmake", "--build", "brewbuild"
system "cmake", "--install", "brewbuild"
end
test do
resource "homebrew-bus_qcif_15fps.y4m" do
url "https://media.xiph.org/video/derf/y4m/bus_qcif_15fps.y4m"
sha256 "868fc3446d37d0c6959a48b68906486bd64788b2e795f0e29613cbb1fa73480e"
end
testpath.install resource("homebrew-bus_qcif_15fps.y4m")
system bin/"aomenc", "--webm",
"--tile-columns=2",
"--tile-rows=2",
"--cpu-used=8",
"--output=bus_qcif_15fps.webm",
"bus_qcif_15fps.y4m"
system bin/"aomdec", "--output=bus_qcif_15fps_decode.y4m",
"bus_qcif_15fps.webm"
end
end
+14 -15
View File
@@ -1,28 +1,27 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Atuin < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "258558bbe65a9c54906ad2487778d369c531dd6d400873944202f7188a1d08b1"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "2eb11c5b9f67dc155ed426a101029a9445c9c088beb520d8b0b8c3b64accf0f0"
sha256 cellar: :any, x86_64_linux: "52891ba9303cfd0159cf625a9600f1e4162de620459a60b452b2b9c1b78cb553"
end
desc "Improved shell history for zsh, bash, fish and nushell"
homepage "https://atuin.sh/"
url "https://homebrew.hyprnet/sources/358c49594fdce992e276d27a0f8f2aab40f671f9f089f772331aa6d40cdde689--atuin--18.16.1.x86_64_linux.bottle.1.tar.gz"
sha256 "aec5c91207f080becc4b13593d5b7edc46685e8d4dbfbaef33d31f8058191bc6"
url "https://github.com/atuinsh/atuin/releases/download/v18.19.0/source.tar.gz"
sha256 "02fc084a925824f9b8ad899803da4c895341a6ae2fcb585ca8eac4fbe1fb454e"
license "MIT"
head "https://github.com/atuinsh/atuin.git", branch: "main"
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_tahoe: "7c0a9028714c42a158eedafd0e3c616f1e6df335f5e2fe3d4796006d8996d5db"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "aabe5a89f5f07effa9b1d93087469c60e3630bbb1f1eef4b4f3e8e63b8c1790b"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "409a9e05765cda4f7271eaaa7833afb7d5ad55b71badac5b6459aa78cb85ee0e"
sha256 cellar: :any_skip_relocation, sonoma: "ebb8239444b8ce96d114812593e5781d141406097b8348bcf0d5b5ab11619fd0"
sha256 cellar: :any_skip_relocation, arm64_linux: "5edbd418eb0f9d32dedfa1c737e8e66487dd2bc81f02d31d27a807070dc6c7af"
sha256 cellar: :any_skip_relocation, x86_64_linux: "51817c931148502c0ba47dbdb24359642c402c5d1697765a482489a5eb8955d6"
end
depends_on "pkgconf" => :build
depends_on "protobuf" => :build
depends_on "rust" => :build
on_linux do
depends_on "openssl@3"
end
def install
system "cargo", "install", *std_cargo_args(path: "crates/atuin")
+43
View File
@@ -0,0 +1,43 @@
class Brotli < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "b8e388c96be5a63a46e0335c390fecb20dda7adb1368a2ba0209b38cae17c708"
sha256 cellar: :any, arm64_tahoe: "71ffd30ccd74a9f28cfb210c21fcdc1aa5fec79e23ad2264b6dbceb73437601f"
sha256 cellar: :any_skip_relocation, x86_64_linux: "d97618daaa84b66bc783888297f1765eb6f60e6a78e9b7c2ba0406889c159c05"
end
desc "Generic-purpose lossless compression algorithm by Google"
homepage "https://github.com/google/brotli"
url "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz"
mirror "http://fresh-center.net/linux/misc/brotli-1.2.0.tar.gz"
mirror "http://fresh-center.net/linux/misc/legacy/brotli-1.2.0.tar.gz"
sha256 "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec"
license "MIT"
compatibility_version 1
head "https://github.com/google/brotli.git", branch: "master"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
depends_on "cmake" => :build
def install
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args
system "cmake", "--build", "build", "--verbose"
system "ctest", "--test-dir", "build", "--verbose"
system "cmake", "--install", "build"
system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args
system "cmake", "--build", "build-static"
lib.install buildpath.glob("build-static/*.a")
end
test do
(testpath/"file.txt").write("Hello, World!")
system bin/"brotli", "file.txt", "file.txt.br"
system bin/"brotli", "file.txt.br", "--output=out.txt", "--decompress"
assert_equal (testpath/"file.txt").read, (testpath/"out.txt").read
end
end
+54
View File
@@ -0,0 +1,54 @@
class CAres < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "cf56a78a008c16b5b430f5183178b644904fad00a55e6e57a20a835ecc45d33a"
sha256 cellar: :any, arm64_tahoe: "44bcc2e67b97daa265e168281875129161ddbbc964ab16ec0db1846c289cc376"
sha256 cellar: :any, x86_64_linux: "9225a94f66cf37b91f224c3e456d60fc59adfcfc9d28dd3c86966d1be3633687"
end
desc "Asynchronous DNS library"
homepage "https://c-ares.org/"
url "https://github.com/c-ares/c-ares/releases/download/v1.34.8/c-ares-1.34.8.tar.gz"
sha256 "c222b6d681096f9444d2c4863d2c1174019e27cacca0a4a5c114d36dd7d7bf78"
license "MIT"
compatibility_version 1
head "https://github.com/c-ares/c-ares.git", branch: "main"
livecheck do
url :homepage
regex(/href=.*?c-ares[._-](\d+(?:\.\d+)+)\.t/i)
end
depends_on "cmake" => :build
def install
args = %W[
-DCARES_STATIC=ON
-DCARES_SHARED=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <ares.h>
int main()
{
ares_library_init(ARES_LIB_INIT_ALL);
ares_library_cleanup();
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-lcares", "-o", "test"
system "./test"
system bin/"ahost", "127.0.0.1"
end
end
+180
View File
@@ -0,0 +1,180 @@
class CaCertificates < Formula
desc "Mozilla CA certificate store"
homepage "https://curl.se/docs/caextract.html"
url "https://curl.se/ca/cacert-2026-07-16.pem"
sha256 "3ff344e30b9b1ed2971044eabb438a08f2e2245ddb5f8ab1a3ad8b63ab4eaf91"
license "MPL-2.0"
compatibility_version 1
livecheck do
url :homepage
regex(/href=.*?cacert[._-](\d{4}-\d{2}-\d{2})\.pem/i)
end
bottle do
rebuild 2
sha256 cellar: :any_skip_relocation, all: "0f62fd67d5a0cc3109ce51568cd7e1603049fb627a0626a0ad5a15d357a2c834"
end
def install
pkgshare.install "cacert-#{version}.pem" => "cacert.pem"
post_install = libexec/"post-install"
post_install.write <<~'BASH'
#!/bin/bash
# Build a CA bundle from trusted system and Mozilla certificates.
set -euo pipefail
shopt -s nullglob
if [[ "$#" -ne 2 ]]; then
echo "usage: post-install SOURCE DESTINATION" >&2
exit 1
fi
source_file="$1"
destination="$2"
destination_dir="${destination%/*}"
mkdir -p "$destination_dir"
# Build beside the destination so the final rename cannot expose a partial bundle.
work_dir="$(mktemp -d "${destination_dir}/.ca-certificates.XXXXXX")"
trap 'rm -rf "$work_dir"' EXIT
fingerprints_file="$work_dir/fingerprints"
bundle_file="$work_dir/cert.pem"
: >"$fingerprints_file"
: >"$bundle_file"
# Split concatenated PEM bundles so each certificate can be validated independently.
split_certificates() {
local input_file="$1"
local output_dir="$2"
mkdir -p "$output_dir"
awk -v output_dir="$output_dir" '
/-----BEGIN CERTIFICATE-----/ {
certificate = ""
writing_certificate = 1
}
writing_certificate {
certificate = certificate $0 ORS
}
/-----END CERTIFICATE-----/ && writing_certificate {
output_file = output_dir "/" ++certificate_count ".pem"
printf "%s", certificate > output_file
close(output_file)
writing_certificate = 0
}
' "$input_file"
}
# Track fingerprints while appending to discard malformed and duplicate certificates.
append_unique_certificate() {
local certificate_file="$1"
local openssl_command="$2"
local fingerprint
fingerprint="$("$openssl_command" x509 -inform pem -fingerprint -sha256 -noout \
<"$certificate_file" 2>/dev/null)" || return 0
grep -Fqx "$fingerprint" "$fingerprints_file" && return
printf '%s\n' "$fingerprint" >>"$fingerprints_file"
cat "$certificate_file" >>"$bundle_file"
printf '\n' >>"$bundle_file"
}
# Append every valid, unique certificate from a PEM bundle.
append_bundle() {
local input_file="$1"
local output_dir="$2"
local openssl_command="$3"
local certificate_file
split_certificates "$input_file" "$output_dir"
for certificate_file in "$output_dir"/*.pem; do
append_unique_certificate "$certificate_file" "$openssl_command"
done
}
# Include only unexpired keychain certificates trusted for server TLS.
append_keychain() {
local keychain="$1"
local purpose="$2"
local output_dir="$work_dir/keychain-$purpose"
local certificate_file
/usr/bin/security find-certificate -a -p "$keychain" >"$work_dir/keychain.pem"
split_certificates "$work_dir/keychain.pem" "$output_dir"
for certificate_file in "$output_dir"/*.pem; do
/usr/bin/openssl x509 -inform pem -checkend 0 -noout <"$certificate_file" &>/dev/null || continue
/usr/bin/openssl x509 -inform pem -purpose -noout <"$certificate_file" 2>/dev/null |
grep -Fq "SSL server CA : Yes" || continue
/usr/bin/security verify-cert -l -L -c "$certificate_file" -p "$purpose" -R offline &>/dev/null ||
continue
append_unique_certificate "$certificate_file" /usr/bin/openssl
done
}
if [[ "$(uname -s)" == "Darwin" ]]; then
# Begin with system trust, then append Mozilla certificates not already present.
append_keychain "/Library/Keychains/System.keychain" ssl
append_keychain "/System/Library/Keychains/SystemRootCertificates.keychain" basic
append_bundle "$source_file" "$work_dir/mozilla" /usr/bin/openssl
else
# Merge the first standard system CA bundle found with the Mozilla bundle.
system_bundle=""
for candidate in \
/etc/ssl/certs/ca-certificates.crt \
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem \
/etc/ssl/ca-bundle.pem; do
if [[ -f "$candidate" && -r "$candidate" ]]; then
system_bundle="$candidate"
break
fi
done
openssl_command="$(command -v openssl || true)"
if [[ -n "$system_bundle" && -n "$openssl_command" ]]; then
append_bundle "$system_bundle" "$work_dir/system" "$openssl_command"
append_bundle "$source_file" "$work_dir/mozilla" "$openssl_command"
else
echo "Cannot find a readable system CA bundle or OpenSSL; using Mozilla certificates only." >&2
output_dir="$work_dir/mozilla"
split_certificates "$source_file" "$output_dir"
for certificate_file in "$output_dir"/*.pem; do
cat "$certificate_file" >>"$bundle_file"
printf '\n' >>"$bundle_file"
done
fi
fi
chmod 0644 "$bundle_file"
mv -f "$bundle_file" "$destination"
BASH
chmod 0755, post_install
end
post_install_steps do
run "post-install", args: ["{{pkgshare}}/cacert.pem", "{{pkgetc}}/cert.pem"], base: :libexec
end
def caveats
on_macos do
<<~EOS
CA certificates have been bootstrapped using certificates from the system keychain.
EOS
end
on_linux do
<<~EOS
CA certificates have been bootstrapped from both the Mozilla CA store and the system CA store at
one of the following locations, depending on your distro:
/etc/ssl/certs/ca-certificates.crt # Debian/Ubuntu, Alpine Linux, Arch Linux
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem # RHEL/CentOS/Fedora, Amazon Linux
/etc/ssl/ca-bundle.pem # SUSE/openSUSE
EOS
end
end
test do
assert_path_exists pkgshare/"cacert.pem"
assert_path_exists pkgetc/"cert.pem"
assert_match "-----BEGIN CERTIFICATE-----", (pkgetc/"cert.pem").read
end
end
+82
View File
@@ -0,0 +1,82 @@
class Cairo < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 2
sha256 cellar: :any, arm64_sequoia: "91a09ffb4c4025f8204305e25c9d16b5d9e3427c65baabe8a11c7c5e6e07e29e"
sha256 cellar: :any, arm64_tahoe: "3099d9356456b9aced4b35bfb6723c45014c09d7b090190bcd8d17053244dd3c"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "3d852e0bcef8e7bf1f4e5b9defa709da64a2dc2dcef4c35d177cebdbf552e65b"
end
desc "Vector graphics library with cross-device output support"
homepage "https://cairographics.org/"
url "https://cairographics.org/releases/cairo-1.18.4.tar.xz"
sha256 "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb"
license any_of: ["LGPL-2.1-only", "MPL-1.1"]
head "https://gitlab.freedesktop.org/cairo/cairo.git", branch: "master"
livecheck do
url "https://cairographics.org/releases/?C=M&O=D"
regex(%r{href=(?:["']?|.*?/)cairo[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t}i)
end
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => [:build, :test]
depends_on "fontconfig"
depends_on "freetype"
depends_on "glib"
depends_on "libpng"
depends_on "libx11"
depends_on "libxcb"
depends_on "libxext"
depends_on "libxrender"
depends_on "lzo"
depends_on "pixman"
on_macos do
depends_on "gettext"
end
on_linux do
depends_on "zlib-ng-compat"
end
def install
args = %w[
--default-library=both
-Dfontconfig=enabled
-Dfreetype=enabled
-Dpng=enabled
-Dglib=enabled
-Dxcb=enabled
-Dxlib=enabled
-Dzlib=enabled
-Dglib=enabled
]
args << "-Dquartz=enabled" if OS.mac?
system "meson", "setup", "build", *args, *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
(testpath/"test.c").write <<~C
#include <cairo.h>
int main(int argc, char *argv[]) {
cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 600, 400);
cairo_t *context = cairo_create(surface);
return 0;
}
C
flags = shell_output("pkgconf --cflags --libs cairo").chomp.split
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end
+49
View File
@@ -0,0 +1,49 @@
class Certifi < Formula
desc "Mozilla CA bundle for Python"
homepage "https://github.com/certifi/python-certifi"
url "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz"
sha256 "741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55"
license "MPL-2.0"
compatibility_version 1
bottle do
sha256 cellar: :any_skip_relocation, all: "32634579cf563c68a3ee47d1a570f5f69866884e93524ece27eb912528aecbb3"
end
depends_on "python@3.14" => [:build, :test]
depends_on "python@3.12" => :test # keep on oldest python to support (externally managed and not EOL)
depends_on "ca-certificates"
def pythons
deps.filter_map { |dep| dep.to_formula if dep.name.start_with?("python@") }
end
def install
oldest_python, python = pythons.sort_by(&:version)
python_exe = python.opt_libexec/"bin/python"
system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "."
# Use brewed ca-certificates PEM file instead of the bundled copy
site_packages = prefix/Language::Python.site_packages(python_exe)
rm site_packages/"certifi/cacert.pem"
(site_packages/"certifi").install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" => "cacert.pem"
python.versioned_formulae.each do |extra_python|
next if extra_python.version < oldest_python.version
# Cannot use Python.site_packages as that requires formula to be installed
extra_site_packages = lib/"python#{extra_python.version.major_minor}/site-packages"
site_packages.find do |path|
(extra_site_packages/path.relative_path_from(site_packages)).dirname.install_symlink path if path.file?
end
end
end
test do
pythons.each do |python|
python_exe = python.opt_libexec/"bin/python"
output = shell_output("#{python_exe} -m certifi").chomp
assert_equal Formula["ca-certificates"].pkgetc/"cert.pem", Pathname(output).realpath
end
end
end
+64
View File
@@ -0,0 +1,64 @@
class Cffi < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9529601cff7bb2ee4e727b1063cbdef22d975069c7575c6906cfa7bdaa3dcc2"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "a9f59871dac0d694d909c4d953173dff0c3058d99c5d192368a40f07d0e6deb9"
sha256 cellar: :any_skip_relocation, sequoia: "12fbc1cab5b78082948c40d7ff015a910c3ff4013c243423f9b32e02f5f0b18f"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "81811e785c1c31c464b96060339d5d173fc421f39b6cdd537bbef631dcbfabff"
end
desc "C Foreign Function Interface for Python"
homepage "https://cffi.readthedocs.io/en/latest/"
url "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz"
sha256 "dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be"
license "MIT-0"
compatibility_version 1
depends_on "python@3.13" => [:build, :test]
depends_on "python@3.14" => [:build, :test]
depends_on "pycparser"
uses_from_macos "libffi"
pypi_packages exclude_packages: "pycparser"
def pythons
deps.map(&:to_formula)
.select { |f| f.name.start_with?("python@") }
.map { |f| f.opt_libexec/"bin/python" }
end
def install
pythons.each do |python|
system python, "-m", "pip", "install", *std_pip_args(build_isolation: true), "."
end
end
test do
assert_empty resources, "This formula should not have any resources!"
(testpath/"sum.c").write <<~C
int sum(int a, int b) { return a + b; }
C
libsum = testpath/shared_library("libsum")
system ENV.cc, "-shared", "sum.c", "-o", libsum
(testpath/"sum.py").write <<~PYTHON
from cffi import FFI
ffi = FFI()
declaration = """
int sum(int a, int b);
"""
ffi.cdef(declaration)
lib = ffi.dlopen("#{libsum}")
print(lib.sum(1, 2))
PYTHON
pythons.each do |python|
assert_equal 3, shell_output("#{python} sum.py").to_i
end
end
end
+8 -13
View File
@@ -1,10 +1,13 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class ClangFormat < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f943e52e18ec8cfda8ab3174eb733017600af529203e53a3a49443044656f46"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "e20d0dbbf9f69f0867b35266ec5c64e2483d2ec9a5275cfe1ae2781cfeb5ad75"
sha256 cellar: :any, x86_64_linux: "442dd96bb8ecbc6a01c8c7245ecba01567511b0626dba79a349854a68897fc2f"
end
desc "Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript"
homepage "https://clang.llvm.org/docs/ClangFormat.html"
url "https://homebrew.hyprnet/sources/c01ebc051b7d6beb690739b66d16f80c2fdd025a38ade481c57108f884e57603--clang-format--22.1.8.x86_64_linux.bottle.tar.gz"
url "https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz"
sha256 "922f1817a0df7b1489272d18134ee0087a8b068828f87ac63b9861b1a9965888"
# The LLVM Project is under the Apache License v2.0 with LLVM Exceptions
license "Apache-2.0" => { with: "LLVM-exception" }
@@ -17,15 +20,7 @@ class ClangFormat < Formula
strategy :github_latest
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "e20d0dbbf9f69f0867b35266ec5c64e2483d2ec9a5275cfe1ae2781cfeb5ad75"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f943e52e18ec8cfda8ab3174eb733017600af529203e53a3a49443044656f46"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "33059fc48804586223ece39cdafba74d6ec600ac792e3bd65c031f760278435b"
sha256 cellar: :any_skip_relocation, sonoma: "a8dd7c9efe79e3f69b901ea1e7e3fbd0aaa4ee887e76e13bf38ab8f22058ab49"
sha256 cellar: :any, arm64_linux: "8f77d7106b7b5af26a131022ec91b1b926d6fad7fb7abb4aa322e7e3a8300b38"
sha256 cellar: :any, x86_64_linux: "442dd96bb8ecbc6a01c8c7245ecba01567511b0626dba79a349854a68897fc2f"
end
depends_on "cmake" => :build
+98
View File
@@ -0,0 +1,98 @@
class Cloc < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ebeea424f284c38dee5dee3a3a3616a91d12c256e6b15ee7f5b38e459bd93ac"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "4ebeea424f284c38dee5dee3a3a3616a91d12c256e6b15ee7f5b38e459bd93ac"
sha256 cellar: :any_skip_relocation, x86_64_linux: "3b910e0c4b436a259954e56325baf43988867891164b4e4664ee7e87a0ef2256"
end
desc "Statistics utility to count lines of code"
homepage "https://github.com/AlDanial/cloc/"
url "https://github.com/AlDanial/cloc/archive/refs/tags/v2.10.tar.gz"
sha256 "a8fac35f4cf42728765580ba11afc2568ad205509a22204663f526169548436d"
license "GPL-2.0-or-later"
head "https://github.com/AlDanial/cloc.git", branch: "master"
uses_from_macos "perl"
resource "Regexp::Common" do
url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2024080801.tar.gz"
sha256 "0677afaec8e1300cefe246b4d809e75cdf55e2cc0f77c486d13073b69ab4fbdd"
end
resource "Algorithm::Diff" do
url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Algorithm-Diff-1.201.tar.gz"
sha256 "0022da5982645d9ef0207f3eb9ef63e70e9713ed2340ed7b3850779b0d842a7d"
end
resource "Parallel::ForkManager" do
url "https://cpan.metacpan.org/authors/id/Y/YA/YANICK/Parallel-ForkManager-2.04.tar.gz"
sha256 "606894fc2e9f7cd13d9ec099aaac103a8f0943d1d80c2c486bae14730a39b7fc"
end
resource "Sub::Quote" do
url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Sub-Quote-2.006009.tar.gz"
sha256 "967282d54d2d51b198c67935594f93e4dea3e54d1e5bced158c94e29be868a4b"
end
resource "Moo::Role" do
url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-2.005005.tar.gz"
sha256 "fb5a2952649faed07373f220b78004a9c6aba387739133740c1770e9b1f4b108"
end
resource "Module::Runtime" do
url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Module-Runtime-0.018.tar.gz"
sha256 "0bf77ef68e53721914ff554eada20973596310b4e2cf1401fc958601807de577"
end
resource "Role::Tiny" do
url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.002004.tar.gz"
sha256 "d7bdee9e138a4f83aa52d0a981625644bda87ff16642dfa845dcb44d9a242b45"
end
resource "Devel::GlobalDestruction" do
on_linux do
url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Devel-GlobalDestruction-0.14.tar.gz"
sha256 "34b8a5f29991311468fe6913cadaba75fd5d2b0b3ee3bb41fe5b53efab9154ab"
end
end
resource "Sub::Exporter::Progressive" do
on_linux do
url "https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz"
sha256 "d535b7954d64da1ac1305b1fadf98202769e3599376854b2ced90c382beac056"
end
end
def install
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
# These are shipped as standard with OS X/macOS' default Perl, but
# because upstream has chosen to use "#!/usr/bin/env perl" cloc will
# use whichever Perl is in the PATH, which isn't guaranteed to include
# these modules. Vendor them to be safe.
resources.each do |r|
r.stage do
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
system "make", "install"
end
end
system "make", "-C", "Unix", "prefix=#{libexec}", "install"
bin.install libexec/"bin/cloc"
bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"])
man1.install libexec/"share/man/man1/cloc.1"
end
test do
(testpath/"test.c").write <<~C
#include <stdio.h>
int main(void) {
return 0;
}
C
assert_match "1,C,0,0,4", shell_output("#{bin}/cloc --csv .")
end
end
+11 -16
View File
@@ -1,25 +1,20 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Conan < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "ff95446f4b646b2abfe32f0a0b64e59ac7620d103439616b6e69fbba3fb2f8c2"
sha256 cellar: :any, arm64_tahoe: "1c472a422807d34bb027626e4cc17e94452dd12956e9b405552f41301a067a50"
sha256 cellar: :any, x86_64_linux: "f01d3988065086768750b731a5a93524ec07826bfc8bc9f5fe13e1a73689cf52"
end
include Language::Python::Virtualenv
desc "Distributed, open source, package manager for C/C++"
homepage "https://conan.io"
url "https://homebrew.hyprnet/sources/1b2f9941f9c24d86dc99bb7a3a1c3ef689ccaae5605c1c0d773a8a2eeec2ceb6--conan--2.30.0.x86_64_linux.bottle.tar.gz"
sha256 "8cee363744b164fc043d0b9bef8db856bd6b27a3c971d9c494441d2aa92794fa"
url "https://files.pythonhosted.org/packages/f0/2f/f88c73d7042b87924e482cf2081645dfdc4ee4c20071f3d3b4aa08ca2f5e/conan-2.31.2.tar.gz"
sha256 "d820e9f5ac44eca1567874f6a7c83586c16a3df5ebca006d9c0c6933fbb375b1"
license "MIT"
head "https://github.com/conan-io/conan.git", branch: "develop2"
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_tahoe: "202d94eb99caec13680d39d7f7be3f0e4a823ee5fedca198d5ba38a87cde2369"
sha256 cellar: :any, arm64_sequoia: "6526b24f7820df8f7b1930ecf8eaa4ef18fe8dca73d18b2536aef5c3ff7154f5"
sha256 cellar: :any, arm64_sonoma: "fe2e58aaafedbb75ef4226cc26f2f2b81081f7e8c1ae344e44e0955d718f07fe"
sha256 cellar: :any, sonoma: "7698ef4ba13fb3b6e54953d57aba1066460ee44227777bec22454d921b6a5f0e"
sha256 cellar: :any, arm64_linux: "b78272c60d58cdd503922f362587d10b46f04c3f185ceb3f0193a13d45f5ac68"
sha256 cellar: :any, x86_64_linux: "8f003c0371a76cf8997ad7d23be6c0aa27c556d2786080a8c65eb01fc0a73f42"
end
depends_on "pkgconf" => :build
depends_on "cmake" => :test
@@ -31,8 +26,8 @@ class Conan < Formula
extra_packages: "distro"
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/e7/a1/67fe25fac3c7642725500a3f6cfe5821ad557c3abb11c9d20d12c7008d3e/charset_normalizer-3.4.7.tar.gz"
sha256 "ae89db9e5f98a11a4bf50407d4363e7b09b31e55bc117b4f7d80aab97ba009e5"
url "https://files.pythonhosted.org/packages/bd/2a/23f34ec9d04624958e137efdc394888716353190e75f25dd22c7a2c7a8aa/charset_normalizer-3.4.9.tar.gz"
sha256 "673611bbd43f0810bec0b0f028ddeaaa501190339cac411f347ac76917c3ae7b"
end
resource "colorama" do
+55
View File
@@ -0,0 +1,55 @@
class Cryptography < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "4d5ae554fdd4a50163aeea97cbb383b6bfdfedd60e53c3f7971a8c9d685e7a57"
sha256 cellar: :any, arm64_tahoe: "1c0d605396f75648f713e109c6b58df9e2aa8d83691ac85524acf2f5577766f4"
sha256 cellar: :any, x86_64_linux: "2ad80d50545b09490aa1a0b7a805a96fc3465bcc5d84193ef731dc79745292b0"
end
desc "Cryptographic recipes and primitives for Python"
homepage "https://cryptography.io/en/latest/"
url "https://files.pythonhosted.org/packages/de/41/6cbdcf9142d00fe82836fbb51e503e58088575cf7a0fe1dbff6695bf0840/cryptography-50.0.0.tar.gz"
sha256 "eeac2acb5a20ed25e0ad6d1df9891a520b78b404266b6d11778f25d5d691a6c9"
license any_of: ["Apache-2.0", "BSD-3-Clause"]
compatibility_version 2
head "https://github.com/pyca/cryptography.git", branch: "main"
depends_on "maturin" => :build
depends_on "pkgconf" => :build
depends_on "python-setuptools" => :build
depends_on "python@3.13" => [:build, :test]
depends_on "python@3.14" => [:build, :test]
depends_on "rust" => :build
depends_on "cffi"
depends_on "openssl@3"
pypi_packages exclude_packages: ["cffi", "pycparser"]
def pythons
deps.map(&:to_formula)
.select { |f| f.name.start_with?("python@") }
.map { |f| f.opt_libexec/"bin/python" }
end
def install
# TODO: Avoid building multiple times as binaries are already built in limited API mode
pythons.each do |python3|
system python3, "-m", "pip", "install", *std_pip_args, "."
end
end
test do
(testpath/"test.py").write <<~PYTHON
from cryptography.fernet import Fernet
key = Fernet.generate_key()
f = Fernet(key)
token = f.encrypt(b"homebrew")
print(f.decrypt(token))
PYTHON
pythons.each do |python3|
assert_match "b'homebrew'", shell_output("#{python3} test.py")
end
end
end
+42
View File
@@ -0,0 +1,42 @@
class Dav1d < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "5f573db161c0685ba7e8d27bd3b6a494e6952e47c7c99355a0d090b253b566af"
sha256 cellar: :any, arm64_tahoe: "d30ff747564febd643ec4b279c5adc74f708b8d6eb8e172f914b9fcdec26c464"
sha256 cellar: :any, x86_64_linux: "6c978ac8a5eb6652bd8780911ff45d73a181e6c6a9f18d60f1c7f86184d4bdb2"
end
desc "AV1 decoder targeted to be small and fast"
homepage "https://code.videolan.org/videolan/dav1d"
url "https://code.videolan.org/videolan/dav1d/-/archive/1.5.4/dav1d-1.5.4.tar.bz2"
sha256 "2abfb0c89212e6e4733a54e0ae509ec00a5b845a6360946f918806e14aedb011"
license "BSD-2-Clause"
compatibility_version 1
depends_on "meson" => :build
depends_on "ninja" => :build
on_intel do
depends_on "nasm" => :build
end
def install
system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
resource "homebrew-00000000.ivf" do
url "https://code.videolan.org/videolan/dav1d-test-data/raw/1.1.0/8-bit/data/00000000.ivf"
sha256 "52b4351f9bc8a876c8f3c9afc403d9e90f319c1882bfe44667d41c8c6f5486f3"
end
testpath.install resource("homebrew-00000000.ivf")
system bin/"dav1d", "-i", testpath/"00000000.ivf", "-o", testpath/"00000000.md5"
assert_path_exists (testpath/"00000000.md5")
assert_match "0b31f7ae90dfa22cefe0f2a1ad97c620", (testpath/"00000000.md5").read
end
end
+157
View File
@@ -0,0 +1,157 @@
class Dbus < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "5a51451acabb5ae56b5682e88a82dfa43cc6a2b653ca068198546bb72324bd0c"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "708eed3cc7031e486c760cc9debe777b7e8de93faf74320b66d3bc42e27499c3"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "42841a5373f596cbccd52b4cf3eae4f3ec6a853309b14e36e869a7030fabd21a"
end
# releases: even (1.12.x) = stable, odd (1.13.x) = development
desc "Message bus system, providing inter-application communication"
homepage "https://wiki.freedesktop.org/www/Software/dbus"
url "https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz"
mirror "https://deb.debian.org/debian/pool/main/d/dbus/dbus_1.16.2.orig.tar.xz"
sha256 "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2"
license any_of: ["AFL-2.1", "GPL-2.0-or-later"]
revision 1
compatibility_version 1
head "https://gitlab.freedesktop.org/dbus/dbus.git", branch: "main"
livecheck do
url "https://dbus.freedesktop.org/releases/dbus/"
regex(/href=.*?dbus[._-]v?(\d+\.\d*?[02468](?:\.\d+)*)\.t/i)
end
depends_on "docbook" => :build
depends_on "docbook-xsl" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => :build
depends_on "xmlto" => :build
uses_from_macos "libxslt" => :build # for xsltproc
uses_from_macos "python" => :build
uses_from_macos "expat"
# Remove deprecated keys from launchd plist.
# PR ref: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/179
patch :DATA
def install
# Fix the TMPDIR to one D-Bus doesn't reject due to odd symbols
ENV["TMPDIR"] = "/tmp"
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
args = %W[
-Dlocalstatedir=#{var}
-Dsysconfdir=#{etc}
-Dxml_docs=enabled
-Ddoxygen_docs=disabled
-Dmodular_tests=disabled
]
args << "-Dlaunchd_agent_dir=#{prefix}" << "-Ddbus_user=daemon" if OS.mac?
inreplace "bus/org.freedesktop.dbus-session.plist.in", "@DBUS_DAEMONDIR@", opt_bin
# rpath is not set for meson build
ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}"
system "meson", "setup", "build", *args, *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
# Manually create plist for system bus service
(prefix/"org.freedesktop.dbus-system.plist").write system_plist if OS.mac?
mkdir etc/"dbus-1/system.d"
mkdir etc/"dbus-1/session.d"
end
post_install_steps do
run "dbus-uuidgen", args: ["--ensure={{var}}/lib/dbus/machine-id"], base: :bin
end
def caveats
on_macos do
<<~EOS
To start the session bus now and at login:
brew services start dbus
To start the system bus now and on boot, install and activate the included daemon:
sudo cp -f $(brew --prefix dbus)/org.freedesktop.dbus-system.plist /Library/LaunchDaemons
sudo launchctl bootstrap system /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
If the daemon is already installed and running, restart it:
sudo launchctl kickstart -k system/org.freedesktop.dbus-system
EOS
end
end
service do
name macos: "org.freedesktop.dbus-session"
end
def system_plist
<<~PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.freedesktop.dbus-system</string>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/dbus-daemon</string>
<string>--nofork</string>
<string>--system</string>
<string>--nopidfile</string>
</array>
<key>Sockets</key>
<dict>
<key>unix_domain_listener</key>
<dict>
<key>SockPathName</key>
<string>#{var}/run/dbus/system_bus_socket</string>
<key>SockPathMode</key>
<integer>511</integer>
</dict>
</dict>
</dict>
</plist>
PLIST
end
test do
assert_match version.to_s, shell_output("#{bin}/dbus-daemon --version")
end
end
__END__
diff --git a/bus/org.freedesktop.dbus-session.plist.in b/bus/org.freedesktop.dbus-session.plist.in
index 40ff370..3c77fa9 100644
--- a/bus/org.freedesktop.dbus-session.plist.in
+++ b/bus/org.freedesktop.dbus-session.plist.in
@@ -5,15 +5,6 @@
<key>Label</key>
<string>org.freedesktop.dbus-session</string>
- <key>ServiceIPC</key>
- <true/>
-
- <!-- Please uncomment on 10.4; OnDemand doesn't work properly there. -->
- <!--
- <key>OnDemand</key>
- <false />
- -->
-
<key>ProgramArguments</key>
<array>
<string>@DBUS_DAEMONDIR@/dbus-daemon</string>
+10 -18
View File
@@ -1,11 +1,14 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class DockerCompose < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "5538df00bdbcae30b2685bc582a3c25c0e837aad75cfd049ecb1c2e8e4c55043"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "786d4102dccbd2d9eb3180416fcf480c6539866f0e8c6f434ea797819b27960a"
sha256 cellar: :any_skip_relocation, x86_64_linux: "582ff48efa606748aed6717f7b60bc8fa07bf7f0224d3030cefaabfbd02fd7f4"
end
desc "Isolated development environments using Docker"
homepage "https://docs.docker.com/compose/"
url "https://homebrew.hyprnet/sources/3703493f0447ff926fca8b7a93fe6597a4225f9d5862cc23466f399a08b8efff--docker-compose--5.3.0.x86_64_linux.bottle.tar.gz"
sha256 "496ee43bc6ecee6fbac28e93f6e784a7b0207baec7ae2b0ffb57cfd83bc92874"
url "https://github.com/docker/compose/archive/refs/tags/v5.4.0.tar.gz"
sha256 "142f895ba74715ea0018a20b7f93fa96e36fb6c91ea66f856a61c6e3716c4ef8"
license "Apache-2.0"
head "https://github.com/docker/compose.git", branch: "main"
@@ -17,15 +20,7 @@ class DockerCompose < Formula
strategy :github_latest
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "14e4c83d2f2c824af7046ca1ce532b9ff823464c1caea94d3968f3be226d8316"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "d316fa23346d9f844562ae62a63fa13d421b2037129953ca6525c2f649d56240"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "c91d7781904a4228534a3eda0013a0bfa881f021e0c389ad9a7f5db6b22ee522"
sha256 cellar: :any_skip_relocation, sonoma: "1bd03d5298514055a21d30a46811f1c0fface305fd2b1fdaca7c540c0715cf16"
sha256 cellar: :any_skip_relocation, arm64_linux: "d7f2705e4e498bb3f952a06d12992638c9301281435e7c087642b83f4ccfa42c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "21210f9a352d063152eab0a3b754b212e4ac2e1147f3fd413711fcb53f8c764b"
end
depends_on "go" => :build
@@ -33,10 +28,7 @@ class DockerCompose < Formula
def install
ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0"
ldflags = %W[
-s -w
-X github.com/docker/compose/v#{version.major}/internal.Version=#{version}
]
ldflags = %W[-X github.com/docker/compose/v#{version.major}/internal.Version=#{version}]
tags = %w[fsnotify] if OS.mac?
system "go", "build", *std_go_args(ldflags:, tags:), "./cmd"
+8 -13
View File
@@ -1,10 +1,13 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Ffmpeg < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "3b1dab25100b79de074463b6b10be1266ed0d5f6eb6409fa53707f49e24bb2a7"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "90fde7486968511145ad359f060eb19adf4e4fa26184e60731dbcff3e4b0243b"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "0604736f61e5760bbeb51a161d8070d9d7733ff437d34d19b5a15f14ef597a11"
end
desc "Play, record, convert, and stream select audio and video codecs"
homepage "https://ffmpeg.org/"
url "https://homebrew.hyprnet/sources/d060ec861b6caccbe753a129c06053a632c22c60ffbd7291922f46ae9e3e34c2--ffmpeg--8.1.2_1.x86_64_linux.bottle.tar.gz"
url "https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.xz"
sha256 "464beb5e7bf0c311e68b45ae2f04e9cc2af88851abb4082231742a74d97b524c"
# None of these parts are used by default, you have to explicitly pass `--enable-gpl`
# to configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
@@ -19,15 +22,7 @@ class Ffmpeg < Formula
regex(/href=.*?ffmpeg[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 arm64_tahoe: "90fde7486968511145ad359f060eb19adf4e4fa26184e60731dbcff3e4b0243b"
sha256 arm64_sequoia: "3b1dab25100b79de074463b6b10be1266ed0d5f6eb6409fa53707f49e24bb2a7"
sha256 arm64_sonoma: "38adbd173fdb77cc6a24a44722daa1f42f1775bf5f6c09a679fefdeee9749a9f"
sha256 sonoma: "fcc13fae2031e5adaa193bc1accb03e8127b9503d41ac29c07e3758e7a88ba88"
sha256 arm64_linux: "947634a5bfc9d2528e49ca232bba628ac4feedf8103d54e1970a76fa6c609c8a"
sha256 x86_64_linux: "0604736f61e5760bbeb51a161d8070d9d7733ff437d34d19b5a15f14ef597a11"
end
depends_on "pkgconf" => :build
+53
View File
@@ -0,0 +1,53 @@
class Flac < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "c9698bcebe8e99ab84adf49a347cad5a9f122c45b80622a9fe2acbaeab902545"
sha256 cellar: :any, arm64_tahoe: "82b19ded7c732c245a9e325c191de60f7d17bb3370afdc98d159852cf3f9dbd5"
sha256 cellar: :any_skip_relocation, x86_64_linux: "85f5cec1705ffb8d93fb9abbb0b7b0f197d61633d8e0de2a29de825526790006"
end
desc "Free lossless audio codec"
homepage "https://xiph.org/flac/"
url "https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.5.0.tar.xz"
mirror "https://github.com/xiph/flac/releases/download/1.5.0/flac-1.5.0.tar.xz"
sha256 "f2c1c76592a82ffff8413ba3c4a1299b6c7ab06c734dee03fd88630485c2b920"
license all_of: [
"BSD-3-Clause",
"GPL-2.0-or-later",
"ISC",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
:public_domain,
any_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"],
]
livecheck do
url "https://ftp.osuosl.org/pub/xiph/releases/flac/?C=M&O=D"
regex(%r{href=(?:["']?|.*?/)flac[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
head do
url "https://gitlab.xiph.org/xiph/flac.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkgconf" => :build
depends_on "libogg"
def install
system "./autogen.sh" if build.head?
system "./configure", "--enable-static", *std_configure_args
system "make", "install"
end
test do
system bin/"flac", "--decode", "--force-raw", "--endian=little", "--sign=signed",
"--output-name=out.raw", test_fixtures("test.flac")
system bin/"flac", "--endian=little", "--sign=signed", "--channels=1", "--bps=8",
"--sample-rate=8000", "--output-name=out.flac", "out.raw"
end
end
+49
View File
@@ -0,0 +1,49 @@
class Fmt < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "301a1bbf99d3401d4e971d957eeab6c07d08fe304a690b269e04df5424fcc9d9"
sha256 cellar: :any, arm64_tahoe: "a218679bf77ccb0c76b316556f71a0bc5d5a1980d8cd3d2ea197a5829a140d65"
sha256 cellar: :any, x86_64_linux: "9d7617cdafe71a36c5371511cdeffbe0d171c1eb93eea555a1e4028af440f5c2"
end
desc "Open-source formatting library for C++"
homepage "https://fmt.dev/"
url "https://github.com/fmtlib/fmt/releases/download/12.2.0/fmt-12.2.0.zip"
sha256 "a2f4a8d51178f954e4c339007f77edd76ba0cb2e36f87a48e5a5403d9be5878f"
license "MIT"
compatibility_version 2
head "https://github.com/fmtlib/fmt.git", branch: "main"
depends_on "cmake" => :build
def install
system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=TRUE", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=FALSE", *std_cmake_args
system "cmake", "--build", "build-static"
lib.install "build-static/libfmt.a"
end
test do
(testpath/"test.cpp").write <<~CPP
#include <iostream>
#include <string>
#include <fmt/format.h>
int main()
{
std::string str = fmt::format("The answer is {}", 42);
std::cout << str;
return 0;
}
CPP
system ENV.cxx, "test.cpp", "-std=c++11", "-o", "test",
"-I#{include}",
"-L#{lib}",
"-lfmt"
assert_equal "The answer is 42", shell_output("./test")
end
end
+80
View File
@@ -0,0 +1,80 @@
class Fontconfig < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "a5f5df5f8d02e8a5b2587cac464c7bd45128447da06b7ab39938a9645982ef49"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "ad1c5a3054313853e9eefa9a07c32a3ff7b11c4fbcff9e73affc2a50233dbafe"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "56c35f5cc20e978189ba6693eef8ed1167de1d04ef9e5289e9a9dff8b5077049"
end
desc "XML-based font configuration API for X Windows"
homepage "https://wiki.freedesktop.org/www/Software/fontconfig/"
url "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.18.3/fontconfig-2.18.3.tar.gz"
sha256 "9ae01e1d53acdef56010c5451cd34aa41d325b2faccd8606448d8fa01b2496b3"
license all_of: [
"HPND-sell-variant",
"Unicode-3.0", # fc-case/CaseFolding.txt
"MIT-Modern-Variant", # src/fcatomic.h, src/fcmutex.h
"MIT", # src/fcfoundry.h
:public_domain, # src/fcmd5.h, src/ftglue.[ch]
]
compatibility_version 1
head "https://gitlab.freedesktop.org/fontconfig/fontconfig.git", branch: "main"
livecheck do
url :stable
regex(/v?(\d+\.\d+\.(?:\d|[0-8]\d+))/i)
end
depends_on "gettext" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => :build
depends_on "freetype"
uses_from_macos "gperf" => :build
uses_from_macos "python" => :build
uses_from_macos "expat"
on_macos do
depends_on "gettext"
end
def install
args = %W[
--default-library=both
--localstatedir=#{var}
--sysconfdir=#{etc}
-Ddoc=disabled
-Dtests=disabled
-Dtools=enabled
-Dcache-build=disabled
-Dadditional-fonts-dirs=no
]
# Cannot use default dirs on macOS due to fc-cache recursing unnecessary directories
# Issue ref: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/547
if OS.mac?
font_dirs = %w[
/System/Library/Fonts
/Library/Fonts
~/Library/Fonts
]
font_dirs << Dir["/System/Library/Assets{,V2}/com_apple_MobileAsset_Font*"].max
args << "-Ddefault-fonts-dirs=#{font_dirs}"
end
system "meson", "setup", "build", *args, *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
post_install_steps do
run "fc-cache", args: ["--force", "--really-force", "--verbose"], base: :bin
end
test do
system bin/"fc-list"
end
end
+51
View File
@@ -0,0 +1,51 @@
class Freetype < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "905d44c655367754329e9fcc67630c71c03c527f5ee0d9c89794b21e9708b172"
sha256 cellar: :any, arm64_tahoe: "449e22351da81ba5c8c398f87c295decac6b396bd6fab54becbb3d18800b62d1"
sha256 cellar: :any_skip_relocation, x86_64_linux: "4dfd17e1b578e43e2200b48b3b6745e18280df3ce9c9504f365f1bcc8fe8869e"
end
desc "Software library to render fonts"
homepage "https://www.freetype.org/"
url "https://downloads.sourceforge.net/project/freetype/freetype2/2.14.3/freetype-2.14.3.tar.xz"
mirror "https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz"
sha256 "36bc4f1cc413335368ee656c42afca65c5a3987e8768cc28cf11ba775e785a5f"
license "FTL"
compatibility_version 1
livecheck do
url :stable
regex(/url=.*?freetype[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "pkgconf" => :build
depends_on "libpng"
uses_from_macos "bzip2"
on_linux do
depends_on "zlib-ng-compat"
end
def install
# This file will be installed to bindir, so we want to avoid embedding the
# absolute path to the pkg-config shim.
inreplace "builds/unix/freetype-config.in", "%PKG_CONFIG%", "pkg-config"
system "./configure", "--prefix=#{prefix}",
"--enable-freetype-config",
"--without-harfbuzz"
system "make"
system "make", "install"
inreplace [bin/"freetype-config", lib/"pkgconfig/freetype2.pc"],
prefix, opt_prefix
end
test do
system bin/"freetype-config", "--cflags", "--libs", "--ftversion",
"--exec-prefix", "--prefix"
end
end
+32
View File
@@ -0,0 +1,32 @@
class Fribidi < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "4904bb3375c1b1f2539cb657fbf17b0d93c050904febbba51e9dd690f3540e3b"
sha256 cellar: :any, arm64_tahoe: "4f6b90cece7f5eb2491a4938689366c84e5cba64e4a99009f20c92aaf341d186"
sha256 cellar: :any_skip_relocation, x86_64_linux: "da83ac3be7e395ab2444c0968fb3dce389161f10c2b481ddd4b18a9056bc2d60"
end
desc "Implementation of the Unicode BiDi algorithm"
homepage "https://github.com/fribidi/fribidi"
url "https://github.com/fribidi/fribidi/releases/download/v1.0.16/fribidi-1.0.16.tar.xz"
sha256 "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c"
license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"]
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--enable-static"
system "make", "install"
end
test do
(testpath/"test.input").write <<~EOS
a _lsimple _RteST_o th_oat
EOS
assert_match "a simple TSet that", shell_output("#{bin}/fribidi --charset=CapRTL --test test.input")
end
end
+59
View File
@@ -0,0 +1,59 @@
class Fzf < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "6137546bd641e541b2e37588880305e625d9b582f5fc70393109ed60f448d77f"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "6137546bd641e541b2e37588880305e625d9b582f5fc70393109ed60f448d77f"
sha256 cellar: :any_skip_relocation, x86_64_linux: "f047e92d46790a241f0b1fd860341b5c14978c2264fd04bf8cf1afb34d5fe0bd"
end
desc "Command-line fuzzy finder written in Go"
homepage "https://junegunn.github.io/fzf/"
url "https://github.com/junegunn/fzf/archive/refs/tags/v0.74.2.tar.gz"
sha256 "3ce36bd4fb0cde458a7f93c11ef534408d92c3bf19e6acc90e112f3e9e2acc60"
license "MIT"
compatibility_version 1
head "https://github.com/junegunn/fzf.git", branch: "master"
depends_on "go" => :build
uses_from_macos "ncurses"
def install
ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0"
ldflags = %W[
-X main.version=#{version}
-X main.revision=#{tap.user}
]
system "go", "build", *std_go_args(ldflags:)
man1.install "man/man1/fzf.1", "man/man1/fzf-tmux.1"
bin.install "bin/fzf-tmux"
bin.install "bin/fzf-preview.sh"
# Please don't install these into standard locations (e.g. `zsh_completion`, etc.)
# See: https://github.com/Homebrew/homebrew-core/pull/137432
# https://github.com/Homebrew/legacy-homebrew/pull/27348
# https://github.com/Homebrew/homebrew-core/pull/70543
prefix.install "install", "uninstall"
(prefix/"shell").install %w[bash zsh fish].map { |s| "shell/key-bindings.#{s}" }
(prefix/"shell").install %w[bash zsh].map { |s| "shell/completion.#{s}" }
(prefix/"plugin").install "plugin/fzf.vim"
end
def caveats
<<~EOS
To set up shell integration, see:
https://github.com/junegunn/fzf#setting-up-shell-integration
To use fzf in Vim, add the following line to your .vimrc:
set rtp+=#{opt_prefix}
EOS
end
test do
assert_match version.to_s, shell_output("#{bin}/fzf --version")
(testpath/"list").write %w[hello world].join($INPUT_RECORD_SEPARATOR)
assert_equal "world", pipe_output("#{bin}/fzf -f wld", (testpath/"list").read).chomp
end
end
+76
View File
@@ -0,0 +1,76 @@
class Gettext < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "dde3cd0db0d7549fadf762b901f8c548dae99e3c592a6e6d41f60e1436253e5e"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "2b713227e438f51d025d76df24cfa45a2b813b61718df7bb91a6cedb1091037b"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "2dcf2f53d79cf6beb5c0df6f880c2cb7d21890be81533b3f74fc628d7f435cac"
end
desc "GNU internationalization (i18n) and localization (l10n) library"
homepage "https://www.gnu.org/software/gettext/"
url "https://ftpmirror.gnu.org/gnu/gettext/gettext-1.0.tar.gz"
mirror "https://ftp.gnu.org/gnu/gettext/gettext-1.0.tar.gz"
sha256 "85d99b79c981a404874c02e0342176cf75c7698e2b51fe41031cf6526d974f1a"
license all_of: [
"GPL-3.0-or-later",
"LGPL-2.1-or-later", # libintl, libasprintf
]
compatibility_version 1
depends_on "json-c" # for spit
depends_on "libunistring"
uses_from_macos "curl" # for spit
uses_from_macos "libxml2"
uses_from_macos "ncurses"
on_linux do
depends_on "acl"
end
def install
# Workaround for newer Clang
ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500
# macOS iconv implementation is slightly broken since Sonoma.
# upstream bug report, https://savannah.gnu.org/bugs/index.php?66541
ENV["am_cv_func_iconv_works"] = "yes" if OS.mac? && MacOS.version >= :sequoia
args = [
"--with-libunistring-prefix=#{formula_opt_prefix("libunistring")}",
"--disable-silent-rules",
"--with-included-glib",
"--with-included-libcroco",
"--with-emacs",
"--with-lispdir=#{elisp}",
"--disable-java",
"--disable-csharp",
# Don't use VCS systems to create these archives
"--without-git",
"--without-cvs",
"--without-xz",
]
args << if OS.mac?
# Ship libintl.h. Disabled on linux as libintl.h is provided by glibc
# https://gcc-help.gcc.gnu.narkive.com/CYebbZqg/cc1-undefined-reference-to-libintl-textdomain
# There should never be a need to install gettext's libintl.h on
# GNU/Linux systems using glibc. If you have it installed you've borked
# your system somehow.
"--with-included-gettext"
else
"--with-libxml2-prefix=#{formula_opt_prefix("libxml2")}"
end
system "./configure", *std_configure_args, *args
system "make"
ENV.deparallelize # install doesn't support multiple make jobs
system "make", "install"
end
test do
system bin/"gettext", "test"
assert_match "spit: missing --model option\n", shell_output("#{bin}/spit 2>&1", 1)
end
end
+37
View File
@@ -0,0 +1,37 @@
class Giflib < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "87a14dfa72601220313c1190505c7a4d0426b384a6a2d1ba3c5a36bdc784d1b0"
sha256 cellar: :any, arm64_tahoe: "bef1f5fb654184cce8af628e3a0c222eeab3c61fcaa4ff169974b22c22f01a8c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "e349e61810df032b3fff5eaac4f0db46dcc66580a070b5640a60482d6779bf64"
end
desc "Library and utilities for processing GIFs"
homepage "https://giflib.sourceforge.net/"
url "https://downloads.sourceforge.net/project/giflib/giflib-6.x/giflib-6.1.3.tar.gz"
sha256 "b65b66b99f0424b93525f987386f22fc5efb9da2bfc92ad4a532249aaffbab0e"
license "MIT"
compatibility_version 1
livecheck do
url :stable
regex(%r{url=.*?/giflib[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
def install
args = ["PREFIX=#{prefix}"]
# Manually skipping shared libutil due to https://sourceforge.net/p/giflib/bugs/189/.
# It is currently unused (binaries link to libutil.a) and not installed.
args << "LIBUTILSO=" if OS.mac?
system "make", "all", *args
ENV.deparallelize # avoid parallel mkdir
system "make", "install", *args
end
test do
output = shell_output("#{bin}/giftext #{test_fixtures("test.gif")}")
assert_match "Screen Size - Width = 1, Height = 1", output
end
end
+8 -13
View File
@@ -1,10 +1,13 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Git < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "5df08160c5e705ffcce25edfe1bb189d50fd3366a0e451fc254a8d70904adc5f"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "8cae58826d317457128023d07c07f00ac00aaf3019356ff72a837e804f5d0306"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "01365c33768a2cb170a34f8f201ea3f3a7bb8c0d2140640ff3fbc58584e9758e"
end
desc "Distributed revision control system"
homepage "https://git-scm.com"
url "https://homebrew.hyprnet/sources/a033b7dba39884cd853861da6e773e03bc640db63fef8e884dc1f82e1134be1f--git--2.55.0.x86_64_linux.bottle.tar.gz"
url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.55.0.tar.xz"
sha256 "457fdb04dc8728e007d4688695e6912e6f680727920f2a40bf11eacc17505357"
license all_of: [
"GPL-2.0-only",
@@ -21,15 +24,7 @@ class Git < Formula
regex(/href=.*?git[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 arm64_tahoe: "8cae58826d317457128023d07c07f00ac00aaf3019356ff72a837e804f5d0306"
sha256 arm64_sequoia: "5df08160c5e705ffcce25edfe1bb189d50fd3366a0e451fc254a8d70904adc5f"
sha256 arm64_sonoma: "3d7a66500cc7bf1530d7a5e862f4b4c2e317ed53c95bf76c012ce8ff7ec92ae7"
sha256 sonoma: "f7477c65f53669d1f9fd90ad2d633e6c009d5f6b0e10e039c15ebc022ac18bde"
sha256 arm64_linux: "ea73cb7a909a7c80c2c5474b15b53659dd04b1222efd678e9a693bb06a7ed314"
sha256 x86_64_linux: "01365c33768a2cb170a34f8f201ea3f3a7bb8c0d2140640ff3fbc58584e9758e"
end
depends_on "gettext" => :build
depends_on "pkgconf" => :build
+193
View File
@@ -0,0 +1,193 @@
class Glib < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "75a92e360363ebd719c655b3170b084dc3491811188b65fce0d97a45d554414e"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "56f78bc6c2d3e68fa15a1c37e3ea6531ac90c3af20665e4a6418d285514ba5ce"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "abe7175c8efb207633f50e94b56d81ad3ce5750062da0b6fc086a2dfafea4333"
end
include Language::Python::Shebang
desc "Core application library for C"
homepage "https://docs.gtk.org/glib/"
url "https://download.gnome.org/sources/glib/2.88/glib-2.88.3.tar.xz"
sha256 "ab24d24e698dfa1e408b7bcdb508f4aafc906185a8b8ce72fdf79bbbdc9b383b"
license "LGPL-2.1-or-later"
compatibility_version 1
depends_on "bison" => :build # for gobject-introspection
depends_on "gettext" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => [:build, :test]
depends_on "python-setuptools" => :build # for gobject-introspection
depends_on "python@3.14" => :build
depends_on "pcre2"
uses_from_macos "flex" => :build # for gobject-introspection
uses_from_macos "libffi"
uses_from_macos "python"
on_macos do
depends_on "gettext"
end
on_linux do
depends_on "dbus"
depends_on "util-linux"
depends_on "zlib-ng-compat"
end
# These used to live in the now defunct `glib-utils`.
link_overwrite "bin/gdbus-codegen", "bin/glib-genmarshal", "bin/glib-mkenums", "bin/gtester-report"
link_overwrite "share/glib-2.0/codegen", "share/glib-2.0/gdb"
# These used to live in `gobject-introspection`
link_overwrite "lib/girepository-1.0/GLib-2.0.typelib", "lib/girepository-1.0/GModule-2.0.typelib",
"lib/girepository-1.0/GObject-2.0.typelib", "lib/girepository-1.0/Gio-2.0.typelib"
link_overwrite "share/gir-1.0/GLib-2.0.gir", "share/gir-1.0/GModule-2.0.gir",
"share/gir-1.0/GObject-2.0.gir", "share/gir-1.0/Gio-2.0.gir"
resource "gobject-introspection" do
url "https://download.gnome.org/sources/gobject-introspection/1.86/gobject-introspection-1.86.0.tar.xz"
sha256 "920d1a3fcedeadc32acff95c2e203b319039dd4b4a08dd1a2dfd283d19c0b9ae"
livecheck do
formula "gobject-introspection"
end
end
# replace several hardcoded paths with homebrew counterparts
patch do
file "Patches/glib/hardcoded-paths.diff"
end
def install
# Avoid the sandbox violation when an empty directory is created outside of the formula prefix.
inreplace "gio/meson.build", "install_emptydir(glib_giomodulesdir)", ""
# Disable dtrace; see https://trac.macports.org/ticket/30413
# and https://gitlab.gnome.org/GNOME/glib/-/issues/653
args = %W[
--localstatedir=#{var}
-Dgio_module_dir=#{HOMEBREW_PREFIX}/lib/gio/modules
-Dbsymbolic_functions=false
-Ddtrace=disabled
-Druntime_dir=#{var}/run
-Dtests=false
]
# Stage build in order to deal with circular dependency as `gobject-introspection`
# is needed to generate `glib` introspection data used by dependents; however,
# `glib` is a dependency of `gobject-introspection`.
# Ref: https://discourse.gnome.org/t/dealing-with-glib-and-gobject-introspection-circular-dependency/18701
staging_dir = buildpath/"staging"
staging_meson_args = std_meson_args(prefix: staging_dir)
system "meson", "setup", "build_staging", "-Dintrospection=disabled", *args, *staging_meson_args
system "meson", "compile", "-C", "build_staging", "--verbose"
system "meson", "install", "-C", "build_staging"
ENV.append_path "PKG_CONFIG_PATH", staging_dir/"lib/pkgconfig"
ENV.append_path "LD_LIBRARY_PATH", staging_dir/"lib" if OS.linux?
ENV.append_path "PATH", staging_dir/"bin"
resource("gobject-introspection").stage do
system "meson", "setup", "build", "-Dcairo=disabled", "-Ddoctool=disabled", "-Dtests=false", *staging_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
system "meson", "setup", "build", "--default-library=both", "-Dintrospection=enabled", *args, *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
# ensure giomoduledir contains prefix, as this pkgconfig variable will be
# used by glib-networking and glib-openssl to determine where to install
# their modules
inreplace lib/"pkgconfig/gio-2.0.pc",
"giomoduledir=#{HOMEBREW_PREFIX}/lib/gio/modules",
"giomoduledir=${libdir}/gio/modules"
bash_completion.install (share/"bash-completion/completions").children
return unless OS.mac?
# `pkg-config --libs glib-2.0` includes -lintl, and gettext itself does not
# have a pkgconfig file, so we add gettext lib and include paths here.
gettext = Formula["gettext"]
inreplace lib/"pkgconfig/glib-2.0.pc" do |s|
s.gsub! "Libs: -L${libdir} -lglib-2.0 -lintl",
"Libs: -L${libdir} -lglib-2.0 -L#{gettext.opt_lib} -lintl"
s.gsub! "Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include",
"Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include -I#{gettext.opt_include}"
end
end
post_install_steps do
mkdir_p "{{HOMEBREW_PREFIX}}/lib/gio/modules"
end
test do
(testpath/"test.c").write <<~C
#include <string.h>
#include <glib.h>
int main(void)
{
gchar *result_1, *result_2;
char *str = "string";
result_1 = g_convert(str, strlen(str), "ASCII", "UTF-8", NULL, NULL, NULL);
result_2 = g_convert(result_1, strlen(result_1), "UTF-8", "ASCII", NULL, NULL, NULL);
return (strcmp(str, result_2) == 0) ? 0 : 1;
}
C
flags = shell_output("pkgconf --cflags --libs glib-2.0").chomp.split
system ENV.cc, "-o", "test", "test.c", *flags
system "./test"
assert_match "This file is generated by glib-mkenum", shell_output(bin/"glib-mkenums")
(testpath/"net.Corp.MyApp.Frobber.xml").write <<~XML
<node>
<interface name="net.Corp.MyApp.Frobber">
<method name="HelloWorld">
<arg name="greeting" direction="in" type="s"/>
<arg name="response" direction="out" type="s"/>
</method>
<signal name="Notification">
<arg name="icon_blob" type="ay"/>
<arg name="height" type="i"/>
<arg name="messages" type="as"/>
</signal>
<property name="Verbose" type="b" access="readwrite"/>
</interface>
</node>
XML
system bin/"gdbus-codegen", "--generate-c-code", "myapp-generated",
"--c-namespace", "MyApp",
"--interface-prefix", "net.corp.MyApp.",
"net.Corp.MyApp.Frobber.xml"
assert_path_exists testpath/"myapp-generated.c"
assert_match "my_app_net_corp_my_app_frobber_call_hello_world", (testpath/"myapp-generated.h").read
# Keep (u)int64_t and g(u)int64 aligned. See install comment for details
(testpath/"typecheck.cpp").write <<~CPP
#include <cstdint>
#include <type_traits>
#include <glib.h>
int main()
{
static_assert(std::is_same<int64_t, gint64>::value == true, "gint64 should match int64_t");
static_assert(std::is_same<uint64_t, guint64>::value == true, "guint64 should match uint64_t");
return 0;
}
CPP
system ENV.cxx, "-o", "typecheck", "typecheck.cpp", "-I#{include}/glib-2.0", "-I#{lib}/glib-2.0/include"
end
end
+86
View File
@@ -0,0 +1,86 @@
class Gmp < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "6683d73d6677d28e1e8d1b92d6ebfbc068c1d33e19b79114a22a648a99ba5991"
sha256 cellar: :any, arm64_tahoe: "db8075f389ca0a9f9aba54762c93760db66ef92ee989f4a32b5e13b4b987339c"
sha256 cellar: :any, sequoia: "d1192da68b2618652f4be0dd9f56b18d2d276481440ae241ce9cc17be0450e07"
sha256 cellar: :any_skip_relocation, x86_64_linux: "3dca3544faca889c7389a5fdbd2b5b00582c34a4e14607033573ad3b06ca7882"
end
desc "GNU multiple precision arithmetic library"
homepage "https://gmplib.org/"
# gmplib.org blocks GitHub server IPs, so it should not be the primary URL
url "https://ftpmirror.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
mirror "https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz"
sha256 "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898"
license any_of: ["LGPL-3.0-or-later", "GPL-2.0-or-later"]
compatibility_version 1
head "https://gmplib.org/repo/gmp/", using: :hg
livecheck do
url "https://gmplib.org/download/gmp/"
regex(/href=.*?gmp[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
uses_from_macos "m4" => :build
def install
if build.head?
system "./.bootstrap"
else
# Regenerate configure to avoid flat namespace linking
# Reported by email: https://gmplib.org/list-archives/gmp-bugs/2023-July/thread.html
# Remove in next version
system "autoreconf", "-i", "-s"
end
# Enable --with-pic to avoid linking issues with the static library
args = std_configure_args + %w[--enable-cxx --with-pic]
cpu = Hardware::CPU.arm? ? "aarch64" : Hardware.oldest_cpu
if OS.mac?
args << "--build=#{cpu}-apple-darwin#{OS.kernel_version.major}"
else
args << "--build=#{cpu}-linux-gnu"
args << "ABI=32" if Hardware::CPU.is_32_bit?
end
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
# Prevent brew from trying to install metafiles that
# are actually symlinks to files in autotools kegs
buildpath.children.select(&:symlink?).map(&:unlink) if build.head?
end
test do
(testpath/"test.c").write <<~C
#include <gmp.h>
#include <stdlib.h>
int main() {
mpz_t i, j, k;
mpz_init_set_str (i, "1a", 16);
mpz_init (j);
mpz_init (k);
mpz_sqrtrem (j, k, i);
if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort();
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-lgmp", "-o", "test"
system "./test"
# Test the static library to catch potential linking issues
system ENV.cc, "test.c", "#{lib}/libgmp.a", "-o", "test"
system "./test"
end
end
+11 -16
View File
@@ -1,10 +1,13 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Gnupg < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "8583235dd83654392b878f06833405b8bac255fb5f96c942259b1efd206b0ae8"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "77a293d5ac76a99d7ca1fca4d57860bd76bb25b3c334b2504fc9b7fc145f1502"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "2dd827488b6c6b1927cf5be2eb70638e0e59ad34ba9db3e9aaaca866c4ed3c29"
end
desc "GNU Privacy Guard (OpenPGP)"
homepage "https://gnupg.org/"
url "https://homebrew.hyprnet/sources/2d432cc236b45dd2fe57d9dc9b9e610cfdb3e49d1ac5c2249b5112beba43a66d--gnupg--2.5.21.x86_64_linux.bottle.tar.gz"
url "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.5.21.tar.bz2"
sha256 "e3af2c8caa46a66a9329fa7c6880af260451914d819595beabc2c26597b31352"
license "GPL-3.0-or-later"
compatibility_version 1
@@ -20,15 +23,7 @@ class Gnupg < Formula
regex(/The current version of GnuPG is v?(\d+(?:\.\d+)+)\. /i)
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 arm64_tahoe: "77a293d5ac76a99d7ca1fca4d57860bd76bb25b3c334b2504fc9b7fc145f1502"
sha256 arm64_sequoia: "8583235dd83654392b878f06833405b8bac255fb5f96c942259b1efd206b0ae8"
sha256 arm64_sonoma: "d5148b6ad728f3f6a5660d17cc33d1a47def81f34a738dcd6667b12b520b42c1"
sha256 sonoma: "b8da334b8bc5df2deecededfbcdf725b44a9dddfd344051ad7dcb8c1eb1d2046"
sha256 arm64_linux: "bf5ac44775f2c6f6c67f31cd2bb10a35d780e484f386442b479a80f08257de99"
sha256 x86_64_linux: "2dd827488b6c6b1927cf5be2eb70638e0e59ad34ba9db3e9aaaca866c4ed3c29"
end
depends_on "pkgconf" => :build
depends_on "gnutls"
@@ -85,9 +80,9 @@ class Gnupg < Formula
end
end
def post_install
(var/"run").mkpath
quiet_system "killall", "gpg-agent"
post_install_steps do
mkdir_p "run", base: :var
terminate_process "gpg-agent", must_succeed: false
end
test do
+100
View File
@@ -0,0 +1,100 @@
class Gnutls < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "0c8ba0cb42636a98b28a2c173b33c4298a286972a9838d27602f0bbc860acdbb"
sha256 cellar: :any, arm64_tahoe: "a2334eb50a165945aad7df804a3e846053de62973f6aee8060fec8c16c59446b"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "8ac010d174af7ca336b9113fa208aa05104eb6b60e4e42f86c4212ad77ff6ad2"
end
desc "GNU Transport Layer Security (TLS) Library"
homepage "https://gnutls.org/"
url "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.13.tar.xz"
mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.8/gnutls-3.8.13.tar.xz"
sha256 "ffed8ec1bf09c2426d4f14aae377de4753b53e537d685e604e99a8b16ca9c97e"
license all_of: ["LGPL-2.1-or-later", "GPL-3.0-only"]
revision 2
compatibility_version 2
# The download page links to the directory listing pages for the "Next" and
# "Current stable" versions. We use the "Next" version in the formula, so we
# match versions from the tarball links on that directory listing page.
livecheck do
url "https://www.gnutls.org/download.html"
regex(/href=.*?gnutls[._-]v?(\d+(?:\.\d+)+)\.t/i)
strategy :page_match do |page, regex|
# Find the higher version from the directory listing page URLs
highest_version = page.scan(%r{href=.*?/gnutls/v?(\d+(?:\.\d+)+)/?["' >]}i)
.map { |match| match[0] }
.max_by { |v| Version.new(v) }
next unless highest_version
# Fetch the related directory listing page
files_page = Homebrew::Livecheck::Strategy.page_content(
"https://www.gnupg.org/ftp/gcrypt/gnutls/v#{highest_version}",
)
next if (files_page_content = files_page[:content]).blank?
files_page_content.scan(regex).map { |match| match[0] }
end
end
depends_on "pkgconf" => :build
depends_on "texinfo" => :build
depends_on "ca-certificates" => :no_linkage
depends_on "gmp"
depends_on "libidn2"
depends_on "libtasn1"
depends_on "libunistring"
depends_on "nettle"
depends_on "p11-kit"
on_macos do
depends_on "gettext"
end
# Backport support for building with older clang
patch do
url "https://gitlab.com/gnutls/gnutls/-/commit/29c2027c963cf559817d0da37c1fc2efd0c1bd6a.diff"
sha256 "c0bfc0164ff131c9d2e1c4d0367430f8b767b64c9c21e0f408bd634d21fb0302"
type :backport
resolves "https://gitlab.com/gnutls/gnutls/-/merge_requests/2106"
end
def install
# DANE support is disabled so GnuTLS does not have an indirect dependency on OpenSSL.
# If the feature is wanted, then can consider shipping as split `gnutls-dane` formula.
args = %W[
--disable-libdane
--disable-silent-rules
--disable-static
--sysconfdir=#{etc}
--with-default-trust-store-file=#{pkgetc}/cert.pem
--disable-heartbeat-support
--with-p11-kit
]
system "./configure", *args, *std_configure_args
system "make", "install"
inreplace lib/"pkgconfig/gnutls.pc", prefix, opt_prefix
# certtool shadows the macOS certtool utility
mv bin/"certtool", bin/"gnutls-certtool"
mv man1/"certtool.1", man1/"gnutls-certtool.1"
end
post_install_steps do
symlink "{{etc}}/ca-certificates/cert.pem", "{{pkgetc}}/cert.pem", overwrite: true
end
def caveats
"Guile bindings are now in the `guile-gnutls` formula."
end
test do
system bin/"gnutls-cli", "--version"
assert_match "expired certificate", shell_output("#{bin}/gnutls-cli expired.badssl.com", 1)
end
end
+45
View File
@@ -0,0 +1,45 @@
class Graphite2 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "bcbf8282acc59c6ed6a0c9a7cf076935735c21de1495bb4e22c3d6bf32f31ee0"
sha256 cellar: :any, arm64_tahoe: "c05e664c8872f3a9e08ada587a33d71b841673126840fe0cd301300c1f59acea"
sha256 cellar: :any, x86_64_linux: "2c2803a27eb8365e8c02726d2c2e967496044a9af06e59348b52fef23e8360fd"
end
desc "Smart font renderer for non-Roman scripts"
homepage "https://graphite.sil.org/"
url "https://github.com/silnrsi/graphite/releases/download/1.3.15/graphite2-1.3.15.tgz"
sha256 "c6bc8b4252724665297f7cad0c55897285c673f9b8e6db3522ace833593fe0b1"
license any_of: ["MIT", "MPL-2.0", "LGPL-2.1-or-later", "GPL-2.0-or-later"]
head "https://github.com/silnrsi/graphite.git", branch: "master"
depends_on "cmake" => :build
on_linux do
depends_on "freetype" => :build
end
def install
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
inreplace lib/"pkgconfig/graphite2.pc", prefix.realpath, opt_prefix
end
test do
resource "testfont" do
url "https://scripts.sil.org/pub/woff/fonts/Simple-Graphite-Font.ttf"
sha256 "7e573896bbb40088b3a8490f83d6828fb0fd0920ac4ccdfdd7edb804e852186a"
end
resource("testfont").stage do
shape = shell_output("#{bin}/gr2fonttest Simple-Graphite-Font.ttf 'abcde'")
assert_match(/67.*36.*37.*38.*71/m, shape)
end
end
end
+66
View File
@@ -0,0 +1,66 @@
class Harfbuzz < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "a056c8d6430223a0a1f0a9d31f6b04cd96fdcb88c74da40a61892d18243d347a"
sha256 cellar: :any, arm64_tahoe: "a4d727f73af8892743817d9557e139866060de41302e1e6461908e9d31e2aa0a"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "ddec7f52274aa95bd5ca762c97024de8d4bd10e7a4233511914dfd2696b6182a"
end
desc "OpenType text shaping engine"
homepage "https://github.com/harfbuzz/harfbuzz"
url "https://github.com/harfbuzz/harfbuzz/releases/download/14.3.0/harfbuzz-14.3.0.tar.xz"
sha256 "16070d77cfc4ba1f1e7327e83bf9b3f55898081cabdb94e56a33e04fc8874eae"
license "MIT"
compatibility_version 1
head "https://github.com/harfbuzz/harfbuzz.git", branch: "main"
depends_on "gobject-introspection" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => :build
depends_on "python@3.14" => [:build, :test]
depends_on "pygobject3" => :test
depends_on "cairo"
depends_on "freetype"
depends_on "glib"
depends_on "graphite2"
depends_on "icu4c@78"
depends_on "libpng"
on_linux do
depends_on "zlib-ng-compat"
end
def install
args = %w[
--default-library=both
-Dcairo=enabled
-Dcoretext=enabled
-Dfreetype=enabled
-Dglib=enabled
-Dgobject=enabled
-Dgraphite=enabled
-Dicu=enabled
-Dintrospection=enabled
-Dtests=disabled
]
system "meson", "setup", "build", *args, *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
resource "homebrew-test-ttf" do
url "https://github.com/harfbuzz/harfbuzz/raw/fc0daafab0336b847ac14682e581a8838f36a0bf/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf"
sha256 "9535d35dab9e002963eef56757c46881f6b3d3b27db24eefcc80929781856c77"
end
resource("homebrew-test-ttf").stage do
shape = pipe_output("#{bin}/hb-shape 270b89df543a7e48e206a2d830c0e10e5265c630.ttf", "സ്റ്റ്").chomp
assert_equal "[glyph201=0+1183|U0D4D=0+0]", shape
end
system "python3.14", "-c", "from gi.repository import HarfBuzz"
end
end
+54
View File
@@ -0,0 +1,54 @@
class HdrhistogramC < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "ac019705090ca3db22752a5e5e6e1c15f0fcb325b23cb01149dc79cf225328ec"
sha256 cellar: :any, arm64_tahoe: "82d614866ee4351be8d84502e69e74efb972fcaa55e2e77ea8eff259ee9f1d56"
sha256 cellar: :any, x86_64_linux: "00929c5ef0d3a7c83956877411dfe888bf7642b3001678632f9c3c840bd207de"
end
desc "C port of the HdrHistogram"
homepage "https://github.com/HdrHistogram/HdrHistogram_c"
url "https://github.com/HdrHistogram/HdrHistogram_c/archive/refs/tags/0.11.10.tar.gz"
sha256 "c3b06d077e680d112abf9f027d8a558f1176ee4a55a7c523577833391d8c2249"
license any_of: ["CC0-1.0", "BSD-2-Clause"]
compatibility_version 1
depends_on "cmake" => :build
on_linux do
depends_on "zlib-ng-compat"
end
def install
system "cmake", "-S", ".", "-B", "build", "-DHDR_HISTOGRAM_BUILD_PROGRAMS=OFF", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <hdr/hdr_histogram.h>
int main(void) {
struct hdr_histogram* histogram;
hdr_init(1, INT64_C(3600000000), 3, &histogram);
hdr_record_value(histogram, 2);
hdr_record_values(histogram, 4, 10);
return hdr_percentiles_print(histogram, stdout, 5, 1.0, CLASSIC);
}
C
system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lhdr_histogram"
assert_equal <<~EOS, shell_output("./test")
Value Percentile TotalCount 1/(1-Percentile)
2.000 0.000000 1 1.00
4.000 0.100000 11 1.11
4.000 1.000000 11 inf
#[Mean = 3.818, StdDeviation = 0.575]
#[Max = 4.000, Total count = 11]
#[Buckets = 22, SubBuckets = 2048]
EOS
end
end
-45
View File
@@ -1,45 +0,0 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Helm < Formula
desc "Kubernetes package manager"
homepage "https://helm.sh/"
url "https://homebrew.hyprnet/sources/3c809b39ccaa77f3d4dbbab3faae9ad1ba7c8bce6310eccc8dae812862c24024--helm--4.2.2.x86_64_linux.bottle.tar.gz",
tag: "v4.2.2",
revision: "b05881cf967a5a09e19866799d0edfd40675803a"
license "Apache-2.0"
head "https://github.com/helm/helm.git", branch: "main"
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "30b3d1bc580fa98befa1857963d9f11d2e47a36df41f099ea3934199871318e6"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "276000aec740958de2b7391642c29af303430b108f5e8668705642b767b5c0af"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "2cbf1f084c340ed1ceac18587fda01173386ac49b8db7c6194fd27fbadabc81c"
sha256 cellar: :any_skip_relocation, sonoma: "0c3457bbe4b875e5f46f04ea44cc8e34ecb83cf8639aac687ed3cd73e1e26314"
sha256 cellar: :any_skip_relocation, arm64_linux: "110ac2ba0295e03379b5eab6bcd3d13268023489bcd88a20d708aa59f0cfb4f5"
sha256 cellar: :any_skip_relocation, x86_64_linux: "c119b6f04ec4a50e327ab6f0157da03b4706f7c2339f09d515fba36c0fbcfc4a"
end
depends_on "go" => :build
def install
system "make", "build"
bin.install "bin/helm"
mkdir "man1" do
system bin/"helm", "docs", "--type", "man"
man1.install Dir["*"]
end
generate_completions_from_executable(bin/"helm", shell_parameter_format: :cobra)
end
test do
system bin/"helm", "create", "foo"
assert File.directory? testpath/"foo/charts"
version_output = shell_output("#{bin}/helm version 2>&1")
assert_match "GitCommit:\"#{stable.specs[:revision]}\"", version_output
assert_match "Version:\"v#{version}\"", version_output
end
end
+310
View File
@@ -0,0 +1,310 @@
class HermesAgent < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "0934c99e0c73fac31d7f6108648a556e701efd2f9a5dcb943fd456e571e03cf5"
sha256 cellar: :any, arm64_tahoe: "1bc6279e603665a0acfa30e3ff91d3f6865cac52b0f2c6aa3bc68a0aab726b5c"
sha256 cellar: :any, x86_64_linux: "a2ec5b0ffadaf401540ca16ee1c096da45d9b7d1a8ed5f800866be4de30782fd"
end
include Language::Python::Virtualenv
desc "Self-improving AI agent that creates skills from experience"
homepage "https://hermes-agent.nousresearch.com"
url "https://github.com/NousResearch/hermes-agent/archive/refs/tags/v2026.8.3.tar.gz"
sha256 "370542c7219faba6300905c3b419e14e6508a31ac698a1a5174e0386990834be"
license "MIT"
head "https://github.com/NousResearch/hermes-agent.git", branch: "main"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
depends_on "pkgconf" => :build
depends_on "rust" => :build
depends_on "certifi" => :no_linkage
depends_on "cryptography" => :no_linkage
depends_on "libyaml"
depends_on "pillow" => :no_linkage
depends_on "pydantic" => :no_linkage
depends_on "python@3.14"
pypi_packages exclude_packages: %w[certifi cryptography pillow pydantic]
resource "annotated-doc" do
url "https://files.pythonhosted.org/packages/57/ba/046ceea27344560984e26a590f90bc7f4a75b06701f653222458922b558c/annotated_doc-0.0.4.tar.gz"
sha256 "fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4"
end
resource "anyio" do
url "https://files.pythonhosted.org/packages/61/cc/a381afa6efea9f496eff839d4a6a1aed3bfafc7b3ab4b0d1b243a12573dd/anyio-4.14.2.tar.gz"
sha256 "cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/bd/2a/23f34ec9d04624958e137efdc394888716353190e75f25dd22c7a2c7a8aa/charset_normalizer-3.4.9.tar.gz"
sha256 "673611bbd43f0810bec0b0f028ddeaaa501190339cac411f347ac76917c3ae7b"
end
resource "click" do
url "https://files.pythonhosted.org/packages/76/d4/81420972a676e8ffea40450d8c8c92943e7218a78fe9b64359836cc9876b/click-8.4.2.tar.gz"
sha256 "9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6"
end
resource "croniter" do
url "https://files.pythonhosted.org/packages/ad/2f/44d1ae153a0e27be56be43465e5cb39b9650c781e001e7864389deb25090/croniter-6.0.0.tar.gz"
sha256 "37c504b313956114a983ece2c2b07790b1f1094fe9d81cc94739214748255577"
end
resource "distro" do
url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz"
sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"
end
resource "fastapi" do
url "https://files.pythonhosted.org/packages/cd/95/d3f0ae10836324a2eab98a52b61210ac609f08200bf4bb0dc8132d32f78a/fastapi-0.139.2.tar.gz"
sha256 "333145a6891e9b5b3cfceb69baf817e8240cde4d4588ae5a10bf56ffacb6255e"
end
resource "fire" do
url "https://files.pythonhosted.org/packages/c0/00/f8d10588d2019d6d6452653def1ee807353b21983db48550318424b5ff18/fire-0.7.1.tar.gz"
sha256 "3b208f05c736de98fb343310d090dcc4d8c78b2a89ea4f32b837c586270a9cbf"
end
resource "h11" do
url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz"
sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"
end
resource "httpcore" do
url "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz"
sha256 "6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"
end
resource "httptools" do
url "https://files.pythonhosted.org/packages/43/e5/d471fcb0e14523fe1c3f4ba58ca52480e7bd70ad7109a3846bc75892f7fb/httptools-0.8.0.tar.gz"
sha256 "6b2a32f18d97e16e90827d7a819ffa8dbd8cc245fc4e1fa9d1095b54ef4bd999"
end
resource "httpx" do
url "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz"
sha256 "75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz"
sha256 "ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848"
end
resource "jinja2" do
url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz"
sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"
end
resource "jiter" do
url "https://files.pythonhosted.org/packages/1d/1f/10936e16d8860c70698a1aa939a46aa0224813b782bce4e000e637da0b2d/jiter-0.16.0.tar.gz"
sha256 "7b24c3492c5f4f84a37946ad9cf504910cf6a782d6a4e0689b6673c5894b4a1c"
end
resource "markdown" do
url "https://files.pythonhosted.org/packages/2b/f4/69fa6ed85ae003c2378ffa8f6d2e3234662abd02c10d216c0ba96081a238/markdown-3.10.2.tar.gz"
sha256 "994d51325d25ad8aa7ce4ebaec003febcce822c3f8c911e3b17c52f7f589f950"
end
resource "markdown-it-py" do
url "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz"
sha256 "04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49"
end
resource "markupsafe" do
url "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz"
sha256 "722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698"
end
resource "mdurl" do
url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz"
sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"
end
resource "openai" do
url "https://files.pythonhosted.org/packages/55/13/17e87641b89b74552ed408a92b231283786523edddc95f3545809fab673c/openai-2.24.0.tar.gz"
sha256 "1e5769f540dbd01cb33bc4716a23e67b9d695161a734aff9c5f925e2bf99a673"
end
resource "packaging" do
url "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz"
sha256 "00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"
end
resource "pathspec" do
url "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz"
sha256 "17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a"
end
resource "prompt-toolkit" do
url "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz"
sha256 "28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855"
end
resource "psutil" do
url "https://files.pythonhosted.org/packages/aa/c6/d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/psutil-7.2.2.tar.gz"
sha256 "0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372"
end
resource "ptyprocess" do
url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz"
sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"
end
resource "pygments" do
url "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz"
sha256 "6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f"
end
resource "pyjwt" do
url "https://files.pythonhosted.org/packages/3b/81/58d0ac84e1ef3a3843791d6954d94c0b33d526c75eeb1efbce9d0a4c4077/pyjwt-2.13.0.tar.gz"
sha256 "41571c89ca91598c79e8ef18a2d07367d4810fbbd6f637794879baf1b7703423"
end
resource "python-dateutil" do
url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz"
sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"
end
resource "python-dotenv" do
url "https://files.pythonhosted.org/packages/82/ed/0301aeeac3e5353ef3d94b6ec08bbcabd04a72018415dcb29e588514bba8/python_dotenv-1.2.2.tar.gz"
sha256 "2c371a91fbd7ba082c2c1dc1f8bf89ca22564a087c2c287cd9b662adde799cf3"
end
resource "python-multipart" do
url "https://files.pythonhosted.org/packages/5b/42/55c32bb9b12693c092ad250a0e82edb5b31ddeda6eb772de5f308b3804ad/python_multipart-0.0.32.tar.gz"
sha256 "be54b7f3fa167bb83e4fcd936b887b708f4e57fe75911c02aebf53efaf8d938e"
end
resource "pytz" do
url "https://files.pythonhosted.org/packages/ff/46/dd499ec9038423421951e4fad73051febaa13d2df82b4064f87af8b8c0c3/pytz-2026.2.tar.gz"
sha256 "0e60b47b29f21574376f218fe21abc009894a2321ea16c6754f3cad6eb7cdd6a"
end
resource "pyyaml" do
url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz"
sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/34/64/8860370b167a9721e8956ae116825caff829224fbca0ca6e7bf8ddef8430/requests-2.33.0.tar.gz"
sha256 "c7ebc5e8b0f21837386ad0e1c8fe8b829fa5f544d8df3b2253bff14ef29d7652"
end
resource "rich" do
url "https://files.pythonhosted.org/packages/b3/c6/f3b320c27991c46f43ee9d856302c70dc2d0fb2dba4842ff739d5f46b393/rich-14.3.3.tar.gz"
sha256 "b8daa0b9e4eef54dd8cf7c86c03713f53241884e814f4e2f5fb342fe520f639b"
end
resource "ruamel-yaml" do
url "https://files.pythonhosted.org/packages/3a/2b/7a1f1ebcd6b3f14febdc003e658778d81e76b40df2267904ee6b13f0c5c6/ruamel_yaml-0.18.17.tar.gz"
sha256 "9091cd6e2d93a3a4b157ddb8fabf348c3de7f1fb1381346d985b6b247dcd8d3c"
end
resource "ruamel-yaml-clib" do
url "https://files.pythonhosted.org/packages/ea/97/60fda20e2fb54b83a61ae14648b0817c8f5d84a3821e40bfbdae1437026a/ruamel_yaml_clib-0.2.15.tar.gz"
sha256 "46e4cc8c43ef6a94885f72512094e482114a8a706d3c555a34ed4b0d20200600"
end
resource "six" do
url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz"
sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"
end
resource "sniffio" do
url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz"
sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"
end
resource "socksio" do
url "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz"
sha256 "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac"
# Unpin flit-core<3 to support 3.14+
patch do
url "https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1.patch?full_index=1"
sha256 "7aefa906b62e2c9a8df255ea742ca97e155ac2e1238e49ce11e3e56e37ee1f8b"
type :backport
resolves "https://github.com/sethmlarson/socksio/pull/61"
end
end
resource "starlette" do
url "https://files.pythonhosted.org/packages/eb/e3/7c1dc7381d9f8ab7d854328ebfa884e62cb3f3d8549ddfd37c7814f42afa/starlette-1.3.1.tar.gz"
sha256 "05d0213193f2fbaae60e2ecb593b4add4262ad4e46536b54abe36f11a71724e0"
end
resource "tenacity" do
url "https://files.pythonhosted.org/packages/47/c6/ee486fd809e357697ee8a44d3d69222b344920433d3b6666ccd9b374630c/tenacity-9.1.4.tar.gz"
sha256 "adb31d4c263f2bd041081ab33b498309a57c77f9acf2db65aadf0898179cf93a"
end
resource "termcolor" do
url "https://files.pythonhosted.org/packages/46/79/cf31d7a93a8fdc6aa0fbb665be84426a8c5a557d9240b6239e9e11e35fc5/termcolor-3.3.0.tar.gz"
sha256 "348871ca648ec6a9a983a13ab626c0acce02f515b9e1983332b17af7979521c5"
end
resource "tqdm" do
url "https://files.pythonhosted.org/packages/8c/69/40407dfc835517f058b603dbf37a6df094d8582b015a51eddc988febbcb7/tqdm-4.69.0.tar.gz"
sha256 "700c5e85dcd5f009dd6222588a29180a193a748247a5d855b4d67db93d79a53b"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/53/0c/06f8b233b8fd13b9e5ee11424ef85419ba0d8ba0b3138bf360be2ff56953/urllib3-2.7.0.tar.gz"
sha256 "231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c"
end
resource "uvicorn" do
url "https://files.pythonhosted.org/packages/a2/65/b7c6c443ccc58678c91e1e973bbe2a878591538655d6e1d47f24ba1c51f3/uvicorn-0.51.0.tar.gz"
sha256 "f6f4b69b657c312f516dd2d268ab9ae6f254b11e4bac504f37b2ab58b24dd0b0"
end
resource "uvloop" do
url "https://files.pythonhosted.org/packages/06/f0/18d39dbd1971d6d62c4629cc7fa67f74821b0dc1f5a77af43719de7936a7/uvloop-0.22.1.tar.gz"
sha256 "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f"
end
resource "watchfiles" do
url "https://files.pythonhosted.org/packages/cd/41/5e1a4bb12aac5f1493fa1bdc11154eca3b258ca4eba65d39c473fe19d8e9/watchfiles-1.2.0.tar.gz"
sha256 "c995fba777f1ea992f090f9236e9284cf7a5d1a0130dd5a3d82c598cacd76838"
end
resource "wcwidth" do
url "https://files.pythonhosted.org/packages/34/74/c6428f875774288bec1396f5bfcbc2d925700a4dad61727fd5f2b12f249d/wcwidth-0.8.2.tar.gz"
sha256 "91fbef97204b96a3d4d421609b80340b760cf33e26da123ff243d76b1fda8dda"
end
resource "websockets" do
url "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz"
sha256 "82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee"
end
def install
ENV["HERMES_NIX_BUILD"] = "1"
# Allow to build with Python 3.14
inreplace "pyproject.toml", "requires-python = \">=3.11,<3.14\"", "requires-python = \">=3.11,<3.15\""
venv = virtualenv_install_with_resources(without: "socksio")
resource("socksio").stage do
# Cap flit-core below 4 as socksio's legacy `[tool.flit.metadata]`
# pyproject table is no longer supported since flit-core 4
inreplace "pyproject.toml", "flit_core >=2", "flit_core >=2,<4"
venv.pip_install Pathname.pwd
end
end
test do
assert_match version.to_s, shell_output("#{bin}/hermes version")
assert_match "No sessions found", shell_output("#{bin}/hermes sessions list")
system bin/"hermes", "status"
system bin/"hermes", "doctor"
end
end
+57
View File
@@ -0,0 +1,57 @@
class Icu4cAT78 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "d1206febbce23e5014f51b631afd7129b2a247ee18a9f97226cd5889e66c1686"
sha256 cellar: :any, arm64_tahoe: "0476be299494b97e50a48b0ba08811255300228aef664058e555480d6aee4fb5"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b152f4b6f581af753a52bf6dc5b7a113cd9f77088dcc94deaf6c321109aa43c2"
end
desc "C/C++ and Java libraries for Unicode and globalization"
homepage "https://icu.unicode.org/home"
url "https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz"
sha256 "3a2e7a47604ba702f345878308e6fefeca612ee895cf4a5f222e7955fabfe0c0"
license "Unicode-3.0"
compatibility_version 1
# We allow the livecheck to detect new `icu4c` major versions in order to
# automate version bumps. To make sure PRs are created correctly, we output
# an error during installation to notify when a new formula is needed.
livecheck do
url :stable
regex(/^release[._-]v?(\d+(?:[.-]\d+)+)$/i)
strategy :git do |tags, regex|
tags.filter_map { |tag| tag[regex, 1]&.tr("-", ".") }
end
end
keg_only :shadowed_by_macos, "macOS provides libicucore.dylib (but nothing else)"
def install
odie "Major version bumps need a new formula!" if version.major.to_s != name[/@(\d+)$/, 1]
args = %w[
--disable-samples
--disable-tests
--enable-static
--with-library-bits=64
]
cd "source" do
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
inreplace [bin/"icu-config", *lib.glob("pkgconfig/icu-*.pc")], prefix, opt_prefix
end
test do
if File.exist? "/usr/share/dict/words"
system bin/"gendict", "--uchars", "/usr/share/dict/words", "dict"
else
(testpath/"hello").write "hello\nworld\n"
system bin/"gendict", "--uchars", "hello", "dict"
end
end
end
+8 -13
View File
@@ -1,10 +1,13 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class Iperf3 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "9c2798aa7042d06364caca9fec400651d5cc5ae26446b24c308827c30649a40a"
sha256 cellar: :any, arm64_tahoe: "4c9732362cf41e8564f33fca550a9a49356ea2b54bf5b1c021ac828038c6ae46"
sha256 cellar: :any_skip_relocation, x86_64_linux: "aa5c3dae2b89ab6be2a65e6c3f90a29d4a99ef5b54254c78331d970781eb82e2"
end
desc "Update of iperf: measures TCP, UDP, and SCTP bandwidth"
homepage "https://github.com/esnet/iperf"
url "https://homebrew.hyprnet/sources/2786822a4598fd12ebdeeddd63ae7afdb3fa6deadd6f74b8b27b4d6dc2456bd9--iperf3--3.21_1.x86_64_linux.bottle.tar.gz"
url "https://downloads.es.net/pub/iperf/iperf-3.21.tar.gz"
sha256 "656e4405ebd620121de7ceca3eaf43a88f79ea1b857d041a6a0b1314801acdd8"
license "BSD-3-Clause"
revision 1
@@ -14,15 +17,7 @@ class Iperf3 < Formula
regex(/href=.*?iperf[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_tahoe: "4c9732362cf41e8564f33fca550a9a49356ea2b54bf5b1c021ac828038c6ae46"
sha256 cellar: :any, arm64_sequoia: "9c2798aa7042d06364caca9fec400651d5cc5ae26446b24c308827c30649a40a"
sha256 cellar: :any, arm64_sonoma: "c63e8ff6df89f6a8f9e5bf7689d0aee545d47725f9bf9068e492b42890fdabdc"
sha256 cellar: :any, sonoma: "27a27e6ade18fc7b85803b70c08571a6a76178a7a12c27f48a4917dc5f05646a"
sha256 cellar: :any_skip_relocation, arm64_linux: "fcf35af72941dad9ecfc704500471dfb43bb5dc35bba09b47ad358acf25e6369"
sha256 cellar: :any_skip_relocation, x86_64_linux: "aa5c3dae2b89ab6be2a65e6c3f90a29d4a99ef5b54254c78331d970781eb82e2"
end
head do
url "https://github.com/esnet/iperf.git", branch: "master"
+73
View File
@@ -0,0 +1,73 @@
class JpegTurbo < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "511445b91fe45351e3f7ae238ee7be0159fe92bb1e240a57489f62ded7fd1632"
sha256 cellar: :any, arm64_tahoe: "516f4fcf68020aea477a82ac745d5a89bff9fb4908e01c7529c191a563fd1a7b"
sha256 cellar: :any, x86_64_linux: "586635840c2b99e9e68e823ebd0b88dbd69bb2dbdeeef63f28d7202af68be9b1"
end
desc "JPEG image codec that aids compression and decompression"
homepage "https://www.libjpeg-turbo.org/"
url "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.2.0/libjpeg-turbo-3.2.0.tar.gz"
sha256 "6f30092cef9fb839779646608f4ee14ae3cbac989c47fa05e841b0841f09878e"
license all_of: [
"IJG", # libjpeg API library and programs
"Zlib", # libjpeg-turbo SIMD source code
"BSD-3-Clause", # TurboJPEG API library and programs
]
compatibility_version 1
head "https://github.com/libjpeg-turbo/libjpeg-turbo.git", branch: "main"
livecheck do
url :stable
strategy :github_latest
end
depends_on "cmake" => :build
on_intel do
# Required only for x86 SIMD extensions.
depends_on "nasm" => :build
end
# These conflict with `jpeg`, which is now keg-only.
link_overwrite "bin/cjpeg", "bin/djpeg", "bin/jpegtran", "bin/rdjpgcom", "bin/wrjpgcom"
link_overwrite "include/jconfig.h", "include/jerror.h", "include/jmorecfg.h", "include/jpeglib.h"
link_overwrite "lib/libjpeg.dylib", "lib/libjpeg.so", "lib/libjpeg.a", "lib/pkgconfig/libjpeg.pc"
link_overwrite "share/man/man1/cjpeg.1", "share/man/man1/djpeg.1", "share/man/man1/jpegtran.1",
"share/man/man1/rdjpgcom.1", "share/man/man1/wrjpgcom.1"
def install
args = ["-DWITH_JPEG8=1", "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath}"]
if Hardware::CPU.arm? && OS.mac?
if MacOS.version >= :ventura
# https://github.com/libjpeg-turbo/libjpeg-turbo/issues/709
args += ["-DFLOATTEST8=fp-contract",
"-DFLOATTEST12=fp-contract"]
elsif MacOS.version == :monterey
# https://github.com/libjpeg-turbo/libjpeg-turbo/issues/734
args << "-DFLOATTEST12=no-fp-contract"
end
end
args += std_cmake_args.reject { |arg| arg["CMAKE_INSTALL_LIBDIR"].present? }
system "cmake", "-S", ".", "-B", "build", *args
system "cmake", "--build", "build"
system "ctest", "--test-dir", "build", "--rerun-failed", "--output-on-failure", "--parallel", ENV.make_jobs
system "cmake", "--install", "build"
# Avoid rebuilding dependents that hard-code the prefix.
inreplace [lib/"pkgconfig/libjpeg.pc", lib/"pkgconfig/libturbojpeg.pc"],
prefix, opt_prefix
end
test do
system bin/"jpegtran", "-crop", "1x1",
"-transpose",
"-perfect",
"-outfile", "out.jpg",
test_fixtures("test.jpg")
assert_path_exists testpath/"out.jpg"
end
end
+49
View File
@@ -0,0 +1,49 @@
class JsonC < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "760e09935d633a49e8a25121969022ef158eed40b739bd142063aadbfed41730"
sha256 cellar: :any, arm64_tahoe: "4095feba36f7d453ae23ddb2656038e0784e857e1c860e70fe26a7c5089c36f5"
sha256 cellar: :any, x86_64_linux: "4d85c99fb83f7bdda0f79118df9605db6bfb1a0e4bfac02ffccddc645c1991d3"
end
desc "JSON parser for C"
homepage "https://github.com/json-c/json-c/wiki"
url "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.19.tar.gz"
sha256 "37ad0249902e301bd9052bf712e511fcc6acff4ecaad4b5900aad9ce564e26de"
license "MIT"
head "https://github.com/json-c/json-c.git", branch: "master"
livecheck do
url :head
regex(/^json-c[._-](\d+(?:\.\d+)+)(?:[._-]\d{6,8})?$/i)
end
depends_on "cmake" => :build
def install
# We pass `BUILD_APPS=OFF` since any built apps are never installed. See:
# https://github.com/json-c/json-c/blob/master/apps/CMakeLists.txt#L119-L121
system "cmake", "-S", ".", "-B", "build", "-DBUILD_APPS=OFF", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~'EOS'
#include <stdio.h>
#include <json-c/json.h>
int main() {
json_object *obj = json_object_new_object();
json_object *value = json_object_new_string("value");
json_object_object_add(obj, "key", value);
printf("%s\n", json_object_to_json_string(obj));
return 0;
}
EOS
system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-ljson-c", "-o", "test"
assert_equal '{ "key": "value" }', shell_output("./test").chomp
end
end
+50
View File
@@ -0,0 +1,50 @@
class Keyutils < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, x86_64_linux: "d5b06c4e38d2c4b7decb5b7bc0431b3416993231e5fa688950e4df83686a298d"
end
desc "Linux key management utilities"
homepage "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git"
url "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/keyutils-1.6.3.tar.gz"
sha256 "a61d5706136ae4c05bd48f86186bcfdbd88dd8bd5107e3e195c924cfc1b39bb4"
license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"]
depends_on :linux
def install
inreplace "request-key.conf" do |s|
s.gsub! %r{(\s)/bin/key}, "\\1#{opt_bin}/key"
s.gsub! %r{(\s)/sbin/key}, "\\1#{opt_sbin}/key"
s.gsub! %r{(\s)/usr/share/#{name}/}, "\\1#{opt_pkgshare}/"
end
args = %W[
BINDIR=#{bin}
ETCDIR=#{etc}
INCLUDEDIR=#{include}
LIBDIR=#{lib}
MANDIR=#{man}
SBINDIR=#{sbin}
SHAREDIR=#{pkgshare}
USRLIBDIR=#{lib}
]
system "make", "install", *args
end
test do
assert_match version.to_s, shell_output("#{bin}/keyctl --version")
system bin/"keyctl", "supports"
# CI container doesn't have permissions to modify keys/keyrings
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
(testpath/"test.sh").write <<~SHELL
keyring=$(#{bin}/keyctl new_session)
key=$(#{bin}/keyctl add user home brew "$keyring")
#{bin}/keyctl print "$key"
SHELL
assert_equal "brew\n", shell_output("bash -e test.sh")
end
end
+68
View File
@@ -0,0 +1,68 @@
class Krb5 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "a9db2ba99f3e99279c4aac0277cdba955510d27f09bde6051b100e660c1a1c28"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "2968bf9d040cd58eb2933ddf03cd004d1f9abe8b19bd7f028ea8666ad47714ab"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "5c06477705002279f07de13c147866235a99abe1495ae4deb1eed805ec542245"
end
desc "Network authentication protocol"
homepage "https://web.mit.edu/kerberos/"
url "https://kerberos.org/dist/krb5/1.22/krb5-1.22.2.tar.gz"
mirror "http://fresh-center.net/linux/misc/krb5-1.22.2.tar.gz"
sha256 "3243ffbc8ea4d4ac22ddc7dd2a1dc54c57874c40648b60ff97009763554eaf13"
# From Fedora: https://src.fedoraproject.org/rpms/krb5/blob/rawhide/f/krb5.spec
license all_of: [
"BSD-2-Clause",
"BSD-2-Clause-first-lines",
"BSD-3-Clause",
"BSD-4-Clause",
"Brian-Gladman-2-Clause",
"CMU-Mach-nodoc",
"FSFULLRWD",
"HPND",
"HPND-export2-US",
"HPND-export-US",
"HPND-export-US-acknowledgement",
"HPND-export-US-modify",
"ISC",
"MIT",
"MIT-CMU",
"OLDAP-2.8",
"OpenVision",
any_of: ["BSD-2-Clause", "GPL-2.0-or-later"],
]
compatibility_version 1
livecheck do
url :homepage
regex(/Current release: .*?>krb5[._-]v?(\d+(?:\.\d+)+)</i)
end
keg_only :provided_by_macos
depends_on "openssl@3"
uses_from_macos "bison" => :build
on_linux do
depends_on "keyutils"
end
def install
cd "src" do
system "./configure", "--disable-nls",
"--disable-silent-rules",
"--without-system-verto",
*std_configure_args
system "make"
system "make", "install"
end
end
test do
system bin/"krb5-config", "--version"
assert_match include.to_s, shell_output("#{bin}/krb5-config --cflags")
end
end
-57
View File
@@ -1,57 +0,0 @@
# frozen_string_literal: true
# Generated by generate_tap.py for local/mirror
class KubernetesCli < Formula
desc "Kubernetes command-line interface"
homepage "https://kubernetes.io/docs/reference/kubectl/"
url "https://homebrew.hyprnet/sources/7902f16cb564f74289964e1bf0f989e6f395847ea9badb9d0fda9468a692a4ad--kubernetes-cli--1.36.2.x86_64_linux.bottle.tar.gz",
tag: "v1.36.2",
revision: "24e2b02af5543d7910c2bb074c7264df5a8f0467"
license "Apache-2.0"
head "https://github.com/kubernetes/kubernetes.git", branch: "master"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, arm64_tahoe: "91df548e1cb396ef67e3a99aa2832777e7ebcd56e0b8050a981a9dc8f1234002"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "8cf9ef220adef51db3f6835f0b4c7fe0b322f593c668753e5635566520ed06c2"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ca5116967ba01c8abc7c03019bfc2bc6599efefe6aca4dc2a913939ecfb9082"
sha256 cellar: :any_skip_relocation, sonoma: "9c4452b0a565b7687f2c374802d19c794b2c192db0ab1da264052e9c8a5cdc11"
sha256 cellar: :any_skip_relocation, arm64_linux: "ee8cd75eacc68081c0a08b4d038c5f61fb08d16ae45574e07c870c12ad116661"
sha256 cellar: :any_skip_relocation, x86_64_linux: "85ab53660f7b8edd92dc7e851191a8474ac8bc19f6281f8f0e02a4c777d494ea"
end
depends_on "go" => :build
on_macos do
depends_on "bash" => :build
depends_on "coreutils" => :build
end
def install
ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? # needs GNU date
ENV["FORCE_HOST_GO"] = "1"
system "make", "WHAT=cmd/kubectl"
bin.install "_output/bin/kubectl"
generate_completions_from_executable(bin/"kubectl", shell_parameter_format: :cobra)
# Install man pages
# Leave this step for the end as this dirties the git tree
system "hack/update-generated-docs.sh"
man1.install Dir["docs/man/man1/*.1"]
end
test do
run_output = shell_output("#{bin}/kubectl 2>&1")
assert_match "kubectl controls the Kubernetes cluster manager.", run_output
version_output = shell_output("#{bin}/kubectl version --client --output=yaml 2>&1")
assert_match "gitTreeState: clean", version_output
assert_match stable.specs[:revision].to_s, version_output
end
end
+42
View File
@@ -0,0 +1,42 @@
class Lame < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "552d24d56ff0d3255e9a3519a368d0ce45de86b5b2967b338209c1a22cd12969"
sha256 cellar: :any, arm64_tahoe: "b0fe0cfb39c74a53b7635833fe3293a62c886b084bc5ccc8ed7cd177803182e4"
sha256 cellar: :any, x86_64_linux: "260e9309ef40e8ad7373bfae07f20d5357e036d32b14ea3ce6526fdf15181a37"
end
desc "High quality MPEG Audio Layer III (MP3) encoder"
homepage "https://lame.sourceforge.io/"
url "https://downloads.sourceforge.net/project/lame/lame/4.0/lame-4.0.tar.gz"
sha256 "3df5124d5ad3a98312ffd7ba6a9b36230e4f8a3e66d3ce0f425e336c32d216eb"
license "LGPL-2.0-or-later"
livecheck do
url :stable
regex(%r{url=.*?/lame[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
depends_on "pkgconf" => :build
depends_on "mpg123"
uses_from_macos "ncurses"
def install
# LAME still calls undeclared legacy ID3 APIs, which do not compile as C23.
# https://sourceforge.net/p/lame/bugs/517/
ENV["ac_cv_prog_cc_c23"] = "no"
ENV.append_to_cflags "-Wno-implicit-function-declaration"
system "./configure", "--disable-dependency-tracking",
"--disable-debug",
"--prefix=#{prefix}",
"--enable-nasm"
system "make", "install"
end
test do
system bin/"lame", "--genre-list", test_fixtures("test.mp3")
end
end
+42
View File
@@ -0,0 +1,42 @@
class Libassuan < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "1430611fe9f337d6a7568a12321f125c567ca8d4d2bdcd7ff0717bdcd82a32dc"
sha256 cellar: :any, arm64_tahoe: "0561b0dae24dbd1bfb2ebcc1b6ca6b4f10cab80d30a73558b8b87ab129415dc5"
sha256 cellar: :any_skip_relocation, x86_64_linux: "620108c517ecfeb00c843bd34f86b75bf84c1bd92be9b554c86424fad3b99f08"
end
desc "Assuan IPC Library"
homepage "https://www.gnupg.org/related_software/libassuan/"
url "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-3.0.2.tar.bz2"
mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libassuan/libassuan-3.0.2.tar.bz2"
sha256 "d2931cdad266e633510f9970e1a2f346055e351bb19f9b78912475b8074c36f6"
license all_of: [
"LGPL-2.1-or-later",
"GPL-3.0-or-later", # assuan.info
"FSFULLR", # libassuan-config, libassuan.m4
]
compatibility_version 1
livecheck do
url "https://gnupg.org/ftp/gcrypt/libassuan/"
regex(/href=.*?libassuan[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "libgpg-error"
def install
system "./configure", "--disable-silent-rules",
"--enable-static",
*std_configure_args
system "make", "install"
# avoid triggering mandatory rebuilds of software that hard-codes this path
inreplace bin/"libassuan-config", prefix, opt_prefix
end
test do
system bin/"libassuan-config", "--version"
end
end
+69
View File
@@ -0,0 +1,69 @@
class Libavif < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "0d1a9ce6320d9ddacb3e7ca31bb2ef3216529755ab1df24eac833fec27b25c95"
sha256 cellar: :any, arm64_tahoe: "584d41a9ad0fd601fac27735b928483c3f8494d4e08d6461599f7fabc915783b"
sha256 cellar: :any_skip_relocation, x86_64_linux: "824125e726a4ea8c4495ef60d538ef5b769037bd9c4acc7c5a757d0cd03c4819"
end
desc "Library for encoding and decoding .avif files"
homepage "https://github.com/AOMediaCodec/libavif"
url "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.4.2.tar.gz"
sha256 "2b645287340ba5a631d268b551dc2d72bd73ac33335962dd36dcdb6d8366921d"
license "BSD-2-Clause"
compatibility_version 1
depends_on "cmake" => :build
depends_on "aom"
depends_on "dav1d"
depends_on "jpeg-turbo"
depends_on "libpng"
on_linux do
depends_on "zlib-ng-compat"
end
resource "libargparse" do
url "https://github.com/kmurray/libargparse/archive/ee74d1b53bd680748af14e737378de57e2a0a954.tar.gz"
version "ee74d1b53bd680748af14e737378de57e2a0a954"
sha256 "7727b0498851e5b6a6fcd734eb667a8a231897e2c86a357aec51cc0664813060"
livecheck do
url "https://raw.githubusercontent.com/AOMediaCodec/libavif/refs/tags/v#{LATEST_VERSION}/cmake/Modules/LocalLibargparse.cmake"
regex(/\(AVIF_LIBARGPARSE_GIT_TAG (\h+)\)/i)
end
end
def install
resource("libargparse").unpack(buildpath/"ext/libargparse")
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
-DAVIF_CODEC_AOM=SYSTEM
-DAVIF_BUILD_APPS=ON
-DAVIF_CODEC_DAV1D=SYSTEM
-DAVIF_BUILD_EXAMPLES=OFF
-DAVIF_BUILD_TESTS=OFF
-DAVIF_LIBYUV=OFF
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
pkgshare.install "examples"
end
test do
system bin/"avifenc", test_fixtures("test.png"), testpath/"test.avif"
assert_path_exists testpath/"test.avif"
system bin/"avifdec", testpath/"test.avif", testpath/"test.jpg"
assert_path_exists testpath/"test.jpg"
example = pkgshare/"examples/avif_example_decode_file.c"
system ENV.cc, example, "-I#{include}", "-L#{lib}", "-lavif", "-o", "avif_example_decode_file"
output = shell_output("#{testpath}/avif_example_decode_file #{testpath}/test.avif")
assert_match "Parsed AVIF: 8x8", output
end
end
+29
View File
@@ -0,0 +1,29 @@
class Libcap < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any_skip_relocation, x86_64_linux: "4216b7a75d21bf4e9640630417cda23d055f1aa85298d3b6941f80b12c346cab"
end
desc "User-space interfaces to POSIX 1003.1e capabilities"
homepage "https://sites.google.com/site/fullycapable/"
url "https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.78.tar.xz"
sha256 "0d621e562fd932ccf67b9660fb018e468a683d7b827541df27813228c996bb11"
license all_of: ["BSD-3-Clause", "GPL-2.0-or-later"]
compatibility_version 1
livecheck do
url "https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/"
regex(/href=.*?libcap[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on :linux
def install
system "make", "install", "prefix=#{prefix}", "lib=lib", "RAISE_SETFCAP=no"
end
test do
assert_match "usage", shell_output("#{sbin}/getcap 2>&1", 1)
end
end
+90
View File
@@ -0,0 +1,90 @@
class Libffi < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "ba141e26c8d3b55fa4534317c474b34d649355d93299e35aa33a6eebf60117f8"
sha256 cellar: :any, arm64_tahoe: "a36f51cb6041fb1c5e70a6300a05a58dfc3b3503e621f83198731f1eaed63f2f"
sha256 cellar: :any, x86_64_linux: "250d5150db65018e524595cae9de93f8d72ebe8a078bfde968eae51bdc1787fc"
end
desc "Portable Foreign Function Interface library"
homepage "https://sourceware.org/libffi/"
url "https://github.com/libffi/libffi/releases/download/v3.8.0/libffi-3.8.0.tar.gz"
sha256 "7da3e2d9a171eb0a038f592ecad3ff2bb2550f3496d87b3b29ad0cf4430c0db4"
license "MIT"
compatibility_version 1
livecheck do
url :stable
strategy :github_latest
end
head do
url "https://github.com/libffi/libffi.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
keg_only :provided_by_macos
def install
system "./autogen.sh" if build.head?
system "./configure", *std_configure_args
system "make", "install"
end
test do
(testpath/"closure.c").write <<~C
#include <stdio.h>
#include <ffi.h>
/* Acts like puts with the file given at time of enclosure. */
void puts_binding(ffi_cif *cif, void *ret, void** args, void *stream)
{
*(unsigned int *)ret = fputs(*(char **)args[0], (FILE *)stream);
}
int main()
{
ffi_cif cif;
ffi_type *args[1];
ffi_closure *closure;
int (*bound_puts)(char *);
int rc;
/* Allocate closure and bound_puts */
closure = ffi_closure_alloc(sizeof(ffi_closure), &bound_puts);
if (closure)
{
/* Initialize the argument info vectors */
args[0] = &ffi_type_pointer;
/* Initialize the cif */
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
&ffi_type_uint, args) == FFI_OK)
{
/* Initialize the closure, setting stream to stdout */
if (ffi_prep_closure_loc(closure, &cif, puts_binding,
stdout, bound_puts) == FFI_OK)
{
rc = bound_puts("Hello World!");
/* rc now holds the result of the call to fputs */
}
}
}
/* Deallocate both closure, and bound_puts */
ffi_closure_free(closure);
return 0;
}
C
flags = ["-L#{lib}", "-lffi", "-I#{include}"]
system ENV.cc, "-o", "closure", "closure.c", *(flags + ENV.cflags.to_s.split)
system "./closure"
end
end
+48
View File
@@ -0,0 +1,48 @@
class Libgcrypt < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "8f05385898305e7f3f8717aead5162962b7266d1f25f8eb6b1f1aaf5ced87139"
sha256 cellar: :any, arm64_tahoe: "a28d181fc09720c699b5fefe62d41b3c75ad8ae73a080c989faa2acf6925d06d"
sha256 cellar: :any_skip_relocation, x86_64_linux: "941be22c944a367fc59d0dac07bce43ee16b3ea8b634389813bd9d2337a01926"
end
desc "Cryptographic library based on the code from GnuPG"
homepage "https://gnupg.org/related_software/libgcrypt/"
url "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.12.2.tar.bz2"
sha256 "7ce33c2492221a0436f96a8500215e9f3e3dcb5fd26a757cd415e7a843babd5e"
license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"]
compatibility_version 1
livecheck do
url "https://gnupg.org/ftp/gcrypt/libgcrypt/"
regex(/href=.*?libgcrypt[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "libgpg-error"
def install
system "./configure", "--disable-asm",
"--disable-silent-rules",
"--enable-static",
"--with-libgpg-error-prefix=#{formula_opt_prefix("libgpg-error")}",
*std_configure_args
# The jitter entropy collector must be built without optimisations
ENV.O0 { system "make", "-C", "random", "rndjent.o", "rndjent.lo" }
# Parallel builds work, but only when run as separate steps
system "make"
system "make", "check"
system "make", "install"
# avoid triggering mandatory rebuilds of software that hard-codes this path
inreplace bin/"libgcrypt-config", prefix, opt_prefix
end
test do
touch "testing"
output = shell_output("#{bin}/hmac256 \"testing\" testing")
assert_match "0e824ce7c056c82ba63cc40cffa60d3195b5bb5feccc999a47724cc19211aef6", output
end
end
+42
View File
@@ -0,0 +1,42 @@
class LibgpgError < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "d209486b1890cf8194a71c00d976bdb4708ff82336232e4b7b38c64f7686de6d"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "74ecfae7911e36e85f9400931acab43770544c7826a3e7a8176c6410dfc10735"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "17c06341c6fc696e36e41d204129ea1e30e90951807194694d146bd16263af6b"
end
desc "Common error values for all GnuPG components"
homepage "https://www.gnupg.org/related_software/libgpg-error/"
url "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.61.tar.bz2"
sha256 "7a85413f2bc354f4f8aa832b718af122e48965e9e0eb9012ee659c13c6385c93"
license "LGPL-2.1-or-later"
compatibility_version 1
livecheck do
url "https://gnupg.org/ftp/gcrypt/libgpg-error/"
regex(/href=.*?libgpg-error[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
on_macos do
depends_on "gettext"
end
def install
# NOTE: gpg-error-config is deprecated upstream, so we should remove this at some point.
# https://dev.gnupg.org/T5683
system "./configure", *std_configure_args,
"--disable-silent-rules",
"--enable-install-gpg-error-config",
"--enable-static"
system "make", "install"
# avoid triggering mandatory rebuilds of software that hard-codes this path
inreplace [bin/"gpg-error-config", lib/"pkgconfig/gpg-error.pc"], prefix, opt_prefix
end
test do
system bin/"gpgrt-config", "--libs"
end
end
+78
View File
@@ -0,0 +1,78 @@
class Libidn2 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "1eb02bfa40ec00b7ea64d8608fcf2115069d99de5a35eb3e2b3ac444a695ea46"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "f8f1b459f15a4ac11d2dce786a9140509782227b7d499cbdf3a1279dd325d90b"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "9e8c065bb543ee967667db82c00185419a108555ecbd965b2e6cebe202472e7f"
end
desc "International domain name library (IDNA2008, Punycode and TR46)"
homepage "https://www.gnu.org/software/libidn/#libidn2"
url "https://ftpmirror.gnu.org/gnu/libidn/libidn2-2.3.8.tar.gz"
mirror "https://ftp.gnu.org/gnu/libidn/libidn2-2.3.8.tar.gz"
mirror "http://ftp.gnu.org/gnu/libidn/libidn2-2.3.8.tar.gz"
sha256 "f557911bf6171621e1f72ff35f5b1825bb35b52ed45325dcdee931e5d3c0787a"
license all_of: [
{ any_of: ["GPL-2.0-or-later", "LGPL-3.0-or-later"] }, # lib
{ all_of: ["Unicode-TOU", "Unicode-DFS-2016"] }, # matching COPYING.unicode
"GPL-3.0-or-later", # bin
"LGPL-2.1-or-later", # parts of gnulib
"FSFAP-no-warranty-disclaimer", # man3
]
compatibility_version 1
livecheck do
url :stable
regex(/href=.*?libidn2[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
head do
url "https://gitlab.com/libidn/libidn2.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gengetopt" => :build
depends_on "gettext" => :build
depends_on "help2man" => :build
depends_on "libtool" => :build
uses_from_macos "gperf" => :build
on_macos do
depends_on "coreutils" => :build
end
on_system :linux, macos: :ventura_or_newer do
depends_on "texinfo" => :build
end
end
depends_on "pkgconf" => :build
depends_on "libunistring"
on_macos do
depends_on "gettext"
end
def install
args = ["--disable-silent-rules", "--with-packager=Homebrew"]
args << "--with-libintl-prefix=#{formula_opt_prefix("gettext")}" if OS.mac?
if build.head?
ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac?
system "./bootstrap", "--skip-po"
end
system "./configure", *args, *std_configure_args
system "make", "install"
end
test do
ENV.delete("LC_CTYPE")
ENV["CHARSET"] = "UTF-8"
output = shell_output("#{bin}/idn2 räksmörgås.se")
assert_equal "xn--rksmrgs-5wao1o.se", output.chomp
output = shell_output("#{bin}/idn2 blåbærgrød.no")
assert_equal "xn--blbrgrd-fxak7p.no", output.chomp
end
end
+44
View File
@@ -0,0 +1,44 @@
class Libimagequant < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "35636b9bf13cd99e77dec879e87736122925c790fec18da07dbcbea76083bdc6"
sha256 cellar: :any, arm64_tahoe: "9fe68c59c0500f834deced30fcd58c965148988f238d51791d39c6c284d71684"
sha256 cellar: :any_skip_relocation, x86_64_linux: "f9943e809de898982fbd65821564d201a4f88d0d902d504d2b8f4a059ab9c94c"
end
desc "Palette quantization library extracted from pnquant2"
homepage "https://pngquant.org/lib/"
url "https://github.com/ImageOptim/libimagequant/archive/refs/tags/4.4.1.tar.gz"
sha256 "2464a3e922b5a220b633d674062b82f0670114f8f3dd30d1935a621c95965f1b"
license all_of: ["GPL-3.0-or-later", "HPND"]
compatibility_version 1
depends_on "cargo-c" => :build
depends_on "rust" => :build
def install
cd "imagequant-sys" do
system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--release", "--prefix", prefix, "--libdir", lib
end
end
test do
(testpath/"test.c").write <<~C
#include <libimagequant.h>
int main()
{
liq_attr *attr = liq_attr_create();
if (!attr) {
return 1;
} else {
liq_attr_destroy(attr);
return 0;
}
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-limagequant", "-o", "test"
system "./test"
end
end
+51
View File
@@ -0,0 +1,51 @@
class Libksba < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "0f0fe7be0551bbc43def382b1a57b6c9c0cd389d9f6ff94e4814f13d874d57ab"
sha256 cellar: :any, arm64_tahoe: "a14ed50998df34e93b8eeedea30c7b953ebd07d2de779f6f040bcb628a8c03f0"
sha256 cellar: :any_skip_relocation, x86_64_linux: "a5518938a0b0907d4d12c0153dcba08245d65442e7ee1c0a5663e5935b591305"
end
desc "X.509 and CMS library"
homepage "https://www.gnupg.org/related_software/libksba/"
url "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.8.0.tar.bz2"
sha256 "296b9db9095749f2aa104202d7ab7fd09ad10710e00780a709c9754b1a1d9292"
license any_of: ["LGPL-3.0-or-later", "GPL-2.0-or-later"]
compatibility_version 1
livecheck do
url "https://gnupg.org/ftp/gcrypt/libksba/"
regex(/href=.*?libksba[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "libgpg-error"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "check"
system "make", "install"
# avoid triggering mandatory rebuilds of software that hard-codes this path
inreplace [bin/"ksba-config", lib/"pkgconfig/ksba.pc"], prefix, opt_prefix
end
test do
(testpath/"ksba-test.c").write <<~C
#include "ksba.h"
#include <stdio.h>
int main() {
printf("%s", ksba_check_version(NULL));
return 0;
}
C
ENV.append_to_cflags shell_output("#{bin}/ksba-config --cflags").strip
ENV.append "LDLIBS", shell_output("#{bin}/ksba-config --libs").strip
system "make", "ksba-test"
assert_equal version.to_s, shell_output("./ksba-test")
end
end
+52
View File
@@ -0,0 +1,52 @@
class Liblinear < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "1447af1433e4c22bb65f7d1483e80be28eef54f01ea4975cbaab5eeddcbf0329"
sha256 cellar: :any, arm64_tahoe: "084eda55e8b1e787d35ba4b64b07973f28c03ba3b80caf34476453bfc0aa6fd3"
sha256 cellar: :any_skip_relocation, x86_64_linux: "746b7ce2c2f425061ad373dedcf34bb5daa031ebb059bbbc9424dbcd7f9ba9c1"
end
desc "Library for large linear classification"
homepage "https://www.csie.ntu.edu.tw/~cjlin/liblinear/"
url "https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles/liblinear-2.50.tar.gz"
sha256 "e5eeafe2159c41148b59304da2ba0ed12648e3d491ce2b9625058e174e96ca29"
license "BSD-3-Clause"
compatibility_version 1
head "https://github.com/cjlin1/liblinear.git", branch: "master"
livecheck do
url "https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles/"
regex(/href=.*?liblinear[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
# Fix sonames
patch :p0 do
file "Patches/liblinear/patch-Makefile.diff"
end
def install
soversion_regex = /^SHVER = (\d+)$/
soversion = (buildpath/"Makefile").read
.lines
.grep(soversion_regex)
.first[soversion_regex, 1]
system "make", "all"
bin.install "predict", "train"
lib.install shared_library("liblinear", soversion)
lib.install_symlink shared_library("liblinear", soversion) => shared_library("liblinear")
include.install "linear.h"
end
test do
(testpath/"train_classification.txt").write <<~EOS
+1 201:1.2 3148:1.8 3983:1 4882:1
-1 874:0.3 3652:1.1 3963:1 6179:1
+1 1168:1.2 3318:1.2 3938:1.8 4481:1
+1 350:1 3082:1.5 3965:1 6122:0.2
-1 99:1 3057:1 3957:1 5838:0.3
EOS
system bin/"train", "train_classification.txt"
end
end
+66
View File
@@ -0,0 +1,66 @@
class Libnghttp2 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "98443603fa19454935158d4a65c2ab53460484a72aae6a515b24743d440f8194"
sha256 cellar: :any, arm64_tahoe: "76cdf4d391ad60a312d8819d3ce644791756e2116b630c3cc991c46090a76919"
sha256 cellar: :any, x86_64_linux: "d61e952b59bbf3f1662e57005807fb1ad7586c97bc33ec73d883eefe06ba29d3"
end
desc "HTTP/2 C Library"
homepage "https://nghttp2.org/"
url "https://github.com/nghttp2/nghttp2/releases/download/v1.70.0/nghttp2-1.70.0.tar.gz"
mirror "http://fresh-center.net/linux/www/nghttp2-1.70.0.tar.gz"
mirror "http://fresh-center.net/linux/www/legacy/nghttp2-1.70.0.tar.gz"
# this legacy mirror is for user to install from the source when https not working for them
# see discussions in here, https://github.com/Homebrew/homebrew-core/pull/133078#discussion_r1221941917
sha256 "aa317e2cf9dca6afa0aed68f8fad6ff303ec6982e25a78c75c0b65e2b9b3ded5"
license "MIT"
compatibility_version 1
livecheck do
formula "nghttp2"
end
head do
url "https://github.com/nghttp2/nghttp2.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkgconf" => :build
# These used to live in `nghttp2`.
link_overwrite "include/nghttp2"
link_overwrite "lib/libnghttp2.a"
link_overwrite "lib/libnghttp2.dylib"
link_overwrite "lib/libnghttp2.14.dylib"
link_overwrite "lib/libnghttp2.so"
link_overwrite "lib/libnghttp2.so.14"
link_overwrite "lib/pkgconfig/libnghttp2.pc"
def install
system "autoreconf", "--force", "--install", "--verbose" if build.head?
system "./configure", "--enable-lib-only", *std_configure_args
system "make", "-C", "lib"
system "make", "-C", "lib", "install"
end
test do
(testpath/"test.c").write <<~C
#include <nghttp2/nghttp2.h>
#include <stdio.h>
int main() {
nghttp2_info *info = nghttp2_version(0);
printf("%s", info->version_str);
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnghttp2", "-o", "test"
assert_equal version.to_s, shell_output("./test")
end
end
+44
View File
@@ -0,0 +1,44 @@
class Libnghttp3 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "7d805c2219e1473377ac0d7b6ba6465d278ad016e71a535d9c89308c4e7f95fd"
sha256 cellar: :any, arm64_tahoe: "896929daeacaf435ed2a119156d648526ee7ab83394f50f207b5a4dda376025a"
sha256 cellar: :any, x86_64_linux: "23d4c3f5d3b91b6fab9f77b66e96484ba9c389a88768e3d792037cbf2c46c2e4"
end
desc "HTTP/3 library written in C"
homepage "https://nghttp2.org/nghttp3/"
url "https://github.com/ngtcp2/nghttp3/releases/download/v1.18.0/nghttp3-1.18.0.tar.xz"
mirror "http://fresh-center.net/linux/www/nghttp3-1.18.0.tar.xz"
sha256 "aad782c23d3f01bd4bb52c8bac7a553b631ef8115fd1612703df6183449fef19"
license "MIT"
compatibility_version 1
head "https://github.com/ngtcp2/nghttp3.git", branch: "main"
depends_on "cmake" => :build
def install
system "cmake", "-S", ".", "-B", "build", "-DENABLE_LIB_ONLY=1", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~C
#include <nghttp3/nghttp3.h>
int main(void) {
nghttp3_qpack_decoder *decoder;
if (nghttp3_qpack_decoder_new(&decoder, 4096, 0, nghttp3_mem_default()) != 0) {
return 1;
}
nghttp3_qpack_decoder_del(decoder);
return 0;
}
C
system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lnghttp3"
system "./test"
end
end
+235
View File
@@ -0,0 +1,235 @@
class Libngtcp2 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "863fe84438291c89a972d647eee6d6099620b7c77039e6d84d704076e25de21c"
sha256 cellar: :any, arm64_tahoe: "301e7664d107756e42c21a981628ef09fa9a9b86731286deba8e0ccbce89fb54"
sha256 cellar: :any, x86_64_linux: "6c5b43b89a08020041b734e63d6c7048e151726a8f9072e58ae677fb21e615e3"
end
desc "IETF QUIC protocol implementation"
homepage "https://nghttp2.org/ngtcp2/"
url "https://github.com/ngtcp2/ngtcp2/releases/download/v1.25.0/ngtcp2-1.25.0.tar.xz"
mirror "http://fresh-center.net/linux/www/ngtcp2-1.25.0.tar.xz"
sha256 "2a34d2484ba17847a5d11965704e9dd0fac4c6d8efc75ffe1ec7de66d8c6b6fb"
license "MIT"
compatibility_version 1
head "https://github.com/ngtcp2/ngtcp2.git", branch: "main"
depends_on "pkgconf" => :build
depends_on "openssl@3"
def install
system "./configure", "--disable-silent-rules", *std_configure_args
system "make", "install"
end
test do
# Warning: aggressive vibe-coding below.
(testpath/"test-ngtcp2.c").write <<~C
#include <stdio.h>
#include <string.h>
#include <ngtcp2/ngtcp2.h>
#include <ngtcp2/ngtcp2_crypto.h>
static int recv_client_initial(ngtcp2_conn *conn, const ngtcp2_cid *dcid, void *user_data) {
// Do nothing just return 0 to indicate success
return 0;
}
static int recv_crypto_data(ngtcp2_conn *conn,
ngtcp2_encryption_level encryption_level,
uint64_t offset,
const uint8_t *data,
size_t datalen,
void *user_data) {
// Accept all crypto data without processing
return 0;
}
static int encrypt_cb(uint8_t *dest,
const ngtcp2_crypto_aead *aead,
const ngtcp2_crypto_aead_ctx *ctx,
const uint8_t *plaintext, size_t plaintextlen,
const uint8_t *nonce, size_t noncelen,
const uint8_t *ad, size_t adlen) {
// Dummy encryption: just memcpy the plaintext to dest.
// Not secure! Just for smoke testing.
memcpy(dest, plaintext, plaintextlen);
return 0; // success
}
static int decrypt_cb(uint8_t *dest,
const ngtcp2_crypto_aead *aead,
const ngtcp2_crypto_aead_ctx *ctx,
const uint8_t *ciphertext, size_t ciphertextlen,
const uint8_t *nonce, size_t noncelen,
const uint8_t *ad, size_t adlen) {
// Dummy decryption: just memcpy ciphertext to dest
memcpy(dest, ciphertext, ciphertextlen);
return 0;
}
static int hp_mask_cb(uint8_t *dest,
const ngtcp2_crypto_cipher *hp,
const ngtcp2_crypto_cipher_ctx *hp_ctx,
const uint8_t *sample) {
// For test: zero out header protection mask
memset(dest, 0, 5);
return 0;
}
static void rand_cb(uint8_t *dest, size_t destlen, const ngtcp2_rand_ctx *ctx) {
// Dummy randomness: fill with incrementing values
for (size_t i = 0; i < destlen; ++i) {
dest[i] = (uint8_t)i;
}
}
static int get_new_connection_id_cb(ngtcp2_conn *conn,
ngtcp2_cid *cid,
uint8_t *token,
size_t cidlen,
void *user_data) {
// Dummy CID: fill with pattern
for (size_t i = 0; i < cidlen; ++i) {
cid->data[i] = (uint8_t)(0xA0 + i);
}
cid->datalen = cidlen;
// Dummy stateless reset token
memset(token, 0, NGTCP2_STATELESS_RESET_TOKENLEN);
return 0;
}
static void delete_crypto_aead_ctx_cb(ngtcp2_conn *conn,
ngtcp2_crypto_aead_ctx *aead_ctx,
void *user_data) {
// For smoke testing, nothing to free
(void)conn;
(void)aead_ctx;
(void)user_data;
}
static int update_key_cb(ngtcp2_conn *conn,
uint8_t *rx_secret,
uint8_t *tx_secret,
ngtcp2_crypto_aead_ctx *rx_ctx,
uint8_t *rx_key,
ngtcp2_crypto_aead_ctx *tx_ctx,
uint8_t *tx_key,
const uint8_t *current_rx_secret,
const uint8_t *current_tx_secret,
size_t secretlen,
void *user_data) {
// Dummy key update: just copy old secrets and keys
memcpy(rx_secret, current_rx_secret, secretlen);
memcpy(tx_secret, current_tx_secret, secretlen);
memset(rx_key, 0, 32); // Dummy key
memset(tx_key, 0, 32);
memset(rx_ctx, 0, sizeof(*rx_ctx));
memset(tx_ctx, 0, sizeof(*tx_ctx));
return 0;
}
static void delete_crypto_cipher_ctx_cb(ngtcp2_conn *conn,
ngtcp2_crypto_cipher_ctx *cipher_ctx,
void *user_data) {
// No-op for smoke testing
(void)conn;
(void)cipher_ctx;
(void)user_data;
}
static int get_path_challenge_data_cb(ngtcp2_conn *conn,
uint8_t *data,
void *user_data) {
// Dummy 8-byte challenge
for (int i = 0; i < 8; ++i) {
data[i] = (uint8_t)(0xC0 + i);
}
return 0;
}
int main(void) {
ngtcp2_conn *conn = NULL;
// Initialize callbacks (all NULL for now)
ngtcp2_callbacks callbacks;
memset(&callbacks, 0, sizeof(callbacks));
callbacks.recv_client_initial = recv_client_initial;
callbacks.recv_crypto_data = recv_crypto_data;
callbacks.encrypt = encrypt_cb;
callbacks.decrypt = decrypt_cb;
callbacks.hp_mask = hp_mask_cb;
callbacks.rand = rand_cb;
callbacks.get_new_connection_id = get_new_connection_id_cb;
callbacks.update_key = update_key_cb;
callbacks.delete_crypto_aead_ctx = delete_crypto_aead_ctx_cb;
callbacks.delete_crypto_cipher_ctx = delete_crypto_cipher_ctx_cb;
callbacks.get_path_challenge_data = get_path_challenge_data_cb;
// Connection IDs
ngtcp2_cid dcid, scid;
ngtcp2_cid_init(&dcid, (const uint8_t *)"\x01", 1);
ngtcp2_cid_init(&scid, (const uint8_t *)"\x02", 1);
// Settings
ngtcp2_settings settings;
ngtcp2_settings_default(&settings);
// Transport parameters
ngtcp2_transport_params params;
memset(&params, 0, sizeof(params));
params.initial_max_stream_data_bidi_local = 65535;
params.initial_max_data = 65535;
params.active_connection_id_limit = NGTCP2_DEFAULT_ACTIVE_CONNECTION_ID_LIMIT;
// Required for server connections:
params.original_dcid_present = 1;
params.original_dcid = dcid;
// Path (required now)
ngtcp2_path path;
memset(&path, 0, sizeof(path));
// QUIC version (use draft-29 as default for test; or NGTCP2_PROTO_VER_V1 if available)
uint32_t version = NGTCP2_PROTO_VER_V1;
int rv = ngtcp2_conn_server_new(
&conn,
&dcid,
&scid,
&path,
version,
&callbacks,
&settings,
&params,
NULL, // token
NULL // user_data
);
if (rv != 0) {
fprintf(stderr, "ngtcp2_conn_server_new failed: %s (%d)", ngtcp2_strerror(rv), rv);
return 1;
}
printf("ngtcp2_conn_server_new succeeded.");
ngtcp2_conn_del(conn);
return 0;
}
C
ENV.append_to_cflags "-I#{include}"
ENV.append "LDFLAGS", "-L#{lib}"
ENV.append "LDLIBS", "-lngtcp2"
system "make", "test-ngtcp2"
system "./test-ngtcp2"
end
end
+62
View File
@@ -0,0 +1,62 @@
class Libnsl < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any_skip_relocation, x86_64_linux: "fa7613b30e9bfe15166339d119c19115ec21f13cea259280182e0c083502ff40"
end
desc "Public client interface for NIS(YP) and NIS+"
homepage "https://github.com/thkukuk/libnsl"
url "https://github.com/thkukuk/libnsl/releases/download/v2.0.1/libnsl-2.0.1.tar.xz"
sha256 "5c9e470b232a7acd3433491ac5221b4832f0c71318618dc6aa04dd05ffcd8fd9"
license "LGPL-2.1-or-later"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "libtirpc"
depends_on :linux
link_overwrite "include/rpcsvc"
link_overwrite "lib/libnsl.a"
link_overwrite "lib/libnsl.so"
def install
system "./configure", *std_configure_args,
"--disable-silent-rules"
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~'EOS'
#include <rpcsvc/ypclnt.h>
int main(int argc, char *argv[]) {
char *domain;
switch (yp_get_default_domain(&domain)) {
case YPERR_SUCCESS:
printf("Domain: %s\n", domain);
return 0;
case YPERR_NODOM:
printf("No domain\n");
return 0;
default:
return 1;
}
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnsl", "-o", "test"
domain = Utils.popen_read("ypdomainname").chomp
domain_exists = $CHILD_STATUS.success?
output = shell_output("./test").chomp
if domain_exists
assert_equal "Domain: #{domain}", output
else
assert_equal "No domain", output
end
end
end
+84
View File
@@ -0,0 +1,84 @@
class Libogg < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "2423ff6b931f0393cd314052a7328a61fdd6f1d8519b65c4dff5ab560f82c52d"
sha256 cellar: :any, arm64_tahoe: "4d9d14f8e36ed913c02201bfc01682ba3f550de412e9a24e3ef9aed4f1b8a23d"
sha256 cellar: :any_skip_relocation, x86_64_linux: "e4fb064699caad0097ce135c7212022d1dc230424fb3b63c379731ab44ea8e42"
end
desc "Ogg Bitstream Library"
homepage "https://www.xiph.org/ogg/"
url "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.6.tar.gz"
mirror "https://github.com/xiph/ogg/releases/download/v1.3.6/libogg-1.3.6.tar.gz"
sha256 "83e6704730683d004d20e21b8f7f55dcb3383cdf84c0daedf30bde175f774638"
license "BSD-3-Clause"
compatibility_version 1
head "https://gitlab.xiph.org/xiph/ogg.git", branch: "main"
livecheck do
url "https://ftp.osuosl.org/pub/xiph/releases/ogg/?C=M&O=D"
regex(%r{href=(?:["']?|.*?/)libogg[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
depends_on "cmake" => :build
def install
system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=TRUE", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=FALSE", *std_cmake_args
system "cmake", "--build", "build-static"
lib.install "build-static/libogg.a"
end
test do
resource "oggfile" do
url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg"
sha256 "f57b56d8aae4c847cf01224fb45293610d801cfdac43d932b5eeab1cd318182a"
end
(testpath/"test.c").write <<~C
#include <ogg/ogg.h>
#include <stdio.h>
int main (void) {
ogg_sync_state oy;
ogg_stream_state os;
ogg_page og;
ogg_packet op;
char *buffer;
int bytes;
ogg_sync_init (&oy);
// Read all available input to avoid broken pipe
do {
buffer = ogg_sync_buffer (&oy, 4096);
bytes = fread(buffer, 1, 4096, stdin);
ogg_sync_wrote (&oy, bytes);
} while (bytes == 4096);
if (ogg_sync_pageout (&oy, &og) != 1)
return 1;
ogg_stream_init (&os, ogg_page_serialno (&og));
if (ogg_stream_pagein (&os, &og) < 0)
return 1;
if (ogg_stream_packetout (&os, &op) != 1)
return 1;
return 0;
}
C
testpath.install resource("oggfile")
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-logg",
"-o", "test"
# Should work on an OGG file
pipe_output("./test", (testpath/"Example.ogg").read, 0)
# Expected to fail on a non-OGG file
pipe_output("./test", test_fixtures("test.wav").read, 1)
end
end
+67
View File
@@ -0,0 +1,67 @@
class Libpng < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "3d976f549e04ea0695078e5d8a3ae08c62e4dccd2b92f5b83c3ee9f1708c001b"
sha256 cellar: :any, arm64_tahoe: "a28e1e29bf508ddf89800c215a013694c2751ca63e8ae40aca859aff7bf7b02c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b5099e23c861337cff22c4b5a8c4f110b5e3bb0a3f5686fcd62f6377fac894b3"
end
desc "Library for manipulating PNG images"
homepage "https://www.libpng.org/pub/png/libpng.html"
url "https://downloads.sourceforge.net/project/libpng/libpng16/1.6.58/libpng-1.6.58.tar.xz"
sha256 "28eb403f51f0f7405249132cecfe82ea5c0ef97f1b32c5a65828814ae0d34775"
license "libpng-2.0"
compatibility_version 1
livecheck do
url :stable
regex(%r{url=.*?/libpng[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
head do
url "https://github.com/pnggroup/libpng.git", branch: "libpng16"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
on_linux do
depends_on "zlib-ng-compat"
# Use Fedora's regenerated test PNG for zlib-ng-compat compression
resource "pngtest.png" do
url "https://src.fedoraproject.org/rpms/libpng/raw/49e9a06ca115aaa911dd3419ee79c1870d1428fb/f/pngtest.png"
sha256 "f925a657a5343cfb724414c01e87afd4d60b1f82a46edc0e11f016a126f84064"
end
end
def install
resource("pngtest.png").stage(buildpath) if OS.linux?
system "./configure", "--disable-silent-rules", *std_configure_args
system "make"
system "make", "test"
system "make", "install"
# Avoid rebuilds of dependants that hardcode this path.
inreplace lib/"pkgconfig/libpng.pc", prefix, opt_prefix
end
test do
(testpath/"test.c").write <<~C
#include <png.h>
int main(void)
{
png_structp png_ptr;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpng", "-o", "test"
system "./test"
end
end
+63
View File
@@ -0,0 +1,63 @@
class Libpsl < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "15d0b4ffc8d173f93e5baf76eadd797b44106e82cbb378a22793b263e78578f9"
sha256 cellar: :any, arm64_tahoe: "6c38c3245d2b76a345a811f75674bd6ead4b6c55e083bc8a968d55ea22f36d1b"
sha256 cellar: :any, x86_64_linux: "f1450e6e5c4d7d0afbc078cdcee3015885c4542bd8a6c8221bf2434f4cdf7dcb"
end
desc "C library for the Public Suffix List"
homepage "https://rockdaboot.github.io/libpsl"
url "https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz"
mirror "http://distfiles.macports.org/libpsl/libpsl-0.23.1.tar.gz"
mirror "http://ftp2.osuosl.org/pub/blfs/conglomeration/libpsl/libpsl-0.23.1.tar.gz"
sha256 "8fbb03054556498ba9c4cc48fcaa36a4483748c6504a65bdb9ba348f555b0e56"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
on_system :linux, macos: :monterey_or_older do
depends_on "libidn2"
depends_on "libunistring"
end
def install
runtime = (OS.linux? || MacOS.version <= :monterey) ? "libidn2" : "libicucore"
args = %W[
--disable-silent-rules
--enable-builtin
--enable-runtime=#{runtime}
]
system "./configure", *args, *std_configure_args
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <libpsl.h>
int main(void)
{
const psl_ctx_t *psl = psl_builtin();
const char *domain = ".eu";
assert(psl_is_public_suffix(psl, domain));
const char *host = "www.example.com";
const char *expected_domain = "example.com";
const char *actual_domain = psl_registrable_domain(psl, host);
assert(strcmp(actual_domain, expected_domain) == 0);
return 0;
}
C
system ENV.cc, "-o", "test", "test.c", "-I#{include}", "-L#{lib}", "-lpsl"
system "./test"
end
end
+45
View File
@@ -0,0 +1,45 @@
class Libraqm < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "562eae89ec18a9e0fe45e3c3337e029802fe59263acf4fb4da8509c8a6986a43"
sha256 cellar: :any, arm64_tahoe: "cc58087be4b56fc11117a57536b22de178c9349003baa4d2d46b1f650468bbbe"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "fd5e6f285625d73d32d5869a0d364479c2251a7a7e53ecdbc477444631cf8603"
end
desc "Library for complex text layout"
homepage "https://github.com/HOST-Oman/libraqm"
url "https://github.com/HOST-Oman/libraqm/archive/refs/tags/v0.11.0.tar.gz"
sha256 "2ba3521d3f24e9696185a67a16f1a9643429d6c897d89d83dfb2aad3a398732a"
license "MIT"
compatibility_version 1
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => :build
depends_on "freetype"
depends_on "fribidi"
depends_on "harfbuzz"
def install
system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
(testpath/"test.c").write <<~C
#include <raqm.h>
int main() {
return 0;
}
C
system ENV.cc, "test.c",
"-I#{include}",
"-I#{Formula["freetype"].include/"freetype2"}",
"-o", "test"
system "./test"
end
end
+84
View File
@@ -0,0 +1,84 @@
class Libsecret < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "79874cb427ebe11a1e139f777e566d34c8be68ca97a25020f128c8052d7b2f7b"
sha256 cellar: :any, arm64_tahoe: "ee55da32af1c04e94e871fc0bc012524bf46c64adf3012991a6c0e2fae089135"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "223ea87975e39fd3bb9ef2d04ea31c1c13b7f797199db96d2d2796b7e7856bf5"
end
desc "Library for storing/retrieving passwords and other secrets"
homepage "https://wiki.gnome.org/Projects/Libsecret"
url "https://download.gnome.org/sources/libsecret/0.21/libsecret-0.21.7.tar.xz"
sha256 "6b452e4750590a2b5617adc40026f28d2f4903de15f1250e1d1c40bfd68ed55e"
# Excluding GPL-2.0-or-later and Apache-2.0 which are for tests
license "LGPL-2.1-or-later"
compatibility_version 1
# libsecret doesn't use GNOME's "even-numbered minor is stable" version
# scheme. This regex is the same as the one generated by the `Gnome` strategy
# but it's necessary to avoid the related version scheme logic.
livecheck do
url :stable
regex(/libsecret[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "docbook-xsl" => :build
depends_on "gettext" => :build
depends_on "gobject-introspection" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => [:build, :test]
depends_on "vala" => :build
depends_on "glib"
depends_on "libgcrypt"
uses_from_macos "libxslt" => :build
uses_from_macos "expat"
on_macos do
depends_on "gettext"
end
def install
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
system "meson", "setup", "build", "-Dbashcompdir=#{bash_completion}",
"-Dgtk_doc=false",
*std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end
test do
(testpath/"test.c").write <<~C
#include <libsecret/secret.h>
const SecretSchema * example_get_schema (void) G_GNUC_CONST;
const SecretSchema *
example_get_schema (void)
{
static const SecretSchema the_schema = {
"org.example.Password", SECRET_SCHEMA_NONE,
{
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
{ "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
{ "NULL", 0 },
}
};
return &the_schema;
}
int main()
{
example_get_schema();
return 0;
}
C
flags = shell_output("pkgconf --cflags --libs libsecret-1").chomp.split
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end
+55
View File
@@ -0,0 +1,55 @@
class Libsndfile < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "2d6a8173ef41359c3da4c78a5d5eb402846e480c509b868f671b80a17726f9c4"
sha256 cellar: :any, arm64_tahoe: "7788d515f9bc665779112b28a86810a2ac4bc5fb94a763df5d1188e461efce98"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b40061adc0ea00923ea38c2c472eccc172e702398c2ddd3c705bf0dd6b16cbed"
end
desc "C library for files containing sampled sound"
homepage "https://libsndfile.github.io/libsndfile/"
url "https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz"
sha256 "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e"
license "LGPL-2.1-or-later"
revision 1
compatibility_version 1
livecheck do
url :stable
strategy :github_latest
end
depends_on "cmake" => :build
depends_on "flac"
depends_on "lame"
depends_on "libogg"
depends_on "libvorbis"
depends_on "mpg123"
depends_on "opus"
uses_from_macos "python" => :build
def install
args = %W[
-DBUILD_PROGRAMS=ON
-DENABLE_PACKAGE_CONFIG=ON
-DINSTALL_PKGCONFIG_MODULE=ON
-DBUILD_EXAMPLES=OFF
-DCMAKE_INSTALL_RPATH=#{rpath}
-DPYTHON_EXECUTABLE=#{which("python3")}
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
]
system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
system "cmake", "-S", ".", "-B", "static", "-DBUILD_SHARED_LIBS=OFF", *args, *std_cmake_args
system "cmake", "--build", "static"
lib.install "static/libsndfile.a"
end
test do
output = shell_output("#{bin}/sndfile-info #{test_fixtures("test.wav")}")
assert_match "Duration : 00:00:00.064", output
end
end
+60
View File
@@ -0,0 +1,60 @@
class Libsoxr < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "164c5e70f213a0cdd5b9a764da773e79bc35753efc54d46e0710aee172de3640"
sha256 cellar: :any, arm64_tahoe: "6fd815529e1078139d7965e7bb7e92b4fa5680e74ca671357aaf4c0e1ea1dc95"
sha256 cellar: :any_skip_relocation, x86_64_linux: "1753c0562a6494e1437dc79db88d4672bb4b2e2a2b9134ac85952b555baf8559"
end
desc "High quality, one-dimensional sample-rate conversion library"
homepage "https://sourceforge.net/projects/soxr/"
url "https://downloads.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz"
sha256 "b111c15fdc8c029989330ff559184198c161100a59312f5dc19ddeb9b5a15889"
license "LGPL-2.1-or-later"
compatibility_version 1
livecheck do
url :stable
regex(%r{url=.*?/soxr[._-]v?(\d+(?:\.\d+)+)(?:-Source)?\.t}i)
end
depends_on "cmake" => :build
# Fixes the build on 64-bit ARM macOS; the __arm__ define used in the
# code isn't defined on 64-bit Apple Silicon.
# Upstream pull request: https://sourceforge.net/p/soxr/code/merge-requests/5/
patch do
file "Patches/libsoxr/arm64_defines.patch"
end
def install
args = %w[
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~C
#include <soxr.h>
int main()
{
char const *version = 0;
version = soxr_version();
if (version == 0)
{
return 1;
}
return 0;
}
C
system ENV.cc, "-L#{lib}", "test.c", "-lsoxr", "-o", "test"
system "./test"
end
end
+155
View File
@@ -0,0 +1,155 @@
class Libssh2 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "cb769ecbc0bbe4c71dd2c1dfd95b5b44433824065cce6e9a7ba639b835f54263"
sha256 cellar: :any, arm64_tahoe: "2700fe402d514ccc6de4d21bf893fea1f346c97ff1668a448a1db1aa2e67c900"
sha256 cellar: :any, sequoia: "77458987f6ef9dc1a0c888f0ae98705e6e8c2b1073dbf6b314042e814d18e68d"
sha256 cellar: :any, x86_64_linux: "97de8d2b3b5ba7320aa04d16f11f98e86b79b70906ac8009fe5e4249b2d3c0b0"
end
desc "C library implementing the SSH2 protocol"
homepage "https://libssh2.org/"
url "https://libssh2.org/download/libssh2-1.11.1.tar.gz"
mirror "https://github.com/libssh2/libssh2/releases/download/libssh2-1.11.1/libssh2-1.11.1.tar.gz"
mirror "http://download.openpkg.org/components/cache/libssh2/libssh2-1.11.1.tar.gz"
sha256 "d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7"
license "BSD-3-Clause"
revision 4
compatibility_version 1
livecheck do
url "https://libssh2.org/download/"
regex(/href=.*?libssh2[._-]v?(\d+(?:\.\d+)+)\./i)
end
head do
url "https://github.com/libssh2/libssh2.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "openssl@3"
on_linux do
depends_on "zlib-ng-compat"
end
# Backport of https://github.com/libssh2/libssh2/commit/2dae3024897e1898d389835151f4e9606227721d
# with a call to `LIBSSH2_UNCONST` removed which doesn't exist in 1.11.1.
# This modification has been vetted and approved at https://github.com/libssh2/libssh2/issues/2125.
# Patch can be removed with the next release.
patch do
file "Patches/libssh2/CVE-2025-15661.patch"
type :backport
resolves "CVE-2025-15661"
end
# Remove with the next release.
patch do
url "https://github.com/libssh2/libssh2/commit/256d04b60d80bf1190e96b0ad1e91b2174d744b1.patch?full_index=1"
sha256 "7c5fe26b0b58fb3ee3770c8a7648eddec09845fe016eff22b9074451d1a60c34"
type :backport
resolves "CVE-2026-7598"
end
# Remove with the next release.
patch do
url "https://github.com/libssh2/libssh2/commit/17626857d20b3c9a1addfa45979dadcee1cd84a4.patch?full_index=1"
sha256 "a236d5cfe1995a85c3b036ab16cc2672aa316fd3e1d6299100bcc4c07a539fd7"
type :backport
resolves "CVE-2026-55199"
end
# Backport of https://github.com/libssh2/libssh2/commit/97acf3dfda80c91c3a8c9f2372546301d4a1a7a8
# with a simple conflict fixed.
# Remove with the next release.
patch do
file "Patches/libssh2/CVE-2026-55200.patch"
type :backport
resolves "CVE-2026-55200"
end
# Backport of https://github.com/libssh2/libssh2/commit/34497525929b9a47f03dfb81887ac896202b7e12
# with ssh2_err changed to the 1.11's _libssh2_error.
# Remove with the next release.
patch do
file "Patches/libssh2/CVE-2026-58050.patch"
type :backport
resolves "CVE-2026-58050"
end
# Remove with the next release.
patch do
url "https://github.com/libssh2/libssh2/commit/a9758da45a52bc8c630ec9493804d0c6ea30b24a.patch?full_index=1"
sha256 "46cc7c5184d333e93c80a9cac1c86469c17340e6fc0418aecb2d0d8f6eaa5f41"
type :backport
resolves "CVE-2026-58051"
end
# Backport of https://github.com/libssh2/libssh2/commit/5e4776146552d898b9c0e1b313cd093fa8dc92d0
# with a simple conflict fixed.
# Remove with the next release.
patch do
file "Patches/libssh2/CVE-2026-66032.patch"
type :backport
resolves "CVE-2026-66032"
end
# Remove with the next release.
patch do
url "https://github.com/libssh2/libssh2/commit/a2ed82d40964bbc0d64cd717aa0a5a892117d2e6.patch?full_index=1"
sha256 "378b5f95f1a410afb790c57ceb67f2d4bd15cc42fc1db58d19fe26fd6f8acbed"
type :backport
resolves "CVE-2026-66033"
end
# Backport of https://github.com/libssh2/libssh2/commit/a13bb6c773f0d55ad1628cede57e99803cd898d9
# with ssh2_err changed to the 1.11's _libssh2_error.
# Remove with the next release.
patch do
file "Patches/libssh2/CVE-2026-66034.patch"
type :backport
resolves "CVE-2026-66034"
end
# Backport of https://github.com/libssh2/libssh2/commit/42e33d81577ed4b95d4b4f6f845e5ee8efe5eeb4
# with simple conflicts fixed and SSH2_SAFEFREE changed to the 1.11's LIBSSH2_FREE + `ptr = NULL`.
# Remove with the next release.
patch do
file "Patches/libssh2/CVE-2026-66035.patch"
type :backport
resolves "CVE-2026-66035"
end
def install
args = %W[
--disable-silent-rules
--disable-examples-build
--with-openssl
--with-libz
--with-libssl-prefix=#{formula_opt_prefix("openssl@3")}
]
system "./buildconf" if build.head?
system "./configure", *std_configure_args, *args
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <libssh2.h>
int main(void)
{
libssh2_exit();
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-lssh2", "-o", "test"
system "./test"
end
end
+46
View File
@@ -0,0 +1,46 @@
class Libtasn1 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "973e0fd7d529808f53fa9ae281020bcbcc750a1dff60e5e5bc37c0da274cca5e"
sha256 cellar: :any, arm64_tahoe: "ae01713eec0bd922b903ed2bf514dc085ec3108636c4ead84614b23a2c33f267"
sha256 cellar: :any_skip_relocation, x86_64_linux: "c0394c5c9c0b278c37eb9f817a282054d64654f7b27eb86100bb5b307a0d72b5"
end
desc "ASN.1 structure parser library"
homepage "https://www.gnu.org/software/libtasn1/"
url "https://ftpmirror.gnu.org/gnu/libtasn1/libtasn1-4.21.0.tar.gz"
mirror "https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.21.0.tar.gz"
sha256 "1d8a444a223cc5464240777346e125de51d8e6abf0b8bac742ac84609167dc87"
license "LGPL-2.1-or-later"
compatibility_version 1
def install
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking",
"--disable-silent-rules"
system "make", "check"
system "make", "install"
end
test do
(testpath/"pkix.asn").write <<~EOS
PKIX1 { }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
Dss-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER
}
END
EOS
(testpath/"assign.asn1").write <<~EOS
dp PKIX1.Dss-Sig-Value
r 42
s 47
EOS
system bin/"asn1Coding", "pkix.asn", "assign.asn1"
assert_match "Decoding: SUCCESS", shell_output("#{bin}/asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value 2>&1")
end
end
+92
View File
@@ -0,0 +1,92 @@
class Libtiff < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "5f4a42e711c65a9b72c426ec773c4c9a1d1daf38184fdf1a1f908573cebbcdce"
sha256 cellar: :any, arm64_tahoe: "5d1873ffd3458d6288110874c349921206349359cf6564443bf2ed92ef9e5d46"
sha256 cellar: :any, x86_64_linux: "fd184f2cda1930f320423cee490c95aecc3522f4a5cfc4f92f75432e87c2b92a"
end
desc "TIFF library and utilities"
homepage "https://libtiff.gitlab.io/libtiff/"
url "https://download.osgeo.org/libtiff/tiff-4.7.2.tar.gz"
mirror "https://ftp2.osuosl.org/pub/osgeo/download/libtiff/tiff-4.7.2.tar.gz"
sha256 "672bd7d10aee4606171afb864f3570b83340f6a33e2c186dc0512f7145ffdf6a"
license "libtiff"
compatibility_version 1
livecheck do
url "https://download.osgeo.org/libtiff/"
regex(/href=.*?tiff[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "jpeg-turbo"
depends_on "webp"
depends_on "xz"
depends_on "zstd"
on_linux do
depends_on "zlib-ng-compat"
end
def install
args = %W[
--disable-libdeflate
--enable-webp
--with-webp-include-dir=#{formula_opt_include("webp")}
--with-webp-lib-dir=#{formula_opt_lib("webp")}
--enable-zstd
--enable-lzma
--with-jpeg-include-dir=#{formula_opt_include("jpeg-turbo")}
--with-jpeg-lib-dir=#{formula_opt_lib("jpeg-turbo")}
--without-x
]
system "./configure", *args, *std_configure_args
system "make", "install"
# Avoid rebuilding dependents that hard-code the prefix.
inreplace lib/"pkgconfig/libtiff-4.pc", prefix, opt_prefix
end
test do
(testpath/"test.c").write <<~C
#include <tiffio.h>
int main(int argc, char* argv[])
{
TIFF *out = TIFFOpen(argv[1], "w");
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) 10);
TIFFClose(out);
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-ltiff", "-o", "test"
system "./test", "test.tif"
assert_match(/ImageWidth.*10/, shell_output("#{bin}/tiffdump test.tif"))
(testpath/"test_webp.c").write <<~C
#include <stdint.h>
#include <tiffio.h>
int main(int argc, char* argv[])
{
uint8_t rgb[16 * 16 * 3] = {0};
TIFF *out = TIFFOpen(argv[1], "w");
if (!out) return 1;
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, 16);
TIFFSetField(out, TIFFTAG_IMAGELENGTH, 16);
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3);
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_WEBP);
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, 16);
if (TIFFWriteEncodedStrip(out, 0, rgb, sizeof(rgb)) < 0) return 2;
TIFFClose(out);
return 0;
}
C
system ENV.cc, "test_webp.c", "-L#{lib}", "-ltiff", "-o", "test_webp"
system "./test_webp", "webp.tif"
assert_match "Compression Scheme: WEBP", shell_output("#{bin}/tiffinfo webp.tif")
end
end
+44
View File
@@ -0,0 +1,44 @@
class Libtirpc < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "8f7acea1ebea5151f3e7b1ca7a208d2d1a78493eab4ec9052ee8ba3dabbe0c3d"
sha256 cellar: :any, arm64_tahoe: "2cf5d4f383c13b44931d5d608d807a0f3c7f2d00e93021267b40326ebc4669c7"
sha256 cellar: :any_skip_relocation, x86_64_linux: "cdf824eba64ba33fe3f47809be7c1e62e3795ff20f62b1329e5fad45071cd934"
end
desc "Port of Sun's Transport-Independent RPC library to Linux"
homepage "https://sourceforge.net/projects/libtirpc/"
url "https://downloads.sourceforge.net/project/libtirpc/libtirpc/1.3.7/libtirpc-1.3.7.tar.bz2"
sha256 "b47d3ac19d3549e54a05d0019a6c400674da716123858cfdb6d3bdd70a66c702"
license "BSD-3-Clause"
compatibility_version 1
depends_on "krb5"
def install
ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" if OS.mac?
system "./configure", "--disable-silent-rules", *std_configure_args.reject { |s| s["--disable-debug"] }
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <stdio.h>
int main() {
XDR xdr;
char buf[256];
xdrmem_create(&xdr, buf, sizeof(buf), XDR_ENCODE);
int i = 42;
xdr_destroy(&xdr);
printf("xdr_int succeeded");
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-I#{include}/tirpc", "-ltirpc", "-o", "test"
system "./test"
end
end
+42
View File
@@ -0,0 +1,42 @@
class Libtommath < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "180de0f47bf4ce7ec3a513db509d368e148b42e50cf310666bf9c60a78cf778b"
sha256 cellar: :any, arm64_tahoe: "fe707123e6ec8488bae4013ce49404a63b00dc6c1c11b12202e25f53a62ef586"
sha256 cellar: :any_skip_relocation, x86_64_linux: "a7023ad5964a1ccfbbbe850cb0979ffa220a65177efd87e0bb751bcf5a3832ba"
end
desc "C library for number theoretic multiple-precision integers"
homepage "https://www.libtom.net/LibTomMath/"
url "https://github.com/libtom/libtommath/releases/download/v1.3.0/ltm-1.3.0.tar.xz"
sha256 "296272d93435991308eb73607600c034b558807a07e829e751142e65ccfa9d08"
license "Unlicense"
compatibility_version 1
head "https://github.com/libtom/libtommath.git", branch: "develop"
depends_on "libtool" => :build
# Fixes mp_set_double being missing on macOS.
# This is needed by some dependents in homebrew-core.
# NOTE: This patch has been merged upstream but we take a backport
# from a fork due to file name differences between 1.2.0 and master.
# Remove with the next version.
patch do
url "https://github.com/MoarVM/libtommath/commit/db0d387b808d557bd408a6a253c5bf3a688ef274.patch?full_index=1"
sha256 "e5eef1762dd3e92125e36034afa72552d77f066eaa19a0fd03cd4f1a656f9ab0"
type :unofficial
end
def install
ENV["PREFIX"] = prefix
system "make", "-f", "makefile.shared", "install"
system "make", "test"
pkgshare.install "test"
end
test do
system pkgshare/"test"
end
end
+75
View File
@@ -0,0 +1,75 @@
class Libtool < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "86f6495e08630095d0a0a4a8be76d8ba0350985a55ec13fb43a73f5473d2a410"
sha256 cellar: :any, arm64_tahoe: "719ae9c4597d0198ee77da6bb09dfcb6f68ae0302330f1a1e61503648e59fdd2"
sha256 cellar: :any, sequoia: "205e69efbbd83ca9ff421c98a0063bd20b64690b44248d0398bd6deb941cf81b"
sha256 cellar: :any, x86_64_linux: "6987dea502aa790323eeed36812983d07620595eff67992f1d6992f4de98e136"
end
desc "Generic library support script"
homepage "https://www.gnu.org/software/libtool/"
url "https://ftpmirror.gnu.org/gnu/libtool/libtool-2.6.2.tar.xz"
mirror "https://ftp.gnu.org/gnu/libtool/libtool-2.6.2.tar.xz"
sha256 "2ef1067c16c97db930fd740cc9bc3d3ba9a583804ae5ac42cc3e8719e49e191e"
license "GPL-2.0-or-later"
compatibility_version 1
depends_on "m4"
def install
ENV["M4"] = formula_opt_bin("m4")/"m4"
args = %w[
--disable-silent-rules
--enable-ltdl-install
]
args << "--program-prefix=g" if OS.mac?
system "./configure", *args, *std_configure_args
system "make", "install"
if OS.mac?
%w[libtool libtoolize].each do |prog|
(libexec/"gnubin").install_symlink bin/"g#{prog}" => prog
(libexec/"gnuman/man1").install_symlink man1/"g#{prog}.1" => "#{prog}.1"
end
(libexec/"gnubin").install_symlink "../gnuman" => "man"
else
bin.install_symlink "libtool" => "glibtool"
bin.install_symlink "libtoolize" => "glibtoolize"
# Avoid references to the Homebrew shims directory
inreplace bin/"libtool", Superenv.shims_path, "/usr/bin"
end
end
def caveats
on_macos do
<<~EOS
All commands have been installed with the prefix "g".
If you need to use these commands with their normal names, you
can add a "gnubin" directory to your PATH from your bashrc like:
PATH="#{opt_libexec}/gnubin:$PATH"
EOS
end
end
test do
system bin/"glibtool", "execute", File.executable?("/usr/bin/true") ? "/usr/bin/true" : "/bin/true"
(testpath/"hello.c").write <<~C
#include <stdio.h>
int main() { puts("Hello, world!"); return 0; }
C
system bin/"glibtool", "--mode=compile", "--tag=CC",
ENV.cc, "-c", "hello.c", "-o", "hello.o"
system bin/"glibtool", "--mode=link", "--tag=CC",
ENV.cc, "hello.o", "-o", "hello"
assert_match "Hello, world!", shell_output("./hello")
system bin/"glibtoolize", "--ltdl"
end
end
+51
View File
@@ -0,0 +1,51 @@
class Libunistring < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "463b68c92d30d845df10b1b137aa8e41a744f1ce2d2cab024dd26c766335b797"
sha256 cellar: :any, arm64_tahoe: "bae6d6d8dffc573c039a850a96e36f1b7fd846abd9ccada8260b7e888b5a3646"
sha256 cellar: :any_skip_relocation, x86_64_linux: "2491acf49407cf75d5f95a6296f2a1c0294646834022fdcad7e22471c0c9a6d4"
end
desc "C string library for manipulating Unicode strings"
homepage "https://www.gnu.org/software/libunistring/"
url "https://ftpmirror.gnu.org/gnu/libunistring/libunistring-1.4.2.tar.gz"
mirror "https://ftp.gnu.org/gnu/libunistring/libunistring-1.4.2.tar.gz"
mirror "http://ftp.gnu.org/gnu/libunistring/libunistring-1.4.2.tar.gz"
sha256 "e82664b170064e62331962126b259d452d53b227bb4a93ab20040d846fec01d8"
license any_of: ["GPL-2.0-or-later", "LGPL-3.0-or-later"]
compatibility_version 1
def install
# macOS iconv implementation is slightly broken since Sonoma.
# This is also why we skip `make check`.
# https://github.com/coreutils/gnulib/commit/bab130878fe57086921fa7024d328341758ed453
# https://savannah.gnu.org/bugs/?65686
use_iconv_workaround = OS.mac? && MacOS.version >= :sonoma
ENV["am_cv_func_iconv_works"] = "yes" if use_iconv_workaround
system "./configure", "--disable-silent-rules", *std_configure_args
system "make"
system "make", "check" unless use_iconv_workaround
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <uniname.h>
#include <unistdio.h>
#include <unistr.h>
#include <stdlib.h>
int main (void) {
uint32_t s[2] = {};
uint8_t buff[12] = {};
if (u32_uctomb (s, unicode_name_character ("BEER MUG"), sizeof s) != 1) abort();
if (u8_sprintf (buff, "%llU", s) != 4) abort();
printf ("%s\\n", buff);
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lunistring",
"-o", "test"
assert_equal "🍺", shell_output("./test").chomp
end
end
+51
View File
@@ -0,0 +1,51 @@
class Libusb < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "a8d271bd5d9e7065987960caa52a9130d7fe6321ff1bad751499e465d0413e38"
sha256 cellar: :any, arm64_tahoe: "184daaa6108f0a56eb72c58cc4124dbbb0b54a655632dffdf8334569d71e2a34"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6ad452e6a96823fcef03781dd0980147b91690d0bb34c97f44e57130de8878f6"
end
desc "Library for USB device access"
homepage "https://libusb.info/"
url "https://github.com/libusb/libusb/releases/download/v1.0.30/libusb-1.0.30.tar.bz2"
sha256 "fea36f34f9156400209595e300840767ab1a385ede1dc7ee893015aea9c6dbaf"
license "LGPL-2.1-or-later"
compatibility_version 1
livecheck do
url :stable
strategy :github_latest
end
head do
url "https://github.com/libusb/libusb.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
on_linux do
depends_on "systemd"
end
def install
args = %W[--disable-dependency-tracking --prefix=#{prefix}]
system "./autogen.sh" if build.head?
system "./configure", *args
system "make", "install"
(pkgshare/"examples").install Dir["examples/*"] - Dir["examples/Makefile*"]
end
test do
cp_r (pkgshare/"examples"), testpath
cd "examples" do
system ENV.cc, "listdevs.c", "-L#{lib}", "-I#{include}/libusb-1.0",
"-lusb-1.0", "-o", "test"
system "./test"
end
end
end
+53
View File
@@ -0,0 +1,53 @@
class Libuv < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "495b7322c4b9d0a2e5ceb96de24f5cc10d781e99179f94ca5e31d350547a235d"
sha256 cellar: :any, arm64_tahoe: "6e8478545dc49bd505a4fac61617cd15d8fec4475d2add5ea1cc92f7281818bf"
sha256 cellar: :any_skip_relocation, x86_64_linux: "ae4d9ac18871f6a4f4250be25da29e904755fb3067c8fb08d48fdc71311c623b"
end
desc "Multi-platform support library with a focus on asynchronous I/O"
homepage "https://libuv.org/"
url "https://dist.libuv.org/dist/v1.52.1/libuv-v1.52.1.tar.gz"
sha256 "66d511b9e6e334c0e62279eb234fbfb2b3110b1479c09b95b44c7afca8cff9e7"
license "MIT"
compatibility_version 1
head "https://github.com/libuv/libuv.git", branch: "v1.x"
livecheck do
url :head
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
depends_on "cmake" => :build
depends_on "sphinx-doc" => :build
def install
# This isn't yet handled by the make install process sadly.
system "make", "-C", "docs", "man"
man1.install "docs/build/man/libuv.1"
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~C
#include <uv.h>
#include <stdlib.h>
int main()
{
uv_loop_t* loop = malloc(sizeof *loop);
uv_loop_init(loop);
uv_loop_close(loop);
free(loop);
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-luv", "-o", "test"
system "./test"
end
end
+48
View File
@@ -0,0 +1,48 @@
class Libvmaf < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "dbd548d2ba16092e9c88b81cd91d7cbd1ecec84b9bb31e9c196fe3f6658ee6b3"
sha256 cellar: :any, arm64_tahoe: "bb9f00a9f9ef91d725d1fcd23205642cedf8557e132f1e38bb9d16a22086beaa"
sha256 cellar: :any, x86_64_linux: "bc908d0197dc5ae7de81cdbffb4164de779b26e13ed9fe50e583bc6ac194c3d1"
end
desc "Perceptual video quality assessment based on multi-method fusion"
homepage "https://github.com/Netflix/vmaf"
url "https://github.com/Netflix/vmaf/archive/refs/tags/v3.2.0.tar.gz"
sha256 "a28f93f3b4fa65601be324587072e32a6a704a304ba7b1aec9b70b3f709bc1dc"
license "BSD-2-Clause-Patent"
compatibility_version 1
depends_on "meson" => :build
depends_on "ninja" => :build
uses_from_macos "vim" => :build # needed for xxd
on_intel do
depends_on "nasm" => :build
end
def install
system "meson", "setup", "build", "libvmaf", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
pkgshare.install "model"
end
test do
(testpath/"test.c").write <<~C
#include <libvmaf/libvmaf.h>
int main() {
return 0;
}
C
flags = [
"-I#{HOMEBREW_PREFIX}/include/libvmaf",
"-L#{lib}",
]
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end
+67
View File
@@ -0,0 +1,67 @@
class Libvorbis < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "c28d1e0b461a4cf6f5aee72e664ac6f5f6f3efaab44f15b91924f08474cfafe1"
sha256 cellar: :any, arm64_tahoe: "99c0de7ff87f4648bb17acd0324a15563e975b7492dbd4f11fd656a8eb6b5622"
sha256 cellar: :any_skip_relocation, x86_64_linux: "41daf79ce53910061acbe1f63ca95f53b4149d3ebb2b97c2bb4d31845820f219"
end
desc "Vorbis general audio compression codec"
homepage "https://xiph.org/vorbis/"
url "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.tar.xz"
mirror "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.xz"
sha256 "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b"
license "BSD-3-Clause"
compatibility_version 1
livecheck do
url "https://ftp.osuosl.org/pub/xiph/releases/vorbis/?C=M&O=D"
regex(%r{href=(?:["']?|.*?/)libvorbis[._-]v?(\d+(?:\.\d+)+)\.t}i)
end
head do
url "https://gitlab.xiph.org/xiph/vorbis.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkgconf" => :build
depends_on "libogg"
resource("oggfile") do
url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg"
sha256 "f57b56d8aae4c847cf01224fb45293610d801cfdac43d932b5eeab1cd318182a"
end
def install
system "./autogen.sh" if build.head?
inreplace "configure", " -force_cpusubtype_ALL", ""
system "./configure", *std_configure_args
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <assert.h>
#include "vorbis/vorbisfile.h"
int main (void) {
OggVorbis_File vf;
assert (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) >= 0);
vorbis_info *vi = ov_info (&vf, -1);
printf("Bitstream is %d channel, %ldHz\\n", vi->channels, vi->rate);
printf("Encoded by: %s\\n", ov_comment(&vf,-1)->vendor);
return 0;
}
C
testpath.install resource("oggfile")
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lvorbisfile",
"-o", "test"
assert_match "2 channel, 44100Hz\nEncoded by: Lavf59.27.100",
shell_output("./test < Example.ogg")
end
end
+52
View File
@@ -0,0 +1,52 @@
class Libvpx < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "4f72f10109e23239ba65d4e7c1eb9086a4b2cd2875f784c8f9d79d713106675d"
sha256 cellar: :any, arm64_tahoe: "38d28c66d270e2d9b1826f16ec4721b6532a1c59c9ace22811cca3aac43b06ab"
sha256 cellar: :any_skip_relocation, x86_64_linux: "980eac19f80348cc5e5f27f06410a3d724b86727ec6f128355c7ee1dd4b3b09d"
end
desc "VP8/VP9 video codec"
homepage "https://www.webmproject.org/code/"
url "https://github.com/webmproject/libvpx/archive/refs/tags/v1.16.0.tar.gz"
sha256 "7a479a3c66b9f5d5542a4c6a1b7d3768a983b1e5c14c60a9396edc9b649e015c"
license "BSD-3-Clause"
compatibility_version 1
head "https://chromium.googlesource.com/webm/libvpx.git", branch: "main"
on_intel do
depends_on "nasm" => :build
end
def install
ENV.runtime_cpu_detection
# NOTE: `libvpx` will fail to build on new macOS versions before the
# `configure` and `build/make/configure.sh` files are updated to support
# the new target (e.g., `arm64-darwin24-gcc` for macOS 15). We [temporarily]
# patch these files to add the new target (until there is a new version).
# If we don't want to create a patch each year, we can consider using
# `--force-target=#{Hardware::CPU.arch}-darwin#{OS.kernel_version.major}-gcc`
# to force the target instead.
args = %W[
--prefix=#{prefix}
--disable-dependency-tracking
--disable-examples
--disable-unit-tests
--enable-pic
--enable-runtime-cpu-detect
--enable-shared
--enable-vp9-highbitdepth
]
args << "--target=#{Hardware::CPU.arch}-darwin#{OS.kernel_version.major}-gcc" if OS.mac?
mkdir "macbuild" do
system "../configure", *args
system "make", "install"
end
end
test do
system "ar", "-x", "#{lib}/libvpx.a"
end
end
+78
View File
@@ -0,0 +1,78 @@
class Libx11 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "1151df800309c229d23b41bdf27973d63619c423ce369164296af84b779482ce"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "cddc8c50c6140f0f64724e4f7c508fe7d26676b24cf7ae2b2527bf884a07a5ea"
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "d7b4f02a9f494cfe80106d3ec885233e06c1c34bbfdfff06a6548869d6844ab6"
end
desc "X.Org: Core X11 protocol client library"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libX11-1.8.13.tar.gz"
sha256 "acf0e7cd7541110e6330ecb539441a2d53061f386ec7be6906dfde0de2598470"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "util-macros" => :build
depends_on "xtrans" => :build
depends_on "libxcb"
depends_on "xorgproto"
def install
ENV.delete "LC_ALL"
ENV["LC_CTYPE"] = "C"
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
--enable-unix-transport
--enable-tcp-transport
--enable-ipv6
--enable-loadable-i18n
--enable-xthreads
--enable-specs=no
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <X11/Xlib.h>
#include <stdio.h>
int main() {
Display* disp = XOpenDisplay(NULL);
if (disp == NULL)
{
fprintf(stderr, "Unable to connect to display\\n");
return 0;
}
int screen_num = DefaultScreen(disp);
unsigned long background = BlackPixel(disp, screen_num);
unsigned long border = WhitePixel(disp, screen_num);
int width = 60, height = 40;
Window win = XCreateSimpleWindow(disp, DefaultRootWindow(disp), 0, 0, width, height, 2, border, background);
XSelectInput(disp, win, ButtonPressMask|StructureNotifyMask);
XMapWindow(disp, win); // display blank window
XGCValues values;
values.foreground = WhitePixel(disp, screen_num);
values.line_width = 1;
values.line_style = LineSolid;
GC pen = XCreateGC(disp, win, GCForeground|GCLineWidth|GCLineStyle, &values);
// draw two diagonal lines
XDrawLine(disp, win, pen, 0, 0, width, height);
XDrawLine(disp, win, pen, width, 0, 0, height);
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-lX11", "-o", "test", "-I#{include}"
system "./test"
end
end
+45
View File
@@ -0,0 +1,45 @@
class Libxau < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "e8a5fedbd9e5c49f10006171decc5b1e56c48fbd4267e7668f813e47c0da984f"
sha256 cellar: :any, arm64_tahoe: "503040606c5d29dd415f2c8dcba7e181d259e4cdff02d1d8bde4e9ea5244765a"
sha256 cellar: :any_skip_relocation, x86_64_linux: "eaab2aad3bf7abb8cf6f1b164cd6648731814a71b1b3cb1141055d48fa07914d"
end
desc "X.Org: A Sample Authorization Protocol for X"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXau-1.0.12.tar.xz"
sha256 "74d0e4dfa3d39ad8939e99bda37f5967aba528211076828464d2777d477fc0fb"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "util-macros" => :build
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/Xauth.h"
int main(int argc, char* argv[]) {
Xauth auth;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+97
View File
@@ -0,0 +1,97 @@
class Libxcb < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "cce8d9e12c3f0b2fdbffbb3f7ba02f7e25cf3fa495b3e759d34a6264599543b3"
sha256 cellar: :any, arm64_tahoe: "059edd054b17234abb0ce8a34dcbbd927e104445d09a3f5904ea82f7c5aa7ded"
sha256 cellar: :any_skip_relocation, x86_64_linux: "1ccb2f6e9f4feb73b3dbc56248554bc8ce30cb34771ed987eec1bd956f8563e2"
end
desc "X.Org: Interface to the X Window System protocol"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.17.0.tar.xz"
sha256 "599ebf9996710fea71622e6e184f3a8ad5b43d0e5fa8c4e407123c88a59a6d55"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "python@3.14" => :build # match version in `xcb-proto`
depends_on "xcb-proto" => :build
depends_on "libxau"
depends_on "libxdmcp"
def install
python3 = "python3.14"
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--enable-dri3
--enable-ge
--enable-xevie
--enable-xprint
--enable-selinux
--disable-silent-rules
--enable-devel-docs=no
--with-doxygen=no
PYTHON=#{python3}
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xcb/xcb.h"
int main() {
xcb_connection_t *connection;
xcb_atom_t *atoms;
xcb_intern_atom_cookie_t *cookies;
int count, i;
char **names;
char buf[100];
count = 200;
connection = xcb_connect(NULL, NULL);
atoms = (xcb_atom_t *) malloc(count * sizeof(atoms));
names = (char **) malloc(count * sizeof(char *));
for (i = 0; i < count; ++i) {
sprintf(buf, "NAME%d", i);
names[i] = strdup(buf);
memset(buf, 0, sizeof(buf));
}
cookies = (xcb_intern_atom_cookie_t *) malloc(count * sizeof(xcb_intern_atom_cookie_t));
for(i = 0; i < count; ++i) {
cookies[i] = xcb_intern_atom(connection, 0, strlen(names[i]), names[i]);
}
for(i = 0; i < count; ++i) {
xcb_intern_atom_reply_t *r;
r = xcb_intern_atom_reply(connection, cookies[i], 0);
if(r)
atoms[i] = r->atom;
free(r);
}
free(atoms);
free(cookies);
xcb_disconnect(connection);
return 0;
}
C
system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lxcb"
system "./test"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+67
View File
@@ -0,0 +1,67 @@
class Libxcrypt < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "04b6d0459d587d4137b8fdc9d7a711bf5df1405afae64997d4d8f6016df50e20"
sha256 cellar: :any, arm64_tahoe: "45b16874ed374eda84779a795aa32640f86759dd480f470567949b7639a8e3ee"
sha256 cellar: :any_skip_relocation, x86_64_linux: "9319e1e70e1e3e476e421956baaeebc0d7be9c3030897844a3c348fe4dd116a5"
end
desc "Extended crypt library for descrypt, md5crypt, bcrypt, and others"
homepage "https://github.com/besser82/libxcrypt"
url "https://github.com/besser82/libxcrypt/releases/download/v4.5.2/libxcrypt-4.5.2.tar.xz"
sha256 "71513a31c01a428bccd5367a32fd95f115d6dac50fb5b60c779d5c7942aec071"
license "LGPL-2.1-or-later"
compatibility_version 1
livecheck do
url :stable
strategy :github_latest
end
keg_only :provided_by_macos
link_overwrite "include/crypt.h"
link_overwrite "lib/libcrypt.so"
def install
system "./configure", "--disable-static",
"--disable-obsolete-api",
"--disable-xcrypt-compat-files",
"--disable-failure-tokens",
"--disable-valgrind",
*std_configure_args
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <crypt.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
int main()
{
char *hash = crypt("abc", "$2b$05$abcdefghijklmnopqrstuu");
if (errno) {
fprintf(stderr, "Received error: %s", strerror(errno));
return errno;
}
if (hash == NULL) {
fprintf(stderr, "Hash is NULL");
return -1;
}
if (strcmp(hash, "$2b$05$abcdefghijklmnopqrstuuRWUgMyyCUnsDr8evYotXg5ZXVF/HhzS")) {
fprintf(stderr, "Unexpected hash output");
return -1;
}
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcrypt", "-o", "test"
system "./test"
end
end
+47
View File
@@ -0,0 +1,47 @@
class Libxcursor < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "8e5c2f6e0290a1308db48d7588e0ce6a831cb56011491470f3592e182db4f3d2"
sha256 cellar: :any, arm64_tahoe: "e25282b8f94e56dee8e9e3ddceccab288e744db1cbad429fb89afe34e273aebd"
sha256 cellar: :any_skip_relocation, x86_64_linux: "02e5f01e4940638fbcce577f05ac3bc57f87bf272959e286a323f6fe3c2fc86d"
end
desc "X.Org: X Window System Cursor management library"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXcursor-1.2.3.tar.xz"
sha256 "fde9402dd4cfe79da71e2d96bb980afc5e6ff4f8a7d74c159e1966afb2b2c2c0"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "util-macros" => :build
depends_on "libx11"
depends_on "libxfixes"
depends_on "libxrender"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/Xcursor/Xcursor.h"
int main(int argc, char* argv[]) {
XcursorFileHeader header;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+45
View File
@@ -0,0 +1,45 @@
class Libxdmcp < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "b09a915dae5b45371a86f20a4ccce13c16c7a8eadc843b665e91bc5b2d2143ce"
sha256 cellar: :any, arm64_tahoe: "34ca0da1c319eeea93ce31badfb5c29c8876cea644754279e93f6cf032ab5cb1"
sha256 cellar: :any_skip_relocation, x86_64_linux: "d8b9dc2969e85e26c6d426d8865244e1416d73f7f408c9f5404a2a614a62e7d4"
end
desc "X.Org: X Display Manager Control Protocol library"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXdmcp-1.1.5.tar.xz"
sha256 "d8a5222828c3adab70adf69a5583f1d32eb5ece04304f7f8392b6a353aa2228c"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
--enable-docs=no
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/Xdmcp.h"
int main(int argc, char* argv[]) {
xdmOpCode code;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+46
View File
@@ -0,0 +1,46 @@
class Libxext < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "71225436c92940977248a28433951e8e26732d3a9eed954ce1999a770f93f98e"
sha256 cellar: :any, arm64_tahoe: "7cf2c8903d82f28e0e854c8d6d3dff46ea98c5512724e5349af40f1edca88e9c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7bc771ee68f57189ea941e83f2f5ff18ac94878ae35c30aed8868a906834d148"
end
desc "X.Org: Library for common extensions to the X11 protocol"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXext-1.3.7.tar.gz"
sha256 "6564608dc3b816b0cfddf0c7ddc62bc579055dd70b2f28113a618df2acb64189"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "libx11"
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
--enable-specs=no
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/extensions/shape.h"
int main(int argc, char* argv[]) {
XShapeEvent event;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+45
View File
@@ -0,0 +1,45 @@
class Libxfixes < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "20bde00fb1c5b48ad54118acc702fd226efd28585e058c7ecdbff8ce8b6fb34a"
sha256 cellar: :any, arm64_tahoe: "18951c8c4a266fc614d3d17798983f314230614d42184a5169d053a5d228c85c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6f33e8a88f01a7afb5a784155e4c81051fea75570635b89ddb4b3b48d2825acf"
end
desc "X.Org: Header files for the XFIXES extension"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXfixes-6.0.2.tar.xz"
sha256 "39f115d72d9c5f8111e4684164d3d68cc1fd21f9b27ff2401b08fddfc0f409ba"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "libx11"
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/extensions/Xfixes.h"
int main(int argc, char* argv[]) {
XFixesSelectionNotifyEvent event;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+51
View File
@@ -0,0 +1,51 @@
class Libxi < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "b8267eff95643d75f879e222a0dee27f938bf9eac0ebd93d39abfd557a05e0e5"
sha256 cellar: :any, arm64_tahoe: "0caffca513b30f308fa1bd54682319f140ea0543397c3f61046f64a39ebcbe85"
sha256 cellar: :any_skip_relocation, x86_64_linux: "5128c5f8ad475f0115e02bd2273029d93ef90ab63dfc0bfd414cf2eb01072c89"
end
desc "X.Org: Library for the X Input Extension"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXi-1.8.3.tar.xz"
sha256 "7ad60056f01af4f786cfe93b3a7707447711626fc8da2637bec71a90409babe5"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "libx11"
depends_on "libxext"
depends_on "libxfixes"
depends_on "xorgproto"
conflicts_with "libslax", because: "both install `libxi.a`"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
--enable-docs=no
--enable-specs=no
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/extensions/XInput.h"
int main(int argc, char* argv[]) {
XDeviceButtonEvent event;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+48
View File
@@ -0,0 +1,48 @@
class Libxrandr < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "c332c9afd47eff9b36b52ab2f318e020d140179bff663d8a224897b9782ace43"
sha256 cellar: :any, arm64_tahoe: "36b7a9f0da5208be5b9b39138d0e0eba832e843d40c0f2e69f6d09b495741ddf"
sha256 cellar: :any_skip_relocation, x86_64_linux: "bed6ab672a51a09e7b6da5d5d824dba33704ce745889d4eebf4917aa009a3b02"
end
desc "X.Org: X Resize, Rotate and Reflection extension library"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXrandr-1.5.5.tar.xz"
sha256 "72b922c2e765434e9e9f0960148070bd4504b288263e2868a4ccce1b7cf2767a"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "libx11"
depends_on "libxext"
depends_on "libxrender"
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/Xlib.h"
#include "X11/extensions/Xrandr.h"
int main(int argc, char* argv[]) {
XRRScreenSize size;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+46
View File
@@ -0,0 +1,46 @@
class Libxrender < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "edcb8884f9d33219d276051be3b5ad64f390cdf3abe9794d9a0050c02895c3a7"
sha256 cellar: :any, arm64_tahoe: "6405639931b8924b009e16163b7d99f50a10274189cb7f7eba12a4585d1ef255"
sha256 cellar: :any_skip_relocation, x86_64_linux: "44bddde0557643e137ddd5aa00d60bf220527719d2cb9263e397098dee2664c5"
end
desc "X.Org: Library for the Render Extension to the X11 protocol"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXrender-0.9.12.tar.gz"
sha256 "0fff64125819c02d1102b6236f3d7d861a07b5216d8eea336c3811d31494ecf7"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "libx11"
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/Xlib.h"
#include "X11/extensions/Xrender.h"
int main(int argc, char* argv[]) {
XRenderColor color;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+45
View File
@@ -0,0 +1,45 @@
class Libxscrnsaver < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "464b8c95cf2d758476e47dc6f774c6504b84b0265cd458d8fd33619f1386721c"
sha256 cellar: :any, arm64_tahoe: "6097790285805d792860cbcf0bb663c76b58d51a57d505346b179e52e2f7ce7c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "592204a7c4aa929e51c550213e52af404a62e1e83075d48daa93e8efb9a88e36"
end
desc "X.Org: X11 Screen Saver extension client library"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXScrnSaver-1.2.5.tar.xz"
sha256 "5057365f847253e0e275871441e10ff7846c8322a5d88e1e187d326de1cd8d00"
license "MIT"
depends_on "pkgconf" => :build
depends_on "libx11"
depends_on "libxext"
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/extensions/scrnsaver.h"
int main(int argc, char* argv[]) {
XScreenSaverNotifyEvent event;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+51
View File
@@ -0,0 +1,51 @@
class Libxtst < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "28d4af1505473aed939328ace91056e111623d0c60b817d0b98dc3e00472dc4d"
sha256 cellar: :any, arm64_tahoe: "3695416abec8f1da23fddcc232bdc5e9522f822f67c7a0c69f522f54c8653617"
sha256 cellar: :any_skip_relocation, x86_64_linux: "51cacd4573d0d4e1cc33c83574cf4838d93de28276a9cd3c69496da8a4466771"
end
desc "X.Org: Client API for the XTEST & RECORD extensions"
homepage "https://www.x.org/"
url "https://xorg.freedesktop.org/archive/individual/lib/libXtst-1.2.5.tar.gz"
sha256 "244ba6e1c5ffa44f1ba251affdfa984d55d99c94bb925a342657e5e7aaf6d39c"
license "MIT"
compatibility_version 1
depends_on "pkgconf" => :build
depends_on "util-macros" => :build
depends_on "libx11"
depends_on "libxext"
depends_on "libxi"
depends_on "xorgproto"
def install
args = %W[
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-silent-rules
--enable-specs=no
]
system "./configure", *args, *std_configure_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include "X11/Xlib.h"
#include "X11/extensions/record.h"
int main(int argc, char* argv[]) {
XRecordRange8 *range;
return 0;
}
C
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end
+47
View File
@@ -0,0 +1,47 @@
class Libyaml < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "0ec9bf8082245c008803b42dcae3e6a0c8cd7a67aed589d9b6482b115c0a543b"
sha256 cellar: :any, arm64_tahoe: "5cd5a1875da18599e25283465b2fb8735eb8717ee7158ef17f8f4260205404f2"
sha256 cellar: :any_skip_relocation, x86_64_linux: "354677a745b6c62109e792ddbd0cbdaf9e6a471d84fdbde3a7d9bae36d832da8"
end
desc "YAML Parser"
homepage "https://github.com/yaml/libyaml"
url "https://github.com/yaml/libyaml/archive/refs/tags/0.2.5.tar.gz"
sha256 "fa240dbf262be053f3898006d502d514936c818e422afdcf33921c63bed9bf2e"
license "MIT"
compatibility_version 1
livecheck do
url :stable
strategy :github_latest
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
def install
system "./bootstrap"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <yaml.h>
int main()
{
yaml_parser_t parser;
yaml_parser_initialize(&parser);
yaml_parser_delete(&parser);
return 0;
}
C
system ENV.cc, "test.c", "-L#{lib}", "-lyaml", "-o", "test"
system "./test"
end
end
+44
View File
@@ -0,0 +1,44 @@
class LittleCms2 < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "be9135a585a60f84ec283d97e7a89bec9338e525679b637b171092338c5c28a0"
sha256 cellar: :any, arm64_tahoe: "09a863e549255993de3f73d705328b1202417dff324edd30c703b77fcee09b01"
sha256 cellar: :any_skip_relocation, x86_64_linux: "8df57239d5b52a119832c5b042c5a9fda56caf1692ac1377d517cb6bfc578ed8"
end
desc "Color management engine supporting ICC profiles"
homepage "https://www.littlecms.com/"
# Ensure release is announced at https://www.littlecms.com/categories/releases/
# (or https://www.littlecms.com/blog/)
url "https://downloads.sourceforge.net/project/lcms/lcms/2.19/lcms2-2.19.tar.gz"
sha256 "49e7e134e4299733dd0eda434fa468997a28ab3d33fa397c642b03644f552216"
license "MIT"
version_scheme 1
compatibility_version 1
# The Little CMS website has been redesigned and there's no longer a
# "Download" page we can check for releases. As of writing this, checking the
# "Releases" blog posts seems to be our best option and we just have to hope
# that the post URLs, headings, etc. maintain a consistent format.
livecheck do
url "https://www.littlecms.com/categories/releases/"
regex(/Little\s*CMS\s+v?(\d+(?:\.\d+)+)\s+released/im)
end
depends_on "jpeg-turbo"
depends_on "libtiff"
def install
system "./configure", *std_configure_args
system "make", "install"
# Avoid rebuilding dependents that hard-code the prefix.
inreplace lib/"pkgconfig/lcms2.pc", prefix, opt_prefix
end
test do
system bin/"jpgicc", test_fixtures("test.jpg"), "out.jpg"
assert_path_exists testpath/"out.jpg"
end
end
+59
View File
@@ -0,0 +1,59 @@
class Llhttp < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: :any, arm64_sequoia: "661a11b740692ce17efa18e0d26d4c77e6e39bcdf0cc0ca53bd9a53ab4a4e71d"
sha256 cellar: :any, arm64_tahoe: "0a3866a86832c768383c04809baccccfa1293a520d3d13654d7c051f12c02c80"
sha256 cellar: :any, x86_64_linux: "064d963ed771884697010f5bee50c78a8f82289cc5b0ff5793c001e5cd7acd27"
end
desc "Port of http_parser to llparse"
homepage "https://llhttp.org/"
url "https://github.com/nodejs/llhttp/archive/refs/tags/release/v9.4.3.tar.gz"
sha256 "1eb813c7437b31a87496a1cd3ed79f00746720f5e7e29c79b42c02cb69f36c39"
license "MIT"
compatibility_version 2
depends_on "cmake" => :build
def install
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
(testpath/"test.c").write <<~'C'
#include <stdio.h>
#include <string.h>
#include <llhttp.h>
int handle_on_message_complete(llhttp_t* parser) {
fprintf(stdout, "Message completed!\n");
return 0;
}
int main(void) {
llhttp_t parser;
llhttp_settings_t settings;
llhttp_settings_init(&settings);
settings.on_message_complete = handle_on_message_complete;
llhttp_init(&parser, HTTP_BOTH, &settings);
const char* request = "GET / HTTP/1.1\r\n\r\n";
int request_len = strlen(request);
enum llhttp_errno err = llhttp_execute(&parser, request, request_len);
if (err == HPE_OK) {
fprintf(stdout, "Successfully parsed!\n");
return 0;
} else {
fprintf(stderr, "Parse error: %s %s\n", llhttp_errno_name(err), llhttp_get_error_reason(&parser));
return 1;
}
}
C
system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lllhttp"
assert_equal "Message completed!\nSuccessfully parsed!\n", shell_output("./test")
end
end
+829
View File
@@ -0,0 +1,829 @@
class Llvm < Formula
bottle do
root_url "https://homebrew.hyprnet/bottles"
sha256 cellar: "/opt/homebrew/Cellar", arm64_sequoia: "5819a7751ca18dd6dd54e182464de9d3c911ccf13900ed94a631ce64e414d710"
sha256 cellar: "/opt/homebrew/Cellar", arm64_tahoe: "d83ee9d03be9f9a5e5795b3ada6b67847735615f4721d19f424dce3632075d19"
sha256 cellar: :any, x86_64_linux: "69ab817bad2fd10427709b74e13699b5ca81a190be9b740d4e903635fd878a10"
end
desc "Next-gen compiler infrastructure"
homepage "https://llvm.org/"
# The LLVM Project is under the Apache License v2.0 with LLVM Exceptions
license "Apache-2.0" => { with: "LLVM-exception" }
compatibility_version 1
head "https://github.com/llvm/llvm-project.git", branch: "main"
stable do
url "https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz"
sha256 "922f1817a0df7b1489272d18134ee0087a8b068828f87ac63b9861b1a9965888"
# Fix triple config loading for clang-cl
patch do
url "https://github.com/llvm/llvm-project/compare/1381ad497b9a6d3da630cbef53cbfa9ddf117bb6...40a8c7c0ff3f688b690e4c74db734de67f0f89e9.diff"
sha256 "f6dafd762737eb79761ab7ef814a9fc802ec4bb8d20f46691f07178053b0eb36"
type :unofficial
resolves "https://github.com/llvm/llvm-project/pull/111397"
end
end
livecheck do
url :stable
regex(/^llvmorg[._-]v?(\d+(?:\.\d+)+)$/i)
end
keg_only :provided_by_macos
# https://llvm.org/docs/GettingStarted.html#requirement
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "swig" => :build # for lldb
depends_on "python@3.14"
depends_on "xz" # for lldb
depends_on "zstd"
uses_from_macos "libedit"
uses_from_macos "libffi"
uses_from_macos "ncurses" # for lldb
# Z3 needs C++20 std::format which is only available in Xcode 15.3 or later.
# To avoid a dependency loop, we disable Z3 support on older macOS.
on_system :linux, macos: :sonoma_or_newer do
depends_on "z3"
end
on_linux do
depends_on "binutils" => :build # needed for LLVMgold plugin
depends_on "pkgconf" => :build
depends_on "zlib-ng-compat"
end
def python3
"python3.14"
end
def clang_config_file_dir
etc/"clang"
end
def install
# The clang bindings need a little help finding keg-only libclang.
inreplace "clang/bindings/python/clang/cindex.py",
"= os.environ.get(\"LIBCLANG_LIBRARY_PATH\")",
"= os.environ.get(\"LIBCLANG_LIBRARY_PATH\", \"#{lib}\")"
projects = %w[
clang
clang-tools-extra
mlir
polly
]
runtimes = %w[
compiler-rt
libcxx
libcxxabi
libunwind
]
unless versioned_formula?
enable_z3 = deps.map(&:name).include?("z3")
projects << "lldb"
if OS.mac?
runtimes << "openmp"
else
projects << "openmp"
end
end
python_versions = Formula.names
.select { |name| name.start_with? "python@" }
.map { |py| py.delete_prefix("python@") }
site_packages = Language::Python.site_packages(python3).delete_prefix("lib/")
# compiler-rt has some iOS simulator features that require i386 symbols
# I'm assuming the rest of clang needs support too for 32-bit compilation
# to work correctly, but if not, perhaps universal binaries could be
# limited to compiler-rt. llvm makes this somewhat easier because compiler-rt
# can almost be treated as an entirely different build from llvm.
ENV.permit_arch_flags
# we install the lldb Python module into libexec to prevent users from
# accidentally importing it with a non-Homebrew Python or a Homebrew Python
# in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html
args = %W[
-DLLVM_ENABLE_PROJECTS=#{projects.join(";")}
-DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")}
-DLLVM_POLLY_LINK_INTO_TOOLS=ON
-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON
-DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_ENABLE_EH=OFF
-DLLVM_ENABLE_FFI=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_INCLUDE_DOCS=OFF
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_INSTALL_UTILS=ON
-DLLVM_ENABLE_Z3_SOLVER=#{enable_z3 ? "ON" : "OFF"}
-DLLVM_OPTIMIZED_TABLEGEN=ON
-DLLVM_TARGETS_TO_BUILD=all
-DLLVM_USE_RELATIVE_PATHS_IN_FILES=ON
-DLLVM_SOURCE_PREFIX=.
-DLLDB_USE_SYSTEM_DEBUGSERVER=ON
-DLLDB_ENABLE_PYTHON=ON
-DLLDB_ENABLE_LUA=OFF
-DLLDB_ENABLE_LZMA=ON
-DLLDB_PYTHON_RELATIVE_PATH=libexec/#{site_packages}
-DLIBOMP_INSTALL_ALIASES=OFF
-DLIBCXX_INSTALL_MODULES=ON
-DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")}
-DLLVM_CREATE_XCODE_TOOLCHAIN=OFF
-DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF
-DCLANG_CONFIG_FILE_SYSTEM_DIR=../etc/clang
-DCLANG_CONFIG_FILE_USER_DIR=~/.config/clang
]
if tap.present?
args += %W[
-DPACKAGE_VENDOR=#{tap.user}
-DBUG_REPORT_URL=#{tap.issues_url}
]
args << "-DCLANG_VENDOR_UTI=sh.brew.clang" if tap.official?
end
runtimes_cmake_args = []
builtins_cmake_args = []
if OS.mac?
macos_sdk = MacOS.sdk_path
args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi"
args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib"
libcxx_install_libdir = lib/"c++"
libunwind_install_libdir = lib/"unwind"
libcxx_rpaths = [loader_path, rpath(source: libcxx_install_libdir, target: libunwind_install_libdir)]
args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON"
args << "-DLLVM_ENABLE_LIBCXX=ON"
args << "-DLIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS=ON"
args << "-DLIBCXX_PSTL_BACKEND=libdispatch"
args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}"
args << "-DLIBUNWIND_INSTALL_LIBRARY_DIR=#{libunwind_install_libdir}"
args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}"
runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{libcxx_rpaths.join("|")}"
# Disable builds for OSes not supported by the CLT SDK.
clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" }
builtins_cmake_args += clt_sdk_support_flags
else
args << "-DFFI_INCLUDE_DIR=#{formula_opt_include("libffi")}"
args << "-DFFI_LIBRARY_DIR=#{formula_opt_lib("libffi")}"
# Disable `libxml2` which isn't very useful.
args << "-DLLVM_ENABLE_LIBXML2=OFF"
args << "-DLLVM_ENABLE_LIBCXX=OFF"
args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++"
# Enable llvm gold plugin for LTO
args << "-DLLVM_BINUTILS_INCDIR=#{formula_opt_include("binutils")}"
# Parts of Polly fail to correctly build with PIC when being used for DSOs.
args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
runtimes_cmake_args += %w[
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
-DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON
-DLIBCXX_USE_COMPILER_RT=ON
-DLIBCXX_HAS_ATOMIC_LIB=OFF
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON
-DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF
-DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON
-DLIBCXXABI_USE_COMPILER_RT=ON
-DLIBCXXABI_USE_LLVM_UNWINDER=ON
-DLIBUNWIND_USE_COMPILER_RT=ON
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON
-DCOMPILER_RT_USE_LLVM_UNWINDER=ON
-DSANITIZER_CXX_ABI=libc++
-DSANITIZER_TEST_CXX=libc++
]
# Prevent compiler-rt from building i386 targets, as this is not portable.
builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
end
# Skip the PGO build on HEAD installs, non-bottle source builds, or versioned formulae.
# Also skip Intel macOS which is slow and will be reduced to Tier 3 in Sept 2026.
# TODO: Fix Linux PGO build which is currently dead code
pgo_build = build.stable? && build.bottle? && OS.mac? && Hardware::CPU.arm? && !versioned_formula?
lto_build = pgo_build && OS.mac?
if ENV.cflags.present?
args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" unless pgo_build
runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}"
builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}"
end
if ENV.cxxflags.present?
args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" unless pgo_build
runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}"
builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}"
end
args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present?
args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present?
llvmpath = buildpath/"llvm"
if pgo_build
# We build LLVM a few times first for optimisations. See
# https://github.com/Homebrew/homebrew-core/issues/77975
# PGO build adapted from:
# https://llvm.org/docs/HowToBuildWithPGO.html#building-clang-with-pgo
# https://github.com/llvm/llvm-project/blob/33ba8bd2/llvm/utils/collect_and_build_with_pgo.py
# https://github.com/facebookincubator/BOLT/blob/01f471e7/docs/OptimizingClang.md
# We build the basic parts of a toolchain to profile.
# The extra targets on macOS are part of a default Compiler-RT build.
extra_args = [
"-DLLVM_TARGETS_TO_BUILD=Native#{";AArch64;ARM;X86" if OS.mac?}",
"-DLLVM_ENABLE_PROJECTS=clang;lld",
"-DLLVM_ENABLE_RUNTIMES=compiler-rt",
]
# Our stage1 compiler includes the minimum necessary to bootstrap.
# `llvm-profdata` is needed for profile data pre-processing, and
# `compiler-rt` to consume profile data.
stage1_targets = ["clang", "llvm-profdata", "compiler-rt"]
stage1_targets += if OS.mac?
extra_args << "-DLLVM_ENABLE_LIBCXX=ON"
extra_args += clt_sdk_support_flags
args << "-DLLVM_ENABLE_LTO=Thin" if lto_build
# LTO creates object files not recognised by Apple libtool.
args << "-DCMAKE_LIBTOOL=#{llvmpath}/stage1/bin/llvm-libtool-darwin"
# These are needed to enable LTO.
["llvm-libtool-darwin", "LTO"]
else
# Make sure CMake doesn't try to pass C++-only flags to C compiler.
extra_args << "-DCMAKE_C_COMPILER=#{ENV.cc}"
extra_args << "-DCMAKE_CXX_COMPILER=#{ENV.cxx}"
# We use this as the linker on Linux to control RPATH.
["lld"]
end
cflags = ENV.cflags&.split || []
cxxflags = ENV.cxxflags&.split || []
extra_args << "-DCMAKE_C_FLAGS=#{cflags.join(" ")}" unless cflags.empty?
extra_args << "-DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")}" unless cxxflags.empty?
# First, build a stage1 compiler. It might be possible to skip this step on macOS
# and use system Clang instead, but this stage does not take too long, and we want
# to avoid incompatibilities from generating profile data with a newer Clang than
# the one we consume the data with.
mkdir llvmpath/"stage1" do
system "cmake", "-G", "Ninja", "..", *extra_args, *std_cmake_args
system "cmake", "--build", ".", "--target", *stage1_targets
end
# Barring the stage where we generate the profile data, there is no benefit to
# rebuilding these.
extra_args << "-DCLANG_TABLEGEN=#{llvmpath}/stage1/bin/clang-tblgen"
extra_args << "-DLLVM_TABLEGEN=#{llvmpath}/stage1/bin/llvm-tblgen"
if OS.linux?
# Make sure brewed glibc will be used if it is installed.
linux_library_paths = [
formula_opt_lib("glibc"),
HOMEBREW_PREFIX/"lib",
]
linux_linker_flags = linux_library_paths.map { |path| "-L#{path} -Wl,-rpath,#{path}" }
# Add opt_libs for dependencies to RPATH.
linux_linker_flags += deps.map(&:to_formula).map { |dep| "-Wl,-rpath,#{dep.opt_lib}" }
[args, extra_args].each do |arg_array|
# Add the linker paths to the arguments passed to the temporary compilers and installed toolchain.
arg_array << "-DCMAKE_EXE_LINKER_FLAGS=#{linux_linker_flags.join(" ")}"
arg_array << "-DCMAKE_MODULE_LINKER_FLAGS=#{linux_linker_flags.join(" ")}"
arg_array << "-DCMAKE_SHARED_LINKER_FLAGS=#{linux_linker_flags.join(" ")}"
# Use stage1 lld instead of ld shim so that we can control RPATH.
arg_array << "-DLLVM_USE_LINKER=lld"
end
# We also need to make sure we can find headers for other formulae on Linux.
linux_include_paths = [
HOMEBREW_PREFIX/"include",
]
linux_include_paths.each { |path| cxxflags << "-isystem#{path}" }
# Unset CMAKE_C_COMPILER and CMAKE_CXX_COMPILER so we can set them below.
extra_args.reject! { |s| s[/CMAKE_C(XX)?_COMPILER/] }
extra_args.reject! { |s| s["CMAKE_CXX_FLAGS"] }
extra_args << "-DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")}"
end
# Next, build an instrumented stage2 compiler
mkdir llvmpath/"stage2" do
# LLVM Profile runs out of static counters
# https://reviews.llvm.org/D92669, https://reviews.llvm.org/D93281
# Without this, the build produces many warnings of the form
# LLVM Profile Warning: Unable to track new values: Running out of static counters.
instrumented_cflags = cflags + %w[-Xclang -mllvm -Xclang -vp-counters-per-site=6]
instrumented_cxxflags = cxxflags + %w[-Xclang -mllvm -Xclang -vp-counters-per-site=6]
instrumented_extra_args = extra_args.reject { |s| s[/CMAKE_C(XX)?_FLAGS/] }
system "cmake", "-G", "Ninja", "..",
"-DCMAKE_C_COMPILER=#{llvmpath}/stage1/bin/clang",
"-DCMAKE_CXX_COMPILER=#{llvmpath}/stage1/bin/clang++",
"-DLLVM_BUILD_INSTRUMENTED=IR",
"-DLLVM_BUILD_RUNTIME=NO",
"-DCMAKE_C_FLAGS=#{instrumented_cflags.join(" ")}",
"-DCMAKE_CXX_FLAGS=#{instrumented_cxxflags.join(" ")}",
*instrumented_extra_args, *std_cmake_args
system "cmake", "--build", ".", "--target", "clang", "lld", "runtimes"
# We run some `check-*` targets to increase profiling
# coverage. These do not need to succeed.
# NOTE: If using `Unix Makefiles` generator, `-k 0` needs to replaced with `--keep-going`.
begin
system "cmake", "--build", ".", "--target", "check-clang", "check-llvm", "--", "-k", "0"
rescue BuildError
nil
end
end
# Then, generate the profile data
mkdir llvmpath/"stage2-profdata" do
system "cmake", "-G", "Ninja", "..",
"-DCMAKE_C_COMPILER=#{llvmpath}/stage2/bin/clang",
"-DCMAKE_CXX_COMPILER=#{llvmpath}/stage2/bin/clang++",
"-DLLVM_BUILD_RUNTIMES=OFF",
*extra_args.reject { |s| s["TABLEGEN"] },
*std_cmake_args
# This build is for profiling, so it is safe to ignore errors.
# NOTE: If using `Unix Makefiles` generator, `-k 0` needs to replaced with `--keep-going`.
begin
system "cmake", "--build", ".", "--", "-k", "0"
rescue BuildError
nil
end
end
# Merge the generated profile data
profpath = llvmpath/"stage2/profiles"
pgo_profile = profpath/"pgo_profile.prof"
system llvmpath/"stage1/bin/llvm-profdata", "merge", "-output=#{pgo_profile}", *profpath.glob("*.profraw")
# Make sure to build with our profiled compiler and use the profile data
args << "-DCMAKE_C_COMPILER=#{llvmpath}/stage1/bin/clang"
args << "-DCMAKE_CXX_COMPILER=#{llvmpath}/stage1/bin/clang++"
args << "-DLLVM_PROFDATA_FILE=#{pgo_profile}"
# `llvm-tblgen` is an install target, so let's build that.
args << "-DCLANG_TABLEGEN=#{llvmpath}/stage1/bin/clang-tblgen"
# Silence some warnings
cflags << "-Wno-backend-plugin"
cxxflags << "-Wno-backend-plugin"
args << "-DCMAKE_C_FLAGS=#{cflags.join(" ")}"
args << "-DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")}"
end
# Now, we can build.
mkdir llvmpath/"build" do
system "cmake", "-G", "Ninja", "..", *(std_cmake_args + args)
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
clang_config_file_dir.mkpath
touch clang_config_file_dir/".keepme"
(prefix/"etc").install_symlink clang_config_file_dir
if OS.mac?
# Get the version from `llvm-config` to get the correct HEAD or RC version too.
llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip
soversion = Version.new(llvm_version).major.to_s
soversion << "git" if llvm_version.end_with?("git")
if (match = llvm_version.match(/-rc\d*$/))
soversion << match[0]
end
# Install versioned symlink, or else `llvm-config` doesn't work properly
lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib"
# Install Xcode toolchain. See:
# https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt
# We do this manually in order to avoid:
# 1. installing duplicates of files in the prefix
# 2. requiring an existing Xcode installation
xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain"
system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist"
system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist"
xctoolchain.install "Info.plist"
(xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share]
# Install a major-versioned symlink that can be used across minor/patch version upgrades.
xctoolchain.parent.install_symlink xctoolchain.basename.to_s => "LLVM#{soversion}.xctoolchain"
# Write config files for each macOS major version so that this works across OS upgrades.
MacOSVersion::SYMBOLS.each_value do |v|
macos_version = MacOSVersion.new(v)
write_config_files(macos_version, MacOSVersion.kernel_major_version(macos_version), Hardware::CPU.arch)
end
# Also write an unversioned config file as fallback
write_config_files("", "", Hardware::CPU.arch)
end
# Install Vim plugins
%w[ftdetect ftplugin indent syntax].each do |dir|
(share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim")
end
# Install Emacs modes
elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el")
return unless lto_build
# Convert LTO-generated bitcode in our static archives to MachO. Adapted from Fedora:
# https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/brp-llvm-compile-lto-elf
lib.glob("*.a").each do |static_archive|
mktemp do
system bin/"llvm-ar", "x", static_archive
rebuilt_files = []
Pathname.glob("*.o").each do |bc_file|
file_type = Utils.safe_popen_read("file", "--brief", bc_file)
next unless file_type.match?(/^LLVM (IR )?bitcode/)
rebuilt_files << bc_file
system bin/"clang", "-fno-lto", "-Wno-unused-command-line-argument",
"-x", "ir", bc_file, "-c", "-o", bc_file
end
system bin/"llvm-ar", "r", static_archive, *rebuilt_files if rebuilt_files.present?
end
end
end
# We use the extra layer of indirection in `arch` because the FormulaAudit/OnSystemConditionals
# doesn't want to let us use `Hardware::CPU.arch` outside of `install` or `post_install` blocks.
def write_config_files(macos_version, kernel_version, arch)
require "utils/clang"
Utils::Clang.write_system_config_files(
config_dir: clang_config_file_dir,
macos_version:,
kernel_version:,
arch:,
)
end
post_install_steps do
configure_clang_system
end
def caveats
s = <<~EOS
CLANG_CONFIG_FILE_SYSTEM_DIR: #{clang_config_file_dir}
CLANG_CONFIG_FILE_USER_DIR: ~/.config/clang
LLD is now provided in a separate formula:
brew install lld
EOS
on_macos do
s += <<~EOS
Using `clang`, `clang++`, etc., requires a CLT installation at `/Library/Developer/CommandLineTools`.
If you don't want to install the CLT, you can write appropriate configuration files pointing to your
SDK at ~/.config/clang.
To use the bundled libunwind please use the following LDFLAGS:
LDFLAGS="-L#{opt_lib}/unwind -lunwind"
To use the bundled libc++ please use the following LDFLAGS:
LDFLAGS="-L#{opt_lib}/c++ -L#{opt_lib}/unwind -lunwind"
Features newer than system libc++ will require the following define to enable
(support for this may be removed in a future major LLVM release):
CPPFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY"
NOTE: You probably want to use the libunwind and libc++ provided by macOS unless you know what you're doing.
EOS
end
s
end
test do
alt_location_libs = [
shared_library("libc++", "*"),
shared_library("libc++abi", "*"),
shared_library("libunwind", "*"),
]
assert_empty lib.glob(alt_location_libs) if OS.mac?
llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip
llvm_version_major = Version.new(llvm_version).major.to_s
soversion = llvm_version_major.dup
if llvm_version.end_with?("git")
soversion << "git"
elsif (match = llvm_version.match(/-rc\d*$/))
soversion << match[0]
else
assert_equal version, llvm_version
end
assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp
assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp
assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s,
shell_output("#{bin}/llvm-config --libfiles").chomp
(testpath/"test.c").write <<~'C'
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
C
(testpath/"test.cpp").write <<~CPP
#include <iostream>
#include <string>
int main()
{
std::string str = "Hello World!";
std::size_t str_hash = std::hash<std::string>{}(str);
std::cout << str << std::endl;
return 0;
}
CPP
system bin/"clang-cpp", "-v", "test.c"
system bin/"clang-cpp", "-v", "test.cpp"
# Testing default toolchain and SDK location.
system bin/"clang++", "-v", "-std=c++11", "test.cpp", "-o", "test++"
assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac?
assert_equal "Hello World!", shell_output("./test++").chomp
system bin/"clang", "-v", "test.c", "-o", "test"
assert_equal "Hello World!", shell_output("./test").chomp
# These tests should ignore the usual SDK includes
with_env(CPATH: nil) do
# Testing Command Line Tools
if OS.mac? && MacOS::CLT.installed?
toolchain_path = "/Library/Developer/CommandLineTools"
cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path
system bin/"clang++", "-v",
"--no-default-config",
"-isysroot", MacOS::CLT.sdk_path,
"-isystem", "#{cpp_base}/usr/include/c++/v1",
"-isystem", "#{MacOS::CLT.sdk_path}/usr/include",
"-isystem", "#{toolchain_path}/usr/include",
"-std=c++11", "test.cpp", "-o", "testCLT++"
assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib"
assert_equal "Hello World!", shell_output("./testCLT++").chomp
system bin/"clang", "-v", "test.c", "-o", "testCLT"
assert_equal "Hello World!", shell_output("./testCLT").chomp
targets = ["#{Hardware::CPU.arch}-apple-macosx#{MacOS.full_version}"]
# The test tends to time out on Intel, so let's do these only for ARM macOS.
if Hardware::CPU.arm?
old_macos_version = HOMEBREW_MACOS_OLDEST_SUPPORTED.to_i - 1
targets << "#{Hardware::CPU.arch}-apple-macosx#{old_macos_version}"
old_kernel_version = MacOSVersion.kernel_major_version(MacOSVersion.new(old_macos_version.to_s))
targets << "#{Hardware::CPU.arch}-apple-darwin#{old_kernel_version}"
end
targets.each do |target|
system bin/"clang-cpp", "-v", "--target=#{target}", "test.c"
system bin/"clang-cpp", "-v", "--target=#{target}", "test.cpp"
system bin/"clang", "-v", "--target=#{target}", "test.c", "-o", "test-macosx"
assert_equal "Hello World!", shell_output("./test-macosx").chomp
system bin/"clang++", "-v", "--target=#{target}", "-std=c++11", "test.cpp", "-o", "test++-macosx"
assert_equal "Hello World!", shell_output("./test++-macosx").chomp
end
end
# Testing Xcode
if OS.mac? && MacOS::Xcode.installed?
cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path
system bin/"clang++", "-v",
"--no-default-config",
"-isysroot", MacOS::Xcode.sdk_path,
"-isystem", "#{cpp_base}/usr/include/c++/v1",
"-isystem", "#{MacOS::Xcode.sdk_path}/usr/include",
"-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include",
"-std=c++11", "test.cpp", "-o", "testXC++"
assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib"
assert_equal "Hello World!", shell_output("./testXC++").chomp
system bin/"clang", "-v",
"-isysroot", MacOS.sdk_path,
"test.c", "-o", "testXC"
assert_equal "Hello World!", shell_output("./testXC").chomp
end
# link against installed libc++
# related to https://github.com/Homebrew/legacy-homebrew/issues/47149
cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib
system bin/"clang++", "-v",
"-isystem", "#{opt_include}/c++/v1",
"-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++",
"-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}"
assert_includes (testpath/"testlibc++").dynamically_linked_libraries,
(cxx_libdir/shared_library("libc++", "1")).to_s
(testpath/"testlibc++").dynamically_linked_libraries.each do |lib|
refute_match(/libstdc\+\+/, lib)
refute_match(/libgcc/, lib)
refute_match(/libatomic/, lib)
end
assert_equal "Hello World!", shell_output("./testlibc++").chomp
end
if OS.linux?
# Link installed libc++, libc++abi, and libunwind archives both into
# a position independent executable (PIE), as well as into a fully
# position independent (PIC) DSO for things like plugins that export
# a C-only API but internally use C++.
#
# FIXME: It'd be nice to be able to use flags like `-static-libstdc++`
# together with `-stdlib=libc++` (the latter one we need anyways for
# headers) to achieve this but those flags don't set up the correct
# search paths or handle all of the libraries needed by `libc++` when
# linking statically.
system bin/"clang++", "-v", "-o", "test_pie_runtimes",
"-pie", "-fPIC", "test.cpp", "-L#{opt_lib}",
"-stdlib=libc++", "-rtlib=compiler-rt",
"-static-libstdc++", "-lpthread", "-ldl"
assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp
(testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib|
refute_match(/lib(std)?c\+\+/, lib)
refute_match(/libgcc/, lib)
refute_match(/libatomic/, lib)
refute_match(/libunwind/, lib)
end
(testpath/"test_plugin.cpp").write <<~CPP
#include <iostream>
__attribute__((visibility("default")))
extern "C" void run_plugin() {
std::cout << "Hello Plugin World!" << std::endl;
}
CPP
(testpath/"test_plugin_main.c").write <<~C
extern void run_plugin();
int main() {
run_plugin();
}
C
system bin/"clang++", "-v", "-o", "test_plugin.so",
"-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}",
"-stdlib=libc++", "-rtlib=compiler-rt",
"-static-libstdc++", "-lpthread", "-ldl"
system bin/"clang", "-v",
"test_plugin_main.c", "-o", "test_plugin_libc++",
"test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt"
assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp
(testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib|
refute_match(/lib(std)?c\+\+/, lib)
refute_match(/libgcc/, lib)
refute_match(/libatomic/, lib)
refute_match(/libunwind/, lib)
end
end
# Testing mlir
(testpath/"test.mlir").write <<~MLIR
func.func @main() {return}
// -----
// expected-note @+1 {{see existing symbol definition here}}
func.func @foo() { return }
// ----
// expected-error @+1 {{redefinition of symbol named 'foo'}}
func.func @foo() { return }
MLIR
system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir"
(testpath/"scanbuildtest.cpp").write <<~CPP
#include <iostream>
int main() {
int *i = new int;
*i = 1;
delete i;
std::cout << *i << std::endl;
return 0;
}
CPP
assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"),
"warning: Use of memory after it is released"
(testpath/"clangformattest.c").write <<~C
int main() {
printf("Hello world!"); }
C
assert_equal "int main() { printf(\"Hello world!\"); }\n",
shell_output("#{bin}/clang-format -style=google clangformattest.c")
# This will fail if the clang bindings cannot find `libclang`.
with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do
system python3, "-c", <<~PYTHON
from clang import cindex
cindex.Config().get_cindex_library()
PYTHON
end
unless versioned_formula?
(testpath/"omptest.c").write <<~C
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main() {
#pragma omp parallel num_threads(4)
{
printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads());
}
return EXIT_SUCCESS;
}
C
rpath_flag = "-Wl,-rpath,#{lib/Utils.safe_popen_read(bin/"clang", "--print-target-triple").chomp}" if OS.linux?
system bin/"clang", "-L#{lib}", "-fopenmp", "-nobuiltininc",
"-I#{lib}/clang/#{llvm_version_major}/include",
rpath_flag.to_s, "omptest.c", "-o", "omptest"
testresult = shell_output("./omptest")
sorted_testresult = testresult.split("\n").sort.join("\n")
expected_result = <<~EOS
Hello from thread 0, nthreads 4
Hello from thread 1, nthreads 4
Hello from thread 2, nthreads 4
Hello from thread 3, nthreads 4
EOS
assert_equal expected_result.strip, sorted_testresult.strip
# Test static analyzer
(testpath/"unreachable.c").write <<~C
unsigned int func(unsigned int a) {
unsigned int *z = 0;
if ((a & 1) && ((a & 1) ^1))
return *z; // unreachable
return 0;
}
C
system bin/"clang", "--analyze", "-Xanalyzer", "-analyzer-constraints=z3", "unreachable.c"
# Check that lldb can use Python
lldb_script_interpreter_info = JSON.parse(shell_output("#{bin}/lldb --print-script-interpreter-info"))
assert_equal "python", lldb_script_interpreter_info["language"]
python_test_cmd = "import pathlib, sys; print(pathlib.Path(sys.prefix).resolve())"
assert_match shell_output("#{python3} -c '#{python_test_cmd}'"),
pipe_output("#{bin}/lldb", <<~EOS)
script
#{python_test_cmd}
EOS
end
# Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time
# was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`.
# On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g.,
# `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`.
abs_path_exts = [".tbd", ".dylib"]
shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib|
if lib.start_with?("-l")
assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd"
assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib"
else
p = Pathname.new(lib)
if abs_path_exts.include?(p.extname)
assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib"
end
end
end
return if OS.linux?
return unless clang_config_file_dir.exist? # https://github.com/Homebrew/homebrew-test-bot/issues/805
assert_match("Configuration file: #{opt_prefix}/etc/clang/",
shell_output("#{opt_bin}/clang --version -no-canonical-prefixes"))
end
end

Some files were not shown because too many files have changed in this diff Show More