# HG changeset patch # User abarth93 # Date 1433939844 0 # Node ID fa07b71bcbfb07397685aede149bd0cf535298fe # Parent fe288ae1e8d9d333c303eeac1f1d4902de9a04ab merge patch from bug #44837, of-netcdf wont cross compile diff -r fe288ae1e8d9 -r fa07b71bcbfb main/netcdf/DESCRIPTION --- a/main/netcdf/DESCRIPTION Tue Jun 09 16:25:46 2015 +0000 +++ b/main/netcdf/DESCRIPTION Wed Jun 10 12:37:24 2015 +0000 @@ -1,6 +1,6 @@ Name: netcdf -Version: 1.0.6 -Date: 2015-02-22 +Version: 1.0.7 +Date: 2015-06-10 Author: Alexander Barth Maintainer: Alexander Barth Title: netcdf diff -r fe288ae1e8d9 -r fa07b71bcbfb main/netcdf/NEWS --- a/main/netcdf/NEWS Tue Jun 09 16:25:46 2015 +0000 +++ b/main/netcdf/NEWS Wed Jun 10 12:37:24 2015 +0000 @@ -1,3 +1,8 @@ +Summary of important user-visible changes for netcdf 1.0.7: +------------------------------------------------------------------- + + ** apply patch from John Donoghue to allow cross-compilation (bug #44837) + Summary of important user-visible changes for netcdf 1.0.6: ------------------------------------------------------------------- diff -r fe288ae1e8d9 -r fa07b71bcbfb main/netcdf/src/Makeconf.in --- a/main/netcdf/src/Makeconf.in Tue Jun 09 16:25:46 2015 +0000 +++ b/main/netcdf/src/Makeconf.in Wed Jun 10 12:37:24 2015 +0000 @@ -53,6 +53,8 @@ OCTAVE_VERSION = @OCTAVE_VERSION@ MKOCTFILE = @MKOCTFILE@ -DHAVE_OCTAVE_$(ver) -v SHLEXT = @SHLEXT@ +NC_CONFIG = @NC_CONFIG@ +OCTAVE_CONFIG = @OCTAVE_CONFIG@ %.o: %.c ; $(MKOCTFILE) -c $< %.o: %.f ; $(MKOCTFILE) -c $< diff -r fe288ae1e8d9 -r fa07b71bcbfb main/netcdf/src/Makefile --- a/main/netcdf/src/Makefile Tue Jun 09 16:25:46 2015 +0000 +++ b/main/netcdf/src/Makefile Wed Jun 10 12:37:24 2015 +0000 @@ -1,10 +1,13 @@ -LIBS=$(shell nc-config --libs) -AWK=awk -MKOCTFILE=mkoctfile -OCTAVE=octave -NCHEADER=$(shell nc-config --includedir)/netcdf.h +sinclude Makeconf + +AWK ?= awk +MKOCTFILE ?= mkoctfile +OCTAVE ?= octave +NC_CONFIG ?= nc-config +NCHEADER=$(shell $(NC_CONFIG) --includedir)/netcdf.h SRC=__netcdf__.cc -CFLAGS=$(shell nc-config --cflags) +CFLAGS=$(shell $(NC_CONFIG) --cflags) +LIBS=$(shell $(NC_CONFIG) --libs) all: __netcdf__.oct diff -r fe288ae1e8d9 -r fa07b71bcbfb main/netcdf/src/configure.base --- a/main/netcdf/src/configure.base Tue Jun 09 16:25:46 2015 +0000 +++ b/main/netcdf/src/configure.base Wed Jun 10 12:37:24 2015 +0000 @@ -50,6 +50,9 @@ AC_CHECK_PROG(MKOCTFILE,mkoctfile,mkoctfile) test -z "$MKOCTFILE" && AC_MSG_WARN([no mkoctfile found on path]) +AC_CHECK_PROG(OCTAVE_CONFIG,octave-config,octave-config) +test -z "$OCTAVE_CONFIG" && AC_MSG_WARN([no octave-config found on path]) + AC_SUBST(ver) AC_SUBST(subver) AC_SUBST(mpath) @@ -252,6 +255,13 @@ AC_SUBST($2) ]) +AC_DEFUN(OCTAVE_CONFIG_EVAL, +[AC_MSG_CHECKING([for $1 in octave-config]) +$2=`$OCTAVE_CONFIG -p $1` +AC_MSG_RESULT($$2) +AC_SUBST($2) +]) + dnl Check status of an octave variable dnl dnl OCTAVE_CHECK_EXIST(variable,action_if_true,action_if_false) @@ -269,13 +279,13 @@ dnl should check that $(OCTAVE) --version matches $(MKOCTFILE) --version AC_CHECK_PROG(OCTAVE,octave,octave) -OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION) +OCTAVE_CONFIG_EVAL(VERSION,OCTAVE_VERSION) dnl grab canonical host type so we can write system specific install stuff -OCTAVE_EVAL(octave_config_info('canonical_host_type'),canonical_host_type) +OCTAVE_CONFIG_EVAL(CANONICAL_HOST_TYPE,canonical_host_type) dnl grab SHLEXT from octave config -OCTAVE_EVAL(octave_config_info('SHLEXT'),SHLEXT) +OCTAVE_CONFIG_EVAL(SHLEXT,SHLEXT) AC_PROG_LN_S @@ -310,13 +320,14 @@ dnl checking for nc-config -AC_CHECK_PROG(NC_CONFIG, nc-config, nc-config) +dnl AC_CHECK_PROG(NC_CONFIG, nc-config, nc-config) +AC_CHECK_TOOL(NC_CONFIG, nc-config, nc-config) if test -z "$NC_CONFIG"; then AC_MSG_ERROR([nc-config not found], 1); fi -NETCDF_LIBS="$NETCDF_LIBS `nc-config --libs`" -NETCDF_CFLAGS="$NETCDF_CFLAGS `nc-config --cflags`" +NETCDF_LIBS="$NETCDF_LIBS `$NC_CONFIG --libs`" +NETCDF_CFLAGS="$NETCDF_CFLAGS `$NC_CONFIG --cflags`" CONFIGURE_OUTPUTS="Makeconf" @@ -336,7 +347,8 @@ headers: $includedir octave-forge is configured with - octave: $OCTAVE (version $OCTAVE_VERSION) - mkoctfile: $MKOCTFILE for Octave $subver + octave: $OCTAVE (version $OCTAVE_VERSION) + mkoctfile: $MKOCTFILE for Octave $subver + octave-config: $OCTAVE_CONFIG for Octave $subver netCDF compiler flags: $NETCDF_CFLAGS netCDF libraries: $NETCDF_LIBS"