Skip to content

Commit

Permalink
gdbm: --enable-libgdbm-compat
Browse files Browse the repository at this point in the history
--enable-libgdbm-compat for dbm.h / gdbm-ndbm.h compatibility:
  https://www.gnu.org.ua/software/gdbm/manual/html_chapter/gdbm_19.html
  • Loading branch information
rfinnie committed Jul 28, 2020
1 parent 310c0c0 commit bb35156
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Formula/gdbm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Gdbm < Formula
mirror "https://ftpmirror.gnu.org/gdbm/gdbm-1.18.1.tar.gz"
sha256 "86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc"
license "GPL-3.0"
revision 1

bottle do
cellar :any
Expand All @@ -15,18 +16,25 @@ class Gdbm < Formula
sha256 "89d6db4fbffbe2184b4531faaebf0432a4b01e1ed92678ce6bd2f95c69dc9803" => :sierra
end

# --enable-libgdbm-compat for dbm.h / gdbm-ndbm.h compatibility:
# https://www.gnu.org.ua/software/gdbm/manual/html_chapter/gdbm_19.html
# Use --without-readline because readline detection is broken in 1.13
# https://github.com/Homebrew/homebrew-core/pull/10903
def install
args = %W[
--disable-dependency-tracking
--disable-silent-rules
--enable-libgdbm-compat
--without-readline
--prefix=#{prefix}
]

system "./configure", *args
system "make", "install"

# Avoid conflicting with macOS SDK's ndbm.h. Renaming to gdbm-ndbm.h
# matches Debian's convention for gdbm's ndbm.h (libgdbm-compat-dev).
mv include/"ndbm.h", include/"gdbm-ndbm.h"
end

test do
Expand Down

0 comments on commit bb35156

Please sign in to comment.