From 3bd7156d775dd1347f114cf5db2f854678dfbcdb Mon Sep 17 00:00:00 2001 From: Brandon Payton Date: Mon, 13 Jul 2026 22:22:36 -0400 Subject: [PATCH] bzip2, xz: enforce the final Wasm artifact contract --- Formula/bzip2.rb | 3 +++ Formula/xz.rb | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Formula/bzip2.rb b/Formula/bzip2.rb index 724a75b..1aa6995 100644 --- a/Formula/bzip2.rb +++ b/Formula/bzip2.rb @@ -10,6 +10,8 @@ class Bzip2 < Formula license "bzip2-1.0.6" revision 1 + depends_on "binaryen" => :build + depends_on "wabt" => :build depends_on "pkgconf" => :test skip_clean "bin/bzip2", "lib/libbz2.a" @@ -25,6 +27,7 @@ def install "CFLAGS=-Wall -Winline -O2 -fPIC -D_FILE_OFFSET_BITS=64", "LDFLAGS=", "libbz2.a", "bzip2" + kandelo_validate_wasm_artifact(buildpath/"bzip2", fork: :forbidden) end kandelo_install_bin(buildpath, "bzip2", "bzip2") lib.install "libbz2.a" diff --git a/Formula/xz.rb b/Formula/xz.rb index b5bad45..0210cd4 100644 --- a/Formula/xz.rb +++ b/Formula/xz.rb @@ -13,6 +13,8 @@ class Xz < Formula license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later", "0BSD"] revision 1 + depends_on "binaryen" => :build + depends_on "wabt" => :build depends_on "pkgconf" => :test skip_clean "bin", "lib/liblzma.a" @@ -45,6 +47,8 @@ def install "--disable-lzmainfo", "--enable-sandbox=no" system "make" + kandelo_validate_wasm_artifact(buildpath/"src/xz/xz", fork: :forbidden) + kandelo_validate_wasm_artifact(buildpath/"src/xzdec/xzdec", fork: :forbidden) system "make", "install" end