Permalink
Browse files

mongo-c-driver: rename from mongo-c, cleanup.

  • Loading branch information...
MikeMcQuaid committed Nov 28, 2016
1 parent c026aa8 commit 2c6fd9c6c0e97c68debe2b07593c6e61558f9713
Showing with 27 additions and 20 deletions.
  1. +1 βˆ’0 Aliases/libmongoc
  2. +1 βˆ’0 Aliases/mongo-c
  3. +19 βˆ’17 Formula/{mongo-c.rb β†’ mongo-c-driver.rb}
  4. +5 βˆ’3 Formula/zmap.rb
  5. +1 βˆ’0 formula_renames.json
View
View
@@ -1,6 +1,6 @@
class MongoC < Formula
desc "Official C driver for MongoDB"
homepage "https://docs.mongodb.org/ecosystem/drivers/c/"
class MongoCDriver < Formula
desc "C driver for MongoDB"
homepage "https://github.com/mongodb/mongo-c-driver"
url "https://github.com/mongodb/mongo-c-driver/releases/download/1.5.0/mongo-c-driver-1.5.0.tar.gz"
sha256 "b9b7514052fe7ec40786d8fc22247890c97d2b322aa38c851bba986654164bd6"
@@ -20,19 +20,18 @@ class MongoC < Formula
depends_on "pkg-config" => :build
depends_on "openssl" => :recommended
conflicts_with "libbson",
:because => "mongo-c installs the libbson headers"
depends_on "libbson"
def install
args = %W[--prefix=#{prefix}]
# --enable-sasl=no: https://jira.mongodb.org/browse/CDRIVER-447
args << "--enable-sasl=no" if MacOS.version <= :yosemite
system "./autogen.sh" if build.head?
if build.head?
system "./autogen.sh"
end
args = %W[
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--enable-man-pages
]
if build.with?("openssl")
args << "--enable-ssl=yes"
@@ -42,14 +41,17 @@ def install
system "./configure", *args
system "make", "install"
prefix.install "examples"
pkgshare.install "examples"
end
test do
system ENV.cc, prefix/"examples/mongoc-ping.c",
libbson = Formula["libbson"]
system ENV.cc, pkgshare/"examples/mongoc-ping.c",
"-I#{include}/libmongoc-1.0",
"-I#{include}/libbson-1.0",
"-L#{lib}", "-lmongoc-1.0", "-lbson-1.0",
"-I#{libbson.include}/libbson-1.0",
"-L#{lib}", "-L#{libbson.lib}",
"-lmongoc-1.0", "-lbson-1.0",
"-o", "test"
assert_match "No suitable servers", shell_output("./test mongodb://0.0.0.0 2>&1", 3)
end
View
@@ -23,7 +23,9 @@ class Zmap < Formula
depends_on "libdnet"
depends_on "json-c"
depends_on "hiredis" => :optional
depends_on "mongo-c" => :optional
depends_on "mongo-c-driver" => :optional
deprecated_option "with-mongo-c" => "with-mongo-c-driver"
def install
inreplace ["conf/zmap.conf", "src/zmap.c", "src/zopt.ggo.in"], "/etc", etc
@@ -32,7 +34,7 @@ def install
args << "-DENABLE_DEVELOPMENT=OFF"
args << "-DRESPECT_INSTALL_PREFIX_CONFIG=ON"
args << "-DWITH_REDIS=ON" if build.with? "hiredis"
args << "-DWITH_MONGO=ON" if build.with? "mongo-c"
args << "-DWITH_MONGO=ON" if build.with? "mongo-c-driver"
system "cmake", ".", *args
system "make"
@@ -42,6 +44,6 @@ def install
test do
system "#{sbin}/zmap", "--version"
assert_match /redis-csv/, `#{sbin}/zmap --list-output-modules` if build.with? "hiredis"
assert_match /mongo/, `#{sbin}/zmap --list-output-modules` if build.with? "mongo-c"
assert_match /mongo/, `#{sbin}/zmap --list-output-modules` if build.with? "mongo-c-driver"
end
end
View
@@ -20,6 +20,7 @@
"juju": "juju@1.25",
"letsencrypt": "certbot",
"libcppa": "caf",
"mongo-c": "mongo-c-driver",
"mpich2": "mpich",
"nimrod": "nim",
"objective-caml": "ocaml",

0 comments on commit 2c6fd9c

Please sign in to comment.