From 3daa5a498f311c52ba26129c6c3829e6e992d907 Mon Sep 17 00:00:00 2001 From: Ivan Andrus Date: Mon, 6 Feb 2023 23:20:16 -0700 Subject: [PATCH] Add support for --head option --- Formula/gap.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Formula/gap.rb b/Formula/gap.rb index 5c7621a..f3fb9c2 100644 --- a/Formula/gap.rb +++ b/Formula/gap.rb @@ -3,6 +3,10 @@ class Gap < Formula homepage "https://www.gap-system.org/" url "https://github.com/gap-system/gap/releases/download/v4.12.2/gap-4.12.2.tar.gz" sha256 "672308745eb78a222494ee8dd6786edd5bc331456fcc6456ac064bdb28d587a8" + head do + url "https://github.com/gap-system/gap.git", branch: "master" + depends_on "autoconf" => :build + end depends_on "gmp" # GAP cannot be built against the native macOS version of readline @@ -33,8 +37,14 @@ def install # GAP does not support "make install" so it has to be compiled in place cd libexec do + if build.head? + system "./autogen.sh" + end system "./configure", "--with-readline=#{Formula["readline"].opt_prefix}" system "make" + if build.head? # option for minimal packages? bootstrap-pkg-minimal + system "make", "bootstrap-pkg-full" + end end # Create a symlink `bin/gap` from the `gap` binary