-
Notifications
You must be signed in to change notification settings - Fork 22
/
patch
157 lines (147 loc) · 6.89 KB
/
patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
diff -ur grass-8.4.0/include/Make/Grass.make ../grass-8.4.0/include/Make/Grass.make
--- grass-8.4.0/include/Make/Grass.make 2024-07-27 13:27:22.000000000 +0200
+++ ../grass-8.4.0/include/Make/Grass.make 2024-08-05 11:27:31.639581200 +0200
@@ -197,7 +197,7 @@
FORMDEPS = $(DBMILIB) $(GISLIB)
RASTER3DDEPS = $(RASTERLIB) $(GISLIB)
GISDEPS = $(DATETIMELIB) $(ZLIBLIBPATH) $(ZLIB) $(BZIP2LIBPATH) $(BZIP2LIB) $(ZSTDLIBPATH) $(ZSTDLIB) $(INTLLIB) $(REGEXLIBPATH) $(REGEXLIB) $(ICONVLIB) $(PTHREADLIBPATH) $(PTHREADLIB) $(MATHLIB)
-GMATHDEPS = $(GISLIB) $(FFTWLIB) $(LAPACKLIB) $(BLASLIB) $(CCMATHLIB) $(OPENMP_CFLAGS) $(OPENMP_LIBPATH) $(OPENMP_LIB)
+GMATHDEPS = $(GISLIB) $(FFTWLIB) $(LAPACKLIB) $(BLASLIB) $(CCMATHLIB) $(OPENMP_LIBPATH) $(OPENMP_LIB)
GPDEDEPS = $(RASTER3DLIB) $(RASTERLIB) $(GISLIB) $(GMATHLIB) $(OPENMP_LIBPATH) $(OPENMP_LIB) $(MATHLIB)
GPROJDEPS = $(GISLIB) $(GDALLIBS) $(PROJLIB) $(MATHLIB)
HTMLDRIVERDEPS = $(DRIVERLIB) $(GISLIB) $(MATHLIB)
diff -ur grass-8.4.0/include/Make/Platform.make.in ../grass-8.4.0/include/Make/Platform.make.in
--- grass-8.4.0/include/Make/Platform.make.in 2024-07-27 13:27:22.000000000 +0200
+++ ../grass-8.4.0/include/Make/Platform.make.in 2024-08-05 11:27:31.648583300 +0200
@@ -234,7 +234,7 @@
#OpenMP
OPENMP_INCPATH = @OPENMP_INCPATH@
OPENMP_LIBPATH = @OPENMP_LIBPATH@
-OPENMP_LIB = @OPENMP_LIB@
+OPENMP_LIB = @OPENMP_CFLAGS@ @OPENMP_LIB@
OPENMP_CFLAGS = @OPENMP_CFLAGS@
USE_OPENMP = @USE_OPENMP@
diff -ur grass-8.4.0/mswindows/osgeo4w/env.bat.tmpl ../grass-8.4.0/mswindows/osgeo4w/env.bat.tmpl
--- grass-8.4.0/mswindows/osgeo4w/env.bat.tmpl 2024-07-27 13:27:22.000000000 +0200
+++ ../grass-8.4.0/mswindows/osgeo4w/env.bat.tmpl 2024-08-05 11:27:31.656582900 +0200
@@ -8,6 +8,8 @@
REM Note that msys package must be also installed
REM set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
+set PYTHONPATH=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@\etc\python;%PYTHONPATH%
+set GRASS_COMPATIBILITY_TEST=0
set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python3.exe
set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
diff -ur grass-8.4.0/mswindows/osgeo4w/libpng-config ../grass-8.4.0/mswindows/osgeo4w/libpng-config
--- grass-8.4.0/mswindows/osgeo4w/libpng-config 2024-07-27 13:27:22.000000000 +0200
+++ ../grass-8.4.0/mswindows/osgeo4w/libpng-config 2024-08-05 12:04:29.037124000 +0200
@@ -14,7 +14,7 @@
prefix="${OSGEO4W_ROOT_MSYS}"
version="$(sed '/^#define PNG_LIBPNG_VER_STRING/!d; s/^[^"]*"\|"//g' ${prefix}/include/libpng*/png.h)"
-dll_version="$(sed '/^#define PNG_LIBPNG_VER_DLLNUM/!d; s/^[^0-9]*\|[^0-9]*$//g' ${prefix}/include/libpng*/png.h)"
+dll_version="$(sed '/^#define PNG_LIBPNG_VER_SHAREDLIB/!d; s/^[^0-9]*\|[^0-9]*$//g' ${prefix}/include/libpng*/png.h)"
exec_prefix="${prefix}"
libdir="${prefix}/lib"
includedir="${prefix}/include/libpng${dll_version}"
diff -ur grass-8.4.0/mswindows/osgeo4w/package.sh ../grass-8.4.0/mswindows/osgeo4w/package.sh
--- grass-8.4.0/mswindows/osgeo4w/package.sh 2024-07-27 13:27:22.000000000 +0200
+++ ../grass-8.4.0/mswindows/osgeo4w/package.sh 2024-08-05 11:27:31.672090000 +0200
@@ -110,29 +110,20 @@
/mingw64/bin/zlib1.dll
/mingw64/bin/libbz2-1.dll
/mingw64/bin/libiconv-2.dll
- /mingw64/bin/libfontconfig-1.dll
/mingw64/bin/libgfortran-5.dll
- /mingw64/bin/libbrotlidec.dll
- /mingw64/bin/libbrotlicommon.dll
/mingw64/bin/libintl-8.dll
/mingw64/bin/libsystre-0.dll
/mingw64/bin/libtre-5.dll
/mingw64/bin/libwinpthread-1.dll
- /mingw64/bin/libcairo-2.dll
- /mingw64/bin/libpixman-1-0.dll
- /mingw64/bin/libpng16-16.dll
- /mingw64/bin/libfreetype-6.dll
- /mingw64/bin/libharfbuzz-0.dll
- /mingw64/bin/libglib-2.0-0.dll
/mingw64/bin/libgomp-1.dll
- /mingw64/bin/libgraphite2.dll
- /mingw64/bin/libpcre-1.dll
+ /mingw64/bin/libomp.dll
/mingw64/bin/libstdc++-6.dll
/mingw64/bin/libgcc_s_seh-1.dll
/mingw64/bin/libfftw3-3.dll
/mingw64/bin/libblas.dll
/mingw64/bin/liblapack.dll
/mingw64/bin/libquadmath-0.dll
+ /mingw64/bin/libreadline8.dll
"
if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
@@ -148,18 +139,18 @@
cp -uv $DLLS dist.x86_64-w64-mingw32/bin
mkdir -p mswindows/osgeo4w/lib
- cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/pq.lib
cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/sqlite3.lib
+
log configure
./configure \
--host=x86_64-w64-mingw32 \
- --with-libs="$OSGEO4W_ROOT_MSYS/lib" \
- --with-includes=$OSGEO4W_ROOT_MSYS/include \
- --libexecdir=$OSGEO4W_ROOT_MSYS/bin \
- --prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
- --bindir=$OSGEO4W_ROOT_MSYS/bin \
- --includedir=$OSGEO4W_ROOT_MSYS/include \
+ --with-libs="${OSGEO4W_ROOT_MSYS}/lib ${OSGEO4W_ROOT_MSYS}/bin" \
+ --with-includes=${OSGEO4W_ROOT_MSYS}/include \
+ --libexecdir=${OSGEO4W_ROOT_MSYS}/bin \
+ --prefix=${OSGEO4W_ROOT_MSYS}/apps/grass \
+ --bindir=${OSGEO4W_ROOT_MSYS}/bin \
+ --includedir=${OSGEO4W_ROOT_MSYS}/include \
--with-opengl=windows \
--without-x \
--with-cxx \
@@ -167,15 +158,16 @@
--enable-largefile \
--with-fftw \
--with-freetype \
- --with-freetype-includes=/mingw64/include/freetype2 \
- --with-proj-share=$OSGEO4W_ROOT_MSYS/share/proj \
- --with-proj-includes=$OSGEO4W_ROOT_MSYS/include \
- --with-proj-libs=$OSGEO4W_ROOT_MSYS/lib \
+ --with-freetype-includes=${OSGEO4W_ROOT_MSYS}/include/freetype2 \
+ --with-proj-share=${OSGEO4W_ROOT_MSYS}/share/proj \
+ --with-proj-includes=${OSGEO4W_ROOT_MSYS}/include \
+ --with-proj-libs=${OSGEO4W_ROOT_MSYS}/lib \
--with-postgres \
- --with-postgres-includes=$OSGEO4W_ROOT_MSYS/include \
- --with-postgres-libs=$PWD/mswindows/osgeo4w/lib \
+ --with-postgres-includes=${OSGEO4W_ROOT_MSYS}/include \
+ --with-postgres-libs=${OSGEO4W_ROOT_MSYS}/lib \
--with-gdal=$PWD/mswindows/osgeo4w/gdal-config \
--with-geos=$PWD/mswindows/osgeo4w/geos-config \
+ --with-libpng=$PWD/mswindows/osgeo4w/libpng-config \
--with-sqlite \
--with-sqlite-includes=$OSGEO4W_ROOT_MSYS/include \
--with-sqlite-libs=$PWD/mswindows/osgeo4w/lib \
@@ -189,10 +181,11 @@
--with-lapack-includes=/mingw64/include \
--with-openmp \
--with-cairo \
- --with-cairo-includes=$OSGEO4W_ROOT_MSYS/include \
- --with-cairo-ldflags="-L$PWD/mswindows/osgeo4w/lib -lcairo -lfontconfig" \
+ --with-cairo-includes=${OSGEO4W_ROOT_MSYS}/include \
+ --with-cairo-ldflags="-L$PWD/mswindows/osgeo4w/lib -lcairo" \
--with-bzlib \
--with-liblas=$PWD/mswindows/osgeo4w/liblas-config \
+ --with-netcdf=${OSGEO4W_ROOT_MSYS}/bin/nc-config \
--without-pdal
touch mswindows/osgeo4w/configure-stamp
@@ -248,7 +241,9 @@
# copy dependencies (TODO: to be reduced)
cp -uv $DLLS apps/grass/grass$POSTFIX/bin
- cp -uv /mingw64/etc/fonts/fonts.conf apps/grass/grass$POSTFIX/etc
+
+ # copy R batch files
+ cp -uv $SRC/mswindows/external/rbatch/* apps/grass/grass$POSTFIX/bin
# creating grass package
/bin/tar -cjf $PDIR/grass$PACKAGE_POSTFIX-$VERSION-$PACKAGE_PATCH.tar.bz2 \