Merge pull request #206954 from Homebrew/bump-gollama-1.28.13
[homebrew-core.git] / Formula / d / dvd+rw-tools.rb
blobeb3c4c14450b786bb7718b3643dc728fb473c9d9
1 class DvdxrwTools < Formula
2   desc "DVD+-RW/R tools"
3   homepage "https://fy.chalmers.se/~appro/linux/DVD+RW/"
4   url "https://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.1.tar.gz"
5   sha256 "f8d60f822e914128bcbc5f64fbe3ed131cbff9045dca7e12c5b77b26edde72ca"
6   license "GPL-2.0-only"
8   livecheck do
9     url "https://fy.chalmers.se/~appro/linux/DVD+RW/tools/"
10     regex(/href=.*?dvd\+rw-tools[._-]v?(\d+(?:[.-]\d+)+)\.t/i)
11   end
13   bottle do
14     sha256 cellar: :any_skip_relocation, arm64_sequoia:  "ef7c367570d1a514f8c5ee0c9a7b9e758dcd12a6ae8ece7fddc835f39ad9b319"
15     sha256 cellar: :any_skip_relocation, arm64_sonoma:   "da895c2f501018863f2db497206573a37ef717337e9f5c2dba6a5863bc989d77"
16     sha256 cellar: :any_skip_relocation, arm64_ventura:  "031b8533eeb4ec71ab6f3e2b68826271b0c5ff3e97e0dddaebab9a721b43df53"
17     sha256 cellar: :any_skip_relocation, arm64_monterey: "b2cbe68ebfc5a48e4936264261fc269c7c4edf4e0c213dc817d962dcf97a1d86"
18     sha256 cellar: :any_skip_relocation, arm64_big_sur:  "11ec6e949911cca76b2c3a940e362aff334523a7018dfd3bdcd232acb7b741d1"
19     sha256 cellar: :any_skip_relocation, sonoma:         "ed0da0bd1a96d04a12f9c9f28cedfb9e10d1f1ed09e8e6dbad8d417dddef6e07"
20     sha256 cellar: :any_skip_relocation, ventura:        "f87fed662aa38e3ae76443247e6f0db628a70c4dac97e1ef15e036728af4ffb2"
21     sha256 cellar: :any_skip_relocation, monterey:       "666563b942edaf7487b15e886264df5dab1cf5a64638ff47dd5f69804a44368d"
22     sha256 cellar: :any_skip_relocation, big_sur:        "c3d9ab88096123bd36acbad9f27cc21c07fd881f00ac45b49605f18de03262b1"
23     sha256 cellar: :any_skip_relocation, catalina:       "18c7e40586199af43cad7bfc604c0e01c90e095a387b425a4e4b74a453423ffe"
24     sha256 cellar: :any_skip_relocation, mojave:         "7d79f2f23e9fb680435005d4491e02d3beb4cbbf2d8abc338b4efe33b7d17988"
25     sha256 cellar: :any_skip_relocation, high_sierra:    "acf8d9a92ff74fdbfc409dc42980be607c4dd263aca89444713972a055d5967a"
26     sha256 cellar: :any_skip_relocation, sierra:         "932e3879247dd1587f35d99c7132c302ddeaf3b5efad9effb05f5b086a55541a"
27     sha256 cellar: :any_skip_relocation, el_capitan:     "01bae78a5187a47ea770a9cb9c0cabdbafb60485e333a563240a6ea74d6718b0"
28     sha256 cellar: :any_skip_relocation, x86_64_linux:   "d491eb26d5db91ea03ea2403ae8866675d268a4d9962a4dc9cb4bdb0aedecb47"
29   end
31   uses_from_macos "m4" => :build
33   # Respect $prefix on macOS.
34   # Fix build failure because of missing #include <limits.h> on Linux.
35   # Patch submitted to author by email.
36   patch :DATA
38   def install
39     bin.mkpath
40     man1.mkpath
41     system "make", "prefix=#{prefix}", "install"
42   end
43 end
45 __END__
46 diff --git a/Makefile.m4 b/Makefile.m4
47 index a6a100b..03fc245 100644
48 --- a/Makefile.m4
49 +++ b/Makefile.m4
50 @@ -27,11 +27,13 @@ CXXFLAGS+=$(WARN) -D__unix -O2 -fno-exceptions
51  LDLIBS =-framework CoreFoundation -framework IOKit
52  LINK.o =$(LINK.cc)
54 +prefix?=/usr
56  # to install set-root-uid, `make BIN_MODE=04755 install'...
57  BIN_MODE?=0755
58  install:       dvd+rw-tools
59 -       install -o root -m $(BIN_MODE) $(CHAIN) /usr/bin
60 -       install -o root -m 0644 growisofs.1 /usr/share/man/man1
61 +       install -m $(BIN_MODE) $(CHAIN) $(prefix)/bin
62 +       install -m 0644 growisofs.1 $(prefix)/share/man/man1
63  ])
65  ifelse(OS,MINGW32,[
66 diff --git a/transport.hxx b/transport.hxx
67 index 35a57a7..467ce50 100644
68 --- a/transport.hxx
69 +++ b/transport.hxx
70 @@ -16,6 +16,7 @@
71  #include <fcntl.h>
72  #include <poll.h>
73  #include <sys/time.h>
74 +#include <limits.h>
76  inline long getmsecs()
77  { struct timeval tv;