Created
March 2, 2016 00:58
-
-
Save richli/76d55a4557a7c6ea9d21 to your computer and use it in GitHub Desktop.
Arch PKGBUILD for gmt 5.2.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- xyz2grd.c 2015-11-06 02:45:03.000000000 -0800 | |
+++ xyz2grd.c 2016-03-01 16:49:49.158598917 -0800 | |
@@ -749,7 +749,7 @@ | |
if (GMT_is_verbose (GMT, GMT_MSG_VERBOSE)) { | |
char line[GMT_BUFSIZ], e_value[GMT_LEN32]; | |
sprintf (line, "%s\n", GMT->current.setting.format_float_out); | |
- (GMT_is_dnan (GMT->common.d.active[GMT_IN])) ? sprintf (e_value, "NaN") : sprintf (e_value, GMT->current.setting.format_float_out, GMT->common.d.nan_proxy[GMT_IN]); | |
+ (GMT_is_dnan ((float) GMT->common.d.active[GMT_IN])) ? sprintf (e_value, "NaN") : sprintf (e_value, GMT->current.setting.format_float_out, GMT->common.d.nan_proxy[GMT_IN]); | |
GMT_Report (API, GMT_MSG_VERBOSE, "Data records read: %" PRIu64 " used: %" PRIu64 " nodes filled: %" PRIu64 " nodes empty: %" PRIu64 " [set to %s]\n", | |
n_read, n_used, n_filled, n_empty, e_value); | |
if (n_bad) GMT_Report (API, GMT_MSG_VERBOSE, "%" PRIu64 " records unreadable\n", n_bad); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# arg 1: the new package version | |
pre_install() { | |
/bin/true | |
} | |
# arg 1: the new package version | |
post_install() { | |
echo "==> GMT HIGH RESOLUTION AND DCW DATASETS" | |
echo "" | |
echo "==> The default installation of GMT contains a low resolution coastline dataset." | |
echo "==> For maps at higer resolutions please install the gmt-coast package." | |
echo "==> For the digital chart of the world dataset install the gmt-dcw package." | |
} | |
# arg 1: the new package version | |
# arg 2: the old package version | |
post_upgrade() { | |
post_install $1 | |
} | |
op=$1 | |
shift | |
$op $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor: Benjamin Sick | |
# Contributor: Rich Li <rich@dranek.com> | |
pkgname=gmt | |
pkgver=5.2.1 | |
pkgrel=3 | |
pkgdesc="Generic Mapping Tools: Collection of tools for manipulating geographic and Cartesian data sets, and generating EPS maps." | |
arch=(i686 x86_64) | |
url="http://gmt.soest.hawaii.edu/" | |
license=('GPL') | |
makedepends=('cmake') | |
depends=('gdal' 'fftw') | |
optdepends=( | |
'ghostscript' | |
'python-sphinx' | |
'python2-sphinx' | |
'gmt-coast: coastlines' | |
'gmt-dcw: digital chart of the world polygon map') | |
conflicts=('gmt4') | |
install='gmt.install' | |
source=( | |
"ftp://ftp.soest.hawaii.edu/gmt/${pkgname}-${pkgver}-src.tar.xz" | |
"float_cast.patch") | |
md5sums=('4823ab45965a55d5d8869181ae3b0cca' | |
'e8f073eba78712e5a773f1abeb9dfb4f') | |
prepare() { | |
cd "${srcdir}/${pkgname}-${pkgver}" | |
rm -fr build && mkdir build | |
patch -d "src/" < "${srcdir}/float_cast.patch" | |
} | |
build() { | |
cd "${srcdir}/${pkgname}-${pkgver}/build" | |
# -DLICENSE_RESTRICTED=off \ | |
cmake -DCMAKE_INSTALL_PREFIX=/usr \ | |
-DGSHHG_ROOT=/usr/share/gmt/coast \ | |
-DGMT_LIBDIR=lib \ | |
-DDCW_ROOT=/usr/share/gmt/dcw \ | |
-DGMT_DATADIR=share/gmt \ | |
-DGMT_MANDIR=share/man \ | |
-DGMT_DOCDIR=share/doc/gmt \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
.. | |
export MAKEFLAGS="-j1" | |
make | |
} | |
package() { | |
cd "${srcdir}/${pkgname}-${pkgver}/build" | |
make "DESTDIR=${pkgdir}" install | |
} | |
# vim:set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment