summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-12-26 13:52:14 +0100
committerDavid Seifert <soap@gentoo.org>2022-12-26 13:52:14 +0100
commitf8935fe091b274b52843192ec4aa489fe267ea9d (patch)
tree660b9267043f808c21ada0100ac38775ed021cbb /sci-misc
parentprofiles/features/wd40: mask more mkdocs-* (diff)
downloadgentoo-f8935fe091b274b52843192ec4aa489fe267ea9d.tar.gz
gentoo-f8935fe091b274b52843192ec4aa489fe267ea9d.tar.bz2
gentoo-f8935fe091b274b52843192ec4aa489fe267ea9d.zip
sci-misc/ncview: add 2.1.8
Bug: https://bugs.gentoo.org/741584 Bug: https://bugs.gentoo.org/828639 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/ncview/Manifest1
-rw-r--r--sci-misc/ncview/files/ncview-2.1.8-autotools.patch110
-rw-r--r--sci-misc/ncview/ncview-2.1.8.ebuild43
3 files changed, 154 insertions, 0 deletions
diff --git a/sci-misc/ncview/Manifest b/sci-misc/ncview/Manifest
index ef1c5c242779..9bc6f2ecb699 100644
--- a/sci-misc/ncview/Manifest
+++ b/sci-misc/ncview/Manifest
@@ -1 +1,2 @@
DIST ncview-2.1.7.tar.gz 1280624 BLAKE2B a3a69ee79443bef68b51ac9e8f9693a6720eec1e1cc03c91f3cf90883f7722d0eec6b2e06e6d6f8bcc3a4e18f2403446cb9b84d9ce2a258beb8b8c7109187ed8 SHA512 c39b26e8453f91865e8483abc6ee25d804150dd03ad21469c0e22a60b41f182c108678e22eb86652b66e8ca0997b5f533b2542593f793d673eeeab73b81eaef7
+DIST ncview-2.1.8.tar.gz 1267792 BLAKE2B 16d0cf4ef827d41a2f1773292839b1795934b346d2f52a6c3a8eeb50260e836822fbbc7245342664629cf256b4270426d4c89c0f848e95fddcf3de043c53cde3 SHA512 2567aa361b365c3788069d81bb7f890d5f244c387fa3ce70c78bcf4487c852d4ac4f93f0b0e3d821f8ae5816073cef654b659c8a3856f1d12fb0d80dfba92fc4
diff --git a/sci-misc/ncview/files/ncview-2.1.8-autotools.patch b/sci-misc/ncview/files/ncview-2.1.8-autotools.patch
new file mode 100644
index 000000000000..9a8fef2f7136
--- /dev/null
+++ b/sci-misc/ncview/files/ncview-2.1.8-autotools.patch
@@ -0,0 +1,110 @@
+--- a/configure.in
++++ b/configure.in
+@@ -8,6 +8,7 @@
+ m4_define([ncview_release_date],[15 Feb 2010])
+
+ AC_INIT([ncview],[ncview_version],[dpierce@ucsd.edu])
++AC_CONFIG_MACRO_DIR([m4macros])
+
+ # Handle netcdf
+ AC_PATH_NETCDF
+@@ -30,13 +31,11 @@
+ # we have to specifically check if the same compiler used to compile the
+ # netcdf library exists.
+ #------------------------------------------------------------------------
+-AC_PROG_CC( $NETCDF_CC )
+-AC_ISC_POSIX
+-AC_HEADER_STDC
++AC_PROG_CC
+
+
+-AC_CONFIG_HEADER(config.h)
+-AM_INIT_AUTOMAKE([ncview],[ncview_version])
++AC_CONFIG_HEADERS(config.h)
++AM_INIT_AUTOMAKE
+
+ AC_PATH_X
+ if test "x$no_x" == "xyes"; then
+@@ -206,82 +205,6 @@
+ AC_SUBST(X_INCLUDES)
+
+
+-#----------------------------------------------------------------------------
+-# We want to test if the same compiler was used for the netcdf library as for
+-# ncview. This might be complicated by the fact that often "gcc" and "cc"
+-# end up invoking the same compiler. Use an ugly hack that I have no idea
+-# if it generally works or not. Probably not.
+-#----------------------------------------------------------------------------
+-CC_TEST_SAME=$CC
+-#-----------------------------------------------------------------------
+-# Point of following obscure manipulations is that $CC can have multiple
+-# words, for example, it could be "gcc -fPIC -lm". We want to keep only
+-# the first word, so use 'set' and then take the first arg ($1).
+-#-----------------------------------------------------------------------
+-set $CC_TEST_SAME
+-CC_TEST_SAME=$1
+-if test x$CC_TEST_SAME = xcc; then
+- CC_TEST_SAME=gcc
+-fi
+-NETCDF_CC_TEST_SAME=$NETCDF_CC
+-set $NETCDF_CC_TEST_SAME
+-NETCDF_CC_TEST_SAME=$1
+-if test x$NETCDF_CC_TEST_SAME = xcc; then
+- NETCDF_CC_TEST_SAME=gcc
+-fi
+-if test x$CC_TEST_SAME != x$NETCDF_CC_TEST_SAME; then
+- echo "======================================================================"
+- echo "Configuration error: You specified that the \"$CC\" C compiler should be"
+- echo "used to build ncview, but the netcdf library was compiled with the \"$NETCDF_CC\""
+- echo "compiler. Here is the path where I found the netcdf library:"
+- echo " $NETCDF_LDFLAGS"
+- echo "You must use the same compiler for ncview as was used to build the netcdf library!"
+- echo " "
+- echo "There are two possible ways to fix this."
+- echo " "
+- echo "1) Download the netcdf library and compile it with the $CC compiler,"
+- echo "install it, and try again to build ncview. NOTE that if you do this,"
+- echo "you might have more than one version of the netcdf library on your system,"
+- echo "built with differnt compilers, which can get confusing. If you do this,"
+- echo "you will have to specify the path to the (new) version of nc-config"
+- echo "that was compiled using the $CC compiler by configuring ncview in a "
+- echo "way similar to this:"
+- echo " "
+- echo " ./configure --with-nc-config=/path/to/newly/compiled/nc-config"
+- echo " "
+- echo "2) Configure ncview to use the $NETCDF_CC compiler."
+- echo "To do this, set environmental variable CC to $NETCDF_CC"
+- echo "and run ./configure again"
+- echo "==================================================================="
+- 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.
+-#----------------------------------------------------------------------------------
+-echo "ac_computer_gnu: $ac_compiler_gnu"
+-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`;
+- RPDIR=${word:2}
+- RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR"
+- fi
+- done
+- AC_SUBST(RPATH_FLAGS)
+-fi
+-
+ AC_CONFIG_FILES([Makefile src/Makefile])
+ AC_OUTPUT
+
diff --git a/sci-misc/ncview/ncview-2.1.8.ebuild b/sci-misc/ncview/ncview-2.1.8.ebuild
new file mode 100644
index 000000000000..f85dbe848aa1
--- /dev/null
+++ b/sci-misc/ncview/ncview-2.1.8.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools desktop
+
+DESCRIPTION="X-based viewer for netCDF files"
+HOMEPAGE="http://meteora.ucsd.edu/~pierce/ncview_home_page.html"
+SRC_URI="ftp://cirrus.ucsd.edu/pub/ncview/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ media-libs/libpng:0=
+ sci-libs/netcdf[hdf5]
+ sci-libs/udunits
+ x11-libs/libXaw
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-autotools.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ doman data/ncview.1
+
+ insinto /usr/share/X11/app-defaults
+ newins Ncview-appdefaults Ncview
+
+ insinto /usr/share/ncview
+ doins *.ncmap
+
+ make_desktop_entry ncview
+}