homebrew-core/Formula/ldapvi.rb
2017-09-23 14:28:13 +02:00

49 lines
2 KiB
Ruby

class Ldapvi < Formula
desc "Update LDAP entries with a text editor"
homepage "http://www.lichteblau.com/ldapvi/"
url "http://www.lichteblau.com/download/ldapvi-1.7.tar.gz"
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/l/ldapvi/ldapvi_1.7.orig.tar.gz"
sha256 "6f62e92d20ff2ac0d06125024a914b8622e5b8a0a0c2d390bf3e7990cbd2e153"
revision 3
bottle do
cellar :any
sha256 "266886333e3e96868249fb5ea6117f95e262884b12c87999ce10839e7b54840a" => :high_sierra
sha256 "715fa62d9a31e3d64eb7be63847bfcb6430baf14513374afeb3861a9c736c27e" => :sierra
sha256 "bc0b47872ac179d5797a0431e268708b0fa5e6a444cfbcbefb9c5b565d44c6a6" => :el_capitan
sha256 "0226ff922a186c3ea5b7342b0caad554316332006db0b797f2ac0eb3cda2c5e8" => :yosemite
end
depends_on "pkg-config" => :build
depends_on "xz" => :build # Homebrew bug. Shouldn't need declaring explicitly.
depends_on "gettext"
depends_on "glib"
depends_on "popt"
depends_on "readline"
depends_on "openssl"
# These patches are applied upstream but release process seems to be dead.
# http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=256ced029c235687bfafdffd07be7d47bf7af39b
# http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=a2717927f297ff9bc6752f281d4eecab8bd34aad
patch do
url "https://mirrors.ocf.berkeley.edu/debian/pool/main/l/ldapvi/ldapvi_1.7-10.debian.tar.xz"
mirror "https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/l/ldapvi/ldapvi_1.7-10.debian.tar.xz"
sha256 "93be20cf717228d01272eab5940337399b344bb262dc8bc9a59428ca604eb6cb"
apply "patches/05_getline-conflict",
"patches/06_fix-vim-modeline"
end
def install
# Fix compilation with clang by changing `return` to `return 0`.
inreplace "ldapvi.c", "if (lstat(sasl, &st) == -1) return;",
"if (lstat(sasl, &st) == -1) return 0;"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
test do
system "#{bin}/ldapvi", "--version"
end
end