Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / g / gensio.rb
blob29a80e482b097d1b03e98c95f7d510c4b0663ef9
1 class Gensio < Formula
2   desc "Stream I/O Library"
3   homepage "https://github.com/cminyard/gensio"
4   url "https://github.com/cminyard/gensio/releases/download/v2.8.11/gensio-2.8.11.tar.gz"
5   sha256 "ac39fb97ab6b85e468384bced70672d1d23d643aeaf79a687947194a74c049e8"
6   license all_of: ["LGPL-2.1-only", "GPL-2.0-only", "Apache-2.0"]
8   bottle do
9     sha256 arm64_sequoia: "bcadaa813fff53eb6f2a8348b1871ea5f1a6ef94d9dc3924e8925c483d2c17f1"
10     sha256 arm64_sonoma:  "8b11a0c759c57e25aa5554ce462e0190ee344af9d5697b25eb532e3e500357a4"
11     sha256 arm64_ventura: "9f4f57b7a5914e2e99517fd19685f251b861254d30b905061ef72612fc3fba90"
12     sha256 sonoma:        "80abcde802af713b344a6ed7ffd8e4a3866bc8e985ebae58e3375bf8664fc738"
13     sha256 ventura:       "ff38691633a984d72b80e9ee41872c537e8c1dacf8ea3e1a1a5701c1da11c022"
14     sha256 x86_64_linux:  "6f5ae1b22dfe4c13cb64c948045ffbd1bb59734e77f6aa36ffa57bd79775e864"
15   end
17   depends_on "go" => :build
18   depends_on "pkgconf" => :build
19   depends_on "swig" => :build
21   depends_on "glib"
22   depends_on "openssl@3"
23   depends_on "python@3.13"
25   uses_from_macos "tcl-tk"
27   on_macos do
28     depends_on "gettext"
29     depends_on "portaudio"
30   end
32   on_linux do
33     depends_on "alsa-lib"
34     depends_on "avahi"
35     depends_on "linux-pam"
36     depends_on "systemd"
37   end
39   def python3
40     "python3.13"
41   end
43   def install
44     args = %W[
45       --disable-silent-rules
46       --with-python=#{which(python3)}
47       --with-pythoninstall=#{lib}/gensio-python
48       --sysconfdir=#{etc}
49     ]
50     args << "--with-tclcflags=-I#{HOMEBREW_PREFIX}/include/tcl-tk" if OS.linux?
52     system "./configure", *args, *std_configure_args
53     system "make", "install"
54     (prefix/Language::Python.site_packages(python3)).install_symlink lib.glob("gensio-python/*")
55   end
57   service do
58     run [opt_sbin/"gtlsshd", "--nodaemon", "--pam-service", "sshd"]
59     keep_alive true
60     require_root true
61     working_dir HOMEBREW_PREFIX
62   end
64   test do
65     assert_match version.to_s, shell_output("#{bin}/gensiot --version")
67     assert_equal "Hello World!", pipe_output("#{bin}/gensiot echo", "Hello World!")
68   end
69 end