Merge pull request #206954 from Homebrew/bump-gollama-1.28.13
[homebrew-core.git] / Formula / d / device-mapper.rb
blob2d16b149c5d011920759ee74f412c2b54e356629
1 class DeviceMapper < Formula
2   desc "Userspace library and tools for logical volume management"
3   homepage "https://sourceware.org/dm"
4   url "https://sourceware.org/git/lvm2.git",
5       tag:      "v2_03_30",
6       revision: "9f81fccd65a29030bf70417e8aca659ae536e081"
7   license "LGPL-2.1-only"
9   livecheck do
10     url :stable
11     regex(/href=.*?;a=tag;.*?>Release (\d+(?:\.\d+)+)</i)
12     strategy :page_match
13   end
15   bottle do
16     sha256 cellar: :any_skip_relocation, x86_64_linux: "8c321e894295316cd5f53609d6a95f372f37dfdc427cfe44f43423a1a2c9836c"
17   end
19   depends_on "pkgconf" => :build
20   depends_on "libaio"
21   depends_on :linux
23   def install
24     # https://github.com/NixOS/nixpkgs/pull/52597
25     ENV.deparallelize
26     system "./configure", "--disable-silent-rules", "--enable-pkgconfig", *std_configure_args
27     system "make", "device-mapper"
28     system "make", "install_device-mapper"
29   end
31   test do
32     (testpath/"test.c").write <<~C
33       #include <libdevmapper.h>
35       int main() {
36         if (DM_STATS_REGIONS_ALL != UINT64_MAX)
37           exit(1);
38       }
39     C
40     system ENV.cc, "-I#{include}", "-L#{lib}", "-ldevmapper", "test.c", "-o", "test"
41     system testpath/"test"
42   end
43 end