|
| 1 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/config/mingw/Makefile gnuplot-5.4.0/config/mingw/Makefile |
| 2 | +--- gnuplot-5.4.0.orig/config/mingw/Makefile 2020-04-10 09:15:40.000000000 +0530 |
| 3 | ++++ gnuplot-5.4.0/config/mingw/Makefile 2020-09-06 20:38:04.140186600 +0530 |
| 4 | +@@ -784,19 +784,19 @@ |
| 5 | + $(HELPFILE): $(BUILDHELPFILE) |
| 6 | + $(CP) $^ $@ |
| 7 | + |
| 8 | +-htmlhelp.def: /c/Windows/System32/hhctrl.ocx |
| 9 | +-ifndef MINGW64 |
| 10 | +- pexports $^ > $@ |
| 11 | +-else |
| 12 | +- gendef - $^ > $@ |
| 13 | +-endif |
| 14 | ++#htmlhelp.def: /c/Windows/System32/hhctrl.ocx |
| 15 | ++#ifndef MINGW64 |
| 16 | ++# pexports $^ > $@ |
| 17 | ++#else |
| 18 | ++# gendef - $^ > $@ |
| 19 | ++#endif |
| 20 | + |
| 21 | +-prntvpt.def: /c/Windows/System32/prntvpt.dll |
| 22 | +-ifndef MINGW64 |
| 23 | +- pexports $^ > $@ |
| 24 | +-else |
| 25 | +- gendef - $^ > $@ |
| 26 | +-endif |
| 27 | ++#prntvpt.def: /c/Windows/System32/prntvpt.dll |
| 28 | ++#ifndef MINGW64 |
| 29 | ++# pexports $^ > $@ |
| 30 | ++#else |
| 31 | ++# gendef - $^ > $@ |
| 32 | ++#endif |
| 33 | + |
| 34 | + # Working directory for patched Japanese sources |
| 35 | + JA = ja/ |
| 36 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/configure.ac gnuplot-5.4.0/configure.ac |
| 37 | +--- gnuplot-5.4.0.orig/configure.ac 2020-07-12 05:59:47.000000000 +0530 |
| 38 | ++++ gnuplot-5.4.0/configure.ac 2020-09-06 20:04:48.475405900 +0530 |
| 39 | +@@ -37,6 +37,8 @@ |
| 40 | + AC_C_STRINGIZE |
| 41 | + AC_PROG_LN_S |
| 42 | + |
| 43 | ++AC_CANONICAL_HOST |
| 44 | ++ |
| 45 | + if test "${build}" != "${host}" |
| 46 | + then |
| 47 | + CC=${CC-${host_alias-gcc}} |
| 48 | +@@ -50,6 +52,8 @@ |
| 49 | + CC_FOR_BUILD="${CC}" |
| 50 | + AC_PROG_CC |
| 51 | + |
| 52 | ++ build_mingw=no |
| 53 | ++ |
| 54 | + # We must set the default linker to the linker used by gcc for the correct |
| 55 | + # operation of libtool. If LD is not defined and we are using gcc, try to |
| 56 | + # set the LD default to the ld used by gcc. |
| 57 | +@@ -59,7 +63,10 @@ |
| 58 | + then |
| 59 | + case $build in |
| 60 | + *-*-mingw*) |
| 61 | +- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; |
| 62 | ++ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` |
| 63 | ++ AC_MSG_NOTICE([MINGW environment detected, executing MINGW type build]) |
| 64 | ++ #AC_CONFIG_LINKS([src/config.h:config/config.mgw]) |
| 65 | ++ build_mingw=yes ;; |
| 66 | + *) |
| 67 | + gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;; |
| 68 | + esac |
| 69 | +@@ -955,6 +962,8 @@ |
| 70 | + |
| 71 | + AM_CONDITIONAL(BUILD_GPCAIRO, test "${build_gpcairo}" = yes) |
| 72 | + |
| 73 | ++AM_CONDITIONAL(BUILD_MINGW, test "${build_mingw}" = yes) |
| 74 | ++ |
| 75 | + dnl Enable subsystem to generate statistical summary of file contents |
| 76 | + AC_ARG_ENABLE(stats,dnl |
| 77 | + [ --disable-stats Omit calculation of statistical summary of data], |
| 78 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/demo/plugin/Makefile.am gnuplot-5.4.0/demo/plugin/Makefile.am |
| 79 | +--- gnuplot-5.4.0.orig/demo/plugin/Makefile.am 2017-12-22 23:02:30.000000000 +0530 |
| 80 | ++++ gnuplot-5.4.0/demo/plugin/Makefile.am 2020-09-06 20:05:12.659453700 +0530 |
| 81 | +@@ -4,7 +4,7 @@ |
| 82 | + noinst_PROGRAMS = demo_plugin.so |
| 83 | + |
| 84 | + demo_plugin_so_SOURCES = demo_plugin.c gnuplot_plugin.h |
| 85 | +-demo_plugin_so_CFLAGS = -rdynamic -fPIC -I$(top_srcdir)/src |
| 86 | ++demo_plugin_so_CFLAGS = -fPIC -I$(top_srcdir)/src |
| 87 | + demo_plugin_so_LDFLAGS = -shared |
| 88 | + |
| 89 | + # Note: Solaris SunPro C compiler needs these flags instead |
| 90 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/docs/Makefile.am gnuplot-5.4.0/docs/Makefile.am |
| 91 | +--- gnuplot-5.4.0.orig/docs/Makefile.am 2020-04-10 22:24:28.000000000 +0530 |
| 92 | ++++ gnuplot-5.4.0/docs/Makefile.am 2020-09-06 20:03:02.506859700 +0530 |
| 93 | +@@ -50,6 +50,11 @@ |
| 94 | + |
| 95 | + AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/term |
| 96 | + |
| 97 | ++if BUILD_MINGW |
| 98 | ++AM_CPPFLAGS += -DWINDOWS_NO_GUI |
| 99 | ++dist_doc_DATA = gnuplot.pdf |
| 100 | ++endif |
| 101 | ++ |
| 102 | + # Documentation will be prepared for all terminals in CORETERM |
| 103 | + # even if the terminal itself is not included in the build. |
| 104 | + |
| 105 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/Makefile.am gnuplot-5.4.0/Makefile.am |
| 106 | +--- gnuplot-5.4.0.orig/Makefile.am 2020-03-31 22:58:16.000000000 +0530 |
| 107 | ++++ gnuplot-5.4.0/Makefile.am 2020-09-06 20:01:49.907467200 +0530 |
| 108 | +@@ -7,6 +7,8 @@ |
| 109 | + PATCHLEVEL PGPKEYS README RELEASE_NOTES \ |
| 110 | + configure.vms win |
| 111 | + |
| 112 | ++dist_doc_DATA = FAQ.pdf README RELEASE_NOTES Copyright NEWS BUGS |
| 113 | ++ |
| 114 | + DISTCLEANFILES = stamp-h |
| 115 | + |
| 116 | + ACLOCAL_AMFLAGS = -I m4 |
| 117 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/src/command.c gnuplot-5.4.0/src/command.c |
| 118 | +--- gnuplot-5.4.0.orig/src/command.c 2020-06-11 03:03:34.000000000 +0530 |
| 119 | ++++ gnuplot-5.4.0/src/command.c 2020-09-06 19:57:28.950915200 +0530 |
| 120 | +@@ -112,7 +112,7 @@ |
| 121 | + int thread_rl_RetCode = -1; /* return code from readline in a thread */ |
| 122 | + #endif /* OS2_IPC */ |
| 123 | + |
| 124 | +-#ifndef _WIN32 |
| 125 | ++#ifndef _MSC_VER |
| 126 | + # include "help.h" |
| 127 | + #endif |
| 128 | + |
| 129 | +@@ -2839,7 +2839,7 @@ |
| 130 | + |
| 131 | + |
| 132 | + #ifdef NO_GIH |
| 133 | +-#ifdef _WIN32 |
| 134 | ++#ifdef _MSC_VER |
| 135 | + void |
| 136 | + help_command() |
| 137 | + { |
| 138 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/src/Makefile.am gnuplot-5.4.0/src/Makefile.am |
| 139 | +--- gnuplot-5.4.0.orig/src/Makefile.am 2020-03-31 22:58:16.000000000 +0530 |
| 140 | ++++ gnuplot-5.4.0/src/Makefile.am 2020-09-06 20:06:11.275225300 +0530 |
| 141 | +@@ -93,6 +93,27 @@ |
| 142 | + # Hercules and original pc graphics driver code |
| 143 | + # corgraph.asm header.mac hrcgraph.asm pcgraph.asm lineproc.mac |
| 144 | + |
| 145 | ++# MINGW specific build section |
| 146 | ++if BUILD_MINGW |
| 147 | ++ |
| 148 | ++AM_CPPFLAGS += -DHAVE_GDIPLUS -DHAVE_DWRITE -DHAVE_D2D -DHAVE_D2D11 -DHAVE_PRNTVPT -DWIN32 |
| 149 | ++AM_CPPFLAGS += -O2 -pipe -DUNICODE -D_UNICODE -Wno-unused-function |
| 150 | ++AM_CPPFLAGS += -D_Windows -DHAVE_CONFIG_H |
| 151 | ++AM_CPPFLAGS += -D__USE_MINGW_ANSI_STDIO=1 |
| 152 | ++AM_CPPFLAGS += -DUSE_MOUSE=1 -DWIN_IPC |
| 153 | ++ |
| 154 | ++AM_LDFLAGS = |
| 155 | ++ |
| 156 | ++gnuplot_SOURCES += win/winmain.c win/wgnuplib.c win/wgraph.c win/wprinter.c \ |
| 157 | ++win/wpause.c win/wgdiplus.cpp win/wd2d.cpp win/wtext.h plot.h\ |
| 158 | ++gpexecute.c |
| 159 | ++ |
| 160 | ++gnuplot_CPPFLAGS = $(AM_CPPFLAGS) -DPIPES -DWGP_CONSOLE |
| 161 | ++gnuplot_LDADD += -lkernel32 -lgdi32 -lwinspool -lcomdlg32 -lcomctl32 \ |
| 162 | ++ -ladvapi32 -lshell32 -lmsimg32 -lgdiplus -lshlwapi -ld2d1 -ld3d11 -ldwrite \ |
| 163 | ++ -lprntvpt -lwindowscodecs -lole32 |
| 164 | ++gnuplot_LDFLAGS = $(AM_LDFLAGS) -mconsole -municode |
| 165 | ++ |
| 166 | + if BUILD_WXWIDGETS |
| 167 | + gnuplot_SOURCES += wxterminal/wxt_gui.cpp |
| 168 | + endif |
| 169 | +@@ -103,6 +122,41 @@ |
| 170 | + |
| 171 | + if BUILD_BITMAP |
| 172 | + gnuplot_SOURCES += bitmap.c |
| 173 | ++ |
| 174 | ++#wgnuplot section |
| 175 | ++bin_PROGRAMS += wgnuplot |
| 176 | ++ |
| 177 | ++menudir = $(prefix)/bin |
| 178 | ++menu_DATA = win/wgnuplot.mnu |
| 179 | ++ |
| 180 | ++wgnuplot_SOURCES = $(gnuplot_SOURCES) |
| 181 | ++wgnuplot_SOURCES += win/wtext.c win/screenbuf.c win/wmenu.c win/wredirect.cpp |
| 182 | ++wgnuplot_CPPFLAGS = $(AM_CPPFLAGS) -DPIPES |
| 183 | ++wgnuplot_LDADD = $(gnuplot_LDADD) wgplt_res.$(O) |
| 184 | ++wgnuplot_LDFLAGS = $(AM_LDFLAGS) -mwindows -municode |
| 185 | ++ |
| 186 | ++#wgnuplot_pipes section |
| 187 | ++bin_PROGRAMS += wgnuplot_pipes |
| 188 | ++ |
| 189 | ++wgnuplot_pipes_SOURCES = $(gnuplot_SOURCES) |
| 190 | ++wgnuplot_pipes_SOURCES += win/wtext.c win/screenbuf.c win/wmenu.c win/wredirect.cpp |
| 191 | ++wgnuplot_pipes_CPPFLAGS = $(AM_CPPFLAGS) -DPIPES |
| 192 | ++wgnuplot_pipes_LDADD = $(gnuplot_LDADD) wgplt_res.$(O) |
| 193 | ++wgnuplot_pipes_LDFLAGS = $(AM_LDFLAGS) -mwindows -municode |
| 194 | ++ |
| 195 | ++RCFLAGS = --include-dir=$(srcdir)/win \ |
| 196 | ++ --define __WIN32__ --define __WIN95__ \ |
| 197 | ++ --define __GNUWIN32__ --use-temp-file |
| 198 | ++RCOUT = wgplt_res.$(O) |
| 199 | ++RES2COFF = echo wgplt_res.$(O) |
| 200 | ++ |
| 201 | ++wgplt_res.$(O): win/wgnuplot.rc win/wgnuplib.rc win/wresourc.h win/texticon.ico win/grpicon.ico win/wgnuplot.exe.manifest win/wgnuplot.exe.manifest64 |
| 202 | ++ echo Making RESOURCE FILE |
| 203 | ++ windres $(RCFLAGS) $< wgplt_res.$(O) |
| 204 | ++ echo wgplt_res.$(O) |
| 205 | ++ |
| 206 | ++endif |
| 207 | ++ |
| 208 | + endif |
| 209 | + |
| 210 | + if DEVELOPMENT_VERSION |
| 211 | +diff --unified '--color=auto' -r gnuplot-5.4.0.orig/src/win/winmain.c gnuplot-5.4.0/src/win/winmain.c |
| 212 | +--- gnuplot-5.4.0.orig/src/win/winmain.c 2020-04-10 22:24:28.000000000 +0530 |
| 213 | ++++ gnuplot-5.4.0/src/win/winmain.c 2020-09-06 19:58:17.437576400 +0530 |
| 214 | +@@ -368,7 +368,8 @@ |
| 215 | + else |
| 216 | + lang = GetLanguageCode(); |
| 217 | + |
| 218 | +- filename = (LPTSTR) malloc((_tcslen(szModuleName) + _tcslen(name) + _tcslen(lang) + _tcslen(ext) + 1) * sizeof(TCHAR)); |
| 219 | ++ //filename = (LPTSTR) malloc((_tcslen(szModuleName) + _tcslen(name) + _tcslen(lang) + _tcslen(ext) + 1) * sizeof(TCHAR)); |
| 220 | ++ filename = (LPTSTR) malloc(1024 * sizeof(TCHAR)); |
| 221 | + if (filename) { |
| 222 | + _tcscpy(filename, szModuleName); |
| 223 | + _tcscat(filename, name); |
0 commit comments