changeset 4297:8f864b4ea93b

gnuplot: enable wx terminal type * src/gnuplot-1-fixes.patch: patch updated * src/gnuplot.mk: update extra flags for wxwidgets
author John D
date Wed, 28 Dec 2016 14:49:14 -0500
parents 68c7e187e20d
children b753293ad067
files src/gnuplot-1-fixes.patch src/gnuplot.mk
diffstat 2 files changed, 63 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gnuplot-1-fixes.patch	Mon Dec 26 15:41:24 2016 -0500
+++ b/src/gnuplot-1-fixes.patch	Wed Dec 28 14:49:14 2016 -0500
@@ -123,3 +123,53 @@
  #endif
  
  #ifdef HAVE_STRUCT_EXCEPTION_IN_MATH_H
+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-12-27 08:55:41.906600912 -0500
++++ gnuplot-5.0.4/config/mingw/Makefile	2016-12-27 08:57:30.033448266 -0500
+@@ -101,6 +101,7 @@
+ # Uncomment the following lines to compile it.
+ #WXT=1
+ #CAIROLIBS=1
++WX_CONFIG ?= wx-config
+ 
+ # Build qt terminal?
+ #QT = 1
+@@ -422,9 +423,9 @@
+ 
+ ifdef WXT
+ 	CFLAGS += -DWXWIDGETS
+-	WXT_CXXFLAGS := $(shell wx-config --cxxflags)
++	WXT_CXXFLAGS := $(shell $(WX_CONFIG) --cxxflags)
+ 	CXXFLAGS += $(WXT_CXXFLAGS)
+-	WX_LIBS := $(shell wx-config --libs | sed -e "s+-Wl,--subsystem,windows++g" -e "s+-mwindows++g")
++	WX_LIBS := $(shell $(WX_CONFIG) --libs | sed -e "s+-Wl,--subsystem,windows++g" -e "s+-mwindows++g")
+ 	WX_OBJS = wxt_gui.$(O)
+ endif
+ 
+diff -ur gnuplot-5.0.4.orig/src/wxterminal/wxt_gui.h gnuplot-5.0.4/src/wxterminal/wxt_gui.h
+--- gnuplot-5.0.4.orig/src/wxterminal/wxt_gui.h	2016-12-27 12:29:33.624151543 -0500
++++ gnuplot-5.0.4/src/wxterminal/wxt_gui.h	2016-12-27 12:30:09.419977685 -0500
+@@ -174,7 +174,7 @@
+ #  ifndef _WIN32_WINNT 
+ #   define _WIN32_WINNT 0x0500
+ #  endif
+-#  include "Windows.h"
++#  include "windows.h"
+ #  include "win/wtext.h"
+ #  include "win/winmain.h"
+ # endif
+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-12-27 12:42:32.612130064 -0500
++++ gnuplot-5.0.4/config/mingw/Makefile	2016-12-27 12:43:31.994500570 -0500
+@@ -108,9 +108,9 @@
+ # specify QT installation directory
+ #QT_DIR = /c/Qt/5.2.1/mingw48_32
+ ifndef MINGW64
+-QT_DIR = /d/Source/Qt-5.2.1-mingw/5.2.1/mingw48_32
++QT_DIR ?= /d/Source/Qt-5.2.1-mingw/5.2.1/mingw48_32
+ else
+-QT_DIR = /mingw64
++QT_DIR ?= /mingw64
+ endif
+ 
+ # Uncomment the following line to select the lua/tikz terminal
--- a/src/gnuplot.mk	Mon Dec 26 15:41:24 2016 -0500
+++ b/src/gnuplot.mk	Wed Dec 28 14:49:14 2016 -0500
@@ -10,8 +10,20 @@
 $(PKG)_URL      := http://sourceforge.net/projects/gnuplot/files/gnuplot/$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     :=
 
+$(PKG)_EXTRAFLAGS :=
+
+
+$(PKG)_DEPS     += wxwidgets cairo  pango
+$(PKG)_EXTRAFLAGS += CAIRTERMS=1 CAIROLIBS=1 
+$(PKG)_EXTRAFLAGS += WXT=1 WX_CONFIG=$(MXE_TOOL_PREFIX)wx-config
+
+#ifeq ($(ENABLE_QT5),yes)
+#  $(PKG)_DEPS     += qt5
+#  $(PKG)_EXTRAFLAGS += QT=1 QT_DIR=$(HOST_PREFIX)/qt5
+#endif
+
 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
-    $(PKG)_EXTRAFLAGS := ICONV_CFLAGS='-I$(HOST_INCDIR)' ICONV_LDFLAGS='-L$(HOST_LIBDIR)'
+    $(PKG)_EXTRAFLAGS += ICONV_CFLAGS='-I$(HOST_INCDIR)' ICONV_LDFLAGS='-L$(HOST_LIBDIR)'
 endif
 
 define $(PKG)_UPDATE
@@ -51,7 +63,6 @@
     $(INSTALL) -m755 '$(1)/config/mingw/gnuplot.exe' '$(TOP_DIR)/gnuplot/bin/'
     $(INSTALL) -m755 '$(1)/config/mingw/wgnuplot.exe' '$(TOP_DIR)/gnuplot/bin/'
     $(INSTALL) -m644 '$(1)/src/win/wgnuplot.mnu' '$(TOP_DIR)/gnuplot/bin/'
-
 endef
 else
 ifeq ($(MXE_SYSTEM),msvc)