# HG changeset patch # User John Donoghue # Date 1441375562 14400 # Node ID 46c6ddb14417febb642f0336a3fcd6dfa92d84f1 # Parent e56d3a2e616bc2d89667d481e32ba26b353ee58a of-communications: add patch to compile wih dev octave (Bug #45856) * src/of-communications-1-fixes.patch: new file * src/of-communications.mk: call autoconfigure * dist-files.mk: add of-communications-1-fixes.patch diff -r e56d3a2e616b -r 46c6ddb14417 dist-files.mk --- a/dist-files.mk Mon Aug 31 09:59:09 2015 -0400 +++ b/dist-files.mk Fri Sep 04 10:06:02 2015 -0400 @@ -447,6 +447,7 @@ octave-1-fixes.patch \ octave.mk \ of-actuarial.mk \ + of-communications-1-fixes.patch \ of-communications.mk \ of-control.mk \ of-data-smoothing.mk \ diff -r e56d3a2e616b -r 46c6ddb14417 src/of-communications-1-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-communications-1-fixes.patch Fri Sep 04 10:06:02 2015 -0400 @@ -0,0 +1,54 @@ +# HG changeset patch +# User John Donoghue +# Date 1441300743 14400 +# Thu Sep 03 13:19:03 2015 -0400 +# Node ID eeb20b3c6074e8932e40b14c9f99985340ceeca5 +# Parent dedf92d61d33525da3f71a635979c447defb438a +Check for ls-oct-ascii.h, ls-oct-text.h (Bug #45856) + +src/configure.ac: check for ls-oct-ascii.h, ls-oct-text.h and set HAVE_XXXX variables accordingly. + +src/ov-galois.cc: include either ls-oct-ascii.h, ls-oct-text.h dependong on HAVE_XXXX variables + +diff -r dedf92d61d33 -r eeb20b3c6074 src/configure.ac +--- a/src/configure.ac Sat Apr 04 12:20:33 2015 -0400 ++++ b/src/configure.ac Thu Sep 03 13:19:03 2015 -0400 +@@ -99,5 +99,21 @@ + PKG_CPPFLAGS="$PKG_CPPFLAGS -DHAVE_OCTAVE_BASE_VALUE_PRINT_CONST=1" + fi + ++comm_save_CXXFLAGS=$CXXFLAGS ++CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS" ++AC_LANG_PUSH(C++) ++AC_CHECK_HEADER([octave/ls-oct-ascii.h], [PKG_CPPFLAGS="$PKG_CPPFLAGS -DHAVE_OCTAVE_ASCII_H=1"], [], ++[ ++#include ++#incude ++]) ++AC_CHECK_HEADER([octave/ls-oct-text.h], [PKG_CPPFLAGS="$PKG_CPPFLAGS -DHAVE_OCTAVE_TEXT_H=1"], [], ++[ ++#include ++#include ++]) ++AC_LANG_POP(C++) ++CXXFLAGS=$comm_save_CXXFLAGS ++ + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT +diff -r dedf92d61d33 -r eeb20b3c6074 src/ov-galois.cc +--- a/src/ov-galois.cc Sat Apr 04 12:20:33 2015 -0400 ++++ b/src/ov-galois.cc Thu Sep 03 13:19:03 2015 -0400 +@@ -30,7 +30,12 @@ + #include + #include + +-#include ++ ++#if defined(HAVE_OCTAVE_TEXT_H) ++# include ++#else ++# include ++#endif + + #include "galois.h" + #include "ov-galois.h" diff -r e56d3a2e616b -r 46c6ddb14417 src/of-communications.mk --- a/src/of-communications.mk Mon Aug 31 09:59:09 2015 -0400 +++ b/src/of-communications.mk Fri Sep 04 10:06:02 2015 -0400 @@ -20,5 +20,6 @@ endef define $(PKG)_BUILD + cd $(1)/src && autoconf $(call OCTAVE_FORGE_PKG_BUILD,$(1),$(2),$(3),$($(PKG)_OPTIONS)) endef