Skip to content

Commit

Permalink
Update desc; only autoreconf HEAD; use coreutils.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonjh committed Jul 27, 2022
1 parent 6b015cc commit e0369b4
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Formula/libeatmydata.rb
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
class Libeatmydata < Formula
desc "Because fsync() should be a no-op"
desc "LD_PRELOAD library and wrapper to transparently disable fsync and related calls"
homepage "https://www.flamingspork.com/projects/libeatmydata/"
url "https://github.com/stewartsmith/libeatmydata/releases/download/v130/libeatmydata-130.tar.gz"
sha256 "48731cd7e612ff73fd6339378fbbff38dd3bcf6c243593b0d9773ca0051541c0"
license "GPL-3.0-or-later"
head "https://github.com/stewartsmith/libeatmydata.git", branch: "master"

depends_on "autoconf" => :build
depends_on "autoconf-archive" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "coreutils" => :test
head do
url "https://github.com/stewartsmith/libeatmydata.git", branch: "master"
depends_on "autoconf" => :build
depends_on "autoconf-archive" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end

depends_on "coreutils"

on_linux do
depends_on "strace" => :test
end

def install
system "autoreconf", "--force", "--install", "--verbose"
# macOS does not support `readlink -f` as used by the `eatmydata` shell wrapper script
inreplace "eatmydata.sh.in", "readlink", "#{Formula["coreutils"].opt_libexec}/gnubin/readlink"

system "autoreconf", "--force", "--install", "--verbose" if build.head?
system "./configure", *std_configure_args,
"--disable-option-checking",
"--disable-silent-rules"
system "make", "install"
end

test do
ENV.prepend_path "PATH", Formula["coreutils"].opt_libexec/"gnubin"
system bin/"eatmydata", "sync"
return if OS.mac?

Expand Down

0 comments on commit e0369b4

Please sign in to comment.