-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alex Reinking <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
class Halide < Formula | ||
desc "Language for fast, portable data-parallel computation" | ||
homepage "https://halide-lang.org" | ||
url "https://github.com/halide/Halide/archive/refs/tags/v18.0.0.tar.gz" | ||
sha256 "1176b42a3e2374ab38555d9316c78e39b157044b5a8e765c748bf3afd2edb351" | ||
url "https://github.com/halide/Halide/archive/refs/tags/v19.0.0.tar.gz" | ||
sha256 "83bae1f0e24dc44d9d85014d5cd0474df2dd03975680894ce3fafd6e97dffee2" | ||
license "MIT" | ||
revision 1 | ||
head "https://github.com/halide/Halide.git", branch: "main" | ||
|
||
livecheck do | ||
|
@@ -29,40 +28,27 @@ class Halide < Formula | |
depends_on "libpng" | ||
depends_on "lld" | ||
depends_on "llvm" | ||
depends_on "openssl@3" | ||
depends_on "[email protected]" | ||
|
||
# Check wabt version in `dependencies/wasm/CMakeLists.txt`. | ||
# TODO: Ask upstream to support usage of a system-provided wabt. | ||
# TODO: Do we really need a git checkout here? | ||
resource "wabt" do | ||
url "https://github.com/WebAssembly/wabt.git", | ||
tag: "1.0.33", | ||
revision: "963f973469b45969ce198e0c86d3af316790a780" | ||
end | ||
depends_on "wabt" | ||
|
||
def python3 | ||
"python3.13" | ||
end | ||
|
||
def install | ||
builddir = buildpath/"build" | ||
(builddir/"_deps/wabt-src").install resource("wabt") | ||
|
||
site_packages = prefix/Language::Python.site_packages(python3) | ||
rpaths = [rpath, rpath(source: site_packages/"halide")] | ||
args = [ | ||
"-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", | ||
"-DHalide_INSTALL_PYTHONDIR=#{site_packages}", | ||
"-DHalide_SHARED_LLVM=ON", | ||
"-DPYBIND11_USE_FETCHCONTENT=OFF", | ||
"-DFLATBUFFERS_USE_FETCHCONTENT=OFF", | ||
"-DFETCHCONTENT_SOURCE_DIR_WABT=#{builddir}/_deps/wabt-src", | ||
"-DCMAKE_SHARED_LINKER_FLAGS=-llldCommon", | ||
"-DHalide_INSTALL_PYTHONDIR=#{site_packages}/halide", | ||
"-DHalide_LLVM_SHARED_LIBS=ON", | ||
"-DHalide_USE_FETCHCONTENT=OFF", | ||
"-DWITH_TESTS=NO", | ||
] | ||
odie "CMAKE_SHARED_LINKER_FLAGS can be removed from `args`" if build.bottle? && version > "18.0.0" | ||
system "cmake", "-S", ".", "-B", builddir, *args, *std_cmake_args | ||
system "cmake", "--build", builddir | ||
system "cmake", "--install", builddir | ||
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args | ||
system "cmake", "--build", "build" | ||
system "cmake", "--install", "build" | ||
end | ||
|
||
test do | ||
|