Skip to content

Commit 0805574

Browse files
osalbahrdaeho-ro
authored andcommitted
bashdb 5.2-1.2.0
1 parent c0c5127 commit 0805574

File tree

1 file changed

+7
-34
lines changed

1 file changed

+7
-34
lines changed

Formula/b/bashdb.rb

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
class Bashdb < Formula
22
desc "Bash shell debugger"
33
homepage "https://bashdb.sourceforge.net/"
4-
url "https://downloads.sourceforge.net/project/bashdb/bashdb/5.0-1.1.2/bashdb-5.0-1.1.2.tar.bz2"
5-
version "5.0-1.1.2"
6-
sha256 "30176d2ad28c5b00b2e2d21c5ea1aef8fbaf40a8f9d9f723c67c60531f3b7330"
4+
url "https://downloads.sourceforge.net/project/bashdb/bashdb/5.2-1.2.0/bashdb-5.2-1.2.0.tar.bz2"
5+
version "5.2-1.2.0"
6+
sha256 "96fe0c8ffc12bc478c9dc41bb349ae85135da71b692069b8b7f62b27967ce534"
77
license "GPL-2.0-or-later"
88

99
# We check the "bashdb" directory page because the bashdb project contains
@@ -15,7 +15,7 @@ class Bashdb < Formula
1515
strategy :page_match
1616
end
1717

18-
no_autobump! because: :requires_manual_review
18+
no_autobump! because: :incompatible_version_format
1919

2020
bottle do
2121
rebuild 1
@@ -28,16 +28,12 @@ class Bashdb < Formula
2828
sha256 cellar: :any_skip_relocation, x86_64_linux: "8f2ec4abf07b97ccf17dd28f503864ff00ea05049a9b844de637612b85478aa7"
2929
end
3030

31-
depends_on "autoconf" => :build # due to patch
32-
depends_on "automake" => :build # due to patch
3331
depends_on "bash"
3432

35-
# Bypass error with Bash 5.1: "error: This package is only known to work with Bash 5.0"
36-
# Upstream ref: https://sourceforge.net/p/bashdb/code/ci/6daffb5c7337620b429f5e94c282b75a0777fc82/
37-
patch :DATA
38-
3933
def install
40-
system "autoreconf", "--force", "--install", "--verbose"
34+
# Update configure to support Bash 5.3 by replacing `'5.2' | '5.0' | '5.1'`
35+
inreplace "configure", /(?:'5\.\d+'(?:\s+\|\s+)?)+/, "'#{Formula["bash"].version.major_minor}'"
36+
4137
system "./configure", "--with-bash=#{HOMEBREW_PREFIX}/bin/bash", *std_configure_args
4238
system "make", "install"
4339
end
@@ -46,26 +42,3 @@ def install
4642
assert_match version.to_s, pipe_output("#{bin}/bashdb --version 2>&1")
4743
end
4844
end
49-
50-
__END__
51-
--- a/configure.ac
52-
+++ b/configure.ac
53-
@@ -107,7 +107,7 @@
54-
[bash_minor=`$SH_PROG -c 'echo ${BASH_VERSINFO[1]}'`]
55-
bash_5_or_greater=no
56-
case "${bash_major}.${bash_minor}" in
57-
- 'OK_BASH_VERS' | '5.0')
58-
+ 'OK_BASH_VERS' | '5.0' | '5.1' | '5.2')
59-
bash_5_or_greater=yes
60-
;;
61-
*)
62-
@@ -118,7 +118,8 @@
63-
64-
AC_ARG_WITH(dbg-main, AC_HELP_STRING([--with-dbg-main],
65-
[location of dbg-main.sh]),
66-
- DBGR_MAIN=$withval)
67-
+ [DBGR_MAIN=$withval]
68-
+ [DBGR_MAIN=${ac_default_prefix/prefix}/bashdb/bashdb-main.inc])
69-
AC_SUBST(DBGR_MAIN)
70-
71-
mydir=$(dirname $0)

0 commit comments

Comments
 (0)