view src/gnuplot-1-fixes.patch @ 4177:16b2ee1a1b5d

gnuplot: update for 5.0.4 * src/gnuplot.mk: update version, checksum * src/gnuplot-1-fixes.patch: updated patch
author "lostbard" <john.donoghue@ieee.org>
date Fri, 15 Jul 2016 10:24:05 -0400
parents 717e989767e3
children 851b9f4a6b1c
line wrap: on
line source

diff -ur gnuplot-5.0.4.orig/config/mingw/Makefile gnuplot-5.0.4/config/mingw/Makefile
--- gnuplot-5.0.4.orig/config/mingw/Makefile	2016-07-21 13:47:52.025061617 -0400
+++ gnuplot-5.0.4/config/mingw/Makefile	2016-07-21 13:48:27.859547002 -0400
@@ -119,14 +119,14 @@
 # Requires libcaca version 0.99.beta15 or newer. A post-beta18
 # svn version is recommended since it contains an improved
 # win32 backend.
-CACA=1
+#CACA=1
 
 # Uncomment if you have libiconv
 ICONV=1
 
 # Uncomment if you have libcerf
 # http://sourceforge.net/projects/libcerf/
-CERF=1
+#CERF=1
 
 # Below you can adapt paths according to your software setup:
 
@@ -171,8 +171,8 @@
 # http://go.microsoft.com/fwlink/?LinkId=154968
 # We need to explicitly set the correct path here since we also need
 # adjust the include and library paths.
-HHWPATH = $(PROGRAMFILES32)/HTML\ Help\ Workshop/
-HHC = $(HHWPATH)hhc
+#HHWPATH = $(PROGRAMFILES32)/HTML\ Help\ Workshop/
+#HHC = $(HHWPATH)hhc
 
 # Choose which resource compiler you want to use (GNU windres or MS rc):
 GNU_RC = 1
@@ -186,7 +186,7 @@
 
 # Inno Setup Compiler
 # get it from: http://www.jrsoftware.org/isdl.php
-ISCC = $(PROGRAMFILES32)/Inno\ Setup\ 5/iscc
+#ISCC = $(PROGRAMFILES32)/Inno\ Setup\ 5/iscc
 
 # Directory that might contain extra files to be shipped with the installer.
 # This should include dependencies like DLLs, but also fontconfig configuration files.
@@ -514,7 +514,7 @@
 FULLVERSION := $(MAINVERSION) patchlevel $(PATCHLEVEL)
 
 
-default: $(TARGET) $(MENUFILE) support
+default: $(TARGET) $(MENUFILE) # support
 
 console: 
 	$(MAKE) TARGET=gnuplot.exe default
@@ -556,8 +556,8 @@
 	$(CC) -c $(CFLAGS) $(CFLAGSEXTRA) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $<
 
 LDLIBS = -lkernel32 -lgdi32 -lwinspool -lcomdlg32 -lcomctl32 -ladvapi32 -lshell32 -lmsimg32 -lgdiplus
-LDLIBS += -lhtmlhelp
-LDFLAGS2 += -L$(HHWPATH)lib
+#LDLIBS += -lhtmlhelp
+#LDFLAGS2 += -L$(HHWPATH)lib
 ifdef MINGW64
 LDFLAGS2 += -L.
 endif
diff -ur gnuplot-5.0.4.orig/src/command.c gnuplot-5.0.4/src/command.c
--- gnuplot-5.0.4.orig/src/command.c	2016-07-21 13:47:51.987062163 -0400
+++ gnuplot-5.0.4/src/command.c	2016-07-21 13:48:27.860546987 -0400
@@ -125,7 +125,7 @@
 # endif
 #endif /* _Windows */
 
-#ifdef _Windows
+#ifdef IGNORE_Windows
 # include <windows.h>
 # ifdef __MSC__
 #  include <malloc.h>
@@ -2535,6 +2535,7 @@
 void
 help_command()
 {
+#ifndef __MINGW32__
     HWND parent;
 
     c_token++;
@@ -2570,6 +2571,7 @@
         link.fIndexOnFail = TRUE;
         HtmlHelp(parent, winhelpname, HH_KEYWORD_LOOKUP, (DWORD_PTR)&link);
     }
+#endif
 }
 #else  /* !_Windows */
 #ifndef VMS
diff -ur gnuplot-5.0.4.orig/src/internal.c gnuplot-5.0.4/src/internal.c
--- gnuplot-5.0.4.orig/src/internal.c	2016-07-21 13:47:52.006061890 -0400
+++ gnuplot-5.0.4/src/internal.c	2016-07-21 13:48:27.861546973 -0400
@@ -47,7 +47,7 @@
 
 #include <math.h>
 
-#ifndef _WIN64
+#if !defined(__MINGW64_VERSION_MAJOR)
 /*
  * FIXME: This is almost certainly out of date on linux, since the matherr
  * mechanism has been replaced by math_error() and supposedly is only 
diff -ur gnuplot-5.0.4.orig/src/syscfg.h gnuplot-5.0.4/src/syscfg.h
--- gnuplot-5.0.4.orig/src/syscfg.h	2016-07-21 13:47:51.994062063 -0400
+++ gnuplot-5.0.4/src/syscfg.h	2016-07-21 13:49:02.401050952 -0400
@@ -345,7 +345,11 @@
 #endif
 
 #ifndef GP_MATHERR
-# define GP_MATHERR matherr
+# if __MINGW32__
+#  define GP_MATHERR _matherr
+#else
+#  define GP_MATHERR matherr
+#endif
 #endif
 
 #ifdef HAVE_STRUCT_EXCEPTION_IN_MATH_H