gnuplot: Fix build with gcc-15
This commit is contained in:
22
mingw-w64-gnuplot/04-fix-build-with-gcc-15.patch
Normal file
22
mingw-w64-gnuplot/04-fix-build-with-gcc-15.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/src/win/winmain.c
|
||||
+++ b/src/win/winmain.c
|
||||
@@ -271,7 +271,9 @@
|
||||
{
|
||||
HMODULE hShell32;
|
||||
FARPROC pSHGetSpecialFolderPath;
|
||||
- static char dir[MAX_PATH] = "";
|
||||
+ typedef UINT (CALLBACK* GETFOLDERPATH)
|
||||
+ (HWND hwnd, LPSTR pszPath, int csidl, BOOL fCreate);
|
||||
+ static char dir[MAX_PATH] = {'\0'};
|
||||
|
||||
if (dir[0])
|
||||
return dir;
|
||||
@@ -284,7 +286,7 @@
|
||||
pSHGetSpecialFolderPath =
|
||||
GetProcAddress(hShell32, "SHGetSpecialFolderPathA");
|
||||
if (pSHGetSpecialFolderPath)
|
||||
- (*pSHGetSpecialFolderPath)(NULL, dir, CSIDL_APPDATA, FALSE);
|
||||
+ (*(GETFOLDERPATH)(pSHGetSpecialFolderPath))(NULL, dir, CSIDL_APPDATA, FALSE);
|
||||
FreeModule(hShell32);
|
||||
return dir;
|
||||
}
|
||||
@@ -3,24 +3,24 @@
|
||||
# This package cannot be build with installed libgdiplus package
|
||||
# as it doesnt contain reference for GdipFontFamilyCachedGenericSansSerif
|
||||
|
||||
_wx_basever=3.2
|
||||
_wx_basever=3.3
|
||||
|
||||
_realname=gnuplot
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=6.0.2
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Plotting package which outputs to PostScript, PNG, GIF, and others (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='http://www.gnuplot.info/'
|
||||
msys2_repository_url='https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/'
|
||||
msys2_documentation_url='http://www.gnuplot.info/documentation.html'
|
||||
msys2_references=(
|
||||
'archlinux: gnuplot'
|
||||
"cpe: cpe:/a:gnuplot:gnuplot"
|
||||
"cpe: cpe:/a:gnuplot_project:gnuplot"
|
||||
)
|
||||
msys2_repository_url='https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/'
|
||||
msys2_documentation_url='http://www.gnuplot.info/documentation.html'
|
||||
url='http://www.gnuplot.info/'
|
||||
license=('spdx:gnuplot')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-cairo"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
@@ -41,11 +41,14 @@ makedepends=(
|
||||
source=("https://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-${pkgver}.tar.gz"
|
||||
"01-gnuplot.patch"
|
||||
"02-wxwidgets-3.2.patch"
|
||||
"03-fix-build-doc2web.patch")
|
||||
"03-fix-build-doc2web.patch"
|
||||
# https://sourceforge.net/p/gnuplot/gnuplot-main/ci/fb8f5c2e0bdd7ffe3e7fdb5c169b965db84643cb
|
||||
"04-fix-build-with-gcc-15.patch")
|
||||
sha256sums=('f68a3b0bbb7bbbb437649674106d94522c00bf2f285cce0c19c3180b1ee7e738'
|
||||
'9b8af2d8eb24f0e8048a388949d8905a79b69208cf7eadd34a763a0c582b8f9e'
|
||||
'06f8076446c4174d5972a252ae18a7f672fd25f4131b3dd1d65399c1f3b52697'
|
||||
'427fa4d801d7c9117526790ee082af91c472c551d4cd4b45078efe856f6a92f9')
|
||||
'427fa4d801d7c9117526790ee082af91c472c551d4cd4b45078efe856f6a92f9'
|
||||
'fcf88de89b6af4ec3635f7c2535a98052f56ad825afc0f81104aebc7dc11f314')
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
@@ -60,7 +63,8 @@ prepare() {
|
||||
apply_patch_with_msg \
|
||||
01-gnuplot.patch \
|
||||
02-wxwidgets-3.2.patch \
|
||||
03-fix-build-doc2web.patch
|
||||
03-fix-build-doc2web.patch \
|
||||
04-fix-build-with-gcc-15.patch
|
||||
|
||||
sed -i "s/AC_PATH_PROG(WX_CONFIG, wx-config,/AC_PATH_PROG(WX_CONFIG, wx-config-${_wx_basever},/" configure.ac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user