class Libdap < Formula desc "Framework for scientific data networking" homepage "https://www.opendap.org/" url "https://www.opendap.org/pub/source/libdap-3.19.0.tar.gz" sha256 "59c384c2da01104a4ef37f010f3bcf5d46e85e30fcfc942c9181e17128f168a5" revision 1 bottle do sha256 "2476acd68e58f7aa6d9cfc000feeb5ef4acbaa4e76f70d03b0fe39b12d7fcef2" => :sierra sha256 "6d0d468daf40a8577f336d4248c3c0503d0a2ccdfce585973510efc98b09ec29" => :el_capitan sha256 "e50988cb95766dc4d9dfbb2852d806d54f27f7c80897b1826fe4dde64adff8cc" => :yosemite end head do url "https://github.com/OPENDAP/libdap4.git" depends_on "automake" => :build depends_on "autoconf" => :build depends_on "libtool" => :build end option "without-test", "Skip build-time tests (Not recommended)" depends_on "pkg-config" => :build depends_on "bison" => :build depends_on "libxml2" depends_on "openssl" needs :cxx11 if MacOS.version < :mavericks def install # Otherwise, "make check" fails ENV.cxx11 if MacOS.version < :mavericks args = %W[ --prefix=#{prefix} --disable-dependency-tracking --disable-debug --with-included-regex ] # Let's try removing this for OS X > 10.6; old note follows: # __Always pass the curl prefix!__ # Otherwise, configure will fall back to pkg-config and on Leopard # and Snow Leopard, the libcurl.pc file that ships with the system # is seriously broken---too many arch flags. This will be carried # over to `dap-config` and from there the contamination will spread. args << "--with-curl=/usr" if MacOS.version <= :snow_leopard system "autoreconf", "-fvi" if build.head? system "./configure", *args system "make" system "make", "check" if build.with? "test" system "make", "install" # Ensure no Cellar versioning of libxml2 path in dap-config entries xml2 = Formula["libxml2"] inreplace bin/"dap-config", xml2.opt_prefix.realpath, xml2.opt_prefix end test do assert_match version.to_s, shell_output("#{bin}/dap-config --version") end end