aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gmt
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/gmt')
-rw-r--r--graphics/gmt/Makefile53
-rw-r--r--graphics/gmt/distinfo4
-rw-r--r--graphics/gmt/files/patch-src__grdvector.c27
-rw-r--r--graphics/gmt/files/patch-src__ps2raster.c11
-rw-r--r--graphics/gmt/pkg-plist2
5 files changed, 70 insertions, 27 deletions
diff --git a/graphics/gmt/Makefile b/graphics/gmt/Makefile
index 9e51ca89b0ed..7319f35ea6c7 100644
--- a/graphics/gmt/Makefile
+++ b/graphics/gmt/Makefile
@@ -3,16 +3,19 @@
PORTNAME= gmt
PORTVERSION= 4.5.11
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.soest.hawaii.edu/%SUBDIR%/ \
ftp://ftp.geologi.uio.no/pub/%SUBDIR%/ \
- ftp://ftp.iag.usp.br/pub/%SUBDIR%/ \
+ ftp://ftp.iag.usp.br/%SUBDIR%/ \
ftp://ftp.scc.u-tokai.ac.jp/pub/%SUBDIR%/ \
http://gd.tuwien.ac.at/graphics/visual/%SUBDIR%/ \
- http://gmt.mirror.ac.za/pub/%SUBDIR%/
-MASTER_SITE_SUBDIR= ${PORTNAME}
+ http://gmt.mirror.ac.za/%SUBDIR%/ \
+ ftp://ftp.soest.hawaii.edu/gshhg/:gshhg \
+ ftp://ftp.scc.u-tokai.ac.jp/pub/gmt/:gshhg
+MASTER_SITE_SUBDIR= ${PORTNAME} ${PORTNAME}/legacy
DISTFILES= ${DISTNAME}-src${EXTRACT_SUFX} \
- ${GSHHG_DISTNAME}.tar.gz
+ ${GSHHG_DISTNAME}.tar.gz:gshhg
MAINTAINER= ports@FreeBSD.org
COMMENT= Generic Mapping Tools - data processing and display software package
@@ -25,18 +28,13 @@ LICENSE_DISTFILES_LGPL3= ${GSHHG_DISTNAME}${EXTRACT_SUFX}
LIB_DEPENDS= libnetcdf.so:${PORTSDIR}/science/netcdf4
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
-OPTIONS_DEFINE= SHARED EPS DEBUG IMPERIAL GDAL OCTAVE X11 DOCS
-OPTIONS_DEFAULT= SHARED GDAL X11
-OPTIONS_SUB= yes
-SHARED_DESC= Build shared (dynamic) libraries
-EPS_DESC= Set .eps as default output format, otherwise .ps
-IMPERIAL_DESC= Choose Imperial (inch) units over metric (cm)
-GDAL_DESC= Compile in experimental GDAL support
-OCTAVE_DESC= Build GMT-octave interface
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_BZIP2= yes
USES= gmake shebangfix
-SHEBANG_FILES= gmtswitch
+SHEBANG_FILES= gmtswitch doc/examples/*/*.sh src/GMT.in \
+ src/gmt_shell_functions.sh.in src/gmtget.in \
+ src/gmtlogo.in src/isogmt.in
USE_AUTOTOOLS= autoconf
CONFIGURE_ARGS= --datadir=${DATADIR} \
--with-gshhg-dir=${DATADIR}/coast
@@ -45,15 +43,28 @@ MAKE_JOBS_UNSAFE= yes
PORTDOCS= *
+PORTSCOUT= limitw:0,even
+
+OPTIONS_DEFINE= DEBUG DOCS EPS GDAL IMPERIAL OCTAVE SHARED X11
+OPTIONS_DEFAULT= GDAL SHARED X11
+OPTIONS_SUB= yes
+
DEBUG_CONFIGURE_ON= --enable-debug --enable-devdebug
-SHARED_CONFIGURE_ON= --enable-shared
-IMPERIAL_CONFIGURE_ON= --enable-US
-EPS_CONFIGURE_ON= --enable-eps
+EPS_DESC= Set .eps as default output format, otherwise .ps
+EPS_CONFNIGURE_ON= --enable-eps
+GDAL_DESC= Compile in experimental GDAL support
GDAL_LIB_DEPENDS= libgdal.so:${PORTSDIR}/graphics/gdal
GDAL_CONFIGURE_ON= --enable-gdal
+IMPERIAL_DESC= Choose Imperial (inch) units over metric (cm)
+IMPERIAL_CONFIGURE_ON= --enable-US
+OCTAVE_DESC= Build GMT-octave interface
OCTAVE_RUN_DEPENDS= octave:${PORTSDIR}/math/octave
OCTAVE_CONFIGURE_ON= --enable-octave --enable-mex
OCTAVE_CONFIGURE_OFF= --disable-mex
+SHARED_DESC= Build shared (dynamic) libraries
+SHARED_CONFIGURE_ON= --enable-shared
+SHARED_USE= LDCONFIG=yes
+X11_USE= XORG=x11,xaw,xmu,xt
X11_CONFIGURE_OFF= --disable-xgrid
STRIP_FILES= blockmean blockmedian blockmode filter1d fitcircle \
@@ -70,18 +81,10 @@ STRIP_FILES= blockmean blockmedian blockmode filter1d fitcircle \
psxy psxyz sample1d spectrum1d splitxyz \
surface trend1d trend2d triangulate xyz2grd
-GSHHG_DISTNAME= gshhg-gmt-2.3.0
+GSHHG_DISTNAME= gshhg-gmt-nc4-2.2.4
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MSHARED}
-USE_LDCONFIG= yes
-.endif
-
-.if ${PORT_OPTIONS:MX11}
-USE_XORG= x11 xaw xmu xt
-.endif
-
post-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/coast
(cd ${WRKDIR}/${GSHHG_DISTNAME} && ${INSTALL_DATA} README.TXT *.nc \
diff --git a/graphics/gmt/distinfo b/graphics/gmt/distinfo
index 59fbce37ede1..8bd12618c35e 100644
--- a/graphics/gmt/distinfo
+++ b/graphics/gmt/distinfo
@@ -1,4 +1,4 @@
SHA256 (gmt-4.5.11-src.tar.bz2) = ec12b1206a8c91843587b241a478690bf61eb9350ff7458e28302a9f431a598e
SIZE (gmt-4.5.11-src.tar.bz2) = 39410288
-SHA256 (gshhg-gmt-2.3.0.tar.gz) = 123a969cf700c0d2607408af63f91c334e97bc456fa2deb3a51de0f50b1c911e
-SIZE (gshhg-gmt-2.3.0.tar.gz) = 57005361
+SHA256 (gshhg-gmt-nc4-2.2.4.tar.gz) = 6ad702c67b2113fc5805f9901a070c963d93429c42c0b4ef253fd21025176e9f
+SIZE (gshhg-gmt-nc4-2.2.4.tar.gz) = 55184708
diff --git a/graphics/gmt/files/patch-src__grdvector.c b/graphics/gmt/files/patch-src__grdvector.c
new file mode 100644
index 000000000000..ffeee46484e8
--- /dev/null
+++ b/graphics/gmt/files/patch-src__grdvector.c
@@ -0,0 +1,27 @@
+--- src/grdvector.c.orig
++++ src/grdvector.c
+@@ -388,15 +388,7 @@
+ if (!Ctrl->N.active) GMT_map_clip_on (GMT_no_rgb, 3);
+
+ if (Ctrl->I.xinc != 0.0 && Ctrl->I.yinc != 0.0) { /* Gave a coarser grid spacing, we hope */
+- struct GRD_HEADER tmp_h;
+- double val;
+- tmp_h = h[0];
+- tmp_h.x_inc = Ctrl->I.xinc;
+- tmp_h.y_inc = Ctrl->I.yinc;
+- GMT_RI_prepare (&tmp_h); /* Convert to make sure we have correct increments */
+- Ctrl->I.xinc = tmp_h.x_inc;
+- Ctrl->I.yinc = tmp_h.y_inc;
+- val = Ctrl->I.yinc / h[0].y_inc;
++ double val = Ctrl->I.yinc / h[0].y_inc;
+ dj = irint (val);
+ if (dj == 0 || fabs (val - dj) > GMT_CONV_LIMIT) {
+ fprintf (stderr, "%s: Error: New y grid increment (%g) is not a multiple of actual grid increment (%g).\n", GMT_program, Ctrl->I.xinc, h[0].x_inc);
+@@ -408,6 +400,7 @@
+ fprintf (stderr, "%s: Error: New x grid increment (%g) is not a multiple of actual grid increment (%g).\n", GMT_program, Ctrl->I.xinc, h[0].x_inc);
+ exit (EXIT_FAILURE);
+ }
++ /* Determine starting point for straddled access */
+ tmp = ceil (h[0].y_max / Ctrl->I.yinc) * Ctrl->I.yinc;
+ if (tmp > h[0].y_max) tmp -= Ctrl->I.yinc;
+ j0 = irint ((h[0].y_max - tmp) / h[0].y_inc);
diff --git a/graphics/gmt/files/patch-src__ps2raster.c b/graphics/gmt/files/patch-src__ps2raster.c
new file mode 100644
index 000000000000..020521acb252
--- /dev/null
+++ b/graphics/gmt/files/patch-src__ps2raster.c
@@ -0,0 +1,11 @@
+--- src/ps2raster.c.orig
++++ src/ps2raster.c
+@@ -505,7 +505,7 @@
+ for (k = 0; k < n_files; k++) {
+ excessK = FALSE;
+ memset ((void *)out_file, 0, BUFSIZ);
+- strcpy(ps_file,ps_names[k]);
++ if (ps_file != ps_names[k]) strcpy(ps_file,ps_names[k]);
+ if ((fp = fopen (ps_file, "r")) == NULL) {
+ fprintf (stderr, "%s: Cannot to open file %s\n", GMT_program, ps_file);
+ continue;
diff --git a/graphics/gmt/pkg-plist b/graphics/gmt/pkg-plist
index 47a792b58449..b0e368c05759 100644
--- a/graphics/gmt/pkg-plist
+++ b/graphics/gmt/pkg-plist
@@ -182,6 +182,7 @@ man/man1/makecpt.1.gz
man/man1/makepattern.1.gz
man/man1/mapproject.1.gz
man/man1/mgd77convert.1.gz
+man/man1/mgd77header.1.gz
man/man1/mgd77info.1.gz
man/man1/mgd77list.1.gz
man/man1/mgd77magref.1.gz
@@ -272,6 +273,7 @@ man/man5/gmtcolors.5.gz
%%DATADIR%%/conf/gmt_cpt.conf
%%DATADIR%%/conf/gmt_custom_media.conf
%%DATADIR%%/conf/gmt_custom_symbols.conf
+%%DATADIR%%/conf/gmt_setup.conf
%%DATADIR%%/conf/gmtdefaults_SI
%%DATADIR%%/conf/gmtdefaults_US
%%DATADIR%%/cpt/GMT_cool.cpt