<commit_before>require 'formula'

class Ncview < Formula
  homepage 'http://meteora.ucsd.edu/~pierce/ncview_home_page.html'
  url 'ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.5.tar.gz'
  mirror 'https://fossies.org/linux/misc/ncview-2.1.5.tar.gz'
  sha1 '31685d068f158ea235654cbee118980f3f038eab'

  depends_on :x11
  depends_on "netcdf"
  depends_on "udunits"

  # Disable a block in configure that tries to pass an RPATH to the compiler.
  # The code guesses wrong which causes the linking step to fail.
  patch :DATA

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end
end

__END__
--- ncview-2.1.5-orig/configure	2015-03-18 09:39:32.000000000 -0700
+++ ncview-2.1.5/configure	2015-05-29 13:44:28.000000000 -0700
@@ -5806,32 +5806,6 @@
 	exit -1<commit_msg>ncview: add 2.1.5 bottle.<commit_after>require 'formula'

class Ncview < Formula
  homepage 'http://meteora.ucsd.edu/~pierce/ncview_home_page.html'
  url 'ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.5.tar.gz'
  mirror 'https://fossies.org/linux/misc/ncview-2.1.5.tar.gz'
  sha1 '31685d068f158ea235654cbee118980f3f038eab'

  bottle do
    root_url "https://homebrew.bintray.com/bottles-science"
    sha256 "564f53319cf2c8c7f1c1d1bec558ca77da0668212c32b4e5843dd8db12ba678b" => :yosemite
    sha256 "4617447e12dabd3a80da5fb49975d5f681903cf35f81bbf85665ad10d4e9b720" => :mavericks
    sha256 "0fa4015cffb9727ddf3555db2d2cab8be8b02f2d23f11fc53a0fd5bd4bc7a9cf" => :mountain_lion
  end

  depends_on :x11
  depends_on "netcdf"
  depends_on "udunits"

  # Disable a block in configure that tries to pass an RPATH to the compiler.
  # The code guesses wrong which causes the linking step to fail.
  patch :DATA

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end
end

__END__
--- ncview-2.1.5-orig/configure	2015-03-18 09:39:32.000000000 -0700
+++ ncview-2.1.5/configure	2015-05-29 13:44:28.000000000 -0700
@@ -5806,32 +5806,6 @@
 	exit -1
{'fraction_non_alphanumeric': 0.124282982791587, 'fraction_numerical': 0.16204588910133844, 'mean_word_length': 3.5798687089715537, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1390674', 'n_tokens_mistral': 1047, 'n_tokens_neox': 859, 'n_words': 156}