2011-05-14 22:53:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ncview < Formula
|
2011-10-13 20:14:36 +00:00
|
|
|
url 'ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.1.tar.gz'
|
2011-05-14 22:53:13 +00:00
|
|
|
homepage 'http://meteora.ucsd.edu/~pierce/ncview_home_page.html'
|
2011-10-13 20:14:36 +00:00
|
|
|
md5 '34e25f5949af342a1783542799f51bed'
|
2011-05-14 22:53:13 +00:00
|
|
|
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :x11
|
2011-05-14 22:53:13 +00:00
|
|
|
depends_on "netcdf"
|
|
|
|
|
2012-05-24 00:21:56 +00:00
|
|
|
# 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.
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2011-05-14 22:53:13 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
2012-05-24 00:21:56 +00:00
|
|
|
"--disable-dependency-tracking"
|
2011-05-14 22:53:13 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2012-05-24 00:21:56 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
Don't try to mess with the compiler rpath. Just not a good idea.
|
|
|
|
|
|
|
|
diff --git a/configure b/configure
|
|
|
|
index b80ae96..a650f6f 100755
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
|
|
|
@@ -8672,29 +8672,6 @@ if test x$CC_TEST_SAME != x$NETCDF_CC_TEST_SAME; then
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
-#----------------------------------------------------------------------------------
|
|
|
|
-# Construct our RPATH flags. Idea here is that we have LDFLAGS that might look,
|
|
|
|
-# for example, something like this:
|
|
|
|
-# LIBS="-L/usr/local/lib -lnetcdf -L/home/pierce/lib -ludunits"
|
|
|
|
-# We want to convert this to -rpath flags suitable for the compiler, which would
|
|
|
|
-# have this format:
|
|
|
|
-# "-Wl,-rpath,/usr/local/lib -Wl,-rpath,/home/pierce/lib"
|
|
|
|
-#
|
|
|
|
-# As a safety check, I only do this for the GNU compiler, as I don't know if this
|
|
|
|
-# is anything like correct syntax for other compilers. Note that this *does* work
|
|
|
|
-# for the Intel icc compiler, but also that the icc compiler sets $ac_compiler_gnu
|
|
|
|
-# to "yes". Go figure.
|
|
|
|
-#----------------------------------------------------------------------------------
|
|
|
|
-if test x$ac_compiler_gnu = xyes; then
|
|
|
|
- RPATH_FLAGS=""
|
|
|
|
- for word in $UDUNITS2_LDFLAGS $NETCDF_LDFLAGS; do
|
|
|
|
- if test `expr $word : -L/` -eq 3; then
|
|
|
|
- RPDIR=`expr substr $word 3 999`;
|
|
|
|
- RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR"
|
|
|
|
- fi
|
|
|
|
- done
|
|
|
|
-
|
|
|
|
-fi
|
|
|
|
|
|
|
|
|
|
|
|
ac_config_files="$ac_config_files Makefile src/Makefile"
|