|
1 | 1 | class Libnfs < Formula
|
2 | 2 | desc "C client library for NFS"
|
3 | 3 | homepage "https://github.com/sahlberg/libnfs"
|
4 |
| - url "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.3.tar.gz" |
5 |
| - sha256 "d945cb4f4c8f82ee1f3640893a168810f794a28e1010bb007ec5add345e9df3e" |
| 4 | + url "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-6.0.0.tar.gz" |
| 5 | + sha256 "6fe64b5a47b2558484c8beb05819c1f1f3e52cc52a7b3a8b805faf398e9a9c24" |
6 | 6 | license "LGPL-2.1-or-later"
|
7 | 7 |
|
8 | 8 | bottle do
|
9 |
| - sha256 cellar: :any, arm64_sequoia: "e758339be8153e070291e70acb20491ef97d2f1c56a2778e11f356ffcefc60ff" |
10 |
| - sha256 cellar: :any, arm64_sonoma: "7a52ed77480250f7f6503c89b55939851022fda4b557723df98ee14572900003" |
11 |
| - sha256 cellar: :any, arm64_ventura: "dff7c08f835774d855710f8195b3fa53d38b4a0d89a1277f8e422d2de6117e21" |
12 |
| - sha256 cellar: :any, arm64_monterey: "06f16c29ed988b38d91ee5f800b93116b41288f993a694603f0af3584f59fdb9" |
13 |
| - sha256 cellar: :any, sonoma: "165309bcf7d58c4bbe4c62889d8de976b85e01102e1e49eb4a7d84632b35ef13" |
14 |
| - sha256 cellar: :any, ventura: "00999f67b246396751e8fd9137cb057bf14b2b99f0d059fdaf6e2cb0fa25998f" |
15 |
| - sha256 cellar: :any, monterey: "1df9d2c2a44214573663eff072d237b090d297ceadca7ab2923daca3cabc6a99" |
16 |
| - sha256 cellar: :any_skip_relocation, x86_64_linux: "da4022b87ad4d500dafafeccbf35e4bebcf2bbbcf23bb47a37c0b35edec09ec5" |
| 9 | + sha256 cellar: :any, arm64_sequoia: "fcb8f457b3c931062da17f2b03dc212cac367b2c03bc62b2b74cdffc6c5e6df4" |
| 10 | + sha256 cellar: :any, arm64_sonoma: "21ce9df74b1ef7002f78d97a6fd03ed5e7d14f16649a415fa3fcebda67ccbf28" |
| 11 | + sha256 cellar: :any, arm64_ventura: "a528cf7f37ed7c7372cf2af7ea4ce62898fc47b711a30d0f0ec9382c0808f828" |
| 12 | + sha256 cellar: :any, sonoma: "1137695cb76bf3596ce1f1ed1ddbc6027c588555eeb6f017c2c3f052bab1a04b" |
| 13 | + sha256 cellar: :any, ventura: "7260fb1a04639b3c2c4b1e8967a8b75ec012540d9de6d612079749799f42021c" |
| 14 | + sha256 cellar: :any_skip_relocation, x86_64_linux: "c526e05b0f69358b24b175a100e4ddfae37f82a747286c6c1d0580731ce259e8" |
17 | 15 | end
|
18 | 16 |
|
19 |
| - depends_on "autoconf" => :build |
20 |
| - depends_on "automake" => :build |
21 |
| - depends_on "libtool" => :build |
| 17 | + depends_on "cmake" => :build |
| 18 | + depends_on "docbook" => :build |
| 19 | + depends_on "docbook-xsl" => :build |
| 20 | + |
| 21 | + # Ref: https://github.com/sahlberg/libnfs/commit/2044497b7faba9404a3a17e81cbfdeb5e8aaaa9c |
| 22 | + # Remove on next release |
| 23 | + patch do |
| 24 | + url "https://github.com/sahlberg/libnfs/commit/2044497b7faba9404a3a17e81cbfdeb5e8aaaa9c.patch?full_index=1" |
| 25 | + sha256 "b31e61faa640ea1c5b590bc884c57fef2d6c40e9ee94596353648d057026bc1b" |
| 26 | + end |
| 27 | + |
| 28 | + # rpath config patch, upstream pr ref, https://github.com/sahlberg/libnfs/pull/502 |
| 29 | + patch do |
| 30 | + url "https://github.com/sahlberg/libnfs/commit/2db7ebd9e15b4fedd2750af1a3d66b146c1da3b7.patch?full_index=1" |
| 31 | + sha256 "eed5d8f35742278b74c2592473554a0050da9105432028e82f5b13d32e52d8b8" |
| 32 | + end |
22 | 33 |
|
23 | 34 | def install
|
24 |
| - system "./bootstrap" |
25 |
| - system "./configure", "--disable-dependency-tracking", |
26 |
| - "--disable-silent-rules", |
27 |
| - "--prefix=#{prefix}" |
| 35 | + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" |
28 | 36 |
|
29 |
| - system "make", "install" |
| 37 | + system "cmake", "-S", ".", "-B", "build", "-DENABLE_DOCUMENTATION=ON", "-DENABLE_UTILS=ON", *std_cmake_args |
| 38 | + system "cmake", "--build", "build" |
| 39 | + system "cmake", "--install", "build" |
30 | 40 | end
|
31 | 41 |
|
32 | 42 | test do
|
| 43 | + assert_match "No URL specified", shell_output("#{bin}/nfs-ls 2>&1", 1) |
| 44 | + |
33 | 45 | (testpath/"test.c").write <<~C
|
34 | 46 | #if defined(__linux__)
|
35 | 47 | # include <sys/time.h>
|
|
0 commit comments