From feccd597ffc16801bcc5f753b5bec87c43a30b34 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Sun, 9 Oct 2016 10:55:24 -0400 Subject: [PATCH] ssdb: revision for 1.9.2 retag See: https://github.com/Homebrew/homebrew-core/issues/4898 https://github.com/ideawu/ssdb/issues/995 Tweaks: - Add autoconf as build dep; without it: ==> make CC=clang CXX=clang++ ERROR! autoconf required! install autoconf first Makefile:4: build_config.mk: No such file or directory make: *** No rule to make target `build_config.mk'. Stop. - ssdb-cli inreplace refresh; - ssdb-ins.sh removed. Closes #5734. Signed-off-by: Zhiming Wang --- Formula/ssdb.rb | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Formula/ssdb.rb b/Formula/ssdb.rb index 7e39a5e034..bf3340c3ab 100644 --- a/Formula/ssdb.rb +++ b/Formula/ssdb.rb @@ -2,7 +2,9 @@ class Ssdb < Formula desc "NoSQL database supporting many data structures: Redis alternative" homepage "http://ssdb.io/" url "https://github.com/ideawu/ssdb/archive/1.9.2.tar.gz" - sha256 "9387ebeaf24f4e3355967ba2459b59be683f75d6423f408ce4cefed2596b4736" + sha256 "3feffa31c07bc3b288978eb0a54ba64a72cb7ee56949faa5cd361ad1a3151111" + revision 1 + head "https://github.com/ideawu/ssdb.git" bottle do @@ -12,21 +14,15 @@ class Ssdb < Formula sha256 "d997f3f17d79e1485389eb4f6c86ba6a5dd60f0d690852dfd689d292877bc8f0" => :mavericks end + depends_on "autoconf" => :build + def install - inreplace "tools/ssdb-cli", "DIR=`dirname $0`", "DIR=#{prefix}" + inreplace "tools/ssdb-cli", /^DIR=.*$/, "DIR=#{prefix}" system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}" system "make", "install", "PREFIX=#{prefix}" - inreplace "#{prefix}/ssdb-ins.sh" do |s| - # Fix path to ssdb-server. - s.gsub! "/usr/local/ssdb", bin - # Fix handling of absolute pid path in config. - s.gsub! "dir=`dirname $config`\n", "" - s.gsub! %r{\$dir/`(.*?) \| sed -n 's/\^\\.\\///p'`}, '`\1`' - end - - ["bench", "cli", "dump", "ins.sh", "repair", "server"].each do |suffix| + ["bench", "cli", "dump", "repair", "server"].each do |suffix| bin.install "#{prefix}/ssdb-#{suffix}" end