# HG changeset patch # User Tatsuro Matsuoka # Date 1432160252 -32400 # Node ID a397ccee4b57aa7c8677b0d3540a3b036b827320 # Parent d83f02205481f0d329cf2bdd1b86ff7f2526ffd3 Bump up gnuplot version to 4.6.7 * src/gnuplot-1-fixes.patch: update patch, merge into one * src/gnuplot-2-win64.patch: removed * src/gnuplot-3-iconv.patch: removed * dist-files.mk: removed gnuplot-2-win64.patch, gnuplot-3-iconv.patch * src/gnuplot.mk: update version, checksum diff -r d83f02205481 -r a397ccee4b57 dist-files.mk --- a/dist-files.mk Wed May 20 07:36:47 2015 -0400 +++ b/dist-files.mk Thu May 21 07:17:32 2015 +0900 @@ -136,8 +136,6 @@ glpk.mk \ gmp.mk \ gnuplot-1-fixes.patch \ - gnuplot-2-win64.patch \ - gnuplot-3-iconv.patch \ gnuplot.mk \ gnutls-1-fixes.patch \ gnutls-test.c \ diff -r d83f02205481 -r a397ccee4b57 src/gnuplot-1-fixes.patch --- a/src/gnuplot-1-fixes.patch Wed May 20 07:36:47 2015 -0400 +++ b/src/gnuplot-1-fixes.patch Thu May 21 07:17:32 2015 +0900 @@ -1,6 +1,6 @@ -diff -ur gnuplot-4.6.4.orig/config/mingw/Makefile gnuplot-4.6.4/config/mingw/Makefile ---- gnuplot-4.6.4.orig/config/mingw/Makefile 2013-11-04 18:26:55.000000000 -0500 -+++ gnuplot-4.6.4/config/mingw/Makefile 2013-11-04 18:28:37.000000000 -0500 + diff -ur gnuplot-4.6.7/config/mingw/Makefile gnuplot-4.6.7-commit/config/mingw/Makefile +--- gnuplot-4.6.7/config/mingw/Makefile 2014-06-13 01:56:55.000000000 +0900 ++++ gnuplot-4.6.7-commit/config/mingw/Makefile 2015-05-16 11:46:53.704000000 +0900 @@ -27,7 +27,7 @@ # Use more modern HTML help instead of no longer supported Windows help system @@ -11,57 +11,56 @@ # GIF, PNG, JPEG device drivers # Requires gd library. There are two possibilities how to configure these @@ -127,29 +127,29 @@ - # -mpentiumpro means optimize for Pentium II and Pro procesors + # -mpentiumpro means optimize for Pentium II and Pro processors #CFLAGS += -ifdef HTML_HELP -- --# To compile the .chm file you need the Microsoft HTML Help 1.4 SDK --# It can be obtained here: --# http://go.microsoft.com/fwlink/?LinkId=154968 --# We need to explicitly set the correct path here since we also need --# adjust the include and linrary paths. ++# ifdef HTML_HELP + + # To compile the .chm file you need the Microsoft HTML Help 1.4 SDK + # It can be obtained here: + # 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 = "$(PROGRAMFILES)/HTML Help Workshop/" -HHC = $(HHWPATH)hhc -+# ifdef HTML_HELP - --else -+# # To compile the .chm file you need the Microsoft HTML Help 1.4 SDK -+# # It can be obtained here: -+# # http://go.microsoft.com/fwlink/?LinkId=154968 -+# # We need to explicitly set the correct path here since we also need -+# # adjust the include and linrary paths. +# HHWPATH = "$(PROGRAMFILES)/HTML Help Workshop/" +# HHC = $(HHWPATH)hhc -+ + +-else +# else -+ -+# # To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help -+# # Workshop. The latter can be obtained from either of -+# # ftp://ftp.microsoft.com/softlib/mslfiles/hcwsetup.exe -+# # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=34D35502-4DE9-4676-952C-34CC7F64F098 -+# # Put the path to hcw here unless it is already in PATH: + + # To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help + # Workshop. The latter can be obtained from either of + # ftp://ftp.microsoft.com/softlib/mslfiles/hcwsetup.exe + # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=34D35502-4DE9-4676-952C-34CC7F64F098 + # Put the path to hcw here unless it is already in PATH: +-HCWPATH = "$(PROGRAMFILES)/Help\ Workshop/" +-HCW = $(HCWPATH)hcw +# HCWPATH = "$(PROGRAMFILES)/Help\ Workshop/" +# HCW = $(HCWPATH)hcw -+# # Switches are for HCW 4.03: + # Switches are for HCW 4.03: +-HCWFLAG = +# HCWFLAG = --# To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help --# Workshop. The latter can be obtained from either of --# ftp://ftp.microsoft.com/softlib/mslfiles/hcwsetup.exe --# http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=34D35502-4DE9-4676-952C-34CC7F64F098 --# Put the path to hcw here unless it is already in PATH: --HCWPATH = "$(PROGRAMFILES)/Help\ Workshop/" --HCW = $(HCWPATH)hcw --# Switches are for HCW 4.03: --HCWFLAG = -- -endif +# endif - # Choose which windres/rc do you want to use (GNU windres or MS RC): + # Choose which resource compiler you want to use (GNU windres or MS rc): GNU_RC = 1 -@@ -401,7 +401,7 @@ +@@ -382,8 +382,9 @@ + endif + + ifdef ICONV +- CFLAGS += -DHAVE_ICONV +- TERMLIBS += -liconv ++ CFLAGS += -DHAVE_ICONV $(ICONV_CFLAGS) ++ LDFLAGS += $(ICONV_LDFLAGS) ++ TERMLIBS += -liconv + endif + + ifdef GNU_RC +@@ -401,7 +402,7 @@ RES2COFF = res2coff -i wgnuplot.res -o wgplt_res.$(O) endif @@ -70,7 +69,7 @@ console: $(MAKE) TARGET=gnuplot.exe gnuplot.exe -@@ -443,7 +443,7 @@ +@@ -443,7 +444,7 @@ LDFLAGS2 += -L$(HHWPATH)lib endif @@ -79,7 +78,7 @@ $(LDX) $(LDFLAGS) $(LDFLAGS2) -o $@ $(OBJS) $(WINOBJS) wgplt_res.$(O) $(LDLIBS)\ $(TERMLIBS) $(WX_LIBS) $(PANGOCAIRO_LIBS) -@@ -458,7 +458,7 @@ +@@ -458,7 +459,7 @@ # explicit rules @@ -88,7 +87,7 @@ $(RC) $(RCFLAGS) $< $(RCOUT) $(RES2COFF) -@@ -494,13 +494,13 @@ +@@ -494,13 +495,13 @@ $(CC) -c $(CFLAGS) $(CXXFLAGS) $(PANGOCAIRO_CFLAGS) -MMD -MT '$*.$$(O)' -MF $*.d -o $@ $< # extract icons from wgnuplot.rc @@ -106,7 +105,7 @@ ifdef HTML_HELP # convert gnuplot.doc to windows/wgnuplot.html -@@ -703,7 +703,7 @@ +@@ -703,7 +704,7 @@ $(RM) config.h wgnuplot.map wgnuplot.res $(W)/gnuplot.rtf $(RM) *.$(O) *.po *.o *.co *.d $(RM) doc2*.exe $(W)/wgnuplib.res wgnuplib.map wgnuplot.lib @@ -115,7 +114,7 @@ $(RM) *.aux *.log *.dvi *.toc $(RM) gnuplot.tex gnuplot-figures.tex pdffigures.tex figure_*.pdf $(RM) titlepag.tex toc_entr.sty VERSION -@@ -802,7 +802,7 @@ +@@ -802,7 +803,7 @@ installer: $(MAKE) DESTDIR=./dist install @@ -124,10 +123,37 @@ cp -p $(TOP)/win/*.iss ./dist (cd ./dist; $(ISCC) gnuplot.iss) ifdef RELEASE -diff -ur gnuplot-4.6.4.orig/src/win/wgnuplot.rc gnuplot-4.6.4/src/win/wgnuplot.rc ---- gnuplot-4.6.4.orig/src/win/wgnuplot.rc 2013-11-04 18:26:55.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wgnuplot.rc 2013-11-04 18:27:15.000000000 -0500 -@@ -15,8 +15,8 @@ + +diff -ur gnuplot-4.6.7/src/syscfg.h gnuplot-4.6.7-commit/src/syscfg.h +--- gnuplot-4.6.7/src/syscfg.h 2014-08-01 01:56:25.000000000 +0900 ++++ gnuplot-4.6.7-commit/src/syscfg.h 2015-05-16 15:27:58.612000000 +0900 +@@ -317,11 +317,19 @@ + #endif + + #ifndef GP_EXCEPTION_NAME +-# define GP_EXCEPTION_NAME exception ++# if __MINGW32__ ++# define GP_EXCEPTION_NAME _exception ++# else ++# define GP_EXCEPTION_NAME exception ++# endif + #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 + +diff -ur gnuplot-4.6.7/src/win/wgnuplot.rc gnuplot-4.6.7-commit/src/win/wgnuplot.rc +--- gnuplot-4.6.7/src/win/wgnuplot.rc 2014-07-08 03:18:41.000000000 +0900 ++++ gnuplot-4.6.7-commit/src/win/wgnuplot.rc 2015-05-16 11:24:48.912000000 +0900 +@@ -19,8 +19,8 @@ * rc -30 -k -dMSRC win\wgnuplot.rc wgnuplot.exe */ @@ -138,3 +164,23 @@ #else /* using Borland BRC.EXE */ + +diff -ur internal.orig.c internal.mod.c +--- a/src/internal.c 2014-07-08 03:18:40.000000000 +0900 ++++ b/src/internal.c 2015-05-16 19:29:17.660000000 +0900 +@@ -58,6 +58,7 @@ + + static enum DATA_TYPES sprintf_specifier __PROTO((const char *format)); + ++#ifndef __MINGW32__ + #ifndef _WIN64 + int + GP_MATHERR( STRUCT_EXCEPTION_P_X ) +@@ -65,6 +66,7 @@ + return (undefined = TRUE); /* don't print error message */ + } + #endif ++#endif + + #define BAD_DEFAULT default: int_error(NO_CARET, "internal error : type neither INT or CMPLX"); return; + diff -r d83f02205481 -r a397ccee4b57 src/gnuplot-2-win64.patch --- a/src/gnuplot-2-win64.patch Wed May 20 07:36:47 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,413 +0,0 @@ -diff -urN gnuplot-4.6.4.orig/src/internal.c gnuplot-4.6.4/src/internal.c ---- gnuplot-4.6.4.orig/src/internal.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/internal.c 2014-02-07 20:11:47.000000000 -0500 -@@ -58,12 +58,13 @@ - - static enum DATA_TYPES sprintf_specifier __PROTO((const char *format)); - -- -+#ifndef WIN32 - int - GP_MATHERR( STRUCT_EXCEPTION_P_X ) - { - return (undefined = TRUE); /* don't print error message */ - } -+#endif - - #define BAD_DEFAULT default: int_error(NO_CARET, "internal error : type neither INT or CMPLX"); return; - -diff -urN gnuplot-4.6.4.orig/src/win/wgnuplot.exe.manifest64 gnuplot-4.6.4/src/win/wgnuplot.exe.manifest64 ---- gnuplot-4.6.4.orig/src/win/wgnuplot.exe.manifest64 1969-12-31 19:00:00.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wgnuplot.exe.manifest64 2014-02-07 20:11:47.000000000 -0500 -@@ -0,0 +1,22 @@ -+ -+ -+ -+Famous scientific plotting package. -+ -+ -+ -+ -+ -+ -diff -urN gnuplot-4.6.4.orig/src/win/wgnuplot.rc gnuplot-4.6.4/src/win/wgnuplot.rc ---- gnuplot-4.6.4.orig/src/win/wgnuplot.rc 2014-02-07 20:11:36.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wgnuplot.rc 2014-02-07 20:11:47.000000000 -0500 -@@ -3,8 +3,12 @@ - #include "wgnuplib.rc" - - #ifndef NO_MANIFEST -+#ifdef _WIN64 -+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "wgnuplot.exe.manifest64" -+#else - CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "wgnuplot.exe.manifest" - #endif -+#endif - - #ifdef MSRC - /* using Microsoft RC.EXE */ -diff -urN gnuplot-4.6.4.orig/src/win/wgraph.c gnuplot-4.6.4/src/win/wgraph.c ---- gnuplot-4.6.4.orig/src/win/wgraph.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wgraph.c 2014-02-07 20:11:47.000000000 -0500 -@@ -433,8 +433,13 @@ - NULL, NULL, lpgw->hInstance, lpgw); - - if (lpgw->hWndGraph) -+#ifdef _WIN64 -+ SetClassLongPtr(lpgw->hWndGraph, GCLP_HICON, -+ (LONG_PTR) LoadIcon(lpgw->hInstance, "GRPICON")); -+#else - SetClassLong(lpgw->hWndGraph, GCL_HICON, - (LONG) LoadIcon(lpgw->hInstance, "GRPICON")); -+#endif - - lpgw->hStatusbar = CreateWindowEx(0, STATUSCLASSNAME, (LPSTR)NULL, - WS_CHILD | SBARS_SIZEGRIP, -@@ -571,7 +576,11 @@ - /* modify the system menu to have the new items we want */ - sysmenu = GetSystemMenu(lpgw->hWndGraph,0); - AppendMenu(sysmenu, MF_SEPARATOR, 0, NULL); -+#ifdef _WIN64 -+ AppendMenu(sysmenu, MF_POPUP, (UINT_PTR)lpgw->hPopMenu, "&Options"); -+#else - AppendMenu(sysmenu, MF_POPUP, (UINT)lpgw->hPopMenu, "&Options"); -+#endif - AppendMenu(sysmenu, MF_STRING, M_ABOUT, "&About"); - - #ifndef WGP_CONSOLE -@@ -2622,13 +2631,17 @@ - } - - pr.hdcPrn = printer; -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 4, (LONG_PTR)((GP_LPPRINT)&pr)); -+#else - SetWindowLong(hwnd, 4, (LONG)((GP_LPPRINT)&pr)); -+#endif - PrintRegister((GP_LPPRINT)&pr); - - EnableWindow(hwnd, FALSE); - pr.bUserAbort = FALSE; - pr.hDlgPrint = CreateDialogParam(hdllInstance, "CancelDlgBox", -- hwnd, PrintDlgProc, (LPARAM)lpgw->Title); -+ hwnd, PrintDlgProc, (LPARAM)lpgw->Title); - SetAbortProc(printer, PrintAbortProc); - - memset(&docInfo, 0, sizeof(DOCINFO)); -@@ -2879,7 +2892,11 @@ - - #define LS_DEFLINE 2 - typedef struct tagLS { -+#ifdef _WIN64 -+ LONG_PTR widtype; -+#else - int widtype; -+#endif - int wid; - HWND hwnd; - int pen; /* current pen number */ -@@ -2941,7 +2958,11 @@ - int i; - UINT pen; - LPLOGPEN plpm, plpc; -+#ifdef _WIN64 -+ lpls = (LPLS)GetWindowLongPtr(GetParent(hdlg), 4); -+#else - lpls = (LPLS)GetWindowLong(GetParent(hdlg), 4); -+#endif - - switch (wmsg) { - case WM_INITDIALOG: -@@ -3121,7 +3142,11 @@ - BOOL status = FALSE; - LS ls; - -+#ifdef _WIN64 -+ SetWindowLongPtr(lpgw->hWndGraph, 4, (LONG_PTR)((LPLS)&ls)); -+#else - SetWindowLong(lpgw->hWndGraph, 4, (LONG)((LPLS)&ls)); -+#endif - _fmemcpy(&ls.colorpen, &lpgw->colorpen, (WGNUMPENS + 2) * sizeof(LOGPEN)); - _fmemcpy(&ls.monopen, &lpgw->monopen, (WGNUMPENS + 2) * sizeof(LOGPEN)); - -@@ -3202,7 +3227,11 @@ - static unsigned int last_modifier_mask = -99; - #endif - -+#ifdef _WIN64 -+ lpgw = (LPGW)GetWindowLongPtr(hwnd, 0); -+#else - lpgw = (LPGW)GetWindowLong(hwnd, 0); -+#endif - - #ifdef USE_MOUSE - /* mouse events first */ -@@ -3716,7 +3745,11 @@ - return FALSE; - case WM_CREATE: - lpgw = ((CREATESTRUCT *)lParam)->lpCreateParams; -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 0, (LONG_PTR)lpgw); -+#else - SetWindowLong(hwnd, 0, (LONG)lpgw); -+#endif - lpgw->hWndGraph = hwnd; - hdc = GetDC(hwnd); - MakePens(lpgw, hdc); -diff -urN gnuplot-4.6.4.orig/src/win/winmain.c gnuplot-4.6.4/src/win/winmain.c ---- gnuplot-4.6.4.orig/src/win/winmain.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/win/winmain.c 2014-02-07 20:16:45.000000000 -0500 -@@ -553,7 +553,12 @@ - if (TextInit(&textwin)) - exit(1); - textwin.hIcon = LoadIcon(hInstance, "TEXTICON"); -+ -+#ifdef _WIN64 -+ SetClassLongPtr(textwin.hWndParent, GCLP_HICON, (LONG_PTR)textwin.hIcon); -+#else - SetClassLong(textwin.hWndParent, GCL_HICON, (DWORD)textwin.hIcon); -+#endif - /* Note: we want to know whether this is an interactive session so that we can - * decide whether or not to write status information to stderr. The old test - * for this was to see if (argc > 1) but the addition of optional command line -diff -urN gnuplot-4.6.4.orig/src/win/wmenu.c gnuplot-4.6.4/src/win/wmenu.c ---- gnuplot-4.6.4.orig/src/win/wmenu.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wmenu.c 2014-02-07 20:11:47.000000000 -0500 -@@ -827,8 +827,13 @@ - goto errorcleanup; - } - hMenu[nMenuLevel] = CreateMenu(); -+#ifdef _WIN64 -+ AppendMenu(hMenu[nMenuLevel > 0 ? nMenuLevel-1 : 0], -+ MF_STRING | MF_POPUP, (UINT_PTR)hMenu[nMenuLevel], (LPCSTR)buf); -+#else - AppendMenu(hMenu[nMenuLevel > 0 ? nMenuLevel-1 : 0], - MF_STRING | MF_POPUP, (UINT)hMenu[nMenuLevel], (LPCSTR)buf); -+#endif - } - else if (!lstrcmpi(buf,"[EndMenu]")) { - if (nMenuLevel > 0) -@@ -1047,7 +1052,11 @@ - { - LPTW lptw; - LPMW lpmw; -+#ifdef _WIN64 -+ lptw = (LPTW)GetWindowLongPtr(GetParent(hDlg), 0); -+#else - lptw = (LPTW)GetWindowLong(GetParent(hDlg), 0); -+#endif - lpmw = lptw->lpmw; - - switch( message) { -diff -urN gnuplot-4.6.4.orig/src/win/wpause.c gnuplot-4.6.4/src/win/wpause.c ---- gnuplot-4.6.4.orig/src/win/wpause.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wpause.c 2014-02-07 20:18:08.000000000 -0500 -@@ -207,7 +207,11 @@ - LPPW lppw; - int cxChar, cyChar, middle; - -+#ifdef _WIN64 -+ lppw = (LPPW)GetWindowLongPtr(hwnd, 0); -+#else - lppw = (LPPW)GetWindowLong(hwnd, 0); -+#endif - - switch(message) { - case WM_KEYDOWN: -@@ -251,7 +255,11 @@ - ws_opts |= WS_VISIBLE; - /* HBB 981202 HMENU sysmenu = GetSystemMenu(hwnd, FALSE); */ - lppw = ((CREATESTRUCT *)lParam)->lpCreateParams; -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 0, (LONG_PTR)lppw); -+#else - SetWindowLong(hwnd, 0, (LONG)lppw); -+#endif - lppw->hWndPause = hwnd; - hdc = GetDC(hwnd); - SelectObject(hdc, GetStockObject(SYSTEM_FONT)); -@@ -273,10 +281,17 @@ - 8*cxChar, 7*cyChar/4, - hwnd, (HMENU)IDCANCEL, - ((LPCREATESTRUCT) lParam)->hInstance, NULL); -+#ifdef _WIN64 -+ lppw->lpfnOK = (WNDPROC) GetWindowLongPtr(lppw->hOK, GWLP_WNDPROC); -+ SetWindowLongPtr(lppw->hOK, GWLP_WNDPROC, (LONG_PTR)PauseButtonProc); -+ lppw->lpfnCancel = (WNDPROC) GetWindowLongPtr(lppw->hCancel, GWLP_WNDPROC); -+ SetWindowLongPtr(lppw->hCancel, GWLP_WNDPROC, (LONG_PTR)PauseButtonProc); -+#else - lppw->lpfnOK = (WNDPROC) GetWindowLong(lppw->hOK, GWL_WNDPROC); - SetWindowLong(lppw->hOK, GWL_WNDPROC, (LONG)PauseButtonProc); - lppw->lpfnCancel = (WNDPROC) GetWindowLong(lppw->hCancel, GWL_WNDPROC); - SetWindowLong(lppw->hCancel, GWL_WNDPROC, (LONG)PauseButtonProc); -+#endif - if (GetParent(hwnd)) - EnableWindow(GetParent(hwnd),FALSE); - #if 0 /* HBB 981203 */ -@@ -308,7 +323,11 @@ - { - LPPW lppw; - LONG n = GetWindowLong(hwnd, GWL_ID); -+#ifdef _WIN64 -+ lppw = (LPPW)GetWindowLongPtr(GetParent(hwnd), 0); -+#else - lppw = (LPPW)GetWindowLong(GetParent(hwnd), 0); -+#endif - switch(message) { - case WM_KEYDOWN: - switch(wParam) { -diff -urN gnuplot-4.6.4.orig/src/win/wprinter.c gnuplot-4.6.4/src/win/wprinter.c ---- gnuplot-4.6.4.orig/src/win/wprinter.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wprinter.c 2014-02-07 20:22:04.000000000 -0500 -@@ -63,15 +63,17 @@ - - GP_LPPRINT prlist = NULL; - --BOOL CALLBACK PrintSizeDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam); - static GP_LPPRINT PrintFind(HDC hdc); - -- - BOOL CALLBACK - PrintSizeDlgProc(HWND hdlg, UINT wmsg, WPARAM wparam, LPARAM lparam) - { - char buf[8]; -+#ifdef _WIN64 -+ GP_LPPRINT lpr = (GP_LPPRINT)GetWindowLongPtr(GetParent(hdlg), 4); -+#else - GP_LPPRINT lpr = (GP_LPPRINT)GetWindowLong(GetParent(hdlg), 4); -+#endif - - switch (wmsg) { - case WM_INITDIALOG: -@@ -146,7 +148,11 @@ - BOOL status = FALSE; - GP_PRINT pr; - -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 4, (LONG_PTR)&pr); -+#else - SetWindowLong(hwnd, 4, (LONG)&pr); -+#endif - pr.poff.x = 0; - pr.poff.y = 0; - pr.psize.x = GetDeviceCaps(printer, HORZSIZE); -@@ -219,7 +225,11 @@ - PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) - { - GP_LPPRINT lpr; -+#ifdef _WIN64 -+ lpr = (GP_LPPRINT) GetWindowLongPtr(GetParent(hDlg), 4); -+#else - lpr = (GP_LPPRINT)GetWindowLong(GetParent(hDlg), 4); -+#endif - /* FIXME: cause of crash in bug #3544949. No idea yet as to why this could happen, though. */ - if (lpr == NULL) - return FALSE; -@@ -240,7 +250,6 @@ - return FALSE; - } - -- - BOOL CALLBACK - PrintAbortProc(HDC hdcPrn, int code) - { -@@ -292,7 +301,12 @@ - printer = pd.hDC; - if (printer != (HDC)NULL) { - pr.hdcPrn = printer; -+ -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 4, (LONG_PTR)((GP_LPPRINT)&pr)); -+#else - SetWindowLong(hwnd, 4, (LONG)((GP_LPPRINT)&pr)); -+#endif - PrintRegister((GP_LPPRINT)&pr); - if ( (buf = malloc(4096+2)) != (char *)NULL ) { - bufcount = (WORD *)buf; -diff -urN gnuplot-4.6.4.orig/src/win/wtext.c gnuplot-4.6.4/src/win/wtext.c ---- gnuplot-4.6.4.orig/src/win/wtext.c 2014-02-07 20:11:05.000000000 -0500 -+++ gnuplot-4.6.4/src/win/wtext.c 2014-02-07 20:11:47.000000000 -0500 -@@ -287,7 +287,11 @@ - - sysmenu = GetSystemMenu(lptw->hWndParent,0); /* get the sysmenu */ - AppendMenu(sysmenu, MF_SEPARATOR, 0, NULL); -+#ifdef _WIN64 -+ AppendMenu(sysmenu, MF_POPUP, (UINT_PTR)lptw->hPopMenu, "&Options"); -+#else - AppendMenu(sysmenu, MF_POPUP, (UINT)lptw->hPopMenu, "&Options"); -+#endif - AppendMenu(sysmenu, MF_STRING, M_ABOUT, "&About"); - - if (lptw->lpmw) -@@ -1020,7 +1024,11 @@ - HDC hdc; - LPTW lptw; - -+#ifdef _WIN64 -+ lptw = (LPTW)GetWindowLongPtr(hwnd, 0); -+#else - lptw = (LPTW)GetWindowLong(hwnd, 0); -+#endif - - switch(message) { - case WM_SYSCOMMAND: -@@ -1098,7 +1106,11 @@ - TEXTMETRIC tm; - - lptw = ((CREATESTRUCT *)lParam)->lpCreateParams; -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 0, (LONG_PTR)lptw); -+#else - SetWindowLong(hwnd, 0, (LONG)lptw); -+#endif - lptw->hWndParent = hwnd; - /* get character size */ - TextMakeFont(lptw); -@@ -1195,7 +1207,11 @@ - int nYinc, nXinc; - LPTW lptw; - -+#ifdef _WIN64 -+ lptw = (LPTW)GetWindowLongPtr(hwnd, 0); -+#else - lptw = (LPTW)GetWindowLong(hwnd, 0); -+#endif - - switch(message) { - case WM_SETFOCUS: -@@ -1864,7 +1880,11 @@ - } - case WM_CREATE: - lptw = ((CREATESTRUCT *)lParam)->lpCreateParams; -+#ifdef _WIN64 -+ SetWindowLongPtr(hwnd, 0, (LONG_PTR)lptw); -+#else - SetWindowLong(hwnd, 0, (LONG)lptw); -+#endif - lptw->hWndText = hwnd; - break; - case WM_DESTROY: -@@ -2149,7 +2169,11 @@ - case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; -+#ifdef _WIN64 -+ DrawIcon(lpdis->hDC, 0, 0, (HICON)GetClassLongPtr(GetParent(hDlg), GCLP_HICON)); -+#else - DrawIcon(lpdis->hDC, 0, 0, (HICON)GetClassLong(GetParent(hDlg), GCL_HICON)); -+#endif - return FALSE; - } - case WM_COMMAND: diff -r d83f02205481 -r a397ccee4b57 src/gnuplot-3-iconv.patch --- a/src/gnuplot-3-iconv.patch Wed May 20 07:36:47 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -diff -ur gnuplot-4.6.4.orig/config/mingw/Makefile gnuplot-4.6.4/config/mingw/Makefile ---- gnuplot-4.6.4.orig/config/mingw/Makefile 2014-07-24 20:30:33 -0400 -+++ gnuplot-4.6.4/config/mingw/Makefile 2014-07-24 20:30:50 -0400 -@@ -382,8 +382,9 @@ - endif - - ifdef ICONV -- CFLAGS += -DHAVE_ICONV -- TERMLIBS += -liconv -+ CFLAGS += -DHAVE_ICONV $(ICONV_CFLAGS) -+ LDFLAGS += $(ICONV_LDFLAGS) -+ TERMLIBS += -liconv - endif - - ifdef GNU_RC diff -r d83f02205481 -r a397ccee4b57 src/gnuplot.mk --- a/src/gnuplot.mk Wed May 20 07:36:47 2015 -0400 +++ b/src/gnuplot.mk Thu May 21 07:17:32 2015 +0900 @@ -3,8 +3,8 @@ PKG := gnuplot $(PKG)_IGNORE := -$(PKG)_VERSION := 4.6.4 -$(PKG)_CHECKSUM := 54ee5ce9a0a2698b046064bd275e772673350013 +$(PKG)_VERSION := 4.6.7 +$(PKG)_CHECKSUM := 0f76465981f4643a5a5491333aeda4d56d890622 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := gnuplot-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://sourceforge.net/projects/gnuplot/files/gnuplot/$($(PKG)_VERSION)/$($(PKG)_FILE)