summaryrefslogtreecommitdiff
path: root/sci-misc/ncview
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-26 14:07:48 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-26 14:07:48 +0000
commitadb727afeb568404873e8cbc91ba93d3d49eff13 (patch)
treed86cdceda93a48d792f162c7b5f054f09c41ee73 /sci-misc/ncview
parented94061721073b4f7b546c30ae337f5737939985 (diff)
gentoo auto-resync : 26:12:2022 - 14:07:48
Diffstat (limited to 'sci-misc/ncview')
-rw-r--r--sci-misc/ncview/Manifest5
-rw-r--r--sci-misc/ncview/files/ncview-2.1.8-autotools.patch110
-rw-r--r--sci-misc/ncview/ncview-2.1.8.ebuild (renamed from sci-misc/ncview/ncview-2.1.7.ebuild)28
3 files changed, 131 insertions, 12 deletions
diff --git a/sci-misc/ncview/Manifest b/sci-misc/ncview/Manifest
index 6a5a16a33404..b399dc085eee 100644
--- a/sci-misc/ncview/Manifest
+++ b/sci-misc/ncview/Manifest
@@ -1,3 +1,4 @@
-DIST ncview-2.1.7.tar.gz 1280624 BLAKE2B a3a69ee79443bef68b51ac9e8f9693a6720eec1e1cc03c91f3cf90883f7722d0eec6b2e06e6d6f8bcc3a4e18f2403446cb9b84d9ce2a258beb8b8c7109187ed8 SHA512 c39b26e8453f91865e8483abc6ee25d804150dd03ad21469c0e22a60b41f182c108678e22eb86652b66e8ca0997b5f533b2542593f793d673eeeab73b81eaef7
-EBUILD ncview-2.1.7.ebuild 690 BLAKE2B cf8c98489ea2474163765e0f61f99711b1e9e7f947208521366deb127c670273703613dcb7e19eb6a22f5f1e13d1de9b9647dd0e45620cfdfc2b78831dec1e90 SHA512 ecd0ac72d3ad748d0004cdf75d7f33a695829898e43bf4725e7b3894af2e0cc3a2369c362d9f6b31b9131b418f305fa8c9738b35fca781fb8970e213aad96895
+AUX ncview-2.1.8-autotools.patch 4402 BLAKE2B fe0743c1556e7c9b5c9a1a9074efbb517f8cb34d3584ebad005ee68927c78c8666aa35355fb5b6ca6b24ee1073b110b2d67cbb792d35018724166d048837c87c SHA512 93ff400d314c528d56ae14dabae845ed6d7f700a0a9ef938075465fd1cb7594d8a266d91b04b85d2f48cc3a184fa590365742809c266daf268d7096db396dfd6
+DIST ncview-2.1.8.tar.gz 1267792 BLAKE2B 16d0cf4ef827d41a2f1773292839b1795934b346d2f52a6c3a8eeb50260e836822fbbc7245342664629cf256b4270426d4c89c0f848e95fddcf3de043c53cde3 SHA512 2567aa361b365c3788069d81bb7f890d5f244c387fa3ce70c78bcf4487c852d4ac4f93f0b0e3d821f8ae5816073cef654b659c8a3856f1d12fb0d80dfba92fc4
+EBUILD ncview-2.1.8.ebuild 779 BLAKE2B faac4b671dc55e8bc800ea9c0b895a9e910e999ac9c684a852cceeceb8ecec8ec3c1e05b931c61b6912330181367fe23048c4325939b38b4f3244678d84d241c SHA512 0a953705bb69671dd465d13ce2f06cf393adb0b93e84dbc27ee60a49447231529990aed9842924dfef251333979334341cf4efee2ca24f80d3aeea025bfe80cb
MISC metadata.xml 596 BLAKE2B 1ae485a3847a461d03bf85e3e41bb333854722b38776ceefd7c9f74a07a1fac55f9d8753fc9df6c4df0ee859d4cf6e9fa1b14339dafb23f9c13699b02fe2885e SHA512 ddcb54f08bb3a59fddb6d1a4e1c176b15ff1e663e6cdb873a87a63fa876e893ca3db54a21cdf822c256b0bdf4ca7b0a050a90cdb4737df2538f709810e0c9beb
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.7.ebuild b/sci-misc/ncview/ncview-2.1.8.ebuild
index 9a3bb737c9b5..f85dbe848aa1 100644
--- a/sci-misc/ncview/ncview-2.1.7.ebuild
+++ b/sci-misc/ncview/ncview-2.1.8.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit eutils
+inherit autotools desktop
DESCRIPTION="X-based viewer for netCDF files"
HOMEPAGE="http://meteora.ucsd.edu/~pierce/ncview_home_page.html"
@@ -11,25 +11,33 @@ SRC_URI="ftp://cirrus.ucsd.edu/pub/ncview/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-IUSE=""
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
-RDEPEND="media-libs/libpng:0=
- >=sci-libs/netcdf-4.1[hdf5]
+RDEPEND="
+ media-libs/libpng:0=
+ sci-libs/netcdf[hdf5]
+ sci-libs/udunits
x11-libs/libXaw
- sci-libs/udunits"
+"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-autotools.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
src_install() {
default
- doman data/${PN}.1
+ doman data/ncview.1
insinto /usr/share/X11/app-defaults
newins Ncview-appdefaults Ncview
- insinto /usr/share/${PN}
+ insinto /usr/share/ncview
doins *.ncmap
- make_desktop_entry ${PN}
+ make_desktop_entry ncview
}