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",
6 revision: "9f81fccd65a29030bf70417e8aca659ae536e081"
7 license "LGPL-2.1-only"
11 regex(/href=.*?;a=tag;.*?>Release (\d+(?:\.\d+)+)</i)
16 sha256 cellar: :any_skip_relocation, x86_64_linux: "8c321e894295316cd5f53609d6a95f372f37dfdc427cfe44f43423a1a2c9836c"
19 depends_on "pkgconf" => :build
24 # https://github.com/NixOS/nixpkgs/pull/52597
26 system "./configure", "--disable-silent-rules", "--enable-pkgconfig", *std_configure_args
27 system "make", "device-mapper"
28 system "make", "install_device-mapper"
32 (testpath/"test.c").write <<~C
33 #include <libdevmapper.h>
36 if (DM_STATS_REGIONS_ALL != UINT64_MAX)
40 system ENV.cc, "-I#{include}", "-L#{lib}", "-ldevmapper", "test.c", "-o", "test"
41 system testpath/"test"