Skip to content
Permalink
Browse files

osgeo4w: updates for grass 7.6.1

(cherry picked from commit a19fc89)
  • Loading branch information
jef-n committed Mar 22, 2019
1 parent e92d2d1 commit 2468226bc97b78ef3b193ac2883b7d3de9e3b4d1
@@ -77,8 +77,8 @@ MACRO (CHECK_GRASS G_PREFIX)
# and then again with no specified paths to search the default
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
# searching for the same item do nothing.
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib)
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} grass_${LIB}.${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}.${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} grass_${LIB}.${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}.${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}} PATHS ${G_PREFIX}/lib)

IF(LIB_PATH)
SET(GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} ${LIB_PATH})
@@ -1,10 +1,19 @@
LoadModule fcgid_module modules/mod_fcgid.so

DefaultInitEnv PATH "@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem"
DefaultInitEnv O4W_QT_PREFIX "@osgeo4w@/apps/Qt5"
DefaultInitEnv O4W_QT_BINARIES "@osgeo4w@/apps/Qt5/bin"
DefaultInitEnv O4W_QT_PLUGINS "@osgeo4w@/apps/Qt5/plugins"
DefaultInitEnv O4W_QT_LIBRARIES "@osgeo4w@/apps/Qt5/lib"
DefaultInitEnv O4W_QT_TRANSLATIONS "@osgeo4w@/apps/Qt5/translations"
DefaultInitEnv O4W_QT_HEADERS "@osgeo4w@/apps/Qt5/include"
DefaultInitEnv O4W_QT_DOC "@osgeo4w@/apps/Qt5/doc"

DefaultInitEnv PATH "@osgeo4w@\apps\qt5\bin;@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\@grasspath@\bin;@osgeo4w@\apps\grass\@grasspath@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem"
DefaultInitEnv QGIS_PREFIX_PATH "@osgeo4w@\apps\@package@"
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt4\plugins"
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt5\plugins"
DefaultInitEnv TEMP "@temp@"
DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python27"
DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python37"
DefaultInitEnv PYTHONPATH "@osgeo4w@\apps\Python37;@osgeo4w@\apps\Python37\Scripts"

Alias /@package@/ @osgeo4w@/apps/@package@/bin/

@@ -68,7 +68,6 @@ set CMAKE_OPT=^

:cmake
for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi
set GRASS7_VERSION=%GRASS7_VERSION:grass-=%
set GRASS_VERSIONS=%GRASS7_VERSION%

set TAR=tar.exe
@@ -206,8 +205,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
mkdir "%TEMP%"

for %%g IN (%GRASS_VERSIONS%) do (
set path=!path!;%OSGEO4W_ROOT%\apps\grass\grass-%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-%%g
set path=!path!;%OSGEO4W_ROOT%\apps\grass\%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g
)
PATH %path%;%BUILDDIR%\output\plugins
set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins
@@ -251,9 +250,10 @@ if errorlevel 1 (echo creation of registry template & goto error)

set batches=
for %%g IN (%GRASS_VERSIONS%) do (
for /F "delims=." %%i in ("%%g") do set v=%%i
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("!gv!") do set v=%%i

sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-g!v!.bat.tmpl
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-g!v!.bat.tmpl
if errorlevel 1 (echo creation of desktop template failed & goto error)
set batches=!batches! bin/%PACKAGENAME%-g!v!.bat.tmpl
)
@@ -63,14 +63,7 @@ set CMAKE_OPT=^
-D CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=TRUE

:cmake
set GRASS7=
if exist %OSGEO4W_ROOT%\bin\grass74.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass74.bat
if exist %OSGEO4W_ROOT%\bin\grass76.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass76.bat
if "%GRASS7%"=="" (echo GRASS7 not found & goto error)

for /f "usebackq tokens=1" %%a in (`%GRASS7% --config path`) do set GRASS7_PATH=%%a
for %%i in ("%GRASS7_PATH%") do set GRASS7_VERSION=%%~nxi
set GRASS7_VERSION=%GRASS7_VERSION:grass-=%
for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi
set GRASS_VERSIONS=%GRASS7_VERSION%

set TAR=tar.exe
@@ -207,8 +200,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
mkdir "%TEMP%"

for %%g IN (%GRASS_VERSIONS%) do (
set path=!path!;%OSGEO4W_ROOT%\apps\grass\grass-%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-%%g
set path=!path!;%OSGEO4W_ROOT%\apps\grass\%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g
)
PATH %path%;%BUILDDIR%\output\plugins
set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins
@@ -265,15 +258,16 @@ if errorlevel 1 (echo creation of httpd.conf template failed & goto error)
set packages="" "-common" "-server" "-devel" "-oracle-provider" "-grass-plugin-common"

for %%g IN (%GRASS_VERSIONS%) do (
for /F "delims=." %%i in ("%%g") do set v=%%i
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("!gv!") do set v=%%i
set w=!v!
if !v!==6 set w=

sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' -e 's/@grassmajor@/!v!/g' postinstall-grass.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-grass-plugin!w!.bat
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/@grassmajor@/!v!/g' postinstall-grass.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-grass-plugin!w!.bat
if errorlevel 1 (echo creation of grass desktop postinstall failed & goto error)
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' -e 's/@grassmajor@/!v!/g' preremove-grass.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-grass-plugin!w!.bat
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/@grassmajor@/!v!/g' preremove-grass.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-grass-plugin!w!.bat
if errorlevel 1 (echo creation of grass desktop preremove failed & goto error)
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' -e 's/@grassmajor@/!v!/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-grass!v!.bat.tmpl
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' -e 's/@grassmajor@/!v!/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-grass!v!.bat.tmpl
if errorlevel 1 (echo creation of grass desktop template failed & goto error)

set packages=!packages! "-grass-plugin!w!"
@@ -437,7 +431,8 @@ if errorlevel 1 (echo tar failed & goto error)
if errorlevel 1 (echo tar grass-plugin failed & goto error)

for %%g IN (%GRASS_VERSIONS%) do (
for /F "delims=." %%i in ("%%g") do set v=%%i
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("!gv!") do set v=%%i
set w=!v!
if !v!==6 set w=

@@ -9,7 +9,8 @@ if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%"

for %%g in (@grassversions@) do (
for /F "delims=." %%i in ("%%g") do set v=%%i
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("%%gv") do set v=%%i

copy "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe"
copy "%OSGEO4W_ROOT%\bin\@package@-bin.vars" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.vars"
@@ -1,10 +1,10 @@
@echo off
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\etc\env.bat"
call "%OSGEO4W_ROOT%\apps\grass\@grasspath@\etc\env.bat"
call qt5_env.bat
call py3_env.bat
@echo off
path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\bin;%PATH%
path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\@grasspath@\lib;%OSGEO4W_ROOT%\apps\grass\@grasspath@\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448

0 comments on commit 2468226

Please sign in to comment.
You can’t perform that action at this time.