Skip to content

Commit

Permalink
halide 19.0.0
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Reinking <[email protected]>
  • Loading branch information
2 people authored and daeho-ro committed Dec 18, 2024
1 parent 7b72790 commit 569bac0
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions Formula/h/halide.rb
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
Expand All @@ -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
Expand Down

0 comments on commit 569bac0

Please sign in to comment.