jackett 0.22.1382
[Homebrew/homebrew-core.git] / Formula / r / recutils.rb
blob8c00b4c7def01073c40d6a46fc5d814ef1a4bfc7
1 class Recutils < Formula
2   desc "Tools to work with human-editable, plain text data files"
3   homepage "https://www.gnu.org/software/recutils/"
4   url "https://ftp.gnu.org/gnu/recutils/recutils-1.9.tar.gz"
5   mirror "https://ftpmirror.gnu.org/gnu/recutils/recutils-1.9.tar.gz"
6   sha256 "6301592b0020c14b456757ef5d434d49f6027b8e5f3a499d13362f205c486e0e"
7   license "GPL-3.0-or-later"
9   bottle do
10     sha256 cellar: :any, arm64_sequoia:  "f1c4d50014f990bf82b005678e5e50d0437c4832db83e80094e0fcfbad824078"
11     sha256 cellar: :any, arm64_sonoma:   "229e25a458f74f9b9e1229b08dd839a18f7e06cede1aaecc890b645f645c80e1"
12     sha256 cellar: :any, arm64_ventura:  "6556b10f353cbae8cc5d69cc48cb0662eaf85060794e0d29ae25950dbe02749e"
13     sha256 cellar: :any, arm64_monterey: "09a875626acf4c73036fc8048bf3e0e5bb7beff7fd60e1e96faa1b1d92888638"
14     sha256 cellar: :any, arm64_big_sur:  "c2da94eb14db7fdd4f6376cd3d6546ff8cebddd64f4290fe265161f21d3fdff8"
15     sha256 cellar: :any, sonoma:         "06f73515dcef0f167c03853cfaf8e08966cb677ce575b03484f63c69adb182e0"
16     sha256 cellar: :any, ventura:        "50252c2587e2e32f0513c9cc71fd49c5786400f6c0d6e95891da4b43a0f873fa"
17     sha256 cellar: :any, monterey:       "feac0920394addceefb8a23fc38a7406fed04b71bde433d14dfa703b852c5089"
18     sha256 cellar: :any, big_sur:        "8bd10813a8870b76fdac43c99062d3449bd4275ae54af0410c85c69ba3f9ab08"
19     sha256 cellar: :any, catalina:       "d92195d721c086a0f14fa0dcdd8014869af600d43e31749a8b8af580f49fafba"
20     sha256               x86_64_linux:   "09224d89dd80efca59a618cb2b966ad1a2a1847d992bc27c014fe997db0148af"
21   end
23   on_linux do
24     depends_on "libgcrypt"
25   end
27   # Fix -flat_namespace being used on Big Sur and later.
28   patch do
29     url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
30     sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
31   end
33   def install
34     # Fix compile with newer Clang. Remove in the next release.
35     # Ref: http://git.savannah.gnu.org/cgit/recutils.git/commit/?id=e154822aeec19cb790f8618ee740875c048859e4
36     ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403
38     system "./configure", "--datarootdir=#{elisp}",
39                           "--disable-silent-rules",
40                           *std_configure_args
41     system "make", "install"
42   end
44   test do
45     (testpath/"test.csv").write <<~CSV
46       a,b,c
47       1,2,3
48     CSV
49     system bin/"csv2rec", "test.csv"
51     (testpath/"test.rec").write <<~EOS
52       %rec: Book
53       %mandatory: Title
55       Title: GNU Emacs Manual
56     EOS
57     system bin/"recsel", "test.rec"
58   end
59 end