From 1640e1cb7999e1c4d16546e3968fb5c140774232 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 11 Jun 2017 21:52:19 +0200 Subject: [PATCH 001/264] inital work on grass cmake build --- CMakeLists.txt | 314 ++++++++++++++++ cmake/ctypesgen.cmake | 50 +++ cmake/locale_strings.cmake | 32 ++ cmake/scripts.cmake | 86 +++++ db/CMakeLists.txt | 53 +++ db/drivers/CMakeLists.txt | 31 ++ demolocation/CMakeLists.txt | 32 ++ display/CMakeLists.txt | 25 ++ find_scripts/FindCairo.cmake | 98 +++++ find_scripts/FindFFTW.cmake | 39 ++ find_scripts/FindFontConfig.cmake | 35 ++ find_scripts/FindGEOS.cmake | 62 ++++ find_scripts/FindPROJ4.cmake | 44 +++ general/CMakeLists.txt | 47 +++ general/manage/lister/CMakeLists.txt | 19 + gui/CMakeLists.txt | 8 + gui/icons/CMakeLists.txt | 22 ++ gui/wxpython/CMakeLists.txt | 65 ++++ imagery/CMakeLists.txt | 105 ++++++ include/CMakeLists.txt | 74 ++++ lib/CMakeLists.txt | 133 +++++++ lib/db/CMakeLists.txt | 44 +++ lib/db/sqlp/CMakeLists.txt | 17 + lib/fonts/CMakeLists.txt | 1 + lib/gis/CMakeLists.txt | 34 ++ lib/init/CMakeLists.txt | 100 ++++++ lib/proj/CMakeLists.txt | 53 +++ lib/python/CMakeLists.txt | 179 ++++++++++ lib/python/ctypes/CMakeLists.txt | 93 +++++ lib/rst/CMakeLists.txt | 20 ++ lib/temporal/CMakeLists.txt | 4 + lib/vector/CMakeLists.txt | 45 +++ lib/vector/dglib/CMakeLists.txt | 56 +++ lib/vector/diglib/CMakeLists.txt | 51 +++ lib/vector/neta/CMakeLists.txt | 24 ++ lib/vector/vedit/CMakeLists.txt | 21 ++ misc/CMakeLists.txt | 20 ++ raster/CMakeLists.txt | 511 +++++++++++++++++++++++++++ raster/r.colors.out/CMakeLists.txt | 16 + raster/r.colors/CMakeLists.txt | 14 + raster/r.mapcalc/CMakeLists.txt | 50 +++ raster/r.sim/CMakeLists.txt | 21 ++ raster/r.spread/CMakeLists.txt | 8 + raster/r.univar/CMakeLists.txt | 15 + raster3d/CMakeLists.txt | 93 +++++ raster3d/r3.flow/CMakeLists.txt | 14 + scripts/CMakeLists.txt | 93 +++++ scripts/tmp.cmakelists.txt | 198 +++++++++++ temporal/CMakeLists.txt | 57 +++ thirdparty/CMakeLists.txt | 120 +++++++ tools/CMakeLists.txt | 38 ++ vector/CMakeLists.txt | 376 ++++++++++++++++++++ vector/v.lrs/CMakeLists.txt | 19 + 53 files changed, 3779 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 cmake/ctypesgen.cmake create mode 100644 cmake/locale_strings.cmake create mode 100644 cmake/scripts.cmake create mode 100644 db/CMakeLists.txt create mode 100644 db/drivers/CMakeLists.txt create mode 100644 demolocation/CMakeLists.txt create mode 100644 display/CMakeLists.txt create mode 100644 find_scripts/FindCairo.cmake create mode 100644 find_scripts/FindFFTW.cmake create mode 100644 find_scripts/FindFontConfig.cmake create mode 100644 find_scripts/FindGEOS.cmake create mode 100644 find_scripts/FindPROJ4.cmake create mode 100644 general/CMakeLists.txt create mode 100644 general/manage/lister/CMakeLists.txt create mode 100644 gui/CMakeLists.txt create mode 100644 gui/icons/CMakeLists.txt create mode 100644 gui/wxpython/CMakeLists.txt create mode 100644 imagery/CMakeLists.txt create mode 100644 include/CMakeLists.txt create mode 100644 lib/CMakeLists.txt create mode 100644 lib/db/CMakeLists.txt create mode 100644 lib/db/sqlp/CMakeLists.txt create mode 100644 lib/fonts/CMakeLists.txt create mode 100644 lib/gis/CMakeLists.txt create mode 100644 lib/init/CMakeLists.txt create mode 100644 lib/proj/CMakeLists.txt create mode 100644 lib/python/CMakeLists.txt create mode 100644 lib/python/ctypes/CMakeLists.txt create mode 100644 lib/rst/CMakeLists.txt create mode 100644 lib/temporal/CMakeLists.txt create mode 100644 lib/vector/CMakeLists.txt create mode 100644 lib/vector/dglib/CMakeLists.txt create mode 100644 lib/vector/diglib/CMakeLists.txt create mode 100644 lib/vector/neta/CMakeLists.txt create mode 100644 lib/vector/vedit/CMakeLists.txt create mode 100644 misc/CMakeLists.txt create mode 100644 raster/CMakeLists.txt create mode 100644 raster/r.colors.out/CMakeLists.txt create mode 100644 raster/r.colors/CMakeLists.txt create mode 100644 raster/r.mapcalc/CMakeLists.txt create mode 100644 raster/r.sim/CMakeLists.txt create mode 100644 raster/r.spread/CMakeLists.txt create mode 100644 raster/r.univar/CMakeLists.txt create mode 100644 raster3d/CMakeLists.txt create mode 100644 raster3d/r3.flow/CMakeLists.txt create mode 100644 scripts/CMakeLists.txt create mode 100644 scripts/tmp.cmakelists.txt create mode 100644 temporal/CMakeLists.txt create mode 100644 thirdparty/CMakeLists.txt create mode 100644 tools/CMakeLists.txt create mode 100644 vector/CMakeLists.txt create mode 100644 vector/v.lrs/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000000..792c5313bfc --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,314 @@ +cmake_minimum_required(VERSION 3.3) + +project(GRASSGIS) + +set(BUILD_SHARED_LIBS ON) + +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/find_scripts;${CMAKE_MODULE_PATH}") + +#TODO +option(WITH_CAIRO "Build with cairo support ." ON) +option(WITH_X11 "Build with X11 support ." ON) +option(WITH_OPENGL "Build with opengl support ." OFF) + +set(GRASS_VERSION_MAJOR) +set(GRASS_VERSION_MINOR) +set(GRASS_VERSION_PATCH) + + +#TODO +set(GRASS_VERSION_UPDATE_PKG "0.2") +set(BUILD_ARCH "x86_64") + +file(STRINGS "include/VERSION" GRASS_VERSION_STRINGS) +list(LENGTH GRASS_VERSION_STRINGS GRASS_VERSION_FILE_LENGTH) + +if(GRASS_VERSION_FILE_LENGTH LESS 3 ) + message(FATAL_ERROR "include/VERSION is not a valid file") +endif() + +list(GET GRASS_VERSION_STRINGS 0 GRASS_VERSION_MAJOR) +list(GET GRASS_VERSION_STRINGS 1 GRASS_VERSION_MINOR) + +if(GRASS_VERSION_FILE_LENGTH GREATER 3 ) + list(GET GRASS_VERSION_STRINGS 2 GRASS_VERSION_RELEASE) +endif() + +if(GRASS_VERSION_FILE_LENGTH GREATER 4 ) + list(GET GRASS_VERSION_STRINGS 3 GRASS_VERSION_DATE) +endif() + +set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}) + +set(NAME_VER ${GRASS_VERSION_MAJOR}) +set(LIB_VER "${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.") + +set(GRASS_VERSION_SVN "exported") +find_program(SVN_VERSION NAMES svnversion) +if(SVN_VERSION) + execute_process( + COMMAND ${SVN_VERSION} -c + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../addons/grass7 + OUTPUT_VARIABLE svnversion_OV + ERROR_VARIABLE svnversion_EV + RESULT_VARIABLE svnversion_RV + ) + + if(svnversion_RV ) + message(FATAL_ERROR "Error running svnversion=${svnversion_EV}") + else() + string(REGEX REPLACE "([0-9]+):" "r" GRASS_VERSION_SVN "${svnversion_OV}") + string(STRIP ${GRASS_VERSION_SVN} GRASS_VERSION_SVN) + endif() + #message(FATAL_ERROR "GRASS_VERSION_SVN=${GRASS_VERSION_SVN}| ${svnversion_OV}") + +endif() #SVN_VERSION + +message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") +message(STATUS "GRASS_VERSION_SVN = '${GRASS_VERSION_SVN}'") + +# Setup build locations. +if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +endif() +if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +endif() +if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +endif() + +function(update_per_group_target t_name) + if(${t_name} MATCHES "(^([a-z|0-9]+)\\.)") + string(REPLACE "." ";" name_to_list "${t_name}") + list(GET name_to_list 0 all_target_name) + if(all_target_name) + set(all_target_name ${all_target_name}-all) + else() + message(FATAL_ERROR "all_target_name=${all_target_name} \t t_name=${t_name}") + endif() + + if(TARGET ${all_target_name}) + add_dependencies(${all_target_name} ${t_name}) + else() + add_custom_target(${all_target_name} DEPENDS ${t_name}) + endif() + endif() + +endfunction() + +function(build_module) + cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;DEFS;HEADERS" ${ARGN} ) + + if(NOT G_NAME) + message(FATAL_ERROR "G_NAME empty") + endif() + update_per_group_target( ${G_NAME} ) + + if(NOT G_SRC_REGEX) + set(G_SRC_REGEX "*.c") + endif() + + if(NOT G_SRCDIR) + set(G_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + + foreach(G_HEADER ${G_HEADERS}) + if( EXISTS "${G_SRCDIR}/${G_HEADER}" ) + file(COPY ${G_SRCDIR}/${G_HEADER} DESTINATION "${CMAKE_BINARY_DIR}/include/grass") + else() + file(GLOB header_list_from_glob LIST_DIRECTORIES false "${G_SRCDIR}/${G_HEADER}") + if(NOT header_list_from_glob) + message(FATAL_ERROR "MUST copy '${G_SRCDIR}/${G_HEADER}' to ${CMAKE_BINARY_DIR}/include/grass") + endif() + foreach(header_I ${header_list_from_glob}) + file(COPY ${header_I} DESTINATION "${CMAKE_BINARY_DIR}/include/grass") + endforeach() + endif() + endforeach() + + if(NOT G_SOURCES) + file(GLOB ${G_NAME}_SRCS "${G_SRCDIR}/${G_SRC_REGEX}") + else() + set(${G_NAME}_SRCS ${G_SOURCES}) + endif() + + if(G_EXE) + add_executable(${G_NAME} ${${G_NAME}_SRCS}) + else() + add_library(${G_NAME} ${${G_NAME}_SRCS}) + set_target_properties(${G_NAME} + PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER} + ) + endif() + + set(${G_NAME}_INCLUDE_DIRS) + + list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_SRCDIR}") + + if(G_INCLUDES) + foreach(G_INCLUDE ${G_INCLUDES}) + # message( "xx=${G_INCLUDE} ${G_NAME}" ) + target_include_directories(${G_NAME} PUBLIC ${G_INCLUDE} ) + endforeach() + endif() + + set(${G_NAME}_LINK_LIBS) + + foreach(G_DEPEND ${G_DEPENDS}) + if(NOT TARGET ${G_DEPEND}) + message(FATAL_ERROR "${G_DEPEND} not a target") + break() + endif() + + #message( "${G_NAME} depends on \t ${G_DEPEND}") + ##go recurse on depends() + add_dependencies(${G_NAME} ${G_DEPEND}) + + + + + + get_target_property(${G_DEPEND}_IDIRS ${G_DEPEND} INTERFACE_INCLUDE_DIRECTORIES) + + foreach(${G_DEPEND}_IDIR ${${G_DEPEND}_IDIRS}) + if(EXISTS "${${G_DEPEND}_IDIR}") + list(APPEND ${G_NAME}_INCLUDE_DIRS "${${G_DEPEND}_IDIR}") + else() + #message(FATAL_ERROR "${G_DEPEND} has incorrect value for INTERFACE_INCLUDE_DIRECTORIES property [${${G_DEPEND}_IDIRS}]") + endif() + + endforeach() + + + get_target_property(${G_DEPEND}_IMPORTED_LOCATIONS ${G_DEPEND} IMPORTED_LOCATION) + foreach( ${G_DEPEND}_IMPORTED_LOC ${${G_DEPEND}_IMPORTED_LOCATIONS}) + if(NOT EXISTS "${${G_DEPEND}_IMPORTED_LOC}") + list(APPEND ${G_NAME}_LINK_LIBS "${G_DEPEND}") + else() + list(APPEND ${G_NAME}_LINK_LIBS "${${G_DEPEND}_IMPORTED_LOC}") + endif() + endforeach() + + + #message("$ ") + #message("$ ") + + endforeach() + +# if(G_EXE) +# target_link_libraries(${G_NAME} m) +# endif() + +if(G_DEFS) + foreach(G_DEF ${G_DEFS}) + target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") + endforeach() + endif() + + if(${G_NAME}_LINK_LIBS) + list(REMOVE_DUPLICATES ${G_NAME}_LINK_LIBS ) + # message("${G_NAME}_LINK_LIBS=${${G_NAME}_LINK_LIBS}") + target_link_libraries(${G_NAME} ${${G_NAME}_LINK_LIBS}) +endif() + + if(${G_NAME}_INCLUDE_DIRS) + list(REMOVE_DUPLICATES ${G_NAME}_INCLUDE_DIRS ) + +# message("${G_NAME}_INCLUDE_DIRS=${${G_NAME}_INCLUDE_DIRS}") + + +endif() + +target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIRS}) + +#foreach( ${G_NAME}_INCLUDE_DIR ${${G_NAME}_INCLUDE_DIRS}) +# target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIR}) +#endforeach() + + set_property( TARGET ${G_NAME} PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib${G_NAME}.a;${${G_NAME}_LINK_LIBS}" ) + set_property( TARGET ${G_NAME} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${G_NAME}_INCLUDE_DIRS}" ) + +endfunction() + + +macro(build_library_in_subdir dir_name) + set (extra_args ${ARGN}) + if ("NAME" IN_LIST extra_args) + #message("dir_name=${dir_name} ${extra_args}") + build_module(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) + else() + get_filename_component(g_name ${dir_name} NAME) + #message("dir_name=${dir_name} |g_name= ${g_name}") + build_module(NAME grass_${g_name} SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN}) + endif() +endmacro() + +macro(build_program) + build_module(${ARGN} EXE) +endmacro() + +macro(build_program_in_subdir dir_name) + set (extra_args ${ARGN}) + if ("NAME" IN_LIST extra_args) + #message("dir_name=${dir_name} ${extra_args}") + build_program(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) + else() + get_filename_component(pgm_name ${dir_name} NAME) + build_program(NAME ${pgm_name} SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) + endif() +endmacro() + + +add_subdirectory(thirdparty) + +include(cmake/scripts.cmake) + +add_subdirectory(include) + +#include_directories("${CMAKE_SOURCE_DIR}/dist.x86_64-unknown-openbsd6.0/include") + +include_directories("${CMAKE_BINARY_DIR}/include") + +add_subdirectory(lib) + +set(ALL_SUBDIRS + general + db + display + imagery + misc + raster + raster3d + demolocation + scripts + vector + temporal + tools + + gui + + + + # ps + # locale + # man + # doc + # testsuite + # demolocation + # macosx + # mswindows +) + + + +foreach(d ${ALL_SUBDIRS}) + add_subdirectory(${d}) +endforeach() + + + + +if(WITH_X11) + build_program_in_subdir(visualization/ximgview DEPENDS grass_gis X11) +endif() diff --git a/cmake/ctypesgen.cmake b/cmake/ctypesgen.cmake new file mode 100644 index 00000000000..6eab941a568 --- /dev/null +++ b/cmake/ctypesgen.cmake @@ -0,0 +1,50 @@ +set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") +set(ENV{GISBASE} "${BIN_DIR}") +set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") +set(ENV{PYTHONPATH} "${BIN_DIR}/gui/wxpython:${BIN_DIR}/etc/python:$ENV{PYTHONPATH}") +set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +set(ENV{LC_ALL} C) + +set(LIBRARIES) +foreach(LIB ${LIBS}) + list(APPEND LIBRARIES "--library=${BIN_DIR}/lib/lib${LIB}.so") +endforeach() + +set(HEADERS) +foreach(HDR ${HDRS}) + list(APPEND HEADERS "${BIN_DIR}/include/grass/${HDR}") +endforeach() + + +foreach(req OUT_FILE HDRS LIBS CTYPESGEN_PY COMPILER ) + if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "") + message(FATAL_ERROR "you must set ${req}") + endif() +endforeach() + + +#NLS_CFLAGS = -DPACKAGE=\"$(PACKAGE)\" +#USE_LARGEFILES = 1 +#LFS_CFLAGS = +#CTYPESFLAGS = --cpp "$(CC) -E $(CPPFLAGS) $(LFS_CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(DEFS) $(EXTRA_INC) $(INC) -D__GLIBC_HAVE_LONG_LONG" + +set(CTYPESFLAGS "${COMPILER} -E -DPACKAGE=\"grasslibs\" -D__GLIBC_HAVE_LONG_LONG") + +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${CTYPESGEN_PY} + --cpp=${CTYPESFLAGS} + --includedir="${BIN_DIR}/include" + --runtime-libdir="${BIN_DIR}/lib" + ${HEADERS} + ${LIBRARIES} + --output=${OUT_FILE} + OUTPUT_VARIABLE ctypesgen_OV + ERROR_VARIABLE ctypesgen_EV + RESULT_VARIABLE ctypesgen_RV + ) + +if( ctypesgen_RV ) + message(FATAL_ERROR "ctypesgen.py: ${ctypesgen_EV} \n ${ctypesgen_OV}") +endif() + +#message(FATAL_ERROR "ctypesgen_RV = ${ctypesgen_OV}") diff --git a/cmake/locale_strings.cmake b/cmake/locale_strings.cmake new file mode 100644 index 00000000000..10f2ab5c444 --- /dev/null +++ b/cmake/locale_strings.cmake @@ -0,0 +1,32 @@ + +set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") +set(ENV{GISBASE} "${BIN_DIR}") +set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") +set(ENV{PYTHONPATH} "${BIN_DIR}/gui/wxpython:${BIN_DIR}/etc/python:$ENV{PYTHONPATH}") +set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +set(ENV{LC_ALL} C) + + +execute_process(COMMAND ${BIN_DIR}/bin/g.parser -t ${INPUT_FILE} + OUTPUT_VARIABLE run_grass_OV + ERROR_VARIABLE run_grass_EV + #OUTPUT_FILE /tmp/tt.out + RESULT_VARIABLE run_grass_RV + ) + +string(REGEX REPLACE "\n" ";" varname "${run_grass_OV}") +set(output_to_write) + +#message("run_grass_OV = ${run_grass_OV}") + +foreach(line ${varname}) + string(REPLACE "\"" "\\\"" line "${line}") + set(line "_(\"${line}\")") + #message("line=${line}") + list(APPEND output_to_write "${line}") +endforeach() + +string(REGEX REPLACE ";" "\n" output_to_write "${output_to_write}") + + +file(WRITE "${OUTPUT_FILE}" "${output_to_write}\n") diff --git a/cmake/scripts.cmake b/cmake/scripts.cmake new file mode 100644 index 00000000000..8b7fb67d216 --- /dev/null +++ b/cmake/scripts.cmake @@ -0,0 +1,86 @@ +macro(make_script_in_dir dir_name) + build_grass_script(NAME ${dir_name}) +endmacro() + +function(build_grass_script) + cmake_parse_arguments(G "" "NAME;SRCDIR;SRC_REGEX" "SOURCES;DEPENDS" ${ARGN} ) + + update_per_group_target( ${G_NAME} ) + if(NOT G_SRCDIR) + set(SCRIPT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) + endif() + + + if(NOT G_SRC_REGEX) + set(G_SRC_REGEX "*.py") + endif() + + file(GLOB SRC_FILES "${SCRIPT_DIR}/${G_SRC_REGEX}") + if(NOT SRC_FILES) + message(FATAL_ERROR "[ ${G_NAME} ]: SRC_FILES empty ") + endif() + + +# message(FATAL_ERROR "ETCPYFILES=${ETCPYFILES}") +#install(FILES ${ETCPYCFILES} DESTINATION etc) + +if(MINGW) + #PGM script_name + # $(BIN)/$(PGM).bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat + # sed -e "s#SCRIPT_NAME#$(PGM)#" -e "s#SCRIPT_DIR#$(SCRIPT_DIR)#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@ + # unix2dos $@ + configure_file( + ${CMAKE_SOURCE_DIR}/scripts/windows_launch.bat + ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat + ) + install( PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin ) +endif() + +foreach(pyfile ${SRC_FILES}) + get_filename_component(pyfile_NAME ${pyfile} NAME) + + string(REPLACE ".py" "" pyfile_NAME ${pyfile_NAME}) + + set(${pyfile_NAME}_OUTPUT_FILE ${CMAKE_BINARY_DIR}/locale/scriptstrings/${pyfile_NAME}_to_translate.c) + + add_custom_command( + OUTPUT ${${pyfile_NAME}_OUTPUT_FILE}.stamp + DEPENDS g.parser + COMMAND ${CMAKE_COMMAND} + -DINPUT_FILE=${pyfile} + -DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + COMMAND ${CMAKE_COMMAND} -E touch ${${pyfile_NAME}_OUTPUT_FILE}.stamp + COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" + VERBATIM + ) + + add_custom_target(${pyfile_NAME} + ALL + DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp + ) + + # add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" + # COMMAND ${CMAKE_COMMAND} + # -DINPUT_FILE=${pyfile} + # -DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} + # -DBIN_DIR=${CMAKE_BINARY_DIR} + # -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + # DEPENDS g.parser + # COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" + # ) + +# set_source_files_properties("${${pyfile_NAME}_OUTPUT_FILE}" GENERATED) + + foreach(G_DEPEND ${G_DEPENDS}) + add_dependencies(${G_DEPEND}) + endforeach() + + install(FILES ${pyfile} DESTINATION etc) +endforeach() + +endfunction() + + + diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt new file mode 100644 index 00000000000..e536df3a90c --- /dev/null +++ b/db/CMakeLists.txt @@ -0,0 +1,53 @@ +#TODO +#add_subdirectory(drivers) + +build_program_in_subdir(db.columns DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.createdb DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.describe DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.connect DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.copy DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.execute DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.drivers DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.databases DEPENDS grass_gis grass_dbmiclient ) + +build_program_in_subdir(db.dropdb DEPENDS grass_gis grass_dbmiclient ) + + +#add_subdirectory(dbf) + + +# MODULE_TOPDIR = .. + +# SUBDIRS = \ +# db.columns \ +# db.connect \ +# db.copy \ +# db.createdb \ +# db.databases \ +# db.describe \ +# db.drivers \ +# db.dropdb \ +# db.execute \ +# db.login \ +# db.select \ +# db.tables + +# CLEAN_SUBDIRS = drivers + +# PGM = databaseintro + +# include $(MODULE_TOPDIR)/include/Make/Dir.make + +# default: htmldir + +# htmldir: +# $(MAKE) -C drivers +# $(MAKE) parsubdirs + diff --git a/db/drivers/CMakeLists.txt b/db/drivers/CMakeLists.txt new file mode 100644 index 00000000000..4799d7b7564 --- /dev/null +++ b/db/drivers/CMakeLists.txt @@ -0,0 +1,31 @@ +set(dbf_SRCS dbf/column.c dbf/create_table.c + dbf/cursor.c dbf/db.c dbf/dbfexe.c dbf/describe.c + dbf/driver.c dbf/error.c dbf/execute.c dbf/fetch.c + dbf/listtab.c dbf/main.c dbf/select.c dbf/str.c dbf/table.c) + +build_program_in_subdir(dbf + SOURCES ${dbf_SRCS} + DEPENDS grass_gis grass_dbmidriver + grass_shape grass_sqlp + ) + + +if(ODBC_LIB) + add_subdirectory(drivers/odbc) +endif() + +if(PQ_LIB) + add_subdirectory(drivers/postgres) +endif() + +if(MYSQL_LIB) + add_subdirectory(drivers/mysql) +endif() + +if(SQLITE_LIB) + add_subdirectory(drivers/sqlite) +endif() + +if(USE_OGR) + add_subdirectory(drivers/ogr) +endif() diff --git a/demolocation/CMakeLists.txt b/demolocation/CMakeLists.txt new file mode 100644 index 00000000000..354693094a8 --- /dev/null +++ b/demolocation/CMakeLists.txt @@ -0,0 +1,32 @@ +set(GISDBASE ${CMAKE_SOURCE_DIR}) + +configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl + "${CMAKE_BINARY_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") + + +# SRCFILES = WIND DEFAULT_WIND VAR PROJ_INFO PROJ_UNITS MYNAME +# DBFMAPS = mysites point +# SQLITEMAPS = country_boundaries +# MAPFILES = dbln coor topo head cidx sidx hist +# DBFFILES := $(foreach map,$(DBFMAPS),dbf/$(map).dbf) +# SQLITEFILES = sqlite/sqlite.db +# VECTFILES := $(foreach map,$(DBFMAPS),$(foreach file,$(MAPFILES),vector/$(map)/$(file))) $(foreach map,$(SQLITEMAPS),$(foreach file,$(MAPFILES),vector/$(map)/$(file))) +# SRC := $(SRCFILES) $(DBFFILES) $(SQLITEFILES) $(VECTFILES) +# SRCDIRS := PERMANENT PERMANENT/vector PERMANENT/dbf PERMANENT/sqlite $(patsubst %,PERMANENT/vector/%,$(DBFMAPS)) $(patsubst %,PERMANENT/vector/%,$(SQLITEMAPS)) + +# DSTDIR = $(ARCH_DISTDIR)/demolocation +# DST := $(patsubst %,$(DSTDIR)/PERMANENT/%,$(SRC)) +# DSTDIRS := $(patsubst %,$(DSTDIR)/%,$(SRCDIRS)) +# RCFILE = $(DSTDIR)/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) + +# default: $(DST) $(RCFILE) + +# $(DSTDIR)/PERMANENT/%: PERMANENT/% | $(DSTDIRS) +# $(INSTALL_DATA) $< $@ + +# $(DSTDIRS): %: +# $(MKDIR) $@ + +# $(RCFILE): grassrc.tmpl | $(DSTDIRS) +# sed 's!@GISDBASE@!$(RUN_GISBASE)!' < $< > $@ + diff --git a/display/CMakeLists.txt b/display/CMakeLists.txt new file mode 100644 index 00000000000..54cada596cc --- /dev/null +++ b/display/CMakeLists.txt @@ -0,0 +1,25 @@ +build_program_in_subdir(d.barscale DEPENDS grass_sym grass_display grass_gis ) +build_program_in_subdir(d.colorlist DEPENDS grass_gis grass_display) +build_program_in_subdir(d.colortable DEPENDS grass_gis grass_display) +build_program_in_subdir(d.erase DEPENDS grass_gis grass_display) +build_program_in_subdir(d.font DEPENDS grass_gis grass_display grass_raster) +build_program_in_subdir(d.fontlist DEPENDS grass_gis grass_display grass_raster) +build_program_in_subdir(d.geodesic DEPENDS grass_gis grass_display) +build_program_in_subdir(d.graph DEPENDS grass_gis grass_sym grass_display) +build_program_in_subdir(d.grid DEPENDS grass_gis grass_sym grass_gproj grass_display) +build_program_in_subdir(d.his DEPENDS grass_gis grass_display) +build_program_in_subdir(d.histogram DEPENDS grass_gis grass_display) +build_program_in_subdir(d.mon DEPENDS grass_gis grass_display) +build_program_in_subdir(d.info DEPENDS grass_gis grass_display) +build_program_in_subdir(d.labels DEPENDS grass_gis grass_display) +build_program_in_subdir(d.legend DEPENDS grass_gis grass_display grass_raster3d) +build_program_in_subdir(d.legend.vect DEPENDS grass_gis grass_display grass_sym) +build_program_in_subdir(d.linegraph DEPENDS grass_gis grass_display grass_sym) +build_program_in_subdir(d.northarrow DEPENDS grass_gis grass_display grass_sym) +build_program_in_subdir(d.path DEPENDS grass_gis grass_display grass_vector) +build_program_in_subdir(d.profile DEPENDS grass_gis grass_display) +build_program_in_subdir(d.rast DEPENDS grass_gis grass_display grass_raster) +build_program_in_subdir(d.rast.arrow DEPENDS grass_gis grass_raster grass_display) +build_program_in_subdir(d.rast.num DEPENDS grass_gis grass_display grass_raster) +build_program_in_subdir(d.where DEPENDS grass_gis grass_display grass_gproj) + diff --git a/find_scripts/FindCairo.cmake b/find_scripts/FindCairo.cmake new file mode 100644 index 00000000000..51ea0b293e8 --- /dev/null +++ b/find_scripts/FindCairo.cmake @@ -0,0 +1,98 @@ +# - Try to find Cairo +# Once done, this will define +# +# CAIRO_FOUND - system has Cairo +# CAIRO_INCLUDE_DIRS - the Cairo include directories +# CAIRO_LIBRARIES - link these to use Cairo +# +# Copyright (C) 2012 Raphael Kubo da Costa +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS +# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FIND_PACKAGE(PkgConfig QUIET) +PKG_CHECK_MODULES(PC_CAIRO cairo QUIET) # FIXME: After we require CMake 2.8.2 we can pass QUIET to this call. + +FIND_PATH(CAIRO_INCLUDE_DIRS + NAMES cairo.h + HINTS ${PC_CAIRO_INCLUDEDIR} + ${PC_CAIRO_INCLUDE_DIRS} + PATH_SUFFIXES cairo +) + +FIND_LIBRARY(CAIRO_LIBRARIES + NAMES cairo + HINTS ${PC_CAIRO_LIBDIR} + ${PC_CAIRO_LIBRARY_DIRS} +) + +IF (CAIRO_INCLUDE_DIRS) + IF (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h") + FILE(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT) + + STRING(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") + SET(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}") + + STRING(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") + SET(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}") + + STRING(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") + SET(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}") + + SET(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}") + ENDIF () +ENDIF () + +# FIXME: Should not be needed anymore once we start depending on CMake 2.8.3 +SET(VERSION_OK TRUE) +IF (Cairo_FIND_VERSION) + IF (Cairo_FIND_VERSION_EXACT) + IF ("${Cairo_FIND_VERSION}" VERSION_EQUAL "${CAIRO_VERSION}") + # FIXME: Use IF (NOT ...) with CMake 2.8.2+ to get rid of the ELSE block + ELSE () + SET(VERSION_OK FALSE) + ENDIF () + ELSE () + IF ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}") + SET(VERSION_OK FALSE) + ENDIF () + ENDIF () +ENDIF () + +find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h) + +if(FONTCONFIG_INCLUDE_DIR) + set(CAIRO_INCLUDE_DIRS ${CAIRO_INCLUDE_DIRS} ${FONTCONFIG_INCLUDE_DIR} ) +else() + message(STATUS "fontconfig/fontconfig.h was not found. \n I had to unset(CAIRO_INCLUDE_DIRS) to make find_package() fail \n ") + unset(CAIRO_INCLUDE_DIRS CACHE) +endif() + +find_library(FONTCONFIG_LIBRARY NAMES fontconfig) +if(FONTCONFIG_LIBRARY) + set(CAIRO_LIBRARIES ${CAIRO_LIBRARIES} ${FONTCONFIG_LIBRARY} ) +else() + message(STATUS "fontconfig library file was not found. \n I had to unset(CAIRO_LIBRARIES) to make find_package() fail \n ") + unset(CAIRO_LIBRARIES CACHE) +endif() + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo DEFAULT_MSG CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES VERSION_OK) diff --git a/find_scripts/FindFFTW.cmake b/find_scripts/FindFFTW.cmake new file mode 100644 index 00000000000..5f0ce1fefec --- /dev/null +++ b/find_scripts/FindFFTW.cmake @@ -0,0 +1,39 @@ +find_path(FFTW_INCLUDE_DIR fftw3.h) + + if(NOT FFTW_INCLUDE_DIR) + + endif() + +#fftw double lib +find_library(FFTWD_LIB fftw3 ) +find_library(FFTWD_THREADS_LIB fftw3_threads) # threads support + +set(FFTW_LIBRARIES) + +if(FFTWD_LIB) + set(FFTWD_FOUND 1) + set(FFTW_LIBRARIES ${FFTWD_LIB}) + if(FFTWD_THREADS_LIB) + set(FFTW_LIBRARIES "${FFTW_LIBRARIES};${FFTWD_THREADS_LIB}") + endif() +endif() + +#Single Precision +find_library(FFTWF_LIB fftw3f) +find_library(FFTWF_THREADS_LIB fftw3f_threads) #threads support + +if(FFTWF_LIB) + set(FFTWF_FOUND 1) + set(FFTW_LIBRARIES "${FFTW_LIBRARIES};${FFTWF_LIB}") + if(FFTWF_THREADS_LIB) + set(FFTW_LIBRARIES "${FFTW_LIBRARIES};${FFTWF_THREADS_LIB}") + endif() +endif() + +if(NOT FFTWD_FOUND AND NOT FFTWF_FOUND ) + set(FFTW_FOUND FALSE) +endif() + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW + REQUIRED_VARS FFTW_LIBRARIES FFTW_INCLUDE_DIR) diff --git a/find_scripts/FindFontConfig.cmake b/find_scripts/FindFontConfig.cmake new file mode 100644 index 00000000000..540aef0d2af --- /dev/null +++ b/find_scripts/FindFontConfig.cmake @@ -0,0 +1,35 @@ +# - Find FontConfig library +# Find the FontConfig includes and library +# This module defines +# FONTCONFIG_INCLUDE_DIR, where to find fontconfig.h +# FONTCONFIG_LIBRARIES, libraries to link against to use the FontConfig API. +# FONTCONFIG_FOUND, If false, do not try to use FontConfig. + +#============================================================================= +# Copyright 2012 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of VTK, substitute the full +# License text for the above reference.) + +find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h) + +find_library(FONTCONFIG_LIBRARY NAMES fontconfig) + +# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(FontConfig DEFAULT_MSG + FONTCONFIG_LIBRARY FONTCONFIG_INCLUDE_DIR) + +if(FONTCONFIG_FOUND) + set( FONTCONFIG_LIBRARIES ${FONTCONFIG_LIBRARY} ) +endif() + +mark_as_advanced(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARY FONTCONFIG_LIBRARIES) diff --git a/find_scripts/FindGEOS.cmake b/find_scripts/FindGEOS.cmake new file mode 100644 index 00000000000..554b76724a9 --- /dev/null +++ b/find_scripts/FindGEOS.cmake @@ -0,0 +1,62 @@ +#--- +# File: FindGEOS.cmake +# +# Find the native GEOS(Geometry Engine - Open Source) includes and libraries. +# +# This module defines: +# +# GEOS_INCLUDE_DIR, where to find geos.h, etc. +# GEOS_LIBRARY, libraries to link against to use GEOS. Currently there are +# two looked for, geos and geos_c libraries. +# GEOS_FOUND, True if found, false if one of the above are not found. +# +# For ossim, typically geos will be system installed which should be found; +# or found in the ossim 3rd party dependencies directory from a geos build +# and install. If the latter it will rely on CMAKE_INCLUDE_PATH and +# CMAKE_LIBRARY_PATH having the path to the party dependencies directory. +# +# NOTE: +# This script is specialized for ossim, e.g. looking in /usr/local/ossim. +# +# $Id$ +#--- + +#--- +# Find include path: +# Note: Ubuntu 14.04+ did not have geos.h (not included in any ossim src). +# Instead looking for Geometry.h +#--- + +find_path( GEOS_INCLUDE_DIR geos/geom/Geometry.h + PATHS + ${CMAKE_INSTALL_PREFIX}/include + $ENV{GEOS_DIR}/include + ${GEOS_DIR}/include + /usr/include + /usr/local/include + /usr/local/ossim/include ) + +# Find GEOS C library: +find_library( GEOS_C_LIB NAMES geos_c ) + +set(GEOS_FOUND FALSE) + +set( GEOS_LIBRARIES) +if(GEOS_C_LIB) + set( GEOS_LIBRARIES ${GEOS_C_LIB}) +endif() +# # Find GEOS c++ library: +# find_library( GEOS_CPP_LIB NAMES geos ) + +if(GEOS_CPP_LIB) + set(GEOS_LIBRARIES ${GEOS_C_LIB} ${GEOS_CPP_LIB} ) +endif() + +#--- +# This function sets GEOS_FOUND if variables are valid. +#--- +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( GEOS DEFAULT_MSG + GEOS_LIBRARIES + GEOS_INCLUDE_DIR ) + diff --git a/find_scripts/FindPROJ4.cmake b/find_scripts/FindPROJ4.cmake new file mode 100644 index 00000000000..b65f7d2f273 --- /dev/null +++ b/find_scripts/FindPROJ4.cmake @@ -0,0 +1,44 @@ +############################################################################### +# CMake module to search for PROJ.4 library +# +# On success, the macro sets the following variables: +# PROJ4_FOUND = if the library found +# PROJ4_LIBRARY = full path to the library +# PROJ4_INCLUDE_DIR = where to find the library headers +# also defined, but not for general use are +# PROJ4_LIBRARY, where to find the PROJ.4 library. +# +# Copyright (c) 2009 Mateusz Loskot +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +############################################################################### + +# Try to use OSGeo4W installation +IF(WIN32) + SET(PROJ4_OSGEO4W_HOME "C:/OSGeo4W") + + IF($ENV{OSGEO4W_HOME}) + SET(PROJ4_OSGEO4W_HOME "$ENV{OSGEO4W_HOME}") + ENDIF() +ENDIF(WIN32) + +FIND_PATH(PROJ4_INCLUDE_DIR proj_api.h + PATHS ${PROJ4_OSGEO4W_HOME}/include + DOC "Path to PROJ.4 library include directory") + +SET(PROJ4_NAMES ${PROJ4_NAMES} proj proj_i) +FIND_LIBRARY(PROJ4_LIBRARY + NAMES ${PROJ4_NAMES} + PATHS ${PROJ4_OSGEO4W_HOME}/lib + DOC "Path to PROJ.4 library file") + +# Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE +# if all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR) + +IF(PROJ4_FOUND) + SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY}) +ENDIF() diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt new file mode 100644 index 00000000000..a769f3293d6 --- /dev/null +++ b/general/CMakeLists.txt @@ -0,0 +1,47 @@ + +build_program_in_subdir(g.access DEPENDS grass_gis ) +build_program_in_subdir(g.copy DEPENDS grass_manage ) +build_program_in_subdir(g.dirseps DEPENDS grass_gis ) +build_program_in_subdir(g.filename DEPENDS grass_gis ) +build_program_in_subdir(g.findetc DEPENDS grass_gis ) +build_program_in_subdir(g.findfile DEPENDS grass_manage ) +build_program_in_subdir(g.gisenv DEPENDS grass_gis ) +build_program_in_subdir(g.list DEPENDS grass_manage) +build_program_in_subdir(g.mapset DEPENDS grass_gis ) +build_program_in_subdir(g.mapsets DEPENDS grass_gis ) +build_program_in_subdir(g.message DEPENDS grass_gis ) +build_program_in_subdir(g.mkfontcap DEPENDS grass_gis FREETYPE ) +build_program_in_subdir(g.parser DEPENDS grass_gis FREETYPE ) +build_program_in_subdir(g.pnmcomp DEPENDS grass_gis ) +build_program_in_subdir(g.ppmtopng DEPENDS grass_gis LIBPNG) +build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj GDAL ) +build_program_in_subdir(g.region DEPENDS grass_gis grass_gproj + grass_vector grass_raster3d grass_gmath) + +build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster ) +build_program_in_subdir(g.rename DEPENDS grass_manage grass_raster ) +build_program_in_subdir(g.tempfile DEPENDS grass_gis ) + + +#TODO +set(GRASS_VERSION_UPDATE_PKG "0.2") +set(BUILD_ARCH "x86_64") + +build_program_in_subdir(g.version DEPENDS grass_gis GEOS GDAL +# DEFS "-DGRASS_VERSION_NUMBER=1;-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE};-DGRASS_VERSION_SVN=45454;-DGRASS_VERSION_UPDATE_PKG=0.2;-DARCH='x86_64'" +DEFS "-DGRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" + "-DGRASS_VERSION_SVN=\"${GRASS_VERSION_SVN}\"" + "-DGRASS_VERSION_UPDATE_PKG=${GRASS_VERSION_UPDATE_PKG}" + "-DARCH=\"${BUILD_ARCH}\"" + ) + +if(WITH_CAIRO) + build_program_in_subdir(g.cairocomp DEPENDS grass_gis grass_cairodriver) +endif() + +# g.cairocomp +# g.gui +add_subdirectory(manage/lister) + + + diff --git a/general/manage/lister/CMakeLists.txt b/general/manage/lister/CMakeLists.txt new file mode 100644 index 00000000000..b7dc24ffeae --- /dev/null +++ b/general/manage/lister/CMakeLists.txt @@ -0,0 +1,19 @@ +# MODULE_TOPDIR = ../../.. + +# LIBES = $(VECTORLIB) $(DBMILIB) $(GISLIB) $(RASTERLIB) +# DEPENDENCIES = $(VECTORDEP) $(DBMIDEP) $(GISDEP) $(RASTERDEP) +# EXTRA_INC = $(VECT_INC) +# EXTRA_CFLAGS = $(VECT_CFLAGS) + +# include $(MODULE_TOPDIR)/include/Make/Module.make + +# default: $(ETC)/lister/cell $(ETC)/lister/vector + +# $(ETC)/lister/%: $(OBJDIR)/%.o | $(ETC)/lister +# $(call linker) + +# $(ETC)/lister: +# $(MKDIR) $@ + +build_module(NAME cell EXE SOURCES "cell.c" DEPENDS grass_vector grass_dbmibase grass_gis grass_raster) +build_module(NAME vector EXE SOURCES "vector.c" DEPENDS grass_vector grass_dbmibase grass_gis grass_raster ) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt new file mode 100644 index 00000000000..ea84ef4e015 --- /dev/null +++ b/gui/CMakeLists.txt @@ -0,0 +1,8 @@ +#TODO +add_subdirectory(icons) +#add_subdirectory(images) +#add_subdirectory(scripts) + +add_subdirectory(wxpython) + +install(FILES xml/grass-interface.dtd DESTINATION gui/xml) diff --git a/gui/icons/CMakeLists.txt b/gui/icons/CMakeLists.txt new file mode 100644 index 00000000000..b2777cf3c8a --- /dev/null +++ b/gui/icons/CMakeLists.txt @@ -0,0 +1,22 @@ +file(GLOB SRCICO "*.ico" "*.png") +file(GLOB SRCICONS "grass/*.png") +file(GLOB SRCFLAGS "flags/*.png") + +install(FILES ${SRCICO} DESTINATION gui/icons/) +install(FILES ${SRCICONS} DESTINATION gui/icons/grass) +install(FILES ${SRCFLAGS} DESTINATION gui/icons/flags) + +install(FILES ${SRCICONS} DESTINATION docs/html/icons) + +install(FILES grass.desktop DESTINATION share/applications) +foreach(icon_type 8 16 22 24 32 36 40 42 48 64 72 80 96 128 192) + set(icon_size "${icon_type}x${icon_type}") + install(FILES grass-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}/apps) + +endforeach() + +install(FILES grass.svg + DESTINATION share/icons/hicolor/scalable/apps + RENAME grass71.svg) + +install(FILES grass.appdata.xml DESTINATION share/appdata ) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt new file mode 100644 index 00000000000..ca4f5e949fa --- /dev/null +++ b/gui/wxpython/CMakeLists.txt @@ -0,0 +1,65 @@ +# MODULE_TOPDIR = ../.. + +# SUBDIRS = docs animation datacatalog mapswipe gmodeler rlisetup psmap dbmgr vdigit iclass gcp timeline tplot +# EXTRA_CLEAN_FILES = menustrings.py build_ext.pyc xml/menudata.xml xml/module_tree_menudata.xml */*.pyc + +# include $(MODULE_TOPDIR)/include/Make/Dir.make +# include $(MODULE_TOPDIR)/include/Make/Python.make + +# DSTDIR = $(GUIDIR)/wxpython + +# SRCFILES := $(wildcard icons/*.py scripts/*.py xml/*) \ +# $(wildcard animation/*.py core/*.py datacatalog/*.py dbmgr/*.py gcp/*.py gmodeler/*.py \ +# gui_core/*.py iclass/*.py lmgr/*.py location_wizard/*.py mapwin/*.py mapdisp/*.py \ +# mapswipe/*.py modules/*.py nviz/*.py psmap/*.py rdigit/*.py rlisetup/*.py timeline/*.py vdigit/*.py \ +# vnet/*.py web_services/*.py wxplot/*.py iscatt/*.py tplot/*.py) \ +# gis_set.py gis_set_error.py wxgui.py README + +# DSTFILES := $(patsubst %,$(DSTDIR)/%,$(SRCFILES)) \ +# $(patsubst %.py,$(DSTDIR)/%.pyc,$(filter %.py,$(SRCFILES))) + +# PYDSTDIRS := $(patsubst %,$(DSTDIR)/%,animation core datacatalog dbmgr gcp gmodeler \ +# gui_core iclass lmgr location_wizard mapwin mapdisp modules nviz psmap \ +# mapswipe vdigit wxplot web_services rdigit rlisetup vnet timeline iscatt tplot) + + +# DSTDIRS := $(patsubst %,$(DSTDIR)/%,icons scripts xml) + +# default: $(DSTFILES) +# -$(MAKE) $(DSTDIR)/xml/module_items.xml +# -$(MAKE) xml/menudata.xml +# -$(MAKE) xml/module_tree_menudata.xml +# -$(MAKE) menustrings.py +# $(MAKE) parsubdirs + + +# $(DSTDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS) +# $(INSTALL_DATA) $< $@ + +# xml/menudata.xml: core/toolboxes.py +# $(call run_grass,$(PYTHON) $< > $@) +# $(call run_grass,$(PYTHON) $< "validate" $@) + +# xml/module_tree_menudata.xml: core/toolboxes.py +# $(call run_grass,$(PYTHON) $< "module_tree" > $@) +# $(call run_grass,$(PYTHON) $< "validate" $@) + +# menustrings.py: core/menutree.py $(DSTDIR)/xml/menudata.xml $(DSTDIR)/xml/module_tree_menudata.xml $(DSTDIR)/xml/menudata_modeler.xml $(DSTDIR)/xml/menudata_psmap.xml +# @echo "# This is a generated file.\n" > $@ +# $(call run_grass,$(PYTHON) $< "manager" >> $@) +# $(call run_grass,$(PYTHON) $< "module_tree" >> $@) +# $(call run_grass,$(PYTHON) $< "modeler" >> $@) +# $(call run_grass,$(PYTHON) $< "psmap" >> $@) + +# $(DSTDIR)/xml/module_items.xml: tools/build_modules_xml.py +# @echo "Generating interface description for all modules..." +# $(call run_grass,$(PYTHON) $< > $@) + +# $(PYDSTDIRS): %: | $(DSTDIR) +# $(MKDIR) $@ + +# $(DSTDIRS): %: | $(DSTDIR) +# $(MKDIR) $@ + +# $(DSTDIR): +# $(MKDIR) $@ diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt new file mode 100644 index 00000000000..65e5bac83e6 --- /dev/null +++ b/imagery/CMakeLists.txt @@ -0,0 +1,105 @@ +build_program_in_subdir(i.albedo DEPENDS grass_imagery grass_raster grass_vector grass_gis ) +build_program_in_subdir(i.aster.toar DEPENDS grass_imagery grass_raster grass_vector grass_gis ) + +build_program_in_subdir(i.biomass DEPENDS grass_imagery grass_raster grass_vector grass_gis ) +build_program_in_subdir(i.cca DEPENDS grass_imagery grass_raster grass_vector grass_gis ) +build_program_in_subdir(i.cluster DEPENDS grass_imagery grass_raster grass_vector grass_gis grass_cluster) + +build_program_in_subdir(i.eb.evapfr DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.eb.eta DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.eb.hsebal01 DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.eb.netrad DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.eb.soilheatflux DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir(i.evapo.mh DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.evapo.pm DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.evapo.pt DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.evapo.time DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.emissivity DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.find DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.gensig DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.gensigset + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.group + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.his.rgb + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.landsat.toar + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.landsat.acca + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.maxlik + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.modis.qc + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + + +# build_program_in_subdir( +# i.ortho.photo +# DEPENDS grass_imagery grass_raster grass_vector grass_gis) + + +build_program_in_subdir( + i.rectify + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.rgb.his + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.segment + DEPENDS grass_imagery grass_raster grass_vector grass_gis grass_segment) + +# build_program_in_subdir( +# i.superpixels.slic +# DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.smap + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.target + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.topo.corr + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.pca + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.vi + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.fft + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.ifft + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +build_program_in_subdir( + i.zc + DEPENDS grass_imagery grass_raster grass_vector grass_gis) + + +build_program_in_subdir(i.atcorr DEPENDS grass_imagery grass_raster grass_vector grass_gis SRC_REGEX "*.cpp") diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 00000000000..0fbb44521cd --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,74 @@ +include(CheckIncludeFile) +check_include_file(limits.h HAVE_LIMITS_H) +check_include_file(termio.h HAVE_TERMIO_H) +check_include_file(termios.h HAVE_TERMIOS_H) +check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file(values.h HAVE_VALUES_H) +check_include_file(zlib.h HAVE_ZLIB_H) +check_include_file(bzlib.h HAVE_BZLIB_H) +check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) +check_include_file(sys/mtio.h HAVE_SYS_MTIO_H) +check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) +check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(time.h TIME_WITH_SYS_TIME) +check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H) +check_include_file(g2c.h HAVE_G2C_H) +check_include_file(f2c.h HAVE_F2C_H) +check_include_file(cblas.h HAVE_CBLAS_H) +check_include_file(clapack.h HAVE_CLAPACK_H) +check_include_file(langinfo.h HAVE_LANGINFO_H) +check_include_file(ft2build.h HAVE_FT2BUILD_H) +check_include_file(pthread.h HAVE_PTHREAD_H) +check_include_file(regex.h HAVE_REGEX_H) +check_include_file(iconv.h HAVE_ICONV_H) +check_include_file(libintl.h HAVE_LIBINTL_H) +check_include_file(dbm.h HAVE_DBM_H) +check_include_file(dfftw.h HAVE_DFFTW_H) +check_include_file(fftw.h HAVE_FFTW_H) +check_include_file(fftw3.h HAVE_FFTW3_H) +check_include_file(jpeglib.h HAVE_JPEGLIB_H) +check_include_file(png.h HAVE_PNG_H) +check_include_file(tiffio.h HAVE_TIFFIO_H) +#used in config.cmake.in +set(STATIC_BUILD FALSE) +if(BUILD_SHARED_LIBS) + set(STATIC_BUILD TRUE) +endif() + +#used in config.cmake.in +set(GDEBUG 0) +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" ) + set(GDEBUG TRUE) +endif() + +#message(STATUS "Copying headers to ${CMAKE_BINARY_DIR}/include/grass/") + +execute_process(COMMAND ${CMAKE_COMMAND} + -E make_directory + ${CMAKE_BINARY_DIR}/include/grass/) + +file(GLOB_RECURSE SRCHS "*.h") +foreach(srch ${SRCHS}) + get_filename_component(srch_PATH ${srch} PATH) + STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" dsth_PATH "${srch_PATH}") + file(COPY ${srch} DESTINATION ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}) +endforeach() + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in + "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") + + +file(READ ${CMAKE_SOURCE_DIR}/COPYING copying_header) +file(WRITE ${CMAKE_BINARY_DIR}/include/grass/copying.h "/* ${copying_header} */" ) + +file(READ ${CMAKE_SOURCE_DIR}/CITING citing_header) +file(WRITE ${CMAKE_BINARY_DIR}/include/grass/citing.h "/* ${citing_header} */" ) + +#TODO +#file(READ ${CMAKE_SOURCE_DIR}/config.status config_status_header) +file(WRITE ${CMAKE_BINARY_DIR}/include/grass/confparms.h "/* */" ) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 00000000000..27c3e0a9ac6 --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1,133 @@ + +#order is relevant: + + +build_library_in_subdir(datetime) + +add_subdirectory(gis) + +build_library_in_subdir(raster + DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" + DEPENDS GDAL PROJ4 + ) + +configure_file(external/ccmath/ccmath.h + ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h + COPYONLY) + +build_library_in_subdir(external/ccmath) + +build_library_in_subdir(external/shapelib NAME grass_shape + HEADERS "shapefil.h") + +build_library_in_subdir(gmath DEPENDS FFTW grass_ccmath) + +build_library_in_subdir(linkm) + +build_library_in_subdir(driver DEPENDS FREETYPE) + +build_library_in_subdir(pngdriver + DEPENDS grass_driver LIBPNG ZLIB + INCLUDES "./driver" + ) +build_library_in_subdir(psdriver + DEPENDS grass_driver + ) +build_library_in_subdir(htmldriver + DEPENDS grass_driver + ) + +set(_grass_display_DEFS) + +set(_grass_display_DEPENDS + grass_driver grass_raster + grass_htmldriver grass_pngdriver grass_psdriver) + +if(WITH_CAIRO) + + set(_cairodriver_DEPENDS CAIRO FREETYPE grass_driver) + if(WITH_X11) + list(APPEND _cairodriver_DEPENDS X11) + endif() + + build_library_in_subdir(cairodriver + DEPENDS ${_cairodriver_DEPENDS} + ) + + set(_grass_display_DEFS "-DUSE_CAIRO") + list(APPEND _grass_display_DEPENDS grass_cairodriver) +endif() + + +build_library_in_subdir(bitmap SOURCES "./bitmap/bitmap.c" "./bitmap/sparse.c") + +build_library_in_subdir(btree) + +build_library_in_subdir(btree2 HEADERS "kdtree.h") + +build_library_in_subdir(display + DEFS ${_grass_display_DEFS} + DEPENDS ${_grass_display_DEPENDS} + ) + +add_subdirectory(db) + +add_subdirectory(fonts) + +add_subdirectory(proj) + +add_subdirectory(vector) + +build_library_in_subdir(imagery DEPENDS GDAL GEOS grass_vector) + +build_library_in_subdir(cluster) + +build_library_in_subdir(rowio) + +build_library_in_subdir(segment) + +add_subdirectory(rst) + +build_library_in_subdir(lidar DEPENDS GDAL GEOS grass_segment HEADERS "lidar.h") + +build_library_in_subdir(raster3d DEPENDS grass_raster) + +build_program_in_subdir(raster3d/test + NAME test.raster3d.lib + DEPENDS grass_gis grass_raster3d + ) + +build_library_in_subdir(gpde HEADERS "N_*.h" + DEPENDS grass_gis grass_raster3d grass_gmath + ) + +build_library_in_subdir(dspf) + +build_library_in_subdir(symbol NAME grass_sym) + +add_subdirectory(init) + +build_library_in_subdir(cdhc) + +build_library_in_subdir(stats) + +build_library_in_subdir(arraystats) + +if(WITH_OPENGL) + build_library_in_subdir(ogsf DEPENDS OPENGL GDAL TIFF) + build_library_in_subdir(nviz DEPENDS OPENGL GDAL TIFF) + if(OPENGL_X11 ) + #add XCFLAGS + endif() +endif() + + +add_subdirectory(temporal) + +add_subdirectory(python) + +build_library_in_subdir(iostream SRC_REGEX "*.cpp") + +build_library_in_subdir(manage DEPENDS grass_gis grass_vector grass_raster3d ) + +build_library_in_subdir(calc) diff --git a/lib/db/CMakeLists.txt b/lib/db/CMakeLists.txt new file mode 100644 index 00000000000..b7c674c7ebf --- /dev/null +++ b/lib/db/CMakeLists.txt @@ -0,0 +1,44 @@ + +# MODULE_TOPDIR = ../.. + +# #the order is relevant +# SUBDIRS = \ +# dbmi_base \ +# dbmi_client \ +# stubs \ +# dbmi_driver \ +# sqlp + +# #doxygen: +# DOXNAME=dbmi + +# include $(MODULE_TOPDIR)/include/Make/Dir.make +# include $(MODULE_TOPDIR)/include/Make/Doxygen.make + +# default: parsubdirs + + +# stubs: dbmi_base + +# dbmi_client: dbmi_base + + +build_library_in_subdir(dbmi_base NAME grass_dbmibase + HEADERS "dbstubs.h") + +build_library_in_subdir(dbmi_client NAME grass_dbmiclient + DEPENDS grass_dbmibase + INCLUDES "./dbmi_base" + ) + +build_library_in_subdir(stubs NAME grass_dstubs + DEPENDS grass_dbmibase + ) + +build_library_in_subdir(dbmi_driver NAME grass_dbmidriver + DEPENDS grass_dstubs + INCLUDES "./dbmi_base" + ) + + +add_subdirectory(sqlp) diff --git a/lib/db/sqlp/CMakeLists.txt b/lib/db/sqlp/CMakeLists.txt new file mode 100644 index 00000000000..9fe5ca0f183 --- /dev/null +++ b/lib/db/sqlp/CMakeLists.txt @@ -0,0 +1,17 @@ + +FLEX_TARGET(sqlp.yy.c sqlp.l ${CMAKE_CURRENT_BINARY_DIR}/sqlp.yy.c) + +BISON_TARGET(sqlp.tab.c sqlp.y ${CMAKE_CURRENT_BINARY_DIR}/sqlp.tab.c ) + +ADD_FLEX_BISON_DEPENDENCY(sqlp.yy.c sqlp.tab.c) + +SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/sqlp.yy.c GENERATED) +SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/sqlp.tab.c GENERATED) + +set(sqlp_SRCS + alloc.c print.c sql.c + ${CMAKE_CURRENT_BINARY_DIR}/sqlp.tab.c + ${CMAKE_CURRENT_BINARY_DIR}/sqlp.yy.c + ) + +build_module(NAME grass_sqlp SOURCES "${sqlp_SRCS}" ) diff --git a/lib/fonts/CMakeLists.txt b/lib/fonts/CMakeLists.txt new file mode 100644 index 00000000000..f9bf1abc130 --- /dev/null +++ b/lib/fonts/CMakeLists.txt @@ -0,0 +1 @@ +#TODO diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt new file mode 100644 index 00000000000..c4163377544 --- /dev/null +++ b/lib/gis/CMakeLists.txt @@ -0,0 +1,34 @@ +set(gislib_SRCS + adj_cellhd.c + copy_dir.c + get_ellipse.c ll_scan.c open_misc.c proj3.c units.c + alloc.c copy_file.c get_projinfo.c locale.c overwrite.c put_window.c user_config.c + area.c counter.c get_window.c location.c pager.c putenv.c verbose.c + area_ellipse.c date.c getl.c lrand48.c parser.c radii.c view.c + area_poly1.c datum.c gisbase.c ls.c parser_dependencies.c rd_cellhd.c whoami.c + area_poly2.c debug.c gisdbase.c ls_filter.c parser_help.c remove.c win32_pipes.c + area_sphere.c distance.c gisinit.c lz4.c parser_html.c rename.c wind_2_box.c + ascii_chk.c done_msg.c handler.c mach_name.c parser_interface.c rhumbline.c wind_format.c + asprintf.c endian.c home.c make_loc.c parser_rest.c rotate.c wind_in.c + basename.c env.c ilist.c make_mapset.c parser_script.c seek.c wind_limits.c + bres_line.c error.c intersect.c mapcase.c parser_standard_options.c set_window.c wind_overlap.c + clicker.c file_name.c is.c mapset.c parser_wps.c short_way.c wind_scan.c + cmprbzip.c find_etc.c key_value1.c mapset_msc.c paths.c sleep.c window_map.c + cmprlz4.c find_file.c key_value2.c mapset_nme.c percent.c snprintf.c worker.c + cmprrle.c find_rast.c key_value3.c mkstemp.c plot.c spawn.c wr_cellhd.c + cmprzlib.c find_rast3d.c key_value4.c myname.c pole_in_poly.c strings.c writ_zeros.c + color_rules.c find_vect.c legal_name.c named_colr.c popen.c tempfile.c xdr.c + color_str.c line_dist.c nl_to_spaces.c progrm_nme.c timestamp.c zero.c + commas.c geodesic.c list.c nme_in_mps.c proj1.c token.c zone.c + compress.c geodist.c ll_format.c open.c proj2.c trim_dec.c + ) + +if(MINGW) + list(APPEND gislib_SRCS "fmode.c") +endif() +set(GRASS_VERSION_DATE 20160402) + +build_module(NAME grass_gis SOURCES "${gislib_SRCS}" + DEPENDS ZLIB LIBM grass_datetime + DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}" + ) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt new file mode 100644 index 00000000000..be1078a0e26 --- /dev/null +++ b/lib/init/CMakeLists.txt @@ -0,0 +1,100 @@ +# MODULE_TOPDIR = ../.. + +# include $(MODULE_TOPDIR)/include/Make/Other.make +# include $(MODULE_TOPDIR)/include/Make/Compile.make + +# #for i18N support +set(PACKAGE "grasslibs") + +set(START_UP grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ) + +file(GLOB init_HTMLFILES "*.html") + +set(BINDIR "${CMAKE_BINARY_DIR}/bin") +configure_file(grass.sh ${CMAKE_BINARY_DIR}/bin/grass.sh @ONLY) + +set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") +configure_file(grass.sh ${CMAKE_CURRENT_BINARY_DIR}/grass.sh @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/grass.sh DESTINATION bin) + +set(GRASS_CONFIG_DIR) + +set(PROJSHARE) + +if(DEFINED ENV{PROJSHARE}) + message(WARNING "External PROJ.4 directory not specified; default will be used") + set(PROJSHARE "$ENV{PROJSHARE}") +else() + get_filename_component(PROJ_INSTALL_PREFIX ${PROJ4_LIBRARY} PATH) + set(PROJSHARE "${PROJ_INSTALL_PREFIX}/share/proj") + if(EXISTS ${PROJSHARE}/epsg) + message("PROJ.4 directory ${PROJSHARE}") + endif() +endif() +set(CONFIG_PROJSHARE "${PROJSHARE}") + + +set(LD_LIBRARY_PATH_VAR) +if(UNIX OR MINGW) + if( DEFINED ENV{LD_LIBRARY_PATH}) + set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}:${CMAKE_BINARY_DIR}/lib") + else() + set(LD_LIBRARY_PATH_VAR "${CMAKE_BINARY_DIR}/lib") + endif() +endif() + +configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.tmp @ONLY) +set(GISBASE "${RUN_GISBASE}") +configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.py @ONLY) + + +#rest here +set(GISBASE "" ) #${RUN_GISBASE}") +if(UNIX OR MINGW) + if( DEFINED ENV{LD_LIBRARY_PATH}) + set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}:${CMAKE_INSTALL_PREFIX}/lib") + else() + set(LD_LIBRARY_PATH_VAR "${CMAKE_INSTALL_PREFIX}/lib") + endif() +endif() + +set(OUTPUT_STARTUP_FILE "${START_UP}") +if(MINGW) + set(OUTPUT_STARTUP_FILE "${START_UP}.py") +endif() +configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} DESTINATION bin) + + + + +add_executable(echo echo.c) +install(TARGETS echo DESTINATION etc) + +add_executable(run run.c) +install(TARGETS run DESTINATION etc) + +# add_executable(clean_temp clean_temp.c) +# install(TARGETS clean_temp DESTINATION etc) + +#TODO +# add_executable(lock lock.c) +# add_dependencies(lock grass_gis) +# install(TARGETS lock DESTINATION etc) + +if(MINGW) + add_executable(winlocale winlocale.c) + install(TARGETS winlocale DESTINATION etc) +endif() + +set(VERSIONNUMBER_CONTENTS "${GRASS_VERSION_NUMBER}") +if(GRASS_VERSION_SVN) + list(APPEND VERSIONNUMBER_CONTENTS "${VERSIONNUMBER_CONTENTS} ${GRASS_VERSION_SVN}") +endif() + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/VERSIONNUMBER "${VERSIONNUMBER_CONTENTS}") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) + +configure_file(license.txt.in ${CMAKE_CURRENT_BINARY_DIR}/license) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) diff --git a/lib/proj/CMakeLists.txt b/lib/proj/CMakeLists.txt new file mode 100644 index 00000000000..c4c13ec1904 --- /dev/null +++ b/lib/proj/CMakeLists.txt @@ -0,0 +1,53 @@ +# MODULE_TOPDIR = ../.. + +# LIB = GPROJ + +# include $(MODULE_TOPDIR)/include/Make/Vars.make + +# MOD_OBJS := $(filter-out ftol.o,$(AUTO_OBJS)) + +# include $(MODULE_TOPDIR)/include/Make/Lib.make +# include $(MODULE_TOPDIR)/include/Make/Doxygen.make + +# EXTRA_CFLAGS = $(ZLIBINCPATH) $(GDALCFLAGS) +# EXTRA_INC = $(PROJINC) + +# PROJ_DIR = $(ETC)/proj + +# PROJ_TABLES := desc.table parms.table units.table +# PROJ_DSTFILES := $(patsubst %,$(PROJ_DIR)/%,$(PROJ_TABLES)) + +# default: lib $(FTOL_OBJ) +# $(MAKE) $(PROJ_DSTFILES) + +# ifdef MINGW +# $(FTOL_OBJ): $(OBJDIR)/ftol.o +# $(INSTALL) $< $@ +# endif + +# $(PROJ_DSTFILES): $(PROJ_DIR)/%: % | $(PROJ_DIR) +# $(INSTALL_DATA) $< $@ + +# $(PROJ_DIR): +# $(MKDIR) $@ + +# #doxygen: +# DOXNAME=proj +set(grass_gproj_SOURCES +convert.c datum.c do_proj.c +ellipse.c get_proj.c + ) +if(MINGW) + list(APPEND grass_gproj_SOURCES "ftol.c") +endif() + +set(PROJ_DIR) + +set(PROJ_TABLES desc.table parms.table units.table) +# PROJ_DSTFILES := $(patsubst %,$(PROJ_DIR)/%,$(PROJ_TABLES)) + +build_module(NAME grass_gproj + DEPENDS grass_driver GDAL ZLIB PROJ4 + SOURCES "${grass_gproj_SOURCES}" + INCLUDES "../driver" + ) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt new file mode 100644 index 00000000000..529ad3ec431 --- /dev/null +++ b/lib/python/CMakeLists.txt @@ -0,0 +1,179 @@ +function(build_pyfiles_in_sudir gpy_dir_name) + # cmake_parse_arguments(GPY "" "NAME" "FILES" ${ARGN} ) + set( gpy_files ${ARGN} ) + if (NOT "__init__.py" IN_LIST gpy_files) + list(APPEND gpy_files "__init__.py") + endif() + + get_filename_component(gpy_name ${gpy_dir_name} NAME) + + foreach(gpy_file ${gpy_files}) + + if(NOT IS_ABSOLUTE ${gpy_file}) + #message("gpy_file=${gpy_dir_name}/${gpy_file}") + get_filename_component(gpy_file ${gpy_dir_name}/${gpy_file} REALPATH) + endif() + if(NOT EXISTS ${gpy_file}) + message(FATAL_ERROR "Cannot find '${gpy_file}'") + endif() + get_filename_component(gpy_file_NAME ${gpy_file} NAME) + file(COPY ${gpy_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${gpy_dir_name}) + # <----- RESET HERE -----> + set(gpy_file ${CMAKE_CURRENT_BINARY_DIR}/${gpy_dir_name}/${gpy_file_NAME}) + # <----- RESET HERE -----> + + + add_custom_command( + OUTPUT ${gpy_file}.stamp + COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${gpy_file} + COMMAND ${CMAKE_COMMAND} -E touch ${gpy_file}.stamp + COMMENT "Generating ${gpy_file}c" + VERBATIM + ) + + add_custom_target(${gpy_name}.${gpy_file_NAME} ALL + DEPENDS ${gpy_file}.stamp + ) + + # add_custom_target(${gpy_name}_${gpy_file_NAME} ALL + # COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${gpy_file} + # COMMENT "Generating ${gpy_file}c" + # ) + + #set_source_files_properties("${gpy_file}c" GENERATED) + + #message(" ${gpy_dir_name} | DESTINATION etc/python/${gpy_dir_name} ") + install(FILES ${gpy_file} DESTINATION etc/python/${gpy_name} ) + + endforeach() +endfunction() + +build_pyfiles_in_sudir(exceptions) + +set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}") + +configure_file( script/setup.py + ${CMAKE_BINARY_DIR}/lib/python/script/setup.py + COPYONLY) + +build_pyfiles_in_sudir(script + core.py + db.py + raster.py + raster3d.py + vector.py + array.py + ${CMAKE_BINARY_DIR}/lib/python/script/setup.py + task.py + utils.py + ) + + + +# build_pyfiles_in_sudir(NAME ctypes +# FILES +# date.py gis.py raster.py gmath.py proj.py +# imagery.py vector.py rtree.py display.py +# stats.py dbmi.py raster3d.py arraystats.py +# cluster.py vedit.py segment.py rowio.py +# temporal.py +# ctypes_preamble.py ctypes_loader.py +# ) + + add_subdirectory(ctypes) + + + build_pyfiles_in_sudir(temporal + base.py + core.py + abstract_dataset.py + abstract_map_dataset.py + abstract_space_time_dataset.py + space_time_datasets.py + open_stds.py + factory.py + gui_support.py + list_stds.py + register.py + sampling.py + metadata.py + spatial_extent.py + temporal_extent.py + datetime_math.py + temporal_granularity.py + spatio_temporal_relationships.py + unit_tests.py + aggregation.py + stds_export.py + stds_import.py + extract.py + mapcalc.py + univar_statistics.py + temporal_topology_dataset_connector.py + spatial_topology_dataset_connector.py + c_libraries_interface.py + temporal_algebra.py + temporal_vector_algebra.py + temporal_raster_base_algebra.py + temporal_raster_algebra.py + temporal_raster3d_algebra.py + temporal_operator.py + ) + + + build_pyfiles_in_sudir(pygrass + errors.py utils.py orderdict.py + ) + + build_pyfiles_in_sudir(pygrass/messages ) + + build_pyfiles_in_sudir(pygrass/modules + shortcuts.py ) + + build_pyfiles_in_sudir(pygrass/modules/interface + docstring.py read.py typedict.py flag.py + parameter.py module.py env.py + ) + + build_pyfiles_in_sudir(pygrass/modules/grid + split.py patch.py grid.py ) + + build_pyfiles_in_sudir(pygrass/raster + abstract.py buffer.py category.py + history.py raster_type.py rowio.py segment.py + ) + + build_pyfiles_in_sudir(pygrass/vector + abstract.py basic.py find.py geometry.py + sql.py table.py vector_type.py + ) + + build_pyfiles_in_sudir(pygrass/gis + region.py + ) + + build_pyfiles_in_sudir(pygrass/shell + conversion.py show.py + ) + + build_pyfiles_in_sudir(pygrass/tests + benchmark.py set_mapset.py + ) + + build_pyfiles_in_sudir(pygrass/rpc + base.py + ) + + build_pyfiles_in_sudir(pydispatch + dispatcher.py errors.py robustapply.py + robust.py saferef.py signal.py + ) + + build_pyfiles_in_sudir(imaging + images2avi.py images2gif.py + images2ims.py images2swf.py) + + build_pyfiles_in_sudir(gunittest + case.py gmodules.py loader.py + runner.py checkers.py gutils.py + invoker.py main.py reporters.py utils.py) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt new file mode 100644 index 00000000000..5eff36dff69 --- /dev/null +++ b/lib/python/ctypes/CMakeLists.txt @@ -0,0 +1,93 @@ +set(MODULES + date gis raster gmath proj imagery vector rtree display + stats dbmi raster3d arraystats cluster vedit segment rowio temporal) + + +if(WITH_OPENGL) + list(APPEND MODULES ogsf nviz) +endif() + +set(date_HDRS datetime.h defs/datetime.h) +set(date_LIBS grass_datetime) +set(date_TARGET_NAME grass_datetime_py) + +set(gis_HDRS gis.h defs/gis.h colors.h defs/colors.h) +set(raster_HDRS raster.h defs/raster.h) +set(gmath_HDRS gmath.h defs/gmath.h) +set(proj_HDRS gprojects.h defs/gprojects.h) +set(proj_LIBS grass_gproj) +set(vector_HDRS vector.h defs/vector.h vect/dig_structs.h vect/dig_defines.h vect/dig_externs.h ) +set(display_HDRS display.h defs/display.h ) +set(dbmi_HDRS dbmi.h defs/dbmi.h ) +set(dbmi_LIBS grass_dbmibase grass_dbmiclient ) +set(arraystats_HDRS arraystats.h defs/arraystats.h ) +set(vedit_HDRS vedit.h defs/vedit.h) +set(nviz_HDRS nviz.h defs/nviz.h) +set(rowio_HDRS rowio.h defs/rowio.h) +set(temporal_HDRS temporal.h) +set(ogsf_HDRS ogsf.h defs/ogsf.h) +set(segment_HDRS segment.h defs/segment.h) +set(imagery_HDRS imagery.h defs/imagery.h ) +set(rtree_HDRS rtree.h) +set(stats_HDRS stats.h defs/stats.h) +set(raster3d_HDRS raster3d.h defs/raster3d.h) +set(cluster_HDRS cluster.h defs/cluster.h) + +#TODO +# set(VECT_INC ${PQINCPATH} ) +# set(proj_INC "${PROJ4_INCLUDE_DIR}") +# set(vector_INC "${PQINCPATH};${GDAL_INCLUDE_DIR}") +# set(vedit_INC "${GDAL_INCLUDE_DIR}") + + +foreach(module ${MODULES}) + + + if(NOT ${module}_LIBS) + set(${module}_LIBS grass_${module}) + endif() + + if(NOT ${module}_HDRS) + message(FATAL_ERROR "${module}_HDRS is not set") + endif() + + foreach(${module}_LIB ${${module}_LIBS}) + if(NOT TARGET ${${module}_LIB} ) + message(FATAL_ERROR "${${module}_LIB} is not a target") + endif() + endforeach() + + if(NOT ${module}_TARGET_NAME) + list(GET ${module}_LIBS 0 first_lib) + set(${module}_TARGET_NAME ${first_lib}_py) + endif() + + if(NOT ${module}_TARGET_NAME) + message(FATAL_ERROR "${${module}_TARGET_NAME} is not set") + endif() + + set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${module}.py") + + add_custom_command( + OUTPUT ${output_file}.stamp + DEPENDS ${${module}_LIBS} + COMMAND ${CMAKE_COMMAND} -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py + -DCOMPILER=${CMAKE_C_COMPILER} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -DHDRS=${${module}_HDRS} + -DLIBS=${${module}_LIBS} + -DOUT_FILE=${output_file} + -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake + COMMAND ${CMAKE_COMMAND} -E touch ${output_file}.stamp + COMMENT "Generating ${output_file}" + VERBATIM + ) + + add_custom_target(${${module}_TARGET_NAME} ALL + DEPENDS ${output_file}.stamp + ) + + install(FILES ${output_file} DESTINATION etc/python/grass/lib) + +endforeach() + diff --git a/lib/rst/CMakeLists.txt b/lib/rst/CMakeLists.txt new file mode 100644 index 00000000000..901cbfc6606 --- /dev/null +++ b/lib/rst/CMakeLists.txt @@ -0,0 +1,20 @@ +#add_subdirectory(data) +#add_subdirectory(qtree) +#add_subdirectory(interp_float) + +build_library_in_subdir(data + NAME grass_interpdata + DEPENDS grass_gis + HEADERS "dataquad.h") + +build_library_in_subdir(qtree + NAME grass_qtree + DEPENDS grass_gis + HEADERS "qtree.h") + + +build_library_in_subdir(interp_float + NAME grass_interpfl + DEPENDS GEOS grass_gis grass_raster grass_bitmap grass_vector + HEADERS "interpf.h") + diff --git a/lib/temporal/CMakeLists.txt b/lib/temporal/CMakeLists.txt new file mode 100644 index 00000000000..7e18d7d4ab4 --- /dev/null +++ b/lib/temporal/CMakeLists.txt @@ -0,0 +1,4 @@ +file(GLOB SQLFILES "SQL/*.sql") +install(FILES "${SQLFILES}" DESTINATION etc/sql) + +build_library_in_subdir(lib NAME grass_temporal DEPENDS grass_dbmibase grass_datetime) diff --git a/lib/vector/CMakeLists.txt b/lib/vector/CMakeLists.txt new file mode 100644 index 00000000000..098607bf011 --- /dev/null +++ b/lib/vector/CMakeLists.txt @@ -0,0 +1,45 @@ +# MODULE_TOPDIR = ../.. + +# PGM = vectorascii + +# SUBDIRS = rtree \ +# dglib \ +# diglib \ +# Vlib \ +# vedit \ +# neta + +# include $(MODULE_TOPDIR)/include/Make/Dir.make +# include $(MODULE_TOPDIR)/include/Make/Doxygen.make + +# DOXNAME = vector + +# default: htmldir + +# htmldir: parsubdirs + +# diglib: rtree + +# Vlib: rtree dglib diglib + +# vedit: Vlib + +# neta: Vlib + +#add_executable(vectorascii ) +build_library_in_subdir(rtree HEADERS "rtree.h") + +add_subdirectory(dglib) +add_subdirectory(diglib) + +build_library_in_subdir(Vlib + NAME grass_vector + DEPENDS grass_gis grass_raster grass_rtree + grass_graph grass_dig2 grass_dbmibase + grass_btree2 grass_dbmiclient + grass_linkm grass_gproj + ) + +add_subdirectory(vedit) + +add_subdirectory(neta) diff --git a/lib/vector/dglib/CMakeLists.txt b/lib/vector/dglib/CMakeLists.txt new file mode 100644 index 00000000000..8c6fe422c1a --- /dev/null +++ b/lib/vector/dglib/CMakeLists.txt @@ -0,0 +1,56 @@ +# MODULE_TOPDIR = ../../.. + +# include $(MODULE_TOPDIR)/include/Make/Vars.make + +# MOD_OBJS := $(filter-out %-template.o,$(AUTO_OBJS)) + +# LIB = GRAPH + +# include $(MODULE_TOPDIR)/include/Make/Lib.make +# include $(MODULE_TOPDIR)/include/Make/Doxygen.make + +# DGLINC = $(ARCH_INCDIR)/dgl + +# default: headers +# $(MAKE) lib + +# headers: $(DGLINC)/avl.h $(DGLINC)/tavl.h $(DGLINC)/graph.h $(DGLINC)/heap.h \ +# $(DGLINC)/tree.h $(DGLINC)/type.h $(DGLINC)/helpers.h $(DGLINC)/graph_v1.h $(DGLINC)/graph_v2.h \ +# $(ARCH_INCDIR)/dgl.h + +# $(DGLINC)/%.h: %.h | $(DGLINC) +# $(INSTALL_DATA) $< $@ + +set(DGL_headers + avl.h + tavl.h + graph.h + heap.h + tree.h + type.h + helpers.h + graph_v1.h + graph_v2.h +) +foreach(DGL_header ${DGL_headers}) + file(COPY ${DGL_header} DESTINATION ${CMAKE_BINARY_DIR}/include/grass/dgl) +endforeach() + +set(graphlib_SRCS + avl.c + graph.c + graph_v2.c + helpers.c + tree.c + graph_v1.c + heap.c + tavl.c + ) + +build_module( + NAME grass_graph + SOURCES "${graphlib_SRCS}" + HEADERS "dgl.h" + ) + + diff --git a/lib/vector/diglib/CMakeLists.txt b/lib/vector/diglib/CMakeLists.txt new file mode 100644 index 00000000000..3d1f1b69ec1 --- /dev/null +++ b/lib/vector/diglib/CMakeLists.txt @@ -0,0 +1,51 @@ +# MODULE_TOPDIR = ../../.. + +# include $(MODULE_TOPDIR)/include/Make/Vars.make + +# MOD_OBJS := $(filter-out test.o port_test.o,$(AUTO_OBJS)) + +# LIB = DIG2 + +# include $(MODULE_TOPDIR)/include/Make/Lib.make + +# EXTRA_INC = $(VECT_INC) +# EXTRA_CFLAGS = $(VECT_CFLAGS) +# LIBES = $(GISLIB) $(RTREELIB) $(MATHLIB) + +# #compile if LFS (Large File Support) present: +# ifneq ($(USE_LARGEFILES),) +# TESTFILE = test64.ok +# else +# TESTFILE = test32.ok +# endif + +# default: lib +# @echo "==============TEST=============" +# ifeq ($(strip $(CROSS_COMPILING)),) +# $(MAKE) test +# endif + +# test: $(OBJDIR)/test.tmp $(TESTFILE) +# cmp $(OBJDIR)/test.tmp $(TESTFILE) + +# $(OBJDIR)/test.tmp: $(OBJDIR)/test$(EXE) +# cd $(OBJDIR) && $(call run_grass,./test) + +# # Test portable read/write functions +# $(OBJDIR)/test$(EXE): $(OBJDIR)/test.o $(DIG2DEP) +# $(call linker) + +# $(OBJDIR)/test$(EXE): LIBES = $(DIG2LIB) + + +set(dig2_SRCS +allocation.c cindex.c frmt.c line_dist.c plus.c plus_node.c port_init.c prune.c struct_alloc.c update.c +angle.c cindex_rw.c head.c linecros.c plus_area.c plus_struct.c spindex.c +box.c file.c inside.c list.c plus_line.c poly.c portable.c spindex_rw.c type.c +) + + + +build_module(NAME grass_dig2 + SOURCES ${dig2_SRCS} + DEPENDS GDAL GEOS grass_gmath grass_gis grass_rtree) diff --git a/lib/vector/neta/CMakeLists.txt b/lib/vector/neta/CMakeLists.txt new file mode 100644 index 00000000000..98986c8d33a --- /dev/null +++ b/lib/vector/neta/CMakeLists.txt @@ -0,0 +1,24 @@ +# MODULE_TOPDIR = ../../.. + +# LIB = NETA + +# LIBES = $(VECTORLIB) $(DBMILIB) $(GISLIB) $(GRAPHLIB) +# DEPENDENCIES= $(VECTORDEP) $(DBMIDEP) $(GISDEP) +# EXTRA_INC = $(VECT_INC) +# EXTRA_CFLAGS = $(VECT_CFLAGS) + +# include $(MODULE_TOPDIR)/include/Make/Lib.make +# include $(MODULE_TOPDIR)/include/Make/Doxygen.make + +# default: lib + +# DOXNAME=neta + +build_module(NAME grass_neta +DEPENDS GDAL GEOS +grass_dbmiclient +grass_gis +grass_graph +grass_vector +) + diff --git a/lib/vector/vedit/CMakeLists.txt b/lib/vector/vedit/CMakeLists.txt new file mode 100644 index 00000000000..f48250ec31f --- /dev/null +++ b/lib/vector/vedit/CMakeLists.txt @@ -0,0 +1,21 @@ +# MODULE_TOPDIR = ../../.. + +# LIB = VEDIT + +# DEPENDENCIES = $(VECTORDEP) $(GISDEP) + +# EXTRA_INC = $(VECT_INC) +# EXTRA_CFLAGS = $(VECT_CFLAGS) + +# include $(MODULE_TOPDIR)/include/Make/Lib.make +# include $(MODULE_TOPDIR)/include/Make/Doxygen.make + +# default: lib + +# # doxygen +# DOXNAME=vedit + + +build_module(NAME grass_vedit + DEPENDS grass_vector GDAL GEOS) + diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt new file mode 100644 index 00000000000..93fcc972937 --- /dev/null +++ b/misc/CMakeLists.txt @@ -0,0 +1,20 @@ + +build_program_in_subdir( + m.cogo + DEPENDS grass_gis) + +build_program_in_subdir( + m.measure + DEPENDS grass_gis) + +build_program_in_subdir( + m.transform + DEPENDS grass_gis grass_imagery grass_raster grass_vector) + +# build_program_in_subdir( +# m.nviz.image +# DEPENDS grass_gis) + +# build_program_in_subdir( +# m.nviz.script +# DEPENDS grass_gis) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt new file mode 100644 index 00000000000..8bc1216adf6 --- /dev/null +++ b/raster/CMakeLists.txt @@ -0,0 +1,511 @@ +build_program_in_subdir( + r.basins.fill + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.buffer + DEPENDS grass_gis grass_raster ) + + +build_program_in_subdir( + r.carve + DEPENDS grass_gis grass_raster grass_vector grass_bitmap) + +build_program_in_subdir( + r.category + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.circle + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.clump + DEPENDS grass_gis grass_raster grass_btree2) + +build_program_in_subdir( + r.coin + DEPENDS grass_gis grass_raster ) + +add_subdirectory(r.colors) + +add_subdirectory(r.colors.out) + +build_program_in_subdir( + r.composite + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.compress + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.contour + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.cost + DEPENDS grass_gis grass_raster grass_segment grass_vector) + +build_program_in_subdir( + r.covar + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.cross + DEPENDS grass_gis grass_raster grass_btree grass_btree2) + +build_program_in_subdir( + r.describe + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.distance + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.drain + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.external + DEPENDS grass_gis grass_raster grass_imagery grass_gproj) + +build_program_in_subdir( + r.external.out + DEPENDS grass_gis grass_raster ) + + build_program_in_subdir( + r.fill.dir + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.flow + DEPENDS grass_gis grass_raster grass_segment grass_vector grass_bitmap) + +build_program_in_subdir( + r.grow.distance + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.gwflow + DEPENDS grass_gis grass_raster grass_gpde) + +build_program_in_subdir( + r.horizon + DEPENDS grass_gis grass_raster grass_gproj) + +build_program_in_subdir( + r.in.ascii + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.in.bin + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.in.gdal + DEPENDS grass_gis grass_raster grass_gproj grass_imagery) + +build_program_in_subdir( + r.in.gridatb + DEPENDS grass_gis grass_raster) + +#TODO +# build_program_in_subdir( +# r.in.lidar +# DEPENDS grass_gis grass_raster grass_lidar) + +build_program_in_subdir( + r.in.mat + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.in.png + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.in.poly + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.in.xyz + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.info + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.kappa + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.latlong + DEPENDS grass_gis grass_raster grass_gproj) + +build_program_in_subdir( + r.lake + DEPENDS grass_gis grass_raster) + +#TODO +# build_program_in_subdir( +# r.li +# DEPENDS grass_gis grass_raster) + +add_subdirectory(r.mapcalc) + +build_program_in_subdir( + r.mfilter + DEPENDS grass_gis grass_raster grass_rowio) + +build_program_in_subdir( + r.mode + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.neighbors + DEPENDS grass_gis grass_raster grass_stats) + +build_program_in_subdir( + r.null + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.ascii + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.bin + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.gdal + DEPENDS grass_gis grass_raster grass_dbmibase grass_imagery) + +#TODO +set_source_files_properties(r.out.gdal/main.c + PROPERTIES COMPILE_DEFINITIONS + "GRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\";GDAL_VERSION_MAJOR=\"2\";GDAL_VERSION_MINOR=\"1\";GDAL_VERSION_REV=\"1\"" + ) + + build_program_in_subdir( + r.out.gridatb + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.mat + DEPENDS grass_gis grass_raster) + + +build_program_in_subdir( + r.out.mpeg + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.png + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.pov + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.ppm + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.ppm3 + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.vrml + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.out.vtk + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.param.scale + DEPENDS grass_gis grass_raster grass_interpfl + grass_interpdata grass_qtree ) + +build_program_in_subdir( + r.patch + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.profile + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.proj + DEPENDS grass_gis grass_raster grass_gproj) + +build_program_in_subdir( + r.quant + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.quantile + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.random + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.random.cells + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.random.surface + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.reclass + DEPENDS grass_gis grass_raster grass_manage ) + +build_program_in_subdir( + r.recode + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.region + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.regression.line + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.regression.multi + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.report + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.resamp.bspline + DEPENDS grass_gis grass_raster grass_vector grass_segment grass_lidar) + +build_program_in_subdir( + r.resamp.filter + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.resamp.interp + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.resamp.rst + DEPENDS grass_gis grass_raster grass_interpfl grass_interpdata grass_qtree) + +build_program_in_subdir( + r.resamp.stats + DEPENDS grass_gis grass_raster grass_stats) + +build_program_in_subdir( + r.resample + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.rescale + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.rescale.eq + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.ros + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.series + DEPENDS grass_gis grass_raster grass_stats ) + +build_program_in_subdir( + r.series.accumulate + DEPENDS grass_gis grass_raster grass_stats ) + +build_program_in_subdir( + r.series.interp + DEPENDS grass_gis grass_raster grass_stats ) + +build_program_in_subdir( + r.relief + DEPENDS grass_gis grass_raster) + +add_subdirectory(r.sim) + +build_program_in_subdir( + r.slope.aspect + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.solute.transport + DEPENDS grass_gis grass_raster grass_gmath grass_gpde) + +add_subdirectory(r.spread) + +build_program_in_subdir( + r.spreadpath + DEPENDS grass_gis grass_raster grass_segment) + +build_program_in_subdir( + r.statistics + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.stats.zonal + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.stats.quantile + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.stats + DEPENDS grass_gis grass_raster) + + build_program_in_subdir( + r.stream.extract + DEPENDS grass_gis grass_raster grass_segment grass_vector) + +build_program_in_subdir( + r.sun + DEPENDS grass_gis grass_raster grass_gproj) + +build_program_in_subdir( + r.sunhours + DEPENDS grass_gis grass_raster grass_gproj) + +build_program_in_subdir( + r.sunmask + DEPENDS grass_gis grass_raster grass_gproj) + +build_program_in_subdir( + r.support + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.support.stats + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.surf.area + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.surf.contour + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.surf.fractal + DEPENDS grass_gis grass_raster grass_gmath ) + +build_program_in_subdir( + r.surf.gauss + DEPENDS grass_gis grass_raster grass_gmath ) + +build_program_in_subdir( + r.surf.idw + DEPENDS grass_gis grass_raster ) + +build_program_in_subdir( + r.surf.random + DEPENDS grass_gis grass_raster grass_gmath ) + +#REVIEW: EXTRA_CFLAGS = -DUSER=\"$(USER)\" -DNODATA_FIX -DELEV_FLOAT -Wno-sign-compare + build_program_in_subdir( + r.terraflow + DEPENDS grass_gis grass_raster grass_iostream + SRC_REGEX "*.cpp" + DEFS "-DUSER=USER;-DNODATA_FIX;-DELEV_FLOAT") + + +build_program_in_subdir( + r.texture + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.thin + DEPENDS grass_gis grass_raster grass_rowio) + +build_program_in_subdir( + r.tile + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.timestamp + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.to.rast3 + DEPENDS grass_gis grass_raster3d) + +build_program_in_subdir( + r.to.rast3elev + DEPENDS grass_gis grass_raster3d) + +build_program_in_subdir( + r.to.vect + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.topidx + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.topmodel + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.transect + DEPENDS grass_gis grass_raster) + +add_subdirectory(r.univar) + +build_program_in_subdir( + r.uslek + DEPENDS grass_gis grass_raster) + +build_program_in_subdir( + r.usler + DEPENDS grass_gis grass_raster) + +#REVIEW: EXTRA_CFLAGS = -DUSER=\"$(USER)\" -Wno-sign-compare + build_program_in_subdir( + r.viewshed + DEPENDS grass_gis grass_raster grass_iostream + SRC_REGEX "*.cpp" + DEFS "-DUSER=USER") + +build_program_in_subdir( + r.volume + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.walk + DEPENDS grass_gis grass_raster grass_segment grass_vector) + +build_program_in_subdir( + r.water.outlet + DEPENDS grass_gis grass_raster) + +#TODO +# build_program_in_subdir( +# r.watershed +# DEPENDS grass_gis grass_raster +# SRC_REGEX "*.cpp") + +build_program_in_subdir( + r.what + DEPENDS grass_gis grass_raster grass_vector) + +build_program_in_subdir( + r.what.color + DEPENDS grass_gis grass_raster) diff --git a/raster/r.colors.out/CMakeLists.txt b/raster/r.colors.out/CMakeLists.txt new file mode 100644 index 00000000000..c369cb48a8d --- /dev/null +++ b/raster/r.colors.out/CMakeLists.txt @@ -0,0 +1,16 @@ +set(r_colors_out_SRCS raster_main.c ) +set(r3_colors_out_SRCS raster3d_main.c ) + +build_program( + NAME r.colors.out + SOURCES "${r_colors_out_SRCS}" + DEPENDS grass_gis grass_raster + ) + +build_program(NAME r3.colors.out + SOURCES "${r3_colors_out_SRCS}" + DEPENDS grass_gis grass_raster3d) + + + + diff --git a/raster/r.colors/CMakeLists.txt b/raster/r.colors/CMakeLists.txt new file mode 100644 index 00000000000..09145071e55 --- /dev/null +++ b/raster/r.colors/CMakeLists.txt @@ -0,0 +1,14 @@ + +set(r_colors_SRCS + raster_main.c edit_colors.c rules.c stats.c + ) +set(r3_colors_SRCS + raster3d_main.c edit_colors.c rules.c stats.c) + +build_program(NAME r.colors + SOURCES "${r_colors_SRCS}" + DEPENDS grass_gis grass_raster3d) + +build_program(NAME r3.colors + SOURCES "${r3_colors_SRCS}" + DEPENDS grass_gis grass_raster3d) diff --git a/raster/r.mapcalc/CMakeLists.txt b/raster/r.mapcalc/CMakeLists.txt new file mode 100644 index 00000000000..46374818fc9 --- /dev/null +++ b/raster/r.mapcalc/CMakeLists.txt @@ -0,0 +1,50 @@ + +# MODULE_TOPDIR = ../.. + +# include $(MODULE_TOPDIR)/include/Make/Vars.make + +# PGM2 = r.mapcalc +# PGM3 = r3.mapcalc +# PROGRAMS = $(PGM2) $(PGM3) + +# r_mapcalc_OBJS := $(filter-out map3.o xcoor3.o xres3.o, $(AUTO_OBJS)) +# r3_mapcalc_OBJS := $(filter-out map.o xcoor.o xres.o, $(AUTO_OBJS)) + + +# include $(MODULE_TOPDIR)/include/Make/Multi.make + +# EXTRA_CFLAGS = $(READLINEINCPATH) $(PTHREADINCPATH) +# LIBES2 = $(CALCLIB) $(GISLIB) $(RASTERLIB) $(BTREELIB) $(READLINELIBPATH) $(READLINELIB) $(HISTORYLIB) $(PTHREADLIBPATH) $(PTHREADLIB) +# LIBES3 = $(CALCLIB) $(RASTER3DLIB) $(GISLIB) $(RASTERLIB) $(BTREELIB) $(READLINELIBPATH) $(READLINELIB) $(HISTORYLIB) $(PTHREADLIBPATH) $(PTHREADLIB) + +# default: multi + +# $(BIN)/$(PGM2)$(EXE): LIBES = $(LIBES2) +# $(BIN)/$(PGM3)$(EXE): LIBES = $(LIBES3) + +# $(OBJDIR)/mapcalc.yy.o: mapcalc.tab.h + +# .SECONDARY: mapcalc.tab.c mapcalc.tab.h mapcalc.output + + +FLEX_TARGET(mapcalc.yy.c mapcalc.l ${CMAKE_CURRENT_BINARY_DIR}/mapcalc.yy.c ) +BISON_TARGET(mapcalc.tab.c mapcalc.y ${CMAKE_CURRENT_BINARY_DIR}/mapcalc.tab.c ) +ADD_FLEX_BISON_DEPENDENCY(mapcalc.yy.c mapcalc.tab.c) +SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/mapcalc.yy.c GENERATED) +SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/mapcalc.tab.c GENERATED) + +set(r_mapcalc_common_SRCS + column_shift.c evaluate.c expression.c function.c main.c xrowcol.c + ${CMAKE_CURRENT_BINARY_DIR}/mapcalc.tab.c + ${CMAKE_CURRENT_BINARY_DIR}/mapcalc.yy.c ) + +set(r_mapcalc_SRCS ${r_mapcalc_common_SRCS} map.c xarea.c xcoor.c xres.c) +set(r3_mapcalc_SRCS ${r_mapcalc_common_SRCS} map3.c xarea.c xcoor3.c xres3.c) + +build_program(NAME r.mapcalc + SOURCES "${r_mapcalc_SRCS}" + DEPENDS grass_gis grass_btree grass_calc grass_raster ) + +build_program(NAME r3.mapcalc + SOURCES "${r3_mapcalc_SRCS}" + DEPENDS grass_gis grass_btree grass_calc grass_raster3d ) diff --git a/raster/r.sim/CMakeLists.txt b/raster/r.sim/CMakeLists.txt new file mode 100644 index 00000000000..e80601d0c52 --- /dev/null +++ b/raster/r.sim/CMakeLists.txt @@ -0,0 +1,21 @@ + + +build_library_in_subdir(simlib + NAME grass_sim + DEPENDS grass_datetime grass_raster grass_vector + HEADERS "waterglobs.h" "simlib.h" ) + +#add_subdirectory(simlib) +# build_module(NAME simlib +# DEPENDS grass_datetime grass_raster grass_vector +# HEADERS "waterglobs.h;simlib.h" ) + +build_program_in_subdir( + r.sim.water + DEPENDS grass_gis grass_gmath grass_sim + INCLUDES "../simlib") + +build_program_in_subdir( + r.sim.sediment + DEPENDS grass_gis grass_gmath grass_sim + INCLUDES "../simlib") diff --git a/raster/r.spread/CMakeLists.txt b/raster/r.spread/CMakeLists.txt new file mode 100644 index 00000000000..75381ff7aeb --- /dev/null +++ b/raster/r.spread/CMakeLists.txt @@ -0,0 +1,8 @@ +set(r_spread_SRCS collect_ori.c deleteHa.c fixHa.c + get_minHa.c insert2Ha.c insertHa.c main.c pick_dist.c + pick_ignite.c ram2out.c replaceHa.c select_linksB.c spot.c spread.c + ) + +build_program(NAME r.spread + SOURCES "${r_spread_SRCS}" + DEPENDS grass_gis grass_raster grass_display) diff --git a/raster/r.univar/CMakeLists.txt b/raster/r.univar/CMakeLists.txt new file mode 100644 index 00000000000..c0d2f41a86b --- /dev/null +++ b/raster/r.univar/CMakeLists.txt @@ -0,0 +1,15 @@ + +set(r_univar_SRCS + r.univar_main.c sort.c stats.c + ) +set(r3_univar_SRCS + r3.univar_main.c sort.c stats.c) + +build_program(NAME r.univar + SOURCES "${r_univar_SRCS}" + DEPENDS grass_gis grass_raster) + +build_program(NAME r3.univar + SOURCES "${r3_univar_SRCS}" + DEPENDS grass_gis grass_raster3d) + diff --git a/raster3d/CMakeLists.txt b/raster3d/CMakeLists.txt new file mode 100644 index 00000000000..9077e314091 --- /dev/null +++ b/raster3d/CMakeLists.txt @@ -0,0 +1,93 @@ + +build_program_in_subdir( + r3.cross.rast + DEPENDS grass_gis grass_raster3d ) + +add_subdirectory(r3.flow) + +build_program_in_subdir( + r3.gradient + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.gwflow + DEPENDS grass_gis grass_raster3d grass_gpde ) + +build_program_in_subdir( + r3.in.ascii + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.in.bin + DEPENDS grass_gis grass_raster3d ) + +#TODO +# build_program_in_subdir( +# r3.in.lidar +# DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.in.v5d + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.info + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.mask + DEPENDS grass_gis grass_raster3d ) + +#TODO +# build_program_in_subdir( +# r3.mkdspf +# DEPENDS grass_gis grass_raster3d grass_gpde ) + +build_program_in_subdir( + r3.null + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.neighbors + DEPENDS grass_gis grass_raster3d grass_stats) + +build_program_in_subdir( + r3.out.ascii + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.out.bin + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.out.v5d + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.retile + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.stats + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.support + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.timestamp + DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.to.rast + DEPENDS grass_gis grass_raster3d ) + +#TODO +# build_program_in_subdir( +# r3.out.netcdf +# DEPENDS grass_gis grass_raster3d ) + +build_program_in_subdir( + r3.out.vtk + DEPENDS grass_gis grass_raster3d ) diff --git a/raster3d/r3.flow/CMakeLists.txt b/raster3d/r3.flow/CMakeLists.txt new file mode 100644 index 00000000000..7a01819e898 --- /dev/null +++ b/raster3d/r3.flow/CMakeLists.txt @@ -0,0 +1,14 @@ +set(r3_flow_SRCS + main.c flowline.c integrate.c interpolate.c voxel_traversal.c + ) + +build_program(NAME r3.flow + SOURCES "${r3_flow_SRCS}" + DEPENDS grass_gis grass_raster3d grass_vector ) + +set(test_r3flow_SRCS + test_main.c flowline.c integrate.c interpolate.c voxel_traversal.c) + +build_program(NAME test.r3flow + SOURCES "${test_r3flow_SRCS}" + DEPENDS grass_gis grass_raster3d grass_vector) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt new file mode 100644 index 00000000000..16440ab53e2 --- /dev/null +++ b/scripts/CMakeLists.txt @@ -0,0 +1,93 @@ + + +make_script_in_dir(r.shade) + +make_script_in_dir(d.correlate) + +make_script_in_dir(d.frame) + +make_script_in_dir(d.out.file ) + +set(scripts_SUBDIRS + d.to.rast + d.polar + d.rast.edit + d.rast.leg + d.redraw + d.shade + d.what.rast + d.what.vect + db.dropcolumn + db.droptable + db.in.ogr + db.out.ogr + db.test + db.univar + g.extension + g.extension.all + g.manual + g.search.modules + i.colors.enhance + i.image.mosaic + i.in.spotvgt + i.oif + i.pansharpen + i.spectral + i.tasscap + m.proj + r.blend + r.buffer.lowmem + r.colors.stddev + r.fillnulls + r.grow + r.import + r.in.aster + r.in.srtm + r.mask + r.out.xyz + r.pack + r.plane + r.reclass.area + r.rgb + r.tileset + r.unpack + r3.in.xyz + v.build.all + v.centroids + v.db.addcolumn + v.db.addtable + v.db.join + v.db.dropcolumn + v.db.droprow + v.db.droptable + v.db.renamecolumn + v.db.reconnect.all + v.db.univar + v.db.update + v.dissolve + v.import + v.in.e00 + v.in.geonames + v.in.lines + v.in.mapgen + v.in.wfs + v.rast.stats + v.report + v.pack + v.to.lines + v.unpack + v.what.strds + v.what.vect + + ) + + #TODO + #r.in.wms + #wxpyimgview + make_script_in_dir( r.in.wms ) + +foreach(d ${scripts_SUBDIRS}) +make_script_in_dir(${d} ) +endforeach() + + diff --git a/scripts/tmp.cmakelists.txt b/scripts/tmp.cmakelists.txt new file mode 100644 index 00000000000..c6ef2a34a24 --- /dev/null +++ b/scripts/tmp.cmakelists.txt @@ -0,0 +1,198 @@ + +macro(make_script_in_dir script_name) + +set(SCRIPTDIR ${CMAKE_CURRENT_SOURCE_DIR}/${script_name}) +set(PGM ${script_name}) +#message(FATAL_ERROR "SCRIPTDI=${PGM}") + +#file(GLOB ETCPYCFILES "${SCRIPTDIR}/*.pyc") + +file(GLOB ETCPYFILES "${SCRIPTDIR}/*.py") + + +if(NOT ETCPYFILES) + message(FATAL_ERROR "ETCPYFILES empty") +endif() + + +#install(FILES ${ETCPYCFILES} DESTINATION etc) + +#set(ETCDIR "$(ETC)/$(PGM)") + +if(MINGW) + # $(BIN)/$(PGM).bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat + # sed -e "s#SCRIPT_NAME#$(PGM)#" -e "s#SCRIPT_DIR#$(SCRIPT_DIR)#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@ + # unix2dos $@ + configure_file( + ${CMAKE_SOURCE_DIR}/scripts/windows_launch.bat + ${CMAKE_BINARY_DIR}/bin/${PGM}.bat + ) + install( PROGRAMS ${CMAKE_BINARY_DIR}/bin/${PGM}.bat DESTINATION bin ) +endif() + +foreach(pyfile ${ETCPYFILES}) + get_filename_component(pyfile_NAME ${pyfile} NAME) +add_custom_target(generate_locale_for_${pyfile_NAME} + COMMAND ${CMAKE_COMMAND} + -DPGM=${pyfile_NAME} + -DINPUT_FILE=${pyfile} + -DSTRINGDIR=${CMAKE_BINARY_DIR}/locale/scriptstrings + -DBIN_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/generate_strings.cmake + DEPENDS g.parser + ) + +install(FILES ${pyfile} DESTINATION etc) + +add_custom_target(${PGM} DEPENDS generate_locale_for_${pyfile_NAME} ) +endforeach() + +endmacro() + +# run_grass = \ +# GISRC=$(RUN_GISRC) \ +# GISBASE=$(RUN_GISBASE) \ +# PATH="$(ARCH_DISTDIR)/bin:$(GISBASE)/bin:$(GISBASE)/scripts:$$PATH" \ +# PYTHONPATH="$(GRASS_PYTHONPATH)" \ +# $(LD_LIBRARY_PATH_VAR)="$(BIN):$(GISBASE)/bin:$(GISBASE)/scripts:$(ARCH_LIBDIR):$(BASE_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \ +# LC_ALL=C \ +# $(1) + +set(GRASS_VERSION_MAJOR "7") +set(GRASS_VERSION_MINOR "2") +set(GISDBASE ${CMAKE_SOURCE_DIR}) + +configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl + "${CMAKE_BINARY_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") + +# macro(run_grass PGM prog) +# set(ENV{GISRC} "${CMAKE_BINARY_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") +# set(ENV{GISBASE} "${CMAKE_BINARY_DIR}") +# set(ENV{PATH} "${CMAKE_BINARY_DIR}/bin:${CMAKE_BINARY_DIR}/scripts:$ENV{PATH}") +# set(ENV{PYTHONPATH} "${CMAKE_BINARY_DIR}/gui/wxpython:${CMAKE_BINARY_DIR}/etc/python:$ENV{PYTHONPATH}") +# set(ENV{LD_LIBRARY_PATH} "${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +# set(ENV{LC_ALL} C) +# execute_process(COMMAND ${prog} ${ARGN} +# OUTPUT_VARIABLE run_grass_OV +# ERROR_VARIABLE run_grass_EV +# #OUTPUT_FILE /tmp/tt.out +# RESULT_VARIABLE run_grass_RV +# ) +# string(REGEX REPLACE "\n" ";" varname "${run_grass_OV}") +# set(${PGM}_to_translate_contents) + +# foreach(line ${varname}) +# string(REPLACE "\"" "\\\"" line "${line}") +# set(line "_(\"${line}\")") +# message("line=${line}") +# list(APPEND ${PGM}_to_translate_contents "${line}") +# endforeach() + +# string(REGEX REPLACE ";" "\n" ${PGM}_to_translate_contents "${${PGM}_to_translate_contents}") +# file(WRITE "${STRINGDIR}/${PGM}_to_translate.c" "${${PGM}_to_translate_contents}\n") +# endmacro() #run_grass + + +# strings = $(call run_grass,g.parser -t $(1) | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' > $(2)) + +# $(STRINGDIR)/%_to_translate.c: %.py +# -$(call strings,$<,$@) + +# $(STRINGDIR)/%_to_translate.c: % +# -$(call strings,$<,$@) + + +# install: +# $(INSTALL) $(SCRIPT) $(INST_DIR)/scripts/ +# $(INSTALL_DATA) $(HTMLDIR)/$(PGM).html $(INST_DIR)/docs/html/ +# $(eval IMG := $(wildcard $(HTMLDIR)/*.png) $(wildcard $(HTMLDIR)/*.jpg)) +# if [ -n "$(IMG)" ] ; then \ +# $(INSTALL_DATA) $(IMG) $(INST_DIR)/docs/html/ ; \ +# fi +# $(INSTALL_DATA) $(ARCH_DISTDIR)/docs/man/man1/$(PGM).1 $(INST_DIR)/docs/man/man1/ +# if [ -d "$(ETC)/$(PGM)" ] ; then \ +# cp -RL $(ETC)/$(PGM) $(INST_DIR)/etc/ ; \ +# fi + +# .PHONY: script scriptstrings + +make_script_in_dir(r.shade) + +make_script_in_dir(d.correlate) +set(scripts_SUBDIRS + d.correlate + d.frame + d.out.file + d.to.rast + d.polar + d.rast.edit + d.rast.leg + d.redraw + d.shade + d.what.rast + d.what.vect + db.dropcolumn + db.droptable + db.in.ogr + db.out.ogr + db.test + db.univar + g.extension + g.extension.all + g.manual + g.search.modules + i.colors.enhance + i.image.mosaic + i.in.spotvgt + i.oif + i.pansharpen + i.spectral + i.tasscap + m.proj + r.blend + r.buffer.lowmem + r.colors.stddev + r.fillnulls + r.grow + r.import + r.in.aster + r.in.srtm + r.in.wms + r.mask + r.out.xyz + r.pack + r.plane + r.reclass.area + r.rgb + r.shade + r.tileset + r.unpack + r3.in.xyz + v.build.all + v.centroids + v.db.addcolumn + v.db.addtable + v.db.join + v.db.dropcolumn + v.db.droprow + v.db.droptable + v.db.renamecolumn + v.db.reconnect.all + v.db.univar + v.db.update + v.dissolve + v.import + v.in.e00 + v.in.geonames + v.in.lines + v.in.mapgen + v.in.wfs + v.rast.stats + v.report + v.pack + v.to.lines + v.unpack + v.what.strds + v.what.vect + wxpyimgview + ) diff --git a/temporal/CMakeLists.txt b/temporal/CMakeLists.txt new file mode 100644 index 00000000000..cabb6db2985 --- /dev/null +++ b/temporal/CMakeLists.txt @@ -0,0 +1,57 @@ +set(temporal_SUBDIRS + t.create + t.support + t.topology + t.list + t.info + t.merge + t.remove + t.sample + t.register + t.unregister + t.rast.accumulate + t.rast.accdetect + t.rast.aggregate + t.rast.aggregate.ds + t.rast.colors + t.rast.contour + t.rast.to.rast3 + t.rast.univar + t.rast.list + t.rast.mapcalc + t.rast.algebra + t.rast.neighbors + t.rast.series + t.rast.export + t.rast.out.vtk + t.rast.import + t.rast.gapfill + t.rast.extract + t.rast.to.vect + t.rast.what + t.rast3d.list + t.rast3d.extract + t.rast3d.mapcalc + t.rast3d.algebra + t.rast3d.univar + t.rename + t.select + t.snap + t.shift + t.vect.list + t.vect.db.select + t.vect.export + t.vect.extract + t.vect.algebra + t.vect.import + t.vect.what.strds + t.vect.observe.strds + t.vect.univar + ) + +build_program_in_subdir(t.connect DEPENDS grass_gis grass_temporal) + +foreach(d ${temporal_SUBDIRS}) + make_script_in_dir(${d}) +endforeach() + diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt new file mode 100644 index 00000000000..910c5a19535 --- /dev/null +++ b/thirdparty/CMakeLists.txt @@ -0,0 +1,120 @@ +find_package(FLEX REQUIRED) + +find_package(BISON REQUIRED) + + + +find_package(GDAL REQUIRED) +add_library(GDAL SHARED IMPORTED GLOBAL) +set_property( TARGET GDAL PROPERTY IMPORTED_LOCATION ${GDAL_LIBRARY} ) +set_property( TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_DIRS} ) + + + +find_package(PNG REQUIRED) +add_library(LIBPNG SHARED IMPORTED GLOBAL) +set_property( TARGET LIBPNG PROPERTY IMPORTED_LOCATION ${PNG_LIBRARY} ) +set_property( TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) + + + +find_package(ZLIB REQUIRED) +add_library(ZLIB SHARED IMPORTED GLOBAL) +set_property( TARGET ZLIB PROPERTY IMPORTED_LOCATION ${ZLIB_LIBRARY} ) +set_property( TARGET ZLIB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR} ) + + + +find_library(M_LIBRARY m) +add_library(LIBM SHARED IMPORTED GLOBAL) +set_property( TARGET LIBM PROPERTY IMPORTED_LOCATION ${M_LIBRARY} ) +#set_property( TARGET LIBM PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${M_INCLUDE_DIR} ) + + + +find_package(PROJ4 REQUIRED) +add_library(PROJ4 SHARED IMPORTED GLOBAL) +set_property( TARGET PROJ4 PROPERTY IMPORTED_LOCATION ${PROJ4_LIBRARY} ) +set_property( TARGET PROJ4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIR} ) + + + +find_package(Freetype REQUIRED) +add_library(FREETYPE SHARED IMPORTED GLOBAL) +set_property( TARGET FREETYPE PROPERTY IMPORTED_LOCATION ${FREETYPE_LIBRARY} ) +set_property( TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) + + + +find_package(FFTW REQUIRED) +add_library(FFTW SHARED IMPORTED GLOBAL) +set_property( TARGET FFTW PROPERTY IMPORTED_LOCATION ${FFTW_LIBRARIES} ) +set_property( TARGET FFTW PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FFTW_INCLUDE_DIR} ) + + +if(WITH_CAIRO) + find_package(Cairo REQUIRED) + add_library(CAIRO SHARED IMPORTED GLOBAL) + set_property( TARGET CAIRO PROPERTY IMPORTED_LOCATION ${CAIRO_LIBRARIES} ) + set_property( TARGET CAIRO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIRS} ) +endif() + +if(WITH_X11) + find_package(X11 REQUIRED) + add_library(X11 SHARED IMPORTED GLOBAL) + set_property( TARGET X11 PROPERTY IMPORTED_LOCATION ${X11_LIBRARIES} ) + set_property( TARGET X11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${X11_INCLUDE_DIR} ) + + find_package(TIFF REQUIRED) + add_library(TIFF SHARED IMPORTED GLOBAL) + set_property( TARGET TIFF PROPERTY IMPORTED_LOCATION ${TIFF_LIBRARY} ) + set_property( TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR} ) +endif() + + +if(WITH_OPENGL) + find_package(OpenGL REQUIRED) + add_library(OPENGL SHARED IMPORTED GLOBAL) + set_property( TARGET OPENGL PROPERTY IMPORTED_LOCATION ${OPENGL_LIBRARIES} ) + set_property( TARGET OPENGL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR} ) + + find_package(TIFF REQUIRED) + add_library(TIFF SHARED IMPORTED GLOBAL) + set_property( TARGET TIFF PROPERTY IMPORTED_LOCATION ${TIFF_LIBRARY} ) + set_property( TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR} ) + +endif() + + +find_package(GEOS REQUIRED) +add_library(GEOS SHARED IMPORTED GLOBAL) +set_property( TARGET GEOS PROPERTY IMPORTED_LOCATION ${GEOS_LIBRARIES} ) +set_property( TARGET GEOS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GEOS_INCLUDE_DIR} ) + + +#find_package (PythonLibs REQUIRED ) + +find_package (PythonInterp REQUIRED ) +#find_package ( Numpy ) + +if (PYTHON_VERSION_MAJOR GREATER 2 ) + message(FATAL_ERROR "cannot use python 3 or higher") +endif() + + + + + +# message("found gdal") + +# if(TARGET LIB_GDAL) +# message("GRASSLIB_DEPEND=LIB_GDAL") +# get_target_property(VAR LIB_GDAL INTERFACE_INCLUDE_DIRECTORIES) +# message("VAR=${VAR}") +# endif() + +#$ +#$ + + + diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 00000000000..7a8de7636fd --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,38 @@ +set(py_files g.html2man/g.html2man.py g.html2man/html.py g.html2man/groff.py) +foreach(py_file ${py_files}) + get_filename_component(py_file_NAME ${py_file} NAME) + + + file(COPY ${py_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + # <----- RESET HERE -----> + set(py_file ${CMAKE_CURRENT_BINARY_DIR}/${py_file_NAME}) + # <----- RESET HERE -----> + + + add_custom_command( + OUTPUT ${py_file}.stamp + DEPENDS g.parser + COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${py_file} + COMMAND ${CMAKE_COMMAND} -E touch ${py_file}.stamp + COMMENT "Generating ${py_file}c" + VERBATIM + ) + + add_custom_target(tools.${py_file_NAME} ALL + DEPENDS ${py_file}.stamp + ) + + + # add_custom_target(tools_${py_file_NAME} ALL + # COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${py_file} + # COMMENT "Generating ${py_file}c" + # ) + + install(FILES ${py_file} DESTINATION tools ) +endforeach() + +build_program_in_subdir(timer NAME current_time_s_ms DEPENDS grass_gis ) + +add_executable(g.echo g.echo.c) + +install(TARGETS g.echo DESTINATION tools) diff --git a/vector/CMakeLists.txt b/vector/CMakeLists.txt new file mode 100644 index 00000000000..61d94ace625 --- /dev/null +++ b/vector/CMakeLists.txt @@ -0,0 +1,376 @@ +build_program_in_subdir( + v.buffer + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.build + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.category + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.class + DEPENDS grass_gis grass_vector grass_arraystats ) + +build_program_in_subdir( + v.clean + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.cluster + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.colors + DEPENDS grass_gis grass_vector grass_raster3d) + +build_program_in_subdir( + v.colors.out + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.db.connect + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.db.select + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.decimate + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.delaunay + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.drape + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.edit + DEPENDS grass_gis grass_vector grass_vedit ) + +build_program_in_subdir( + v.extract + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.extrude + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.generalize + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.hull + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.info + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.in.ascii + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.in.db + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.in.dxf + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.in.pdal + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.in.region + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.kcv + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.kernel + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.label + DEPENDS grass_gis grass_vector grass_display) + +build_program_in_subdir( + v.proj + DEPENDS grass_gis grass_vector grass_gproj) + +add_subdirectory(v.lrs) + +build_program_in_subdir( + v.mkgrid + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.neighbors + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.net + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.net.alloc + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.net.allpairs + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.bridge + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.centrality + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.components + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.connectivity + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.distance + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.flow + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.iso + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.path + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.salesman + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.spanningtree + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.steiner + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.timetable + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.net.visibility + DEPENDS grass_gis grass_vector grass_neta) + +build_program_in_subdir( + v.normal + DEPENDS grass_gis grass_vector grass_cdhc) + +#TODO +# v.lidar.correction \ +# v.lidar.edgedetection \ +# v.lidar.growing \ +build_program_in_subdir( + v.out.ascii + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.out.dxf + DEPENDS grass_gis grass_vector) + +#TODO +# build_program_in_subdir( +# v.out.lidar +# DEPENDS grass_gis grass_vector) + +# build_program_in_subdir( +# v.out.postgis +# DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.out.pov + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.out.svg + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.out.vtk + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.outlier + DEPENDS grass_gis grass_vector grass_lidar) + +build_program_in_subdir( + v.overlay + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.parallel + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.patch + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.perturb + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.split + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.qcount + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.random + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.reclass + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.rectify + DEPENDS grass_gis grass_vector grass_imagery) + +build_program_in_subdir( + v.sample + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.segment + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.select + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.support + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.surf.bspline + DEPENDS grass_gis grass_vector grass_lidar grass_gpde) + +build_program_in_subdir( + v.surf.idw + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.surf.rst + DEPENDS grass_gis grass_vector grass_interpdata grass_interpfl grass_qtree ) + +build_program_in_subdir( + v.transform + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.timestamp + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.to.3d + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.to.db + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.to.points + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.to.rast + DEPENDS grass_gis grass_vector grass_raster) + +build_program_in_subdir( + v.to.rast3 + DEPENDS grass_gis grass_vector grass_raster3d) + +build_program_in_subdir( + v.type + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.univar + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.voronoi + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.what + DEPENDS grass_gis grass_vector) + +build_program_in_subdir( + v.what.rast + DEPENDS grass_gis grass_vector grass_raster) + +build_program_in_subdir( + v.what.rast3 + DEPENDS grass_gis grass_vector grass_raster3d) + +build_program_in_subdir( + v.vect.stats + DEPENDS grass_gis grass_vector grass_stats) + +build_program_in_subdir( + v.vol.rst + DEPENDS grass_gis grass_vector grass_raster3d grass_bitmap) + +build_program_in_subdir( + v.out.ogr + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.in.ogr + DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.external + DEPENDS grass_gis grass_vector ) + +#TODO +# build_program_in_subdir( +# v.in.dwg +# DEPENDS grass_gis grass_vector ) + +# build_program_in_subdir( +# v.in.lidar +# DEPENDS grass_gis grass_vector ) + +build_program_in_subdir( + v.external.out + DEPENDS grass_gis grass_vector ) + diff --git a/vector/v.lrs/CMakeLists.txt b/vector/v.lrs/CMakeLists.txt new file mode 100644 index 00000000000..7643588d21c --- /dev/null +++ b/vector/v.lrs/CMakeLists.txt @@ -0,0 +1,19 @@ +build_library_in_subdir(lib NAME grass_lrs + DEPENDS grass_gis grass_vector + HEADERS "lrs.h" ) + +build_program_in_subdir( + v.lrs.create + DEPENDS grass_lrs) + +build_program_in_subdir( + v.lrs.segment + DEPENDS grass_lrs) + +build_program_in_subdir( + v.lrs.label + DEPENDS grass_lrs) + +build_program_in_subdir( + v.lrs.where + DEPENDS grass_lrs) From 6c7a9f9c8dd6221293320a1b57a9cd3cb616c435 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 27 Aug 2017 20:20:57 +0200 Subject: [PATCH 002/264] wip: cmake fixes --- CMakeLists.txt | 121 ++++--------- cmake/tests/have_pbuffer.c | 18 ++ cmake/tests/have_pixmaps.c | 20 +++ find_scripts/FindFFTW.cmake | 4 - find_scripts/FindSQLite.cmake | 4 + imagery/CMakeLists.txt | 3 +- include/CMakeLists.txt | 214 +++++++++++++++++++++-- include/config.h.cmake.in | 309 +++++++++++++++++++++++++++++++++ lib/CMakeLists.txt | 15 +- lib/db/dbmi_base/dirent.c | 4 +- lib/gis/CMakeLists.txt | 3 +- lib/init/license.txt.in | 11 ++ lib/python/ctypes/ctypesgen.py | 2 +- thirdparty/CMakeLists.txt | 152 ++++++++++------ tools/CMakeLists.txt | 2 +- 15 files changed, 719 insertions(+), 163 deletions(-) create mode 100644 cmake/tests/have_pbuffer.c create mode 100644 cmake/tests/have_pixmaps.c create mode 100644 find_scripts/FindSQLite.cmake create mode 100644 include/config.h.cmake.in create mode 100644 lib/init/license.txt.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 792c5313bfc..030b6193cec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,13 +9,20 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/find_scripts;${CMAKE_MODULE_PATH}") #TODO option(WITH_CAIRO "Build with cairo support ." ON) option(WITH_X11 "Build with X11 support ." ON) -option(WITH_OPENGL "Build with opengl support ." OFF) +option(WITH_OPENGL "Build with opengl support ." ON) +option(WITH_SQLITE "enable sqlite support" ON) +option(WITH_POSTGRES "enable postgres support" OFF) +option(WITH_NLS "enable sqlite support" ON) +option(WITH_BZLIB "enable sqlite support" ON) +option(WITH_BLAS "enable sqlite support" ON) +option(WITH_LAPACK "enable sqlite support" ON) set(GRASS_VERSION_MAJOR) set(GRASS_VERSION_MINOR) set(GRASS_VERSION_PATCH) + #TODO set(GRASS_VERSION_UPDATE_PKG "0.2") set(BUILD_ARCH "x86_64") @@ -48,7 +55,7 @@ find_program(SVN_VERSION NAMES svnversion) if(SVN_VERSION) execute_process( COMMAND ${SVN_VERSION} -c - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../addons/grass7 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE svnversion_OV ERROR_VARIABLE svnversion_EV RESULT_VARIABLE svnversion_RV @@ -98,7 +105,7 @@ function(update_per_group_target t_name) endfunction() function(build_module) - cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;DEFS;HEADERS" ${ARGN} ) + cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) if(NOT G_NAME) message(FATAL_ERROR "G_NAME empty") @@ -142,92 +149,40 @@ function(build_module) ) endif() - set(${G_NAME}_INCLUDE_DIRS) - - list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_SRCDIR}") - - if(G_INCLUDES) - foreach(G_INCLUDE ${G_INCLUDES}) - # message( "xx=${G_INCLUDE} ${G_NAME}" ) - target_include_directories(${G_NAME} PUBLIC ${G_INCLUDE} ) - endforeach() - endif() - - set(${G_NAME}_LINK_LIBS) - - foreach(G_DEPEND ${G_DEPENDS}) - if(NOT TARGET ${G_DEPEND}) - message(FATAL_ERROR "${G_DEPEND} not a target") - break() + foreach(G_OPTIONAL_DEPEND ${G_OPTIONAL_DEPENDS}) + if(TARGET ${G_OPTIONAL_DEPEND}) + add_dependencies(${G_NAME} ${G_OPTIONAL_DEPEND}) endif() - - #message( "${G_NAME} depends on \t ${G_DEPEND}") - ##go recurse on depends() - add_dependencies(${G_NAME} ${G_DEPEND}) - - - - - - get_target_property(${G_DEPEND}_IDIRS ${G_DEPEND} INTERFACE_INCLUDE_DIRECTORIES) - - foreach(${G_DEPEND}_IDIR ${${G_DEPEND}_IDIRS}) - if(EXISTS "${${G_DEPEND}_IDIR}") - list(APPEND ${G_NAME}_INCLUDE_DIRS "${${G_DEPEND}_IDIR}") - else() - #message(FATAL_ERROR "${G_DEPEND} has incorrect value for INTERFACE_INCLUDE_DIRECTORIES property [${${G_DEPEND}_IDIRS}]") - endif() - - endforeach() - - - get_target_property(${G_DEPEND}_IMPORTED_LOCATIONS ${G_DEPEND} IMPORTED_LOCATION) - foreach( ${G_DEPEND}_IMPORTED_LOC ${${G_DEPEND}_IMPORTED_LOCATIONS}) - if(NOT EXISTS "${${G_DEPEND}_IMPORTED_LOC}") - list(APPEND ${G_NAME}_LINK_LIBS "${G_DEPEND}") - else() - list(APPEND ${G_NAME}_LINK_LIBS "${${G_DEPEND}_IMPORTED_LOC}") - endif() - endforeach() - - - #message("$ ") - #message("$ ") - endforeach() - -# if(G_EXE) -# target_link_libraries(${G_NAME} m) -# endif() - -if(G_DEFS) - foreach(G_DEF ${G_DEFS}) - target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") - endforeach() - endif() - - if(${G_NAME}_LINK_LIBS) - list(REMOVE_DUPLICATES ${G_NAME}_LINK_LIBS ) - # message("${G_NAME}_LINK_LIBS=${${G_NAME}_LINK_LIBS}") - target_link_libraries(${G_NAME} ${${G_NAME}_LINK_LIBS}) -endif() - - if(${G_NAME}_INCLUDE_DIRS) - list(REMOVE_DUPLICATES ${G_NAME}_INCLUDE_DIRS ) - -# message("${G_NAME}_INCLUDE_DIRS=${${G_NAME}_INCLUDE_DIRS}") - + foreach(G_DEPEND ${G_DEPENDS}) + if(NOT TARGET ${G_DEPEND}) + message(FATAL_ERROR "${G_DEPEND} not a target") + break() + endif() + + add_dependencies(${G_NAME} ${G_DEPEND}) + + set(${G_NAME}_INCLUDE_DIRS) + list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_SRCDIR}") + foreach(G_INCLUDE ${G_INCLUDES}) + list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_INCLUDE}") + endforeach() + + if(${G_NAME}_INCLUDE_DIRS) + list(REMOVE_DUPLICATES ${G_NAME}_INCLUDE_DIRS ) + endif() + + target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIRS}) + + endforeach() -endif() + foreach(G_DEF ${G_DEFS}) + target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") + endforeach() -target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIRS}) -#foreach( ${G_NAME}_INCLUDE_DIR ${${G_NAME}_INCLUDE_DIRS}) -# target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIR}) -#endforeach() + target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) - set_property( TARGET ${G_NAME} PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib${G_NAME}.a;${${G_NAME}_LINK_LIBS}" ) - set_property( TARGET ${G_NAME} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${G_NAME}_INCLUDE_DIRS}" ) endfunction() diff --git a/cmake/tests/have_pbuffer.c b/cmake/tests/have_pbuffer.c new file mode 100644 index 00000000000..ebc7244acb9 --- /dev/null +++ b/cmake/tests/have_pbuffer.c @@ -0,0 +1,18 @@ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char glXCreatePbuffer(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer) +choke me +#else +glXCreatePbuffer(); +#endif +; return 0; } + diff --git a/cmake/tests/have_pixmaps.c b/cmake/tests/have_pixmaps.c new file mode 100644 index 00000000000..88b501bde46 --- /dev/null +++ b/cmake/tests/have_pixmaps.c @@ -0,0 +1,20 @@ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char glXCreateGLXPixmap(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char glXCreateGLXPixmap(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap) +choke me +#else +glXCreateGLXPixmap(); +#endif + +; return 0; } diff --git a/find_scripts/FindFFTW.cmake b/find_scripts/FindFFTW.cmake index 5f0ce1fefec..120b5fb167d 100644 --- a/find_scripts/FindFFTW.cmake +++ b/find_scripts/FindFFTW.cmake @@ -1,8 +1,4 @@ find_path(FFTW_INCLUDE_DIR fftw3.h) - - if(NOT FFTW_INCLUDE_DIR) - - endif() #fftw double lib find_library(FFTWD_LIB fftw3 ) diff --git a/find_scripts/FindSQLite.cmake b/find_scripts/FindSQLite.cmake new file mode 100644 index 00000000000..60b9099e224 --- /dev/null +++ b/find_scripts/FindSQLite.cmake @@ -0,0 +1,4 @@ +find_path(SQLITE_INCLUDE_DIR sqlite3.h) +find_library(SQLITE_LIBRARY NAMES sqlite3 ) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE REQUIRED_VARS SQLITE_LIBRARY SQLITE_INCLUDE_DIR) diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt index 65e5bac83e6..b8e0cd31abe 100644 --- a/imagery/CMakeLists.txt +++ b/imagery/CMakeLists.txt @@ -91,7 +91,8 @@ build_program_in_subdir( build_program_in_subdir( i.fft - DEPENDS grass_imagery grass_raster grass_vector grass_gis) + DEPENDS grass_imagery grass_raster grass_vector grass_gis + OPTIONAL_DEPENDS FFTW) build_program_in_subdir( i.ifft diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 0fbb44521cd..72ff4a2066c 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -5,7 +5,10 @@ check_include_file(termios.h HAVE_TERMIOS_H) check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(values.h HAVE_VALUES_H) check_include_file(zlib.h HAVE_ZLIB_H) -check_include_file(bzlib.h HAVE_BZLIB_H) +if(TARGET BZIP2) + #check_include_file(bzlib.h HAVE_BZLIB_H) + set(HAVE_BZLIB_H 1) +endif() check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) check_include_file(sys/mtio.h HAVE_SYS_MTIO_H) check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) @@ -19,30 +22,206 @@ check_include_file(f2c.h HAVE_F2C_H) check_include_file(cblas.h HAVE_CBLAS_H) check_include_file(clapack.h HAVE_CLAPACK_H) check_include_file(langinfo.h HAVE_LANGINFO_H) -check_include_file(ft2build.h HAVE_FT2BUILD_H) + +if(TARGET FREETYPE) + #check_include_file(ft2build.h HAVE_FT2BUILD_H) + set(HAVE_FT2BUILD_H 1) +endif() + check_include_file(pthread.h HAVE_PTHREAD_H) check_include_file(regex.h HAVE_REGEX_H) check_include_file(iconv.h HAVE_ICONV_H) check_include_file(libintl.h HAVE_LIBINTL_H) check_include_file(dbm.h HAVE_DBM_H) check_include_file(dfftw.h HAVE_DFFTW_H) -check_include_file(fftw.h HAVE_FFTW_H) check_include_file(fftw3.h HAVE_FFTW3_H) -check_include_file(jpeglib.h HAVE_JPEGLIB_H) -check_include_file(png.h HAVE_PNG_H) -check_include_file(tiffio.h HAVE_TIFFIO_H) +if(NOT HAVE_FFTW3_H) + check_include_file(fftw.h HAVE_FFTW_H) +endif() + +set(HAVE_JPEGLIB_H 0) +if(TARGET LIBJPEG) + set(HAVE_JPEGLIB_H 1) + #check_include_file(jpeglib.h HAVE_JPEGLIB_H) +endif() + +set(HAVE_PNG_H 0) +if(TARGET LIBPNG) + set(HAVE_PNG_H 1) + #check_include_file(png.h HAVE_PNG_H) +endif() + +set(HAVE_TIFFIO_H 0) +if(TARGET TIFF) + set(HAVE_TIFFIO_H 1) + #check_include_file(tiffio.h HAVE_TIFFIO_H) +endif() + +set(HAVE_GEOS 0) +if(TARGET GEOS) + set(HAVE_GEOS 1) +endif() + +set(HAVE_GDAL 0) +set(HAVE_OGR 0) +if(TARGET GDAL) + set(HAVE_GDAL 1) + set(HAVE_OGR 1) +endif() + +set(HAVE_SQLITE 0) +if(TARGET SQLITE) + set(HAVE_SQLITE 1) +endif() + +if(WITH_NLS) + set(USE_NLS 1) +endif() + +set(HAVE_LIBBLAS 0) +if(TARGET BLAS) + set(HAVE_LIBBLAS 1) +endif() + +set(HAVE_LIBLAPACK 0) +if(TARGET LAPACK) + set(HAVE_LIBLAPACK 1) +endif() + +########################TODO######################## +set(HAVE_POSTGRES 0) + set(HAVE_LIBPQ_FE_H 0) + set(HAVE_PQCMDTUPLES 0) +if(TARGET POSTGRES) + set(HAVE_POSTGRES 1) + set(HAVE_LIBPQ_FE_H 0) + set(HAVE_PQCMDTUPLES 0) +endif() + +set(HAVE_LIBATLAS 0) +if(TARGET ATLAS) + set(HAVE_LIBATLAS 1) +endif() + +set(HAVE_READLINE_READLINE_H 0) +set(HAVE_SQL_H 0) +set(USE_NLS 0) + +set(USE_G_SOCKS 0) +set(RETSIGTYPE_RESULT "int") + +set(gid_t 0) +set(uid_t 0) +set(off_t 0) + + + + +set(_OE_SOCKETS 0) +set(USE_DELTA_FOR_TZ 0) +set(_REENTRANT 0) +########################TODO######################## + +set(X_DISPLAY_MISSING 1) +if(TARGET X11) + set(X_DISPLAY_MISSING 0) +endif() + #used in config.cmake.in -set(STATIC_BUILD FALSE) +set(STATIC_BUILD TRUE) if(BUILD_SHARED_LIBS) - set(STATIC_BUILD TRUE) + set(STATIC_BUILD FALSE) endif() #used in config.cmake.in set(GDEBUG 0) if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" ) - set(GDEBUG TRUE) + set(GDEBUG 1) +endif() + +include(CheckCSourceCompiles) + +set(CMAKE_REQUIRED_FLAGS ${CMAKE_C_FLAGS}) + +unset(HAVE_LONG_LONG_INT CACHE) + +CHECK_C_SOURCE_COMPILES(" +int main(int argc, char *argv[]) +{ +long long int x; +return 0; +} +" +HAVE_LONG_LONG_INT ) + +CHECK_FUNCTION_EXISTS(ftime HAVE_FTIME) +CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME) +CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) +CHECK_FUNCTION_EXISTS(lseek HAVE_LSEEK) +CHECK_FUNCTION_EXISTS(time HAVE_TIME) +CHECK_FUNCTION_EXISTS(uname HAVE_UNAME) +CHECK_FUNCTION_EXISTS(seteuid HAVE_SETEUID) +CHECK_FUNCTION_EXISTS(setpriority HAVE_SETPRIORITY) +CHECK_FUNCTION_EXISTS(setreuid HAVE_SETREUID) +CHECK_FUNCTION_EXISTS(setruid HAVE_SETRUID) +CHECK_FUNCTION_EXISTS(setpgrp SETPGRP_VOID) +CHECK_FUNCTION_EXISTS(drand48 HAVE_DRAND48) +CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP) +CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF) +CHECK_FUNCTION_EXISTS(putenv HAVE_PUTENV) +CHECK_FUNCTION_EXISTS(setenv HAVE_SETENV) +CHECK_FUNCTION_EXISTS(socket HAVE_SOCKET) + +set(HAVE_PBUFFERS 0) +set(HAVE_PIXMAPS 0) +if(WITH_OPENGL) +try_compile(HAVE_PBUFFERS ${CMAKE_CURRENT_BINARY_DIR} +${CMAKE_SOURCE_DIR}/cmake/tests/have_pbuffer.c +CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${OPENGL_INCLUDE_DIR}" + "-w" + "-DLINK_LIBRARIES:STRING=${OPENGL_LIBRARIES}" +OUTPUT_VARIABLE COMPILE_HAVE_PBUFFERS +) +if(NOT COMPILE_HAVE_PBUFFERS) + message(FATAL_ERROR "Performing Test HAVE_PBUFFERS - Failed\n COMPILE_OUTPUT:${COMPILE_HAVE_PBUFFERS}\n") +else() + message(STATUS "Performing Test HAVE_PBUFFERS - Success") + set(HAVE_PBUFFERS 1) +endif() + + +try_compile(HAVE_PIXMAPS ${CMAKE_CURRENT_BINARY_DIR} +${CMAKE_SOURCE_DIR}/cmake/tests/have_pixmaps.c +CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${OPENGL_INCLUDE_DIR}" + "-w" + "-DLINK_LIBRARIES:STRING=${OPENGL_LIBRARIES}" + OUTPUT_VARIABLE COMPILE_HAVE_PIXMAPS + ) + +if(NOT COMPILE_HAVE_PIXMAPS) + message(FATAL_ERROR "Performing Test HAVE_PIXMAPS - Failed\n COMPILE_OUTPUT:${COMPILE_HAVE_PIXMAPS}\n") +else() + message(STATUS "Performing Test HAVE_PIXMAPS - Success") + set(HAVE_PIXMAPS 1) endif() + +endif(WITH_OPENGL) +CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + + +set(OPENGL_X11 0) +set(OPENGL_AQUA 0) +set(OPENGL_WINDOWS 0) +if(WITH_OPENGL) + if(APPLE) + set(OPENGL_AQUA 1) + elseif(WIN32) + set(OPENGL_WINDOWS 1) + else() + set(OPENGL_X11 1) + endif() +endif() #message(STATUS "Copying headers to ${CMAKE_BINARY_DIR}/include/grass/") execute_process(COMMAND ${CMAKE_COMMAND} @@ -63,12 +242,19 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") -file(READ ${CMAKE_SOURCE_DIR}/COPYING copying_header) -file(WRITE ${CMAKE_BINARY_DIR}/include/grass/copying.h "/* ${copying_header} */" ) +file(WRITE ${CMAKE_BINARY_DIR}/include/grass/copying.h "") +file(STRINGS ${CMAKE_SOURCE_DIR}/COPYING copying_lines) +foreach(copying_line ${copying_lines}) + file(APPEND ${CMAKE_BINARY_DIR}/include/grass/copying.h "\"${copying_line} \\n\"\n" ) +endforeach() + +file(WRITE ${CMAKE_BINARY_DIR}/include/grass/citing.h "") +file(STRINGS ${CMAKE_SOURCE_DIR}/CITING citing_lines) +foreach(citing_line ${citing_lines}) + file(APPEND ${CMAKE_BINARY_DIR}/include/grass/citing.h "\"${citing_line}\\n\"\n" ) +endforeach() -file(READ ${CMAKE_SOURCE_DIR}/CITING citing_header) -file(WRITE ${CMAKE_BINARY_DIR}/include/grass/citing.h "/* ${citing_header} */" ) #TODO #file(READ ${CMAKE_SOURCE_DIR}/config.status config_status_header) -file(WRITE ${CMAKE_BINARY_DIR}/include/grass/confparms.h "/* */" ) +file(WRITE ${CMAKE_BINARY_DIR}/include/grass/confparms.h "\"/* */\\n\"" ) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in new file mode 100644 index 00000000000..ee1e9378042 --- /dev/null +++ b/include/config.h.cmake.in @@ -0,0 +1,309 @@ +/* + #Generated by cmake from include/config.h.cmake.in + * config.h.cmake.in + */ + +#ifndef _config_h +#define _config_h + +#cmakedefine GDEBUG + +/* define _OE_SOCKETS flag (OS/390 sys/socket.h) */ +#cmakedefine _OE_SOCKETS + +/* define _REENTRANT flag (for SunOS) */ +#cmakedefine _REENTRANT + +/* define USE_DELTA_FOR_TZ (for AIX) */ +#cmakedefine USE_DELTA_FOR_TZ + +/* define for Windows static build */ +#cmakedefine STATIC_BUILD + +/* define if limits.h exists */ +#cmakedefine HAVE_LIMITS_H + +/* define if termio.h exists */ +#cmakedefine HAVE_TERMIO_H + +/* define if termios.h exists */ +#cmakedefine HAVE_TERMIOS_H + +/* define if unistd.h exists */ +#cmakedefine HAVE_UNISTD_H + +/* define if values.h exists */ +#cmakedefine HAVE_VALUES_H + +/* define if zlib.h exists */ +#cmakedefine HAVE_ZLIB_H + +/* define if bzlib.h exists */ +#cmakedefine HAVE_BZLIB_H + +/* define if sys/ioctl.h exists */ +#cmakedefine HAVE_SYS_IOCTL_H + +/* define if sys/mtio.h exists */ +#cmakedefine HAVE_SYS_MTIO_H + +/* define if sys/resource.h exists */ +#cmakedefine HAVE_SYS_RESOURCE_H + +/* define if sys/time.h exists */ +#cmakedefine HAVE_SYS_TIME_H + +/* define if time.h and sys/time.h can be included together */ +#cmakedefine TIME_WITH_SYS_TIME + +/* define if sys/timeb.h exists */ +#cmakedefine HAVE_SYS_TIMEB_H + +/* define if sys/types.h exists */ +#cmakedefine HAVE_SYS_TYPES_H + +/* define if sys/utsname.h exists */ +#cmakedefine HAVE_SYS_UTSNAME_H + +/* define if g2c.h exists */ +#cmakedefine HAVE_G2C_H + +/* define if f2c.h exists */ +#cmakedefine HAVE_F2C_H + +/* define if cblas.h exists */ +#cmakedefine HAVE_CBLAS_H + +/* define if clapack.h exists */ +#cmakedefine HAVE_CLAPACK_H + +/* define gid_t type */ +#cmakedefine gid_t + +/* define off_t type */ +#cmakedefine off_t + +/* define uid_t type */ +#cmakedefine uid_t + +/* define if "long long" is available */ +#cmakedefine HAVE_LONG_LONG_INT + +/* Define the return type of signal handlers */ +#define RETSIGTYPE @RETSIGTYPE_RESULT@ + +/* define if ftime() exists */ +#cmakedefine HAVE_FTIME + +/* define if gethostname() exists */ +#cmakedefine HAVE_GETHOSTNAME + +/* define if gettimeofday() exists */ +#cmakedefine HAVE_GETTIMEOFDAY + +/* define if lseek() exists */ +#cmakedefine HAVE_LSEEK + +/* define if time() exists */ +#cmakedefine HAVE_TIME + +/* define if uname() exists */ +#cmakedefine HAVE_UNAME + +/* define if seteuid() exists */ +#cmakedefine HAVE_SETEUID + +/* define if setpriority() exists */ +#cmakedefine HAVE_SETPRIORITY + +/* define if setreuid() exists */ +#cmakedefine HAVE_SETREUID + +/* define if setruid() exists */ +#cmakedefine HAVE_SETRUID + +/* define if setpgrp() takes no argument */ +#cmakedefine SETPGRP_VOID + +/* define if drand48() exists */ +#cmakedefine HAVE_DRAND48 + +/* define if nanosleep() exists */ +#cmakedefine HAVE_NANOSLEEP + +/* define if asprintf() exists */ +#cmakedefine HAVE_ASPRINTF @HAVE_ASPRINTF@ + +/* define if postgres is to be used */ +#cmakedefine HAVE_POSTGRES + +/* define if SQLite is to be used */ +#cmakedefine HAVE_SQLITE @HAVE_SQLITE@ + +/* define if GDAL is to be used */ +#cmakedefine HAVE_GDAL @HAVE_GDAL@ + +/* define if OGR is to be used */ +#cmakedefine HAVE_OGR @HAVE_OGR@ + +/* define if GEOS is to be used */ +#cmakedefine HAVE_GEOS @HAVE_GEOS@ + +/* define if postgres client header exists */ +#cmakedefine HAVE_LIBPQ_FE_H + +/* define if PQcmdTuples in lpq */ +#cmakedefine HAVE_PQCMDTUPLES + +/* define if ODBC exists */ +#cmakedefine HAVE_SQL_H + +/* define if tiffio.h exists */ +#cmakedefine HAVE_TIFFIO_H + +/* define if png.h exists */ +#cmakedefine HAVE_PNG_H + +/* define if jpeglib.h exists */ +#cmakedefine HAVE_JPEGLIB_H + +/* define if fftw3.h exists */ +#cmakedefine HAVE_FFTW3_H + +/* define if fftw.h exists */ +#cmakedefine HAVE_FFTW_H + +/* define if dfftw.h exists */ +#cmakedefine HAVE_DFFTW_H + +/* define if BLAS exists */ +#cmakedefine HAVE_LIBBLAS + +/* define if LAPACK exists */ +#cmakedefine HAVE_LIBLAPACK + +/* define if ATLAS exists */ +#cmakedefine HAVE_LIBATLAS + +/* define if dbm.h exists */ +#cmakedefine HAVE_DBM_H + +/* define if readline exists */ +#cmakedefine HAVE_READLINE_READLINE_H + +/* define if ft2build.h exists */ +#cmakedefine HAVE_FT2BUILD_H + +/* Whether or not we are using G_socks for display communications */ +#cmakedefine USE_G_SOCKS + +/* define if X is disabled or unavailable */ +#cmakedefine X_DISPLAY_MISSING + +/* define if libintl.h exists */ +#cmakedefine HAVE_LIBINTL_H + +/* define if iconv.h exists */ +#cmakedefine HAVE_ICONV_H + +/* define if NLS requested */ +#cmakedefine USE_NLS + +/* define if putenv() exists */ +#cmakedefine HAVE_PUTENV + +/* define if setenv() exists */ +#cmakedefine HAVE_SETENV + +/* define if socket() exists */ +#cmakedefine HAVE_SOCKET + +/* define if glXCreatePbuffer exists */ +#cmakedefine HAVE_PBUFFERS + +/* define if glXCreateGLXPixmap exists */ +#cmakedefine HAVE_PIXMAPS + +/* define if OpenGL uses X11 */ +#cmakedefine OPENGL_X11 + +/* define if OpenGL uses Aqua (MacOS X) */ +#cmakedefine OPENGL_AQUA + +/* define if OpenGL uses Windows */ +#cmakedefine OPENGL_WINDOWS + +/* define if regex.h exists */ +#cmakedefine HAVE_REGEX_H + +/* define if pthread.h exists */ +#cmakedefine HAVE_PTHREAD_H + +/* define if fseeko() exists */ +#cmakedefine HAVE_FSEEKO + +/* + * configuration information solely dependent on the above + * nothing below this point should need changing + */ + +#if defined(HAVE_VALUES_H) && !defined(HAVE_LIMITS_H) +#define INT_MIN -MAXINT +#endif + + + +/* + * Defines needed to get large file support - from cdrtools-2.01 + */ + +/* MINGW32 LFS */ + +/* define if we have LFS */ +#undef HAVE_LARGEFILES + +#ifdef HAVE_LARGEFILES /* If we have working largefiles at all */ + /* This is not defined with glibc-2.1.3 */ + +#if 0 + +/* what to do with these four? configure comments these out */ + +#undef _LARGEFILE_SOURCE /* To make ftello() visible (HP-UX 10.20). */ +#undef _LARGE_FILES /* Large file defined on AIX-style hosts. */ +#undef _XOPEN_SOURCE /* To make ftello() visible (glibc 2.1.3). */ +#undef _XOPEN_SOURCE_EXTENDED + /* XXX We don't use this because glibc2.1.3*/ + /* XXX is bad anyway. If we define */ + /* XXX _XOPEN_SOURCE we will loose caddr_t */ + +#endif + +#if defined(__MINGW32__) && (!defined(_FILE_OFFSET_BITS) || (_FILE_OFFSET_BITS != 64)) + +/* add/remove as needed */ +/* redefine off_t */ +#include +#define off_t off64_t +/* fseeko and ftello are safe because not defined by MINGW */ +#define HAVE_FSEEKO +#define fseeko fseeko64 +#define ftello ftello64 +/* redefine lseek */ +#include +#define lseek lseek64 +/* redefine stat and fstat */ +/* use _stati64 compatible with MSVCRT < 6.1 */ +#include +#define stat _stati64 +#define fstat _fstati64 + +#endif /* MINGW32 LFS */ + +#endif /* HAVE_LARGEFILES */ + + +/* define if langinfo.h exists */ +#cmakedefine HAVE_LANGINFO_H + +#endif /* _config_h */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 27c3e0a9ac6..e772b997779 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -20,7 +20,9 @@ build_library_in_subdir(external/ccmath) build_library_in_subdir(external/shapelib NAME grass_shape HEADERS "shapefil.h") -build_library_in_subdir(gmath DEPENDS FFTW grass_ccmath) +build_library_in_subdir(gmath + DEPENDS grass_ccmath + OPTIONAL_DEPENDS FFTW ) build_library_in_subdir(linkm) @@ -114,17 +116,16 @@ build_library_in_subdir(stats) build_library_in_subdir(arraystats) if(WITH_OPENGL) - build_library_in_subdir(ogsf DEPENDS OPENGL GDAL TIFF) - build_library_in_subdir(nviz DEPENDS OPENGL GDAL TIFF) - if(OPENGL_X11 ) - #add XCFLAGS - endif() + # set(ogsf_DEPENDS OPENGL GDAL TIFF) + # build_library_in_subdir(ogsf DEPENDS ${ogsf_DEPENDS}) + build_library_in_subdir(ogsf DEPENDS OPENGL GDAL TIFF) + build_library_in_subdir(nviz DEPENDS OPENGL GDAL TIFF) endif() add_subdirectory(temporal) -add_subdirectory(python) +#add_subdirectory(python) build_library_in_subdir(iostream SRC_REGEX "*.cpp") diff --git a/lib/db/dbmi_base/dirent.c b/lib/db/dbmi_base/dirent.c index 54348b6defe..7686e7d8fe5 100644 --- a/lib/db/dbmi_base/dirent.c +++ b/lib/db/dbmi_base/dirent.c @@ -16,10 +16,12 @@ #include #include #include -/* NOTE: these should come from or from */ + +#if !defined(HAVE_UNISTD_H) #define R_OK 4 #define W_OK 2 #define X_OK 1 +#endif #include #ifdef USE_DIRECT diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index c4163377544..d1e3f583ee5 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -29,6 +29,7 @@ endif() set(GRASS_VERSION_DATE 20160402) build_module(NAME grass_gis SOURCES "${gislib_SRCS}" - DEPENDS ZLIB LIBM grass_datetime + DEPENDS grass_datetime ZLIB LIBM + OPTIONAL_DEPENDS PTHREAD BZIP2 ICONV DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}" ) diff --git a/lib/init/license.txt.in b/lib/init/license.txt.in new file mode 100644 index 00000000000..c40844420c5 --- /dev/null +++ b/lib/init/license.txt.in @@ -0,0 +1,11 @@ +Geographic Resources Analysis Support System (GRASS) is Copyright, +1999-@GRASS_VERSION_DATE@ by the GRASS Development Team, and licensed under terms of the +GNU General Public License (GPL) version >=2. + +This GRASS GIS @GRASS_VERSION_NUMBER@ release is coordinated and produced by +the GRASS Development Team with contributions from all over the world. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. diff --git a/lib/python/ctypes/ctypesgen.py b/lib/python/ctypes/ctypesgen.py index 0092f1b342f..cdcaceaf7f5 100755 --- a/lib/python/ctypes/ctypesgen.py +++ b/lib/python/ctypes/ctypesgen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 def find_names_in_modules(modules): diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 910c5a19535..3359816ae8f 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -3,97 +3,149 @@ find_package(FLEX REQUIRED) find_package(BISON REQUIRED) - find_package(GDAL REQUIRED) -add_library(GDAL SHARED IMPORTED GLOBAL) -set_property( TARGET GDAL PROPERTY IMPORTED_LOCATION ${GDAL_LIBRARY} ) +add_library(GDAL INTERFACE IMPORTED GLOBAL) +set_property( TARGET GDAL PROPERTY INTERFACE_LINK_LIBRARIES ${GDAL_LIBRARY} ) set_property( TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_DIRS} ) - - find_package(PNG REQUIRED) -add_library(LIBPNG SHARED IMPORTED GLOBAL) -set_property( TARGET LIBPNG PROPERTY IMPORTED_LOCATION ${PNG_LIBRARY} ) +add_library(LIBPNG INTERFACE IMPORTED GLOBAL) +set_property( TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY} ) set_property( TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) - +find_package(JPEG) +if(JPEG_FOUND) + add_library(LIBJPEG INTERFACE IMPORTED GLOBAL) + set_property( TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY} ) + set_property( TARGET LIBJPEG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR} ) +endif() find_package(ZLIB REQUIRED) -add_library(ZLIB SHARED IMPORTED GLOBAL) -set_property( TARGET ZLIB PROPERTY IMPORTED_LOCATION ${ZLIB_LIBRARY} ) +add_library(ZLIB INTERFACE IMPORTED GLOBAL) +set_property( TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY} ) set_property( TARGET ZLIB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR} ) - - find_library(M_LIBRARY m) -add_library(LIBM SHARED IMPORTED GLOBAL) -set_property( TARGET LIBM PROPERTY IMPORTED_LOCATION ${M_LIBRARY} ) -#set_property( TARGET LIBM PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${M_INCLUDE_DIR} ) - - +add_library(LIBM INTERFACE IMPORTED GLOBAL) +set_property( TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) find_package(PROJ4 REQUIRED) -add_library(PROJ4 SHARED IMPORTED GLOBAL) -set_property( TARGET PROJ4 PROPERTY IMPORTED_LOCATION ${PROJ4_LIBRARY} ) +add_library(PROJ4 INTERFACE IMPORTED GLOBAL) +set_property( TARGET PROJ4 PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) set_property( TARGET PROJ4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIR} ) - - find_package(Freetype REQUIRED) -add_library(FREETYPE SHARED IMPORTED GLOBAL) -set_property( TARGET FREETYPE PROPERTY IMPORTED_LOCATION ${FREETYPE_LIBRARY} ) +add_library(FREETYPE INTERFACE IMPORTED GLOBAL) +set_property( TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY} ) set_property( TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) - - -find_package(FFTW REQUIRED) -add_library(FFTW SHARED IMPORTED GLOBAL) -set_property( TARGET FFTW PROPERTY IMPORTED_LOCATION ${FFTW_LIBRARIES} ) -set_property( TARGET FFTW PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FFTW_INCLUDE_DIR} ) - +find_package(FFTW) +if(FFTW_FOUND) + add_library(FFTW INTERFACE IMPORTED GLOBAL) + set_property( TARGET FFTW PROPERTY INTERFACE_LINK_LIBRARIES ${FFTW_LIBRARIES} ) + set_property( TARGET FFTW PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FFTW_INCLUDE_DIR} ) +endif() if(WITH_CAIRO) find_package(Cairo REQUIRED) - add_library(CAIRO SHARED IMPORTED GLOBAL) - set_property( TARGET CAIRO PROPERTY IMPORTED_LOCATION ${CAIRO_LIBRARIES} ) + add_library(CAIRO INTERFACE IMPORTED GLOBAL) + set_property( TARGET CAIRO PROPERTY INTERFACE_LINK_LIBRARIES ${CAIRO_LIBRARIES} ) set_property( TARGET CAIRO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIRS} ) endif() if(WITH_X11) find_package(X11 REQUIRED) - add_library(X11 SHARED IMPORTED GLOBAL) - set_property( TARGET X11 PROPERTY IMPORTED_LOCATION ${X11_LIBRARIES} ) - set_property( TARGET X11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${X11_INCLUDE_DIR} ) + add_library(X11 INTERFACE IMPORTED GLOBAL) + set_property(TARGET X11 PROPERTY INTERFACE_LINK_LIBRARIES ${X11_LIBRARIES} ) + set_property(TARGET X11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${X11_INCLUDE_DIR}") - find_package(TIFF REQUIRED) - add_library(TIFF SHARED IMPORTED GLOBAL) - set_property( TARGET TIFF PROPERTY IMPORTED_LOCATION ${TIFF_LIBRARY} ) - set_property( TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR} ) +endif() + +find_package(TIFF REQUIRED) +add_library(TIFF INTERFACE IMPORTED GLOBAL) +set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY} ) +set_property(TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${TIFF_INCLUDE_DIR}") + +find_package(Iconv) +if(ICONV_FOUND) +add_library(ICONV INTERFACE IMPORTED GLOBAL) +set_property(TARGET ICONV PROPERTY INTERFACE_LINK_LIBRARIES ${ICONV_LIBRARIES} ) +set_property(TARGET ICONV PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICONV_INCLUDE_DIR}") +#if(ICONV_SECOND_ARGUMENT_IS_CONST) +#set() update this value in include/config.cmake.in +endif() + +if(WITH_BZLIB) +find_package(BZip2) +if(BZIP2_FOUND) +add_library(BZIP2 INTERFACE IMPORTED GLOBAL) +set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARIES} ) +set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") +endif() +endif() + +if(WITH_BLAS) +find_package(BLAS) +if(BLAS_FOUND) +add_library(BZIP2 INTERFACE IMPORTED GLOBAL) +set_property(TARGET BLAS PROPERTY INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ) +#set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIR}") +endif() +endif() + +if(WITH_LAPACK) +find_package(LAPACK) +if(LAPACK_FOUND) +add_library(LAPACK INTERFACE IMPORTED GLOBAL) +set_property(TARGET LAPACK PROPERTY INTERFACE_LINK_LIBRARIES ${LAPACK_LIBRARIES} ) +#set_property(TARGET LAPACK PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIR}") +endif() endif() if(WITH_OPENGL) find_package(OpenGL REQUIRED) - add_library(OPENGL SHARED IMPORTED GLOBAL) - set_property( TARGET OPENGL PROPERTY IMPORTED_LOCATION ${OPENGL_LIBRARIES} ) - set_property( TARGET OPENGL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR} ) + add_library(OPENGL INTERFACE IMPORTED GLOBAL) + set_property( TARGET OPENGL PROPERTY INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARIES} ) + set_property( TARGET OPENGL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR} ) +endif() - find_package(TIFF REQUIRED) - add_library(TIFF SHARED IMPORTED GLOBAL) - set_property( TARGET TIFF PROPERTY IMPORTED_LOCATION ${TIFF_LIBRARY} ) - set_property( TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR} ) - +if(WITH_POSTGRES) + find_package(PostgreSQL REQUIRED) + add_library(POSTGRES INTERFACE IMPORTED GLOBAL) + set_property( TARGET POSTGRES PROPERTY INTERFACE_LINK_LIBRARIES ${PostgreSQL_LIBRARIES} ) + set_property( TARGET POSTGRES PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PostgreSQL_INCLUDE_DIRS} ) +endif() + + +if(WITH_SQLITE) + find_package(SQLite REQUIRED) + add_library(SQLITE INTERFACE IMPORTED GLOBAL) + set_property( TARGET SQLITE PROPERTY INTERFACE_LINK_LIBRARIES ${SQLITE_LIBRARY} ) + set_property( TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIR} ) endif() find_package(GEOS REQUIRED) -add_library(GEOS SHARED IMPORTED GLOBAL) -set_property( TARGET GEOS PROPERTY IMPORTED_LOCATION ${GEOS_LIBRARIES} ) +add_library(GEOS INTERFACE IMPORTED GLOBAL) +set_property( TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_LIBRARIES} ) set_property( TARGET GEOS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GEOS_INCLUDE_DIR} ) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads) +if(Threads_FOUND) + add_library(PTHREAD INTERFACE IMPORTED GLOBAL) + if(THREADS_HAVE_PTHREAD_ARG) + set_property(TARGET PTHREAD PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread") + endif() + if(CMAKE_THREAD_LIBS_INIT) + set_property(TARGET PTHREAD PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") + endif() +endif() #find_package (PythonLibs REQUIRED ) +set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) find_package (PythonInterp REQUIRED ) #find_package ( Numpy ) @@ -114,7 +166,7 @@ endif() # endif() #$ -#$ +#$ diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 7a8de7636fd..d583ddc0b6f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -set(py_files g.html2man/g.html2man.py g.html2man/html.py g.html2man/groff.py) +set(py_files g.html2man/g.html2man.py g.html2man/ghtml.py g.html2man/ggroff.py) foreach(py_file ${py_files}) get_filename_component(py_file_NAME ${py_file} NAME) From 10f576c70768d4db531f83a603ce120f2ca1a4de Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:23:11 +0100 Subject: [PATCH 003/264] add find iconv script --- find_scripts/FindIconv.cmake | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 find_scripts/FindIconv.cmake diff --git a/find_scripts/FindIconv.cmake b/find_scripts/FindIconv.cmake new file mode 100644 index 00000000000..028df5c1ae5 --- /dev/null +++ b/find_scripts/FindIconv.cmake @@ -0,0 +1,58 @@ +# - Try to find Iconv +# Once done this will define +# +# ICONV_FOUND - system has Iconv +# ICONV_INCLUDE_DIR - the Iconv include directory +# ICONV_LIBRARIES - Link these to use Iconv +# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const +# +include(CheckCXXSourceCompiles) + +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + +FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) + From 48d787aca4646ef339bb1848055e9b44771e9fd3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:23:25 +0100 Subject: [PATCH 004/264] fix blas error wrong target added --- thirdparty/CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 3359816ae8f..1cd3eca15a9 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -87,7 +87,7 @@ endif() if(WITH_BLAS) find_package(BLAS) if(BLAS_FOUND) -add_library(BZIP2 INTERFACE IMPORTED GLOBAL) +add_library(BLAS INTERFACE IMPORTED GLOBAL) set_property(TARGET BLAS PROPERTY INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ) #set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIR}") endif() @@ -106,30 +106,30 @@ endif() if(WITH_OPENGL) find_package(OpenGL REQUIRED) add_library(OPENGL INTERFACE IMPORTED GLOBAL) - set_property( TARGET OPENGL PROPERTY INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARIES} ) - set_property( TARGET OPENGL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR} ) + set_property(TARGET OPENGL PROPERTY INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARIES} ) + set_property(TARGET OPENGL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR} ) endif() if(WITH_POSTGRES) find_package(PostgreSQL REQUIRED) add_library(POSTGRES INTERFACE IMPORTED GLOBAL) - set_property( TARGET POSTGRES PROPERTY INTERFACE_LINK_LIBRARIES ${PostgreSQL_LIBRARIES} ) - set_property( TARGET POSTGRES PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PostgreSQL_INCLUDE_DIRS} ) + set_property(TARGET POSTGRES PROPERTY INTERFACE_LINK_LIBRARIES ${PostgreSQL_LIBRARIES} ) + set_property(TARGET POSTGRES PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PostgreSQL_INCLUDE_DIRS} ) endif() if(WITH_SQLITE) find_package(SQLite REQUIRED) add_library(SQLITE INTERFACE IMPORTED GLOBAL) - set_property( TARGET SQLITE PROPERTY INTERFACE_LINK_LIBRARIES ${SQLITE_LIBRARY} ) - set_property( TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIR} ) + set_property(TARGET SQLITE PROPERTY INTERFACE_LINK_LIBRARIES ${SQLITE_LIBRARY} ) + set_property(TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIR} ) endif() find_package(GEOS REQUIRED) add_library(GEOS INTERFACE IMPORTED GLOBAL) -set_property( TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_LIBRARIES} ) -set_property( TARGET GEOS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GEOS_INCLUDE_DIR} ) +set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_LIBRARIES} ) +set_property(TARGET GEOS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GEOS_INCLUDE_DIR} ) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads) @@ -145,13 +145,13 @@ endif() #find_package (PythonLibs REQUIRED ) -set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) +set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 3.5 3.6) find_package (PythonInterp REQUIRED ) #find_package ( Numpy ) -if (PYTHON_VERSION_MAJOR GREATER 2 ) - message(FATAL_ERROR "cannot use python 3 or higher") -endif() +# if (PYTHON_VERSION_MAJOR GREATER 2 ) +# message(FATAL_ERROR "cannot use python 3 or higher") +# endif() From 0f9ceac2a95129aa3c5448ce2a2bd321a549acd8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:35:56 +0100 Subject: [PATCH 005/264] link with dl lib on linux --- lib/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e772b997779..e902a92631d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -4,11 +4,15 @@ build_library_in_subdir(datetime) +set(DL_LIBRARY) add_subdirectory(gis) +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + find_library(DL_LIBRARY dl) +endif() build_library_in_subdir(raster DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" - DEPENDS GDAL PROJ4 + DEPENDS GDAL PROJ4 ${DL_LIBRARY} ) configure_file(external/ccmath/ccmath.h @@ -96,7 +100,7 @@ build_library_in_subdir(raster3d DEPENDS grass_raster) build_program_in_subdir(raster3d/test NAME test.raster3d.lib - DEPENDS grass_gis grass_raster3d + DEPENDS grass_gis grass_raster3d ) build_library_in_subdir(gpde HEADERS "N_*.h" From 449223773ef389f7892c865b5b4bbc27d811f4da Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:36:15 +0100 Subject: [PATCH 006/264] disable some modules (wip) --- imagery/CMakeLists.txt | 17 +++++++---------- thirdparty/CMakeLists.txt | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt index b8e0cd31abe..789e874ae8a 100644 --- a/imagery/CMakeLists.txt +++ b/imagery/CMakeLists.txt @@ -89,18 +89,15 @@ build_program_in_subdir( i.vi DEPENDS grass_imagery grass_raster grass_vector grass_gis) -build_program_in_subdir( - i.fft - DEPENDS grass_imagery grass_raster grass_vector grass_gis - OPTIONAL_DEPENDS FFTW) +# build_program_in_subdir( +# i.fft +# DEPENDS grass_imagery grass_raster grass_vector grass_gis +# OPTIONAL_DEPENDS FFTW) -build_program_in_subdir( - i.ifft - DEPENDS grass_imagery grass_raster grass_vector grass_gis) -build_program_in_subdir( - i.zc - DEPENDS grass_imagery grass_raster grass_vector grass_gis) +# build_program_in_subdir( +# i.zc +# DEPENDS grass_imagery grass_raster grass_vector grass_gis) build_program_in_subdir(i.atcorr DEPENDS grass_imagery grass_raster grass_vector grass_gis SRC_REGEX "*.cpp") diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 1cd3eca15a9..f7328a42cc7 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -42,8 +42,8 @@ set_property( TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_ find_package(FFTW) if(FFTW_FOUND) add_library(FFTW INTERFACE IMPORTED GLOBAL) - set_property( TARGET FFTW PROPERTY INTERFACE_LINK_LIBRARIES ${FFTW_LIBRARIES} ) - set_property( TARGET FFTW PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FFTW_INCLUDE_DIR} ) + set_property(TARGET FFTW PROPERTY INTERFACE_LINK_LIBRARIES ${FFTW_LIBRARIES} ) + set_property(TARGET FFTW PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FFTW_INCLUDE_DIR} ) endif() if(WITH_CAIRO) From 1dc78db5f73cfca9fe72f211359299d2adc227a3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:58:15 +0100 Subject: [PATCH 007/264] search whatever is fftw's inlcude dir --- include/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 72ff4a2066c..a49c6246086 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -28,11 +28,13 @@ if(TARGET FREETYPE) set(HAVE_FT2BUILD_H 1) endif() +set(CMAKE_REQUIRED_INCLUDES "${FFTW_INCLUDE_DIR}") check_include_file(pthread.h HAVE_PTHREAD_H) check_include_file(regex.h HAVE_REGEX_H) check_include_file(iconv.h HAVE_ICONV_H) check_include_file(libintl.h HAVE_LIBINTL_H) check_include_file(dbm.h HAVE_DBM_H) + check_include_file(dfftw.h HAVE_DFFTW_H) check_include_file(fftw3.h HAVE_FFTW3_H) if(NOT HAVE_FFTW3_H) From 402d450cacf698918770d74d8878de22bf032cd1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:58:36 +0100 Subject: [PATCH 008/264] driver lib depends on iconv --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e902a92631d..07b87f2077c 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -30,7 +30,7 @@ build_library_in_subdir(gmath build_library_in_subdir(linkm) -build_library_in_subdir(driver DEPENDS FREETYPE) +build_library_in_subdir(driver DEPENDS FREETYPE ICONV) build_library_in_subdir(pngdriver DEPENDS grass_driver LIBPNG ZLIB From 85b435c2e08213fbe94ffa2db50992906a671432 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 12:58:59 +0100 Subject: [PATCH 009/264] fftw in required package --- thirdparty/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index f7328a42cc7..9421bf1b9aa 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -39,7 +39,7 @@ add_library(FREETYPE INTERFACE IMPORTED GLOBAL) set_property( TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY} ) set_property( TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) -find_package(FFTW) +find_package(FFTW REQUIRED) if(FFTW_FOUND) add_library(FFTW INTERFACE IMPORTED GLOBAL) set_property(TARGET FFTW PROPERTY INTERFACE_LINK_LIBRARIES ${FFTW_LIBRARIES} ) From 4f12d8f4198e48970579b053051c65a178587143 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 13:02:15 +0100 Subject: [PATCH 010/264] build fftw modules --- imagery/CMakeLists.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt index 789e874ae8a..f9708103758 100644 --- a/imagery/CMakeLists.txt +++ b/imagery/CMakeLists.txt @@ -89,15 +89,13 @@ build_program_in_subdir( i.vi DEPENDS grass_imagery grass_raster grass_vector grass_gis) -# build_program_in_subdir( -# i.fft -# DEPENDS grass_imagery grass_raster grass_vector grass_gis -# OPTIONAL_DEPENDS FFTW) - - -# build_program_in_subdir( -# i.zc -# DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir( + i.fft + DEPENDS grass_imagery grass_raster + grass_vector grass_gis FFTW) +build_program_in_subdir( + i.zc + DEPENDS grass_imagery grass_raster grass_vector grass_gis) build_program_in_subdir(i.atcorr DEPENDS grass_imagery grass_raster grass_vector grass_gis SRC_REGEX "*.cpp") From 933d60d21f5c85fd1259020e15fd24b7932f8af2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 13:02:31 +0100 Subject: [PATCH 011/264] add python libs --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 07b87f2077c..863c3f5a6d0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -129,7 +129,7 @@ endif() add_subdirectory(temporal) -#add_subdirectory(python) +add_subdirectory(python) build_library_in_subdir(iostream SRC_REGEX "*.cpp") From 1592a6e71f4959a72fd338df8d78af6cdce0a502 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 13:03:06 +0100 Subject: [PATCH 012/264] test with python 3.x --- lib/python/ctypes/ctypesgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/ctypes/ctypesgen.py b/lib/python/ctypes/ctypesgen.py index cdcaceaf7f5..0092f1b342f 100755 --- a/lib/python/ctypes/ctypesgen.py +++ b/lib/python/ctypes/ctypesgen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python def find_names_in_modules(modules): From 53c43e16625784af76151af66206b6f253990d80 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 13:18:38 +0100 Subject: [PATCH 013/264] test with py3 --- lib/python/CMakeLists.txt | 2 +- thirdparty/CMakeLists.txt | 2 +- tools/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 529ad3ec431..49ed88532b7 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -25,7 +25,7 @@ function(build_pyfiles_in_sudir gpy_dir_name) add_custom_command( OUTPUT ${gpy_file}.stamp - COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${gpy_file} + COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${gpy_file} COMMAND ${CMAKE_COMMAND} -E touch ${gpy_file}.stamp COMMENT "Generating ${gpy_file}c" VERBATIM diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 9421bf1b9aa..b3431c75be5 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -145,7 +145,7 @@ endif() #find_package (PythonLibs REQUIRED ) -set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 3.5 3.6) +set(Python_ADDITIONAL_VERSIONS 3.5 3.6) #2.7 2.6 2.5) find_package (PythonInterp REQUIRED ) #find_package ( Numpy ) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index d583ddc0b6f..f2224717c56 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -12,7 +12,7 @@ foreach(py_file ${py_files}) add_custom_command( OUTPUT ${py_file}.stamp DEPENDS g.parser - COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${py_file} + COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${py_file} COMMAND ${CMAKE_COMMAND} -E touch ${py_file}.stamp COMMENT "Generating ${py_file}c" VERBATIM From f480b9b607550d0015fce7b69a74854db6a16d1a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 13:19:11 +0100 Subject: [PATCH 014/264] test parsetab --- .../ctypes/ctypesgencore/parser/parsetab.py | 514 +++++++++--------- 1 file changed, 257 insertions(+), 257 deletions(-) diff --git a/lib/python/ctypes/ctypesgencore/parser/parsetab.py b/lib/python/ctypes/ctypesgencore/parser/parsetab.py index 74744c36eaf..ec92d4c3ff1 100644 --- a/lib/python/ctypes/ctypesgencore/parser/parsetab.py +++ b/lib/python/ctypes/ctypesgencore/parser/parsetab.py @@ -1,5 +1,5 @@ -# /home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/parsetab.py +# /home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/parsetab.py # This file is automatically generated. Do not edit. _lr_method = 'LALR' @@ -23,260 +23,260 @@ del _lr_goto_items _lr_productions = [ ("S'",1,None,None,None), - ('translation_unit',0,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',63), - ('translation_unit',2,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',64), - ('translation_unit',2,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',65), - ('identifier',1,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',74), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',75), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',76), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',77), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',78), - ('constant',1,'p_constant','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',95), - ('constant',1,'p_constant','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',96), - ('string_literal',1,'p_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',120), - ('multi_string_literal',1,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',125), - ('multi_string_literal',1,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',126), - ('multi_string_literal',2,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',127), - ('multi_string_literal',2,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',128), - ('macro_param',1,'p_macro_param','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',141), - ('macro_param',2,'p_macro_param','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',142), - ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',151), - ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',152), - ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',153), - ('primary_expression',3,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',154), - ('postfix_expression',1,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',163), - ('postfix_expression',4,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',164), - ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',165), - ('postfix_expression',4,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',166), - ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',167), - ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',168), - ('postfix_expression',2,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',169), - ('postfix_expression',2,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',170), - ('argument_expression_list',1,'p_argument_expression_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',207), - ('argument_expression_list',3,'p_argument_expression_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',208), - ('asm_expression',5,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',218), - ('asm_expression',7,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',219), - ('asm_expression',9,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',220), - ('asm_expression',11,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',221), - ('str_opt_expr_pair_list',0,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',234), - ('str_opt_expr_pair_list',1,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',235), - ('str_opt_expr_pair_list',3,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',236), - ('str_opt_expr_pair',1,'p_str_opt_expr_pair','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',241), - ('str_opt_expr_pair',4,'p_str_opt_expr_pair','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',242), - ('volatile_opt',0,'p_volatile_opt','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',247), - ('volatile_opt',1,'p_volatile_opt','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',248), - ('unary_expression',1,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',264), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',265), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',266), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',267), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',268), - ('unary_expression',4,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',269), - ('unary_expression',1,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',270), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',288), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',289), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',290), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',291), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',292), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',293), - ('cast_expression',1,'p_cast_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',299), - ('cast_expression',4,'p_cast_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',300), - ('multiplicative_expression',1,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',315), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',316), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',317), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',318), - ('additive_expression',1,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',334), - ('additive_expression',3,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',335), - ('additive_expression',3,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',336), - ('shift_expression',1,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',352), - ('shift_expression',3,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',353), - ('shift_expression',3,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',354), - ('relational_expression',1,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',372), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',373), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',374), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',375), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',376), - ('equality_expression',1,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',392), - ('equality_expression',3,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',393), - ('equality_expression',3,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',394), - ('and_expression',1,'p_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',405), - ('and_expression',3,'p_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',406), - ('exclusive_or_expression',1,'p_exclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',419), - ('exclusive_or_expression',3,'p_exclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',420), - ('inclusive_or_expression',1,'p_inclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',433), - ('inclusive_or_expression',3,'p_inclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',434), - ('logical_and_expression',1,'p_logical_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',447), - ('logical_and_expression',3,'p_logical_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',448), - ('logical_or_expression',1,'p_logical_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',461), - ('logical_or_expression',3,'p_logical_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',462), - ('conditional_expression',1,'p_conditional_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',475), - ('conditional_expression',5,'p_conditional_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',476), - ('assignment_expression',1,'p_assignment_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',498), - ('assignment_expression',3,'p_assignment_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',499), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',515), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',516), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',517), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',518), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',519), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',520), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',521), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',522), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',523), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',524), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',525), - ('expression',1,'p_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',531), - ('expression',3,'p_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',532), - ('constant_expression',1,'p_constant_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',539), - ('declaration',2,'p_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',545), - ('declaration_impl',1,'p_declaration_impl','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',553), - ('declaration_impl',2,'p_declaration_impl','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',554), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',579), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',580), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',581), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',582), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',583), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',584), - ('init_declarator_list',1,'p_init_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',593), - ('init_declarator_list',3,'p_init_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',594), - ('init_declarator',1,'p_init_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',603), - ('init_declarator',3,'p_init_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',604), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',612), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',613), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',614), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',615), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',616), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',622), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',623), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',624), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',625), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',626), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',627), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',628), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',629), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',630), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',631), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',632), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',633), - ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',643), - ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',644), - ('struct_or_union_specifier',4,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',645), - ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',646), - ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',647), - ('struct_or_union',1,'p_struct_or_union','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',664), - ('struct_or_union',1,'p_struct_or_union','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',665), - ('struct_declaration_list',1,'p_struct_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',671), - ('struct_declaration_list',2,'p_struct_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',672), - ('struct_declaration',3,'p_struct_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',681), - ('struct_declaration',2,'p_struct_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',682), - ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',697), - ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',698), - ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',699), - ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',700), - ('struct_declarator_list',1,'p_struct_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',710), - ('struct_declarator_list',3,'p_struct_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',711), - ('struct_declarator',1,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',720), - ('struct_declarator',2,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',721), - ('struct_declarator',3,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',722), - ('enum_specifier',4,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',734), - ('enum_specifier',5,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',735), - ('enum_specifier',2,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',736), - ('enumerator_list',1,'p_enumerator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',750), - ('enumerator_list',2,'p_enumerator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',751), - ('enumerator_list_iso',1,'p_enumerator_list_iso','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',759), - ('enumerator_list_iso',3,'p_enumerator_list_iso','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',760), - ('enumerator',1,'p_enumerator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',769), - ('enumerator',3,'p_enumerator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',770), - ('type_qualifier',1,'p_type_qualifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',779), - ('type_qualifier',1,'p_type_qualifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',780), - ('declarator',2,'p_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',786), - ('declarator',1,'p_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',787), - ('direct_declarator',1,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',800), - ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',801), - ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',802), - ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',803), - ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',804), - ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',805), - ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',806), - ('pointer',1,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',835), - ('pointer',2,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',836), - ('pointer',2,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',837), - ('pointer',3,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',838), - ('type_qualifier_list',1,'p_type_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',856), - ('type_qualifier_list',2,'p_type_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',857), - ('parameter_type_list',1,'p_parameter_type_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',866), - ('parameter_type_list',3,'p_parameter_type_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',867), - ('parameter_list',1,'p_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',876), - ('parameter_list',3,'p_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',877), - ('parameter_declaration',2,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',886), - ('parameter_declaration',2,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',887), - ('parameter_declaration',1,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',888), - ('identifier_list',1,'p_identifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',897), - ('identifier_list',3,'p_identifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',898), - ('type_name',1,'p_type_name','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',911), - ('type_name',2,'p_type_name','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',912), - ('abstract_declarator',1,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',930), - ('abstract_declarator',1,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',931), - ('abstract_declarator',2,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',932), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',952), - ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',953), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',954), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',955), - ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',956), - ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',957), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',958), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',959), - ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',960), - ('initializer',1,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',998), - ('initializer',3,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',999), - ('initializer',4,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1000), - ('initializer_list',1,'p_initializer_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1005), - ('initializer_list',3,'p_initializer_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1006), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1011), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1012), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1013), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1014), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1015), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1016), - ('labeled_statement',3,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1021), - ('labeled_statement',4,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1022), - ('labeled_statement',3,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1023), - ('compound_statement',2,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1028), - ('compound_statement',3,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1029), - ('compound_statement',3,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1030), - ('compound_statement',4,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1031), - ('compound_statement',3,'p_compound_statement_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1036), - ('declaration_list',1,'p_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1042), - ('declaration_list',2,'p_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1043), - ('statement_list',1,'p_statement_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1048), - ('statement_list',2,'p_statement_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1049), - ('expression_statement',1,'p_expression_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1054), - ('expression_statement',2,'p_expression_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1055), - ('expression_statement',2,'p_expression_statement_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1060), - ('selection_statement',5,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1066), - ('selection_statement',7,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1067), - ('selection_statement',5,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1068), - ('iteration_statement',5,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1073), - ('iteration_statement',7,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1074), - ('iteration_statement',6,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1075), - ('iteration_statement',7,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1076), - ('jump_statement',3,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1081), - ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1082), - ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1083), - ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1084), - ('jump_statement',3,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1085), - ('external_declaration',1,'p_external_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1090), - ('external_declaration',1,'p_external_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1091), - ('function_definition',4,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1098), - ('function_definition',3,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1099), - ('function_definition',3,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1100), - ('function_definition',2,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1101), - ('define',3,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1106), - ('define',4,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1107), - ('define',4,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1108), - ('define',5,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1109), - ('define',6,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1110), - ('define',6,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1111), - ('define',7,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1112), - ('define',3,'p_define_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1146), - ('macro_parameter_list',1,'p_macro_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1176), - ('macro_parameter_list',3,'p_macro_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1177), + ('translation_unit',0,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',61), + ('translation_unit',2,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',62), + ('translation_unit',2,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',63), + ('identifier',1,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',72), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',73), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',74), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',75), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',76), + ('constant',1,'p_constant','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',93), + ('constant',1,'p_constant','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',94), + ('string_literal',1,'p_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',118), + ('multi_string_literal',1,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',123), + ('multi_string_literal',1,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',124), + ('multi_string_literal',2,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',125), + ('multi_string_literal',2,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',126), + ('macro_param',1,'p_macro_param','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',139), + ('macro_param',2,'p_macro_param','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',140), + ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',149), + ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',150), + ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',151), + ('primary_expression',3,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',152), + ('postfix_expression',1,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',161), + ('postfix_expression',4,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',162), + ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',163), + ('postfix_expression',4,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',164), + ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',165), + ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',166), + ('postfix_expression',2,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',167), + ('postfix_expression',2,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',168), + ('argument_expression_list',1,'p_argument_expression_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',205), + ('argument_expression_list',3,'p_argument_expression_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',206), + ('asm_expression',5,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',216), + ('asm_expression',7,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',217), + ('asm_expression',9,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',218), + ('asm_expression',11,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',219), + ('str_opt_expr_pair_list',0,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',232), + ('str_opt_expr_pair_list',1,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',233), + ('str_opt_expr_pair_list',3,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',234), + ('str_opt_expr_pair',1,'p_str_opt_expr_pair','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',239), + ('str_opt_expr_pair',4,'p_str_opt_expr_pair','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',240), + ('volatile_opt',0,'p_volatile_opt','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',245), + ('volatile_opt',1,'p_volatile_opt','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',246), + ('unary_expression',1,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',262), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',263), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',264), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',265), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',266), + ('unary_expression',4,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',267), + ('unary_expression',1,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',268), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',286), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',287), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',288), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',289), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',290), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',291), + ('cast_expression',1,'p_cast_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',297), + ('cast_expression',4,'p_cast_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',298), + ('multiplicative_expression',1,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',313), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',314), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',315), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',316), + ('additive_expression',1,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',332), + ('additive_expression',3,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',333), + ('additive_expression',3,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',334), + ('shift_expression',1,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',350), + ('shift_expression',3,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',351), + ('shift_expression',3,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',352), + ('relational_expression',1,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',370), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',371), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',372), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',373), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',374), + ('equality_expression',1,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',390), + ('equality_expression',3,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',391), + ('equality_expression',3,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',392), + ('and_expression',1,'p_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',403), + ('and_expression',3,'p_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',404), + ('exclusive_or_expression',1,'p_exclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',417), + ('exclusive_or_expression',3,'p_exclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',418), + ('inclusive_or_expression',1,'p_inclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',431), + ('inclusive_or_expression',3,'p_inclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',432), + ('logical_and_expression',1,'p_logical_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',445), + ('logical_and_expression',3,'p_logical_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',446), + ('logical_or_expression',1,'p_logical_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',459), + ('logical_or_expression',3,'p_logical_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',460), + ('conditional_expression',1,'p_conditional_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',473), + ('conditional_expression',5,'p_conditional_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',474), + ('assignment_expression',1,'p_assignment_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',496), + ('assignment_expression',3,'p_assignment_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',497), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',513), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',514), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',515), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',516), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',517), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',518), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',519), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',520), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',521), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',522), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',523), + ('expression',1,'p_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',529), + ('expression',3,'p_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',530), + ('constant_expression',1,'p_constant_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',537), + ('declaration',2,'p_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',543), + ('declaration_impl',1,'p_declaration_impl','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',551), + ('declaration_impl',2,'p_declaration_impl','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',552), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',577), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',578), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',579), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',580), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',581), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',582), + ('init_declarator_list',1,'p_init_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',591), + ('init_declarator_list',3,'p_init_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',592), + ('init_declarator',1,'p_init_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',601), + ('init_declarator',3,'p_init_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',602), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',610), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',611), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',612), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',613), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',614), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',620), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',621), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',622), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',623), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',624), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',625), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',626), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',627), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',628), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',629), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',630), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',631), + ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',641), + ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',642), + ('struct_or_union_specifier',4,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',643), + ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',644), + ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',645), + ('struct_or_union',1,'p_struct_or_union','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',662), + ('struct_or_union',1,'p_struct_or_union','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',663), + ('struct_declaration_list',1,'p_struct_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',669), + ('struct_declaration_list',2,'p_struct_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',670), + ('struct_declaration',3,'p_struct_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',679), + ('struct_declaration',2,'p_struct_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',680), + ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',695), + ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',696), + ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',697), + ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',698), + ('struct_declarator_list',1,'p_struct_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',708), + ('struct_declarator_list',3,'p_struct_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',709), + ('struct_declarator',1,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',718), + ('struct_declarator',2,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',719), + ('struct_declarator',3,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',720), + ('enum_specifier',4,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',732), + ('enum_specifier',5,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',733), + ('enum_specifier',2,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',734), + ('enumerator_list',1,'p_enumerator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',748), + ('enumerator_list',2,'p_enumerator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',749), + ('enumerator_list_iso',1,'p_enumerator_list_iso','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',757), + ('enumerator_list_iso',3,'p_enumerator_list_iso','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',758), + ('enumerator',1,'p_enumerator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',767), + ('enumerator',3,'p_enumerator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',768), + ('type_qualifier',1,'p_type_qualifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',777), + ('type_qualifier',1,'p_type_qualifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',778), + ('declarator',2,'p_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',784), + ('declarator',1,'p_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',785), + ('direct_declarator',1,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',798), + ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',799), + ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',800), + ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',801), + ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',802), + ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',803), + ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',804), + ('pointer',1,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',833), + ('pointer',2,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',834), + ('pointer',2,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',835), + ('pointer',3,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',836), + ('type_qualifier_list',1,'p_type_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',854), + ('type_qualifier_list',2,'p_type_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',855), + ('parameter_type_list',1,'p_parameter_type_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',864), + ('parameter_type_list',3,'p_parameter_type_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',865), + ('parameter_list',1,'p_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',874), + ('parameter_list',3,'p_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',875), + ('parameter_declaration',2,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',884), + ('parameter_declaration',2,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',885), + ('parameter_declaration',1,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',886), + ('identifier_list',1,'p_identifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',895), + ('identifier_list',3,'p_identifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',896), + ('type_name',1,'p_type_name','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',909), + ('type_name',2,'p_type_name','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',910), + ('abstract_declarator',1,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',928), + ('abstract_declarator',1,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',929), + ('abstract_declarator',2,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',930), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',950), + ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',951), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',952), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',953), + ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',954), + ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',955), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',956), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',957), + ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',958), + ('initializer',1,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',996), + ('initializer',3,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',997), + ('initializer',4,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',998), + ('initializer_list',1,'p_initializer_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1003), + ('initializer_list',3,'p_initializer_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1004), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1009), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1010), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1011), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1012), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1013), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1014), + ('labeled_statement',3,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1019), + ('labeled_statement',4,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1020), + ('labeled_statement',3,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1021), + ('compound_statement',2,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1026), + ('compound_statement',3,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1027), + ('compound_statement',3,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1028), + ('compound_statement',4,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1029), + ('compound_statement',3,'p_compound_statement_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1034), + ('declaration_list',1,'p_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1040), + ('declaration_list',2,'p_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1041), + ('statement_list',1,'p_statement_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1046), + ('statement_list',2,'p_statement_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1047), + ('expression_statement',1,'p_expression_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1052), + ('expression_statement',2,'p_expression_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1053), + ('expression_statement',2,'p_expression_statement_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1058), + ('selection_statement',5,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1064), + ('selection_statement',7,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1065), + ('selection_statement',5,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1066), + ('iteration_statement',5,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1071), + ('iteration_statement',7,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1072), + ('iteration_statement',6,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1073), + ('iteration_statement',7,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1074), + ('jump_statement',3,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1079), + ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1080), + ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1081), + ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1082), + ('jump_statement',3,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1083), + ('external_declaration',1,'p_external_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1088), + ('external_declaration',1,'p_external_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1089), + ('function_definition',4,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1096), + ('function_definition',3,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1097), + ('function_definition',3,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1098), + ('function_definition',2,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1099), + ('define',3,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1104), + ('define',4,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1105), + ('define',4,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1106), + ('define',5,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1107), + ('define',6,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1108), + ('define',6,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1109), + ('define',7,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1110), + ('define',3,'p_define_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1144), + ('macro_parameter_list',1,'p_macro_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1174), + ('macro_parameter_list',3,'p_macro_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1175), ] From 24c02c2fe463187342917ddffb704b423a4c58be Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 13:19:44 +0100 Subject: [PATCH 015/264] Revert "test parsetab" This reverts commit e993230269e6342b5677b06fb09fefbd5b94fad8. --- .../ctypes/ctypesgencore/parser/parsetab.py | 514 +++++++++--------- 1 file changed, 257 insertions(+), 257 deletions(-) diff --git a/lib/python/ctypes/ctypesgencore/parser/parsetab.py b/lib/python/ctypes/ctypesgencore/parser/parsetab.py index ec92d4c3ff1..74744c36eaf 100644 --- a/lib/python/ctypes/ctypesgencore/parser/parsetab.py +++ b/lib/python/ctypes/ctypesgencore/parser/parsetab.py @@ -1,5 +1,5 @@ -# /home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/parsetab.py +# /home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/parsetab.py # This file is automatically generated. Do not edit. _lr_method = 'LALR' @@ -23,260 +23,260 @@ del _lr_goto_items _lr_productions = [ ("S'",1,None,None,None), - ('translation_unit',0,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',61), - ('translation_unit',2,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',62), - ('translation_unit',2,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',63), - ('identifier',1,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',72), - ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',73), - ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',74), - ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',75), - ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',76), - ('constant',1,'p_constant','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',93), - ('constant',1,'p_constant','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',94), - ('string_literal',1,'p_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',118), - ('multi_string_literal',1,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',123), - ('multi_string_literal',1,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',124), - ('multi_string_literal',2,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',125), - ('multi_string_literal',2,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',126), - ('macro_param',1,'p_macro_param','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',139), - ('macro_param',2,'p_macro_param','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',140), - ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',149), - ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',150), - ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',151), - ('primary_expression',3,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',152), - ('postfix_expression',1,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',161), - ('postfix_expression',4,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',162), - ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',163), - ('postfix_expression',4,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',164), - ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',165), - ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',166), - ('postfix_expression',2,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',167), - ('postfix_expression',2,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',168), - ('argument_expression_list',1,'p_argument_expression_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',205), - ('argument_expression_list',3,'p_argument_expression_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',206), - ('asm_expression',5,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',216), - ('asm_expression',7,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',217), - ('asm_expression',9,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',218), - ('asm_expression',11,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',219), - ('str_opt_expr_pair_list',0,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',232), - ('str_opt_expr_pair_list',1,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',233), - ('str_opt_expr_pair_list',3,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',234), - ('str_opt_expr_pair',1,'p_str_opt_expr_pair','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',239), - ('str_opt_expr_pair',4,'p_str_opt_expr_pair','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',240), - ('volatile_opt',0,'p_volatile_opt','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',245), - ('volatile_opt',1,'p_volatile_opt','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',246), - ('unary_expression',1,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',262), - ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',263), - ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',264), - ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',265), - ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',266), - ('unary_expression',4,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',267), - ('unary_expression',1,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',268), - ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',286), - ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',287), - ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',288), - ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',289), - ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',290), - ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',291), - ('cast_expression',1,'p_cast_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',297), - ('cast_expression',4,'p_cast_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',298), - ('multiplicative_expression',1,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',313), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',314), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',315), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',316), - ('additive_expression',1,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',332), - ('additive_expression',3,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',333), - ('additive_expression',3,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',334), - ('shift_expression',1,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',350), - ('shift_expression',3,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',351), - ('shift_expression',3,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',352), - ('relational_expression',1,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',370), - ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',371), - ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',372), - ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',373), - ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',374), - ('equality_expression',1,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',390), - ('equality_expression',3,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',391), - ('equality_expression',3,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',392), - ('and_expression',1,'p_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',403), - ('and_expression',3,'p_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',404), - ('exclusive_or_expression',1,'p_exclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',417), - ('exclusive_or_expression',3,'p_exclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',418), - ('inclusive_or_expression',1,'p_inclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',431), - ('inclusive_or_expression',3,'p_inclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',432), - ('logical_and_expression',1,'p_logical_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',445), - ('logical_and_expression',3,'p_logical_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',446), - ('logical_or_expression',1,'p_logical_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',459), - ('logical_or_expression',3,'p_logical_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',460), - ('conditional_expression',1,'p_conditional_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',473), - ('conditional_expression',5,'p_conditional_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',474), - ('assignment_expression',1,'p_assignment_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',496), - ('assignment_expression',3,'p_assignment_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',497), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',513), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',514), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',515), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',516), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',517), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',518), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',519), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',520), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',521), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',522), - ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',523), - ('expression',1,'p_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',529), - ('expression',3,'p_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',530), - ('constant_expression',1,'p_constant_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',537), - ('declaration',2,'p_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',543), - ('declaration_impl',1,'p_declaration_impl','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',551), - ('declaration_impl',2,'p_declaration_impl','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',552), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',577), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',578), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',579), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',580), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',581), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',582), - ('init_declarator_list',1,'p_init_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',591), - ('init_declarator_list',3,'p_init_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',592), - ('init_declarator',1,'p_init_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',601), - ('init_declarator',3,'p_init_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',602), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',610), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',611), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',612), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',613), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',614), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',620), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',621), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',622), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',623), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',624), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',625), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',626), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',627), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',628), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',629), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',630), - ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',631), - ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',641), - ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',642), - ('struct_or_union_specifier',4,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',643), - ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',644), - ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',645), - ('struct_or_union',1,'p_struct_or_union','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',662), - ('struct_or_union',1,'p_struct_or_union','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',663), - ('struct_declaration_list',1,'p_struct_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',669), - ('struct_declaration_list',2,'p_struct_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',670), - ('struct_declaration',3,'p_struct_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',679), - ('struct_declaration',2,'p_struct_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',680), - ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',695), - ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',696), - ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',697), - ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',698), - ('struct_declarator_list',1,'p_struct_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',708), - ('struct_declarator_list',3,'p_struct_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',709), - ('struct_declarator',1,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',718), - ('struct_declarator',2,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',719), - ('struct_declarator',3,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',720), - ('enum_specifier',4,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',732), - ('enum_specifier',5,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',733), - ('enum_specifier',2,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',734), - ('enumerator_list',1,'p_enumerator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',748), - ('enumerator_list',2,'p_enumerator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',749), - ('enumerator_list_iso',1,'p_enumerator_list_iso','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',757), - ('enumerator_list_iso',3,'p_enumerator_list_iso','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',758), - ('enumerator',1,'p_enumerator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',767), - ('enumerator',3,'p_enumerator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',768), - ('type_qualifier',1,'p_type_qualifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',777), - ('type_qualifier',1,'p_type_qualifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',778), - ('declarator',2,'p_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',784), - ('declarator',1,'p_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',785), - ('direct_declarator',1,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',798), - ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',799), - ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',800), - ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',801), - ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',802), - ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',803), - ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',804), - ('pointer',1,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',833), - ('pointer',2,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',834), - ('pointer',2,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',835), - ('pointer',3,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',836), - ('type_qualifier_list',1,'p_type_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',854), - ('type_qualifier_list',2,'p_type_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',855), - ('parameter_type_list',1,'p_parameter_type_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',864), - ('parameter_type_list',3,'p_parameter_type_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',865), - ('parameter_list',1,'p_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',874), - ('parameter_list',3,'p_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',875), - ('parameter_declaration',2,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',884), - ('parameter_declaration',2,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',885), - ('parameter_declaration',1,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',886), - ('identifier_list',1,'p_identifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',895), - ('identifier_list',3,'p_identifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',896), - ('type_name',1,'p_type_name','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',909), - ('type_name',2,'p_type_name','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',910), - ('abstract_declarator',1,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',928), - ('abstract_declarator',1,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',929), - ('abstract_declarator',2,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',930), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',950), - ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',951), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',952), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',953), - ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',954), - ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',955), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',956), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',957), - ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',958), - ('initializer',1,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',996), - ('initializer',3,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',997), - ('initializer',4,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',998), - ('initializer_list',1,'p_initializer_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1003), - ('initializer_list',3,'p_initializer_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1004), - ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1009), - ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1010), - ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1011), - ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1012), - ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1013), - ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1014), - ('labeled_statement',3,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1019), - ('labeled_statement',4,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1020), - ('labeled_statement',3,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1021), - ('compound_statement',2,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1026), - ('compound_statement',3,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1027), - ('compound_statement',3,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1028), - ('compound_statement',4,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1029), - ('compound_statement',3,'p_compound_statement_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1034), - ('declaration_list',1,'p_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1040), - ('declaration_list',2,'p_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1041), - ('statement_list',1,'p_statement_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1046), - ('statement_list',2,'p_statement_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1047), - ('expression_statement',1,'p_expression_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1052), - ('expression_statement',2,'p_expression_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1053), - ('expression_statement',2,'p_expression_statement_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1058), - ('selection_statement',5,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1064), - ('selection_statement',7,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1065), - ('selection_statement',5,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1066), - ('iteration_statement',5,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1071), - ('iteration_statement',7,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1072), - ('iteration_statement',6,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1073), - ('iteration_statement',7,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1074), - ('jump_statement',3,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1079), - ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1080), - ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1081), - ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1082), - ('jump_statement',3,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1083), - ('external_declaration',1,'p_external_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1088), - ('external_declaration',1,'p_external_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1089), - ('function_definition',4,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1096), - ('function_definition',3,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1097), - ('function_definition',3,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1098), - ('function_definition',2,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1099), - ('define',3,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1104), - ('define',4,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1105), - ('define',4,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1106), - ('define',5,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1107), - ('define',6,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1108), - ('define',6,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1109), - ('define',7,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1110), - ('define',3,'p_define_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1144), - ('macro_parameter_list',1,'p_macro_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1174), - ('macro_parameter_list',3,'p_macro_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1175), + ('translation_unit',0,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',63), + ('translation_unit',2,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',64), + ('translation_unit',2,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',65), + ('identifier',1,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',74), + ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',75), + ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',76), + ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',77), + ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',78), + ('constant',1,'p_constant','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',95), + ('constant',1,'p_constant','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',96), + ('string_literal',1,'p_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',120), + ('multi_string_literal',1,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',125), + ('multi_string_literal',1,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',126), + ('multi_string_literal',2,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',127), + ('multi_string_literal',2,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',128), + ('macro_param',1,'p_macro_param','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',141), + ('macro_param',2,'p_macro_param','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',142), + ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',151), + ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',152), + ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',153), + ('primary_expression',3,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',154), + ('postfix_expression',1,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',163), + ('postfix_expression',4,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',164), + ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',165), + ('postfix_expression',4,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',166), + ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',167), + ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',168), + ('postfix_expression',2,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',169), + ('postfix_expression',2,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',170), + ('argument_expression_list',1,'p_argument_expression_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',207), + ('argument_expression_list',3,'p_argument_expression_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',208), + ('asm_expression',5,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',218), + ('asm_expression',7,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',219), + ('asm_expression',9,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',220), + ('asm_expression',11,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',221), + ('str_opt_expr_pair_list',0,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',234), + ('str_opt_expr_pair_list',1,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',235), + ('str_opt_expr_pair_list',3,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',236), + ('str_opt_expr_pair',1,'p_str_opt_expr_pair','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',241), + ('str_opt_expr_pair',4,'p_str_opt_expr_pair','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',242), + ('volatile_opt',0,'p_volatile_opt','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',247), + ('volatile_opt',1,'p_volatile_opt','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',248), + ('unary_expression',1,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',264), + ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',265), + ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',266), + ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',267), + ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',268), + ('unary_expression',4,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',269), + ('unary_expression',1,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',270), + ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',288), + ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',289), + ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',290), + ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',291), + ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',292), + ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',293), + ('cast_expression',1,'p_cast_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',299), + ('cast_expression',4,'p_cast_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',300), + ('multiplicative_expression',1,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',315), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',316), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',317), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',318), + ('additive_expression',1,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',334), + ('additive_expression',3,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',335), + ('additive_expression',3,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',336), + ('shift_expression',1,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',352), + ('shift_expression',3,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',353), + ('shift_expression',3,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',354), + ('relational_expression',1,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',372), + ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',373), + ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',374), + ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',375), + ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',376), + ('equality_expression',1,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',392), + ('equality_expression',3,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',393), + ('equality_expression',3,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',394), + ('and_expression',1,'p_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',405), + ('and_expression',3,'p_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',406), + ('exclusive_or_expression',1,'p_exclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',419), + ('exclusive_or_expression',3,'p_exclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',420), + ('inclusive_or_expression',1,'p_inclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',433), + ('inclusive_or_expression',3,'p_inclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',434), + ('logical_and_expression',1,'p_logical_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',447), + ('logical_and_expression',3,'p_logical_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',448), + ('logical_or_expression',1,'p_logical_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',461), + ('logical_or_expression',3,'p_logical_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',462), + ('conditional_expression',1,'p_conditional_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',475), + ('conditional_expression',5,'p_conditional_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',476), + ('assignment_expression',1,'p_assignment_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',498), + ('assignment_expression',3,'p_assignment_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',499), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',515), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',516), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',517), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',518), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',519), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',520), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',521), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',522), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',523), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',524), + ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',525), + ('expression',1,'p_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',531), + ('expression',3,'p_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',532), + ('constant_expression',1,'p_constant_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',539), + ('declaration',2,'p_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',545), + ('declaration_impl',1,'p_declaration_impl','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',553), + ('declaration_impl',2,'p_declaration_impl','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',554), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',579), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',580), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',581), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',582), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',583), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',584), + ('init_declarator_list',1,'p_init_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',593), + ('init_declarator_list',3,'p_init_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',594), + ('init_declarator',1,'p_init_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',603), + ('init_declarator',3,'p_init_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',604), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',612), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',613), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',614), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',615), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',616), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',622), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',623), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',624), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',625), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',626), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',627), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',628), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',629), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',630), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',631), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',632), + ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',633), + ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',643), + ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',644), + ('struct_or_union_specifier',4,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',645), + ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',646), + ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',647), + ('struct_or_union',1,'p_struct_or_union','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',664), + ('struct_or_union',1,'p_struct_or_union','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',665), + ('struct_declaration_list',1,'p_struct_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',671), + ('struct_declaration_list',2,'p_struct_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',672), + ('struct_declaration',3,'p_struct_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',681), + ('struct_declaration',2,'p_struct_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',682), + ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',697), + ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',698), + ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',699), + ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',700), + ('struct_declarator_list',1,'p_struct_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',710), + ('struct_declarator_list',3,'p_struct_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',711), + ('struct_declarator',1,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',720), + ('struct_declarator',2,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',721), + ('struct_declarator',3,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',722), + ('enum_specifier',4,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',734), + ('enum_specifier',5,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',735), + ('enum_specifier',2,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',736), + ('enumerator_list',1,'p_enumerator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',750), + ('enumerator_list',2,'p_enumerator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',751), + ('enumerator_list_iso',1,'p_enumerator_list_iso','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',759), + ('enumerator_list_iso',3,'p_enumerator_list_iso','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',760), + ('enumerator',1,'p_enumerator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',769), + ('enumerator',3,'p_enumerator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',770), + ('type_qualifier',1,'p_type_qualifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',779), + ('type_qualifier',1,'p_type_qualifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',780), + ('declarator',2,'p_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',786), + ('declarator',1,'p_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',787), + ('direct_declarator',1,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',800), + ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',801), + ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',802), + ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',803), + ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',804), + ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',805), + ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',806), + ('pointer',1,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',835), + ('pointer',2,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',836), + ('pointer',2,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',837), + ('pointer',3,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',838), + ('type_qualifier_list',1,'p_type_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',856), + ('type_qualifier_list',2,'p_type_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',857), + ('parameter_type_list',1,'p_parameter_type_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',866), + ('parameter_type_list',3,'p_parameter_type_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',867), + ('parameter_list',1,'p_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',876), + ('parameter_list',3,'p_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',877), + ('parameter_declaration',2,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',886), + ('parameter_declaration',2,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',887), + ('parameter_declaration',1,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',888), + ('identifier_list',1,'p_identifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',897), + ('identifier_list',3,'p_identifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',898), + ('type_name',1,'p_type_name','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',911), + ('type_name',2,'p_type_name','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',912), + ('abstract_declarator',1,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',930), + ('abstract_declarator',1,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',931), + ('abstract_declarator',2,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',932), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',952), + ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',953), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',954), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',955), + ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',956), + ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',957), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',958), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',959), + ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',960), + ('initializer',1,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',998), + ('initializer',3,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',999), + ('initializer',4,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1000), + ('initializer_list',1,'p_initializer_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1005), + ('initializer_list',3,'p_initializer_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1006), + ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1011), + ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1012), + ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1013), + ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1014), + ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1015), + ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1016), + ('labeled_statement',3,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1021), + ('labeled_statement',4,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1022), + ('labeled_statement',3,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1023), + ('compound_statement',2,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1028), + ('compound_statement',3,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1029), + ('compound_statement',3,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1030), + ('compound_statement',4,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1031), + ('compound_statement',3,'p_compound_statement_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1036), + ('declaration_list',1,'p_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1042), + ('declaration_list',2,'p_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1043), + ('statement_list',1,'p_statement_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1048), + ('statement_list',2,'p_statement_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1049), + ('expression_statement',1,'p_expression_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1054), + ('expression_statement',2,'p_expression_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1055), + ('expression_statement',2,'p_expression_statement_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1060), + ('selection_statement',5,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1066), + ('selection_statement',7,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1067), + ('selection_statement',5,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1068), + ('iteration_statement',5,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1073), + ('iteration_statement',7,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1074), + ('iteration_statement',6,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1075), + ('iteration_statement',7,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1076), + ('jump_statement',3,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1081), + ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1082), + ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1083), + ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1084), + ('jump_statement',3,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1085), + ('external_declaration',1,'p_external_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1090), + ('external_declaration',1,'p_external_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1091), + ('function_definition',4,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1098), + ('function_definition',3,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1099), + ('function_definition',3,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1100), + ('function_definition',2,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1101), + ('define',3,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1106), + ('define',4,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1107), + ('define',4,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1108), + ('define',5,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1109), + ('define',6,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1110), + ('define',6,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1111), + ('define',7,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1112), + ('define',3,'p_define_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1146), + ('macro_parameter_list',1,'p_macro_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1176), + ('macro_parameter_list',3,'p_macro_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1177), ] From acccffc8d482a1a6ea70f6efd174db458aef017e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 14:25:45 +0100 Subject: [PATCH 016/264] install sqlfiles to etc/sql --- lib/temporal/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/temporal/CMakeLists.txt b/lib/temporal/CMakeLists.txt index 7e18d7d4ab4..8b1873bdf4f 100644 --- a/lib/temporal/CMakeLists.txt +++ b/lib/temporal/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB SQLFILES "SQL/*.sql") -install(FILES "${SQLFILES}" DESTINATION etc/sql) - +foreach(sqlfile ${SQLFILES}) + install(FILES "${sqlfile}" DESTINATION etc/sql) +endforeach() build_library_in_subdir(lib NAME grass_temporal DEPENDS grass_dbmibase grass_datetime) From 7db449966b54f235390bb79cd6a180dbe35be7e8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 14:26:07 +0100 Subject: [PATCH 017/264] install lock, clean_temp, echo to ./etc/ --- lib/init/CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index be1078a0e26..dfddc5e00bf 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -69,18 +69,25 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} DESTINATION add_executable(echo echo.c) +# add_dependencies(echo grass_gis) +# target_link_libraries(lock grass_gis) install(TARGETS echo DESTINATION etc) add_executable(run run.c) +# add_dependencies(lock grass_gis) +# target_link_libraries(lock grass_gis) install(TARGETS run DESTINATION etc) -# add_executable(clean_temp clean_temp.c) -# install(TARGETS clean_temp DESTINATION etc) +add_executable(clean_temp clean_temp.c) +add_dependencies(clean_temp grass_gis) +target_link_libraries(clean_temp grass_gis) +install(TARGETS clean_temp DESTINATION etc) #TODO -# add_executable(lock lock.c) -# add_dependencies(lock grass_gis) -# install(TARGETS lock DESTINATION etc) +add_executable(lock lock.c) +add_dependencies(lock grass_gis grass_datetime) +target_link_libraries(lock grass_gis grass_datetime) +install(TARGETS lock DESTINATION etc) if(MINGW) add_executable(winlocale winlocale.c) From 491fe75033f4ce0d86d3ad65dc9456fd3413ab5f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 14:51:23 +0100 Subject: [PATCH 018/264] Revert "Revert "test parsetab"" This reverts commit 27040edaa6b4a96632c5dc631e5dffda3140c8e5. --- .../ctypes/ctypesgencore/parser/parsetab.py | 514 +++++++++--------- 1 file changed, 257 insertions(+), 257 deletions(-) diff --git a/lib/python/ctypes/ctypesgencore/parser/parsetab.py b/lib/python/ctypes/ctypesgencore/parser/parsetab.py index 74744c36eaf..ec92d4c3ff1 100644 --- a/lib/python/ctypes/ctypesgencore/parser/parsetab.py +++ b/lib/python/ctypes/ctypesgencore/parser/parsetab.py @@ -1,5 +1,5 @@ -# /home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/parsetab.py +# /home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/parsetab.py # This file is automatically generated. Do not edit. _lr_method = 'LALR' @@ -23,260 +23,260 @@ del _lr_goto_items _lr_productions = [ ("S'",1,None,None,None), - ('translation_unit',0,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',63), - ('translation_unit',2,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',64), - ('translation_unit',2,'p_translation_unit','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',65), - ('identifier',1,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',74), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',75), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',76), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',77), - ('identifier',3,'p_identifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',78), - ('constant',1,'p_constant','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',95), - ('constant',1,'p_constant','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',96), - ('string_literal',1,'p_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',120), - ('multi_string_literal',1,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',125), - ('multi_string_literal',1,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',126), - ('multi_string_literal',2,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',127), - ('multi_string_literal',2,'p_multi_string_literal','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',128), - ('macro_param',1,'p_macro_param','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',141), - ('macro_param',2,'p_macro_param','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',142), - ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',151), - ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',152), - ('primary_expression',1,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',153), - ('primary_expression',3,'p_primary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',154), - ('postfix_expression',1,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',163), - ('postfix_expression',4,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',164), - ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',165), - ('postfix_expression',4,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',166), - ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',167), - ('postfix_expression',3,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',168), - ('postfix_expression',2,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',169), - ('postfix_expression',2,'p_postfix_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',170), - ('argument_expression_list',1,'p_argument_expression_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',207), - ('argument_expression_list',3,'p_argument_expression_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',208), - ('asm_expression',5,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',218), - ('asm_expression',7,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',219), - ('asm_expression',9,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',220), - ('asm_expression',11,'p_asm_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',221), - ('str_opt_expr_pair_list',0,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',234), - ('str_opt_expr_pair_list',1,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',235), - ('str_opt_expr_pair_list',3,'p_str_opt_expr_pair_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',236), - ('str_opt_expr_pair',1,'p_str_opt_expr_pair','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',241), - ('str_opt_expr_pair',4,'p_str_opt_expr_pair','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',242), - ('volatile_opt',0,'p_volatile_opt','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',247), - ('volatile_opt',1,'p_volatile_opt','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',248), - ('unary_expression',1,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',264), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',265), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',266), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',267), - ('unary_expression',2,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',268), - ('unary_expression',4,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',269), - ('unary_expression',1,'p_unary_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',270), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',288), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',289), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',290), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',291), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',292), - ('unary_operator',1,'p_unary_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',293), - ('cast_expression',1,'p_cast_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',299), - ('cast_expression',4,'p_cast_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',300), - ('multiplicative_expression',1,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',315), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',316), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',317), - ('multiplicative_expression',3,'p_multiplicative_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',318), - ('additive_expression',1,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',334), - ('additive_expression',3,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',335), - ('additive_expression',3,'p_additive_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',336), - ('shift_expression',1,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',352), - ('shift_expression',3,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',353), - ('shift_expression',3,'p_shift_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',354), - ('relational_expression',1,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',372), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',373), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',374), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',375), - ('relational_expression',3,'p_relational_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',376), - ('equality_expression',1,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',392), - ('equality_expression',3,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',393), - ('equality_expression',3,'p_equality_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',394), - ('and_expression',1,'p_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',405), - ('and_expression',3,'p_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',406), - ('exclusive_or_expression',1,'p_exclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',419), - ('exclusive_or_expression',3,'p_exclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',420), - ('inclusive_or_expression',1,'p_inclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',433), - ('inclusive_or_expression',3,'p_inclusive_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',434), - ('logical_and_expression',1,'p_logical_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',447), - ('logical_and_expression',3,'p_logical_and_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',448), - ('logical_or_expression',1,'p_logical_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',461), - ('logical_or_expression',3,'p_logical_or_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',462), - ('conditional_expression',1,'p_conditional_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',475), - ('conditional_expression',5,'p_conditional_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',476), - ('assignment_expression',1,'p_assignment_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',498), - ('assignment_expression',3,'p_assignment_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',499), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',515), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',516), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',517), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',518), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',519), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',520), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',521), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',522), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',523), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',524), - ('assignment_operator',1,'p_assignment_operator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',525), - ('expression',1,'p_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',531), - ('expression',3,'p_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',532), - ('constant_expression',1,'p_constant_expression','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',539), - ('declaration',2,'p_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',545), - ('declaration_impl',1,'p_declaration_impl','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',553), - ('declaration_impl',2,'p_declaration_impl','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',554), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',579), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',580), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',581), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',582), - ('declaration_specifiers',1,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',583), - ('declaration_specifiers',2,'p_declaration_specifiers','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',584), - ('init_declarator_list',1,'p_init_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',593), - ('init_declarator_list',3,'p_init_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',594), - ('init_declarator',1,'p_init_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',603), - ('init_declarator',3,'p_init_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',604), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',612), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',613), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',614), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',615), - ('storage_class_specifier',1,'p_storage_class_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',616), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',622), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',623), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',624), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',625), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',626), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',627), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',628), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',629), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',630), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',631), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',632), - ('type_specifier',1,'p_type_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',633), - ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',643), - ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',644), - ('struct_or_union_specifier',4,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',645), - ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',646), - ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',647), - ('struct_or_union',1,'p_struct_or_union','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',664), - ('struct_or_union',1,'p_struct_or_union','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',665), - ('struct_declaration_list',1,'p_struct_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',671), - ('struct_declaration_list',2,'p_struct_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',672), - ('struct_declaration',3,'p_struct_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',681), - ('struct_declaration',2,'p_struct_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',682), - ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',697), - ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',698), - ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',699), - ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',700), - ('struct_declarator_list',1,'p_struct_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',710), - ('struct_declarator_list',3,'p_struct_declarator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',711), - ('struct_declarator',1,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',720), - ('struct_declarator',2,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',721), - ('struct_declarator',3,'p_struct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',722), - ('enum_specifier',4,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',734), - ('enum_specifier',5,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',735), - ('enum_specifier',2,'p_enum_specifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',736), - ('enumerator_list',1,'p_enumerator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',750), - ('enumerator_list',2,'p_enumerator_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',751), - ('enumerator_list_iso',1,'p_enumerator_list_iso','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',759), - ('enumerator_list_iso',3,'p_enumerator_list_iso','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',760), - ('enumerator',1,'p_enumerator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',769), - ('enumerator',3,'p_enumerator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',770), - ('type_qualifier',1,'p_type_qualifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',779), - ('type_qualifier',1,'p_type_qualifier','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',780), - ('declarator',2,'p_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',786), - ('declarator',1,'p_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',787), - ('direct_declarator',1,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',800), - ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',801), - ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',802), - ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',803), - ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',804), - ('direct_declarator',4,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',805), - ('direct_declarator',3,'p_direct_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',806), - ('pointer',1,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',835), - ('pointer',2,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',836), - ('pointer',2,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',837), - ('pointer',3,'p_pointer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',838), - ('type_qualifier_list',1,'p_type_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',856), - ('type_qualifier_list',2,'p_type_qualifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',857), - ('parameter_type_list',1,'p_parameter_type_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',866), - ('parameter_type_list',3,'p_parameter_type_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',867), - ('parameter_list',1,'p_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',876), - ('parameter_list',3,'p_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',877), - ('parameter_declaration',2,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',886), - ('parameter_declaration',2,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',887), - ('parameter_declaration',1,'p_parameter_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',888), - ('identifier_list',1,'p_identifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',897), - ('identifier_list',3,'p_identifier_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',898), - ('type_name',1,'p_type_name','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',911), - ('type_name',2,'p_type_name','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',912), - ('abstract_declarator',1,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',930), - ('abstract_declarator',1,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',931), - ('abstract_declarator',2,'p_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',932), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',952), - ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',953), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',954), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',955), - ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',956), - ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',957), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',958), - ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',959), - ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',960), - ('initializer',1,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',998), - ('initializer',3,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',999), - ('initializer',4,'p_initializer','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1000), - ('initializer_list',1,'p_initializer_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1005), - ('initializer_list',3,'p_initializer_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1006), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1011), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1012), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1013), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1014), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1015), - ('statement',1,'p_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1016), - ('labeled_statement',3,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1021), - ('labeled_statement',4,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1022), - ('labeled_statement',3,'p_labeled_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1023), - ('compound_statement',2,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1028), - ('compound_statement',3,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1029), - ('compound_statement',3,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1030), - ('compound_statement',4,'p_compound_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1031), - ('compound_statement',3,'p_compound_statement_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1036), - ('declaration_list',1,'p_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1042), - ('declaration_list',2,'p_declaration_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1043), - ('statement_list',1,'p_statement_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1048), - ('statement_list',2,'p_statement_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1049), - ('expression_statement',1,'p_expression_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1054), - ('expression_statement',2,'p_expression_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1055), - ('expression_statement',2,'p_expression_statement_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1060), - ('selection_statement',5,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1066), - ('selection_statement',7,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1067), - ('selection_statement',5,'p_selection_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1068), - ('iteration_statement',5,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1073), - ('iteration_statement',7,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1074), - ('iteration_statement',6,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1075), - ('iteration_statement',7,'p_iteration_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1076), - ('jump_statement',3,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1081), - ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1082), - ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1083), - ('jump_statement',2,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1084), - ('jump_statement',3,'p_jump_statement','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1085), - ('external_declaration',1,'p_external_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1090), - ('external_declaration',1,'p_external_declaration','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1091), - ('function_definition',4,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1098), - ('function_definition',3,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1099), - ('function_definition',3,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1100), - ('function_definition',2,'p_function_definition','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1101), - ('define',3,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1106), - ('define',4,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1107), - ('define',4,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1108), - ('define',5,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1109), - ('define',6,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1110), - ('define',6,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1111), - ('define',7,'p_define','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1112), - ('define',3,'p_define_error','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1146), - ('macro_parameter_list',1,'p_macro_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1176), - ('macro_parameter_list',3,'p_macro_parameter_list','/home/pietro/docdat/src/gis/grass_git/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1177), + ('translation_unit',0,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',61), + ('translation_unit',2,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',62), + ('translation_unit',2,'p_translation_unit','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',63), + ('identifier',1,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',72), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',73), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',74), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',75), + ('identifier',3,'p_identifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',76), + ('constant',1,'p_constant','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',93), + ('constant',1,'p_constant','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',94), + ('string_literal',1,'p_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',118), + ('multi_string_literal',1,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',123), + ('multi_string_literal',1,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',124), + ('multi_string_literal',2,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',125), + ('multi_string_literal',2,'p_multi_string_literal','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',126), + ('macro_param',1,'p_macro_param','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',139), + ('macro_param',2,'p_macro_param','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',140), + ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',149), + ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',150), + ('primary_expression',1,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',151), + ('primary_expression',3,'p_primary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',152), + ('postfix_expression',1,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',161), + ('postfix_expression',4,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',162), + ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',163), + ('postfix_expression',4,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',164), + ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',165), + ('postfix_expression',3,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',166), + ('postfix_expression',2,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',167), + ('postfix_expression',2,'p_postfix_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',168), + ('argument_expression_list',1,'p_argument_expression_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',205), + ('argument_expression_list',3,'p_argument_expression_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',206), + ('asm_expression',5,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',216), + ('asm_expression',7,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',217), + ('asm_expression',9,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',218), + ('asm_expression',11,'p_asm_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',219), + ('str_opt_expr_pair_list',0,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',232), + ('str_opt_expr_pair_list',1,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',233), + ('str_opt_expr_pair_list',3,'p_str_opt_expr_pair_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',234), + ('str_opt_expr_pair',1,'p_str_opt_expr_pair','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',239), + ('str_opt_expr_pair',4,'p_str_opt_expr_pair','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',240), + ('volatile_opt',0,'p_volatile_opt','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',245), + ('volatile_opt',1,'p_volatile_opt','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',246), + ('unary_expression',1,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',262), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',263), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',264), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',265), + ('unary_expression',2,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',266), + ('unary_expression',4,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',267), + ('unary_expression',1,'p_unary_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',268), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',286), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',287), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',288), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',289), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',290), + ('unary_operator',1,'p_unary_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',291), + ('cast_expression',1,'p_cast_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',297), + ('cast_expression',4,'p_cast_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',298), + ('multiplicative_expression',1,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',313), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',314), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',315), + ('multiplicative_expression',3,'p_multiplicative_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',316), + ('additive_expression',1,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',332), + ('additive_expression',3,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',333), + ('additive_expression',3,'p_additive_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',334), + ('shift_expression',1,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',350), + ('shift_expression',3,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',351), + ('shift_expression',3,'p_shift_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',352), + ('relational_expression',1,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',370), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',371), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',372), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',373), + ('relational_expression',3,'p_relational_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',374), + ('equality_expression',1,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',390), + ('equality_expression',3,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',391), + ('equality_expression',3,'p_equality_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',392), + ('and_expression',1,'p_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',403), + ('and_expression',3,'p_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',404), + ('exclusive_or_expression',1,'p_exclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',417), + ('exclusive_or_expression',3,'p_exclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',418), + ('inclusive_or_expression',1,'p_inclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',431), + ('inclusive_or_expression',3,'p_inclusive_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',432), + ('logical_and_expression',1,'p_logical_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',445), + ('logical_and_expression',3,'p_logical_and_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',446), + ('logical_or_expression',1,'p_logical_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',459), + ('logical_or_expression',3,'p_logical_or_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',460), + ('conditional_expression',1,'p_conditional_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',473), + ('conditional_expression',5,'p_conditional_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',474), + ('assignment_expression',1,'p_assignment_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',496), + ('assignment_expression',3,'p_assignment_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',497), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',513), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',514), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',515), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',516), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',517), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',518), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',519), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',520), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',521), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',522), + ('assignment_operator',1,'p_assignment_operator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',523), + ('expression',1,'p_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',529), + ('expression',3,'p_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',530), + ('constant_expression',1,'p_constant_expression','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',537), + ('declaration',2,'p_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',543), + ('declaration_impl',1,'p_declaration_impl','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',551), + ('declaration_impl',2,'p_declaration_impl','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',552), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',577), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',578), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',579), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',580), + ('declaration_specifiers',1,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',581), + ('declaration_specifiers',2,'p_declaration_specifiers','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',582), + ('init_declarator_list',1,'p_init_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',591), + ('init_declarator_list',3,'p_init_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',592), + ('init_declarator',1,'p_init_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',601), + ('init_declarator',3,'p_init_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',602), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',610), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',611), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',612), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',613), + ('storage_class_specifier',1,'p_storage_class_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',614), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',620), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',621), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',622), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',623), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',624), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',625), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',626), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',627), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',628), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',629), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',630), + ('type_specifier',1,'p_type_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',631), + ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',641), + ('struct_or_union_specifier',5,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',642), + ('struct_or_union_specifier',4,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',643), + ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',644), + ('struct_or_union_specifier',2,'p_struct_or_union_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',645), + ('struct_or_union',1,'p_struct_or_union','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',662), + ('struct_or_union',1,'p_struct_or_union','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',663), + ('struct_declaration_list',1,'p_struct_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',669), + ('struct_declaration_list',2,'p_struct_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',670), + ('struct_declaration',3,'p_struct_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',679), + ('struct_declaration',2,'p_struct_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',680), + ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',695), + ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',696), + ('specifier_qualifier_list',2,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',697), + ('specifier_qualifier_list',1,'p_specifier_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',698), + ('struct_declarator_list',1,'p_struct_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',708), + ('struct_declarator_list',3,'p_struct_declarator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',709), + ('struct_declarator',1,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',718), + ('struct_declarator',2,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',719), + ('struct_declarator',3,'p_struct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',720), + ('enum_specifier',4,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',732), + ('enum_specifier',5,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',733), + ('enum_specifier',2,'p_enum_specifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',734), + ('enumerator_list',1,'p_enumerator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',748), + ('enumerator_list',2,'p_enumerator_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',749), + ('enumerator_list_iso',1,'p_enumerator_list_iso','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',757), + ('enumerator_list_iso',3,'p_enumerator_list_iso','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',758), + ('enumerator',1,'p_enumerator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',767), + ('enumerator',3,'p_enumerator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',768), + ('type_qualifier',1,'p_type_qualifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',777), + ('type_qualifier',1,'p_type_qualifier','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',778), + ('declarator',2,'p_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',784), + ('declarator',1,'p_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',785), + ('direct_declarator',1,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',798), + ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',799), + ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',800), + ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',801), + ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',802), + ('direct_declarator',4,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',803), + ('direct_declarator',3,'p_direct_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',804), + ('pointer',1,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',833), + ('pointer',2,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',834), + ('pointer',2,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',835), + ('pointer',3,'p_pointer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',836), + ('type_qualifier_list',1,'p_type_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',854), + ('type_qualifier_list',2,'p_type_qualifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',855), + ('parameter_type_list',1,'p_parameter_type_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',864), + ('parameter_type_list',3,'p_parameter_type_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',865), + ('parameter_list',1,'p_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',874), + ('parameter_list',3,'p_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',875), + ('parameter_declaration',2,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',884), + ('parameter_declaration',2,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',885), + ('parameter_declaration',1,'p_parameter_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',886), + ('identifier_list',1,'p_identifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',895), + ('identifier_list',3,'p_identifier_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',896), + ('type_name',1,'p_type_name','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',909), + ('type_name',2,'p_type_name','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',910), + ('abstract_declarator',1,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',928), + ('abstract_declarator',1,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',929), + ('abstract_declarator',2,'p_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',930), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',950), + ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',951), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',952), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',953), + ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',954), + ('direct_abstract_declarator',2,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',955), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',956), + ('direct_abstract_declarator',3,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',957), + ('direct_abstract_declarator',4,'p_direct_abstract_declarator','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',958), + ('initializer',1,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',996), + ('initializer',3,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',997), + ('initializer',4,'p_initializer','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',998), + ('initializer_list',1,'p_initializer_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1003), + ('initializer_list',3,'p_initializer_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1004), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1009), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1010), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1011), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1012), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1013), + ('statement',1,'p_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1014), + ('labeled_statement',3,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1019), + ('labeled_statement',4,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1020), + ('labeled_statement',3,'p_labeled_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1021), + ('compound_statement',2,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1026), + ('compound_statement',3,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1027), + ('compound_statement',3,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1028), + ('compound_statement',4,'p_compound_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1029), + ('compound_statement',3,'p_compound_statement_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1034), + ('declaration_list',1,'p_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1040), + ('declaration_list',2,'p_declaration_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1041), + ('statement_list',1,'p_statement_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1046), + ('statement_list',2,'p_statement_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1047), + ('expression_statement',1,'p_expression_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1052), + ('expression_statement',2,'p_expression_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1053), + ('expression_statement',2,'p_expression_statement_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1058), + ('selection_statement',5,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1064), + ('selection_statement',7,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1065), + ('selection_statement',5,'p_selection_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1066), + ('iteration_statement',5,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1071), + ('iteration_statement',7,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1072), + ('iteration_statement',6,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1073), + ('iteration_statement',7,'p_iteration_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1074), + ('jump_statement',3,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1079), + ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1080), + ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1081), + ('jump_statement',2,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1082), + ('jump_statement',3,'p_jump_statement','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1083), + ('external_declaration',1,'p_external_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1088), + ('external_declaration',1,'p_external_declaration','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1089), + ('function_definition',4,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1096), + ('function_definition',3,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1097), + ('function_definition',3,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1098), + ('function_definition',2,'p_function_definition','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1099), + ('define',3,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1104), + ('define',4,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1105), + ('define',4,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1106), + ('define',5,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1107), + ('define',6,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1108), + ('define',6,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1109), + ('define',7,'p_define','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1110), + ('define',3,'p_define_error','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1144), + ('macro_parameter_list',1,'p_macro_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1174), + ('macro_parameter_list',3,'p_macro_parameter_list','/home/rashad/projects/grass/grass-ci/lib/python/ctypes/ctypesgencore/parser/cgrammar.py',1175), ] From 22f947a4f83b00ba0fa5fc590428bc769eb004c5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 15:17:45 +0100 Subject: [PATCH 019/264] fix on py2.7 --- lib/python/ctypes/ctypesgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/ctypes/ctypesgen.py b/lib/python/ctypes/ctypesgen.py index 0092f1b342f..cdcaceaf7f5 100755 --- a/lib/python/ctypes/ctypesgen.py +++ b/lib/python/ctypes/ctypesgen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2.7 def find_names_in_modules(modules): From d24d66584de9bc3702676c567d68a31280b71537 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 15:17:57 +0100 Subject: [PATCH 020/264] install libs --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 030b6193cec..e990903981d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,7 @@ function(build_module) target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) + install(TARGETS ${G_NAME} DESTINATION lib) endfunction() From 70dc76cf0cfafbf09ffca93263119fe61f4c79fd Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 15:18:14 +0100 Subject: [PATCH 021/264] link with dl lib --- lib/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 863c3f5a6d0..b0d86c9964b 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -4,17 +4,19 @@ build_library_in_subdir(datetime) -set(DL_LIBRARY) add_subdirectory(gis) -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - find_library(DL_LIBRARY dl) -endif() build_library_in_subdir(raster DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" - DEPENDS GDAL PROJ4 ${DL_LIBRARY} + DEPENDS GDAL PROJ4 ) + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + find_library(DL_LIBRARY dl) + target_link_libraries(grass_raster ${DL_LIBRARY}) +endif() + configure_file(external/ccmath/ccmath.h ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h COPYONLY) From 5719c6088645cf1ba9cba0c70530b3e961ee28a3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 15:18:52 +0100 Subject: [PATCH 022/264] cleanup cmake code --- lib/init/CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index dfddc5e00bf..902aade59f5 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -66,16 +66,10 @@ configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} @ONL install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} DESTINATION bin) - - add_executable(echo echo.c) -# add_dependencies(echo grass_gis) -# target_link_libraries(lock grass_gis) install(TARGETS echo DESTINATION etc) add_executable(run run.c) -# add_dependencies(lock grass_gis) -# target_link_libraries(lock grass_gis) install(TARGETS run DESTINATION etc) add_executable(clean_temp clean_temp.c) @@ -83,7 +77,6 @@ add_dependencies(clean_temp grass_gis) target_link_libraries(clean_temp grass_gis) install(TARGETS clean_temp DESTINATION etc) -#TODO add_executable(lock lock.c) add_dependencies(lock grass_gis grass_datetime) target_link_libraries(lock grass_gis grass_datetime) From 47ffe48463a46c31395f02c2236feaa16423ac55 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 17:48:05 +0100 Subject: [PATCH 023/264] fix python script & lib install dirs --- cmake/scripts.cmake | 4 +++- lib/init/CMakeLists.txt | 5 ++++- lib/python/CMakeLists.txt | 21 ++++++++++++++------- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/cmake/scripts.cmake b/cmake/scripts.cmake index 8b7fb67d216..83afd21ed55 100644 --- a/cmake/scripts.cmake +++ b/cmake/scripts.cmake @@ -77,7 +77,9 @@ foreach(pyfile ${SRC_FILES}) add_dependencies(${G_DEPEND}) endforeach() - install(FILES ${pyfile} DESTINATION etc) + install(FILES ${pyfile} + RENAME ${pyfile_NAME} + DESTINATION scripts) endforeach() endfunction() diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 902aade59f5..ec4efc2239a 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -44,11 +44,14 @@ if(UNIX OR MINGW) endif() configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.tmp @ONLY) +set(RUN_GISBASE "${CMAKE_INSTALL_PREFIX}") set(GISBASE "${RUN_GISBASE}") configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.py @ONLY) - +install(PROGRAMS ${CMAKE_BINARY_DIR}/${START_UP}.py + DESTINATION bin) #rest here + set(GISBASE "" ) #${RUN_GISBASE}") if(UNIX OR MINGW) if( DEFINED ENV{LD_LIBRARY_PATH}) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 49ed88532b7..3a116cce3b8 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -6,9 +6,16 @@ function(build_pyfiles_in_sudir gpy_dir_name) endif() get_filename_component(gpy_name ${gpy_dir_name} NAME) - - foreach(gpy_file ${gpy_files}) - + string(REPLACE "/" ";" input_list "${gpy_dir_name}") + + list(LENGTH input_list input_list_LEN) + if(input_list_LEN EQUAL 1) + set(dest_dir ${gpy_dir_name}) + else() + list(GET input_list 0 dest_dir) + endif() + + foreach(gpy_file ${gpy_files}) if(NOT IS_ABSOLUTE ${gpy_file}) #message("gpy_file=${gpy_dir_name}/${gpy_file}") get_filename_component(gpy_file ${gpy_dir_name}/${gpy_file} REALPATH) @@ -43,7 +50,7 @@ function(build_pyfiles_in_sudir gpy_dir_name) #set_source_files_properties("${gpy_file}c" GENERATED) #message(" ${gpy_dir_name} | DESTINATION etc/python/${gpy_dir_name} ") - install(FILES ${gpy_file} DESTINATION etc/python/${gpy_name} ) + install(FILES ${gpy_file} DESTINATION etc/python/grass/${dest_dir} ) endforeach() endfunction() @@ -56,7 +63,7 @@ configure_file( script/setup.py ${CMAKE_BINARY_DIR}/lib/python/script/setup.py COPYONLY) -build_pyfiles_in_sudir(script +build_pyfiles_in_sudir(script core.py db.py raster.py @@ -80,10 +87,10 @@ build_pyfiles_in_sudir(script # ctypes_preamble.py ctypes_loader.py # ) - add_subdirectory(ctypes) +add_subdirectory(ctypes) - build_pyfiles_in_sudir(temporal + build_pyfiles_in_sudir(temporal base.py core.py abstract_dataset.py From 4b382602e39e3b1dc38eccac506c93bab1b58b55 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 17:51:10 +0100 Subject: [PATCH 024/264] fixed gisbase for grass startup script --- lib/init/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index ec4efc2239a..b1e985e5df1 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -50,9 +50,6 @@ configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.py @ONLY) install(PROGRAMS ${CMAKE_BINARY_DIR}/${START_UP}.py DESTINATION bin) -#rest here - -set(GISBASE "" ) #${RUN_GISBASE}") if(UNIX OR MINGW) if( DEFINED ENV{LD_LIBRARY_PATH}) set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}:${CMAKE_INSTALL_PREFIX}/lib") From 39753a3fa7224a77ea2f1e2218963477e8fcbe67 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 17:53:07 +0100 Subject: [PATCH 025/264] call correct python interp with version --- lib/init/grass.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init/grass.sh b/lib/init/grass.sh index 3605fbb157c..554c4170826 100755 --- a/lib/init/grass.sh +++ b/lib/init/grass.sh @@ -24,7 +24,7 @@ trap "echo 'User break!' ; exit" 2 3 9 15 if [ -z "$GRASS_PYTHON" ] ; then - GRASS_PYTHON=python + GRASS_PYTHON=python2.7 fi export GRASS_PYTHON From 6634794ea1b0e171620861c58a2e5538d86b2200 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 18:04:41 +0100 Subject: [PATCH 026/264] install modules to bin --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e990903981d..7a02f554736 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,12 @@ function(build_module) target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) - install(TARGETS ${G_NAME} DESTINATION lib) + if(G_EXE) + install(TARGETS ${G_NAME} DESTINATION bin) + else() + install(TARGETS ${G_NAME} DESTINATION lib) + endif() + endfunction() From 44ecfa66f60ddc6d436da935b8d1bd8aa52cd2f0 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 18:05:14 +0100 Subject: [PATCH 027/264] add PNG as dependency to r.out.png --- raster/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index 8bc1216adf6..b6e28593dfe 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -204,7 +204,7 @@ build_program_in_subdir( build_program_in_subdir( r.out.png - DEPENDS grass_gis grass_raster) + DEPENDS grass_gis grass_raster LIBPNG) build_program_in_subdir( r.out.pov From f4db409417163195b39e6ab6d5a50960440dccfe Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 18:05:33 +0100 Subject: [PATCH 028/264] install __init__.py --- lib/python/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 3a116cce3b8..b80086fb466 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -184,3 +184,5 @@ add_subdirectory(ctypes) case.py gmodules.py loader.py runner.py checkers.py gutils.py invoker.py main.py reporters.py utils.py) + +install(FILES __init__.py DESTINATION etc/python/grass) From 017d3f6e799c902cdc2c5ae74ab4015a732a6483 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 18:10:39 +0100 Subject: [PATCH 029/264] wrong install dir for python api --- lib/python/CMakeLists.txt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index b80086fb466..5514c0f38b3 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -6,14 +6,6 @@ function(build_pyfiles_in_sudir gpy_dir_name) endif() get_filename_component(gpy_name ${gpy_dir_name} NAME) - string(REPLACE "/" ";" input_list "${gpy_dir_name}") - - list(LENGTH input_list input_list_LEN) - if(input_list_LEN EQUAL 1) - set(dest_dir ${gpy_dir_name}) - else() - list(GET input_list 0 dest_dir) - endif() foreach(gpy_file ${gpy_files}) if(NOT IS_ABSOLUTE ${gpy_file}) @@ -49,8 +41,8 @@ function(build_pyfiles_in_sudir gpy_dir_name) #set_source_files_properties("${gpy_file}c" GENERATED) - #message(" ${gpy_dir_name} | DESTINATION etc/python/${gpy_dir_name} ") - install(FILES ${gpy_file} DESTINATION etc/python/grass/${dest_dir} ) + + install(FILES ${gpy_file} DESTINATION etc/python/grass/${gpy_dir_name} ) endforeach() endfunction() From 5fc8388de962ba43d948f2ee05d5657ef5272aa9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 18:18:38 +0100 Subject: [PATCH 030/264] install with rpath to avoid LD_LIBRARY_PATH --- CMakeLists.txt | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a02f554736..805e2545fbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,13 +17,26 @@ option(WITH_BZLIB "enable sqlite support" ON) option(WITH_BLAS "enable sqlite support" ON) option(WITH_LAPACK "enable sqlite support" ON) +if(APPLE) + if(POLICY CMP0042) + cmake_policy(SET CMP0042 NEW) + endif() + set(CMAKE_MACOSX_RPATH TRUE) +endif() + +set(CMAKE_SKIP_BUILD_RPATH FALSE) +set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) +if("${isSystemDir}" STREQUAL "-1") + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +endif("${isSystemDir}" STREQUAL "-1") + set(GRASS_VERSION_MAJOR) set(GRASS_VERSION_MINOR) set(GRASS_VERSION_PATCH) - - -#TODO set(GRASS_VERSION_UPDATE_PKG "0.2") set(BUILD_ARCH "x86_64") From f31945fdeb8c3d0bc33131678ae8a409fdbf8afc Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 28 Jan 2018 18:41:13 +0100 Subject: [PATCH 031/264] whitespace fixes --- thirdparty/CMakeLists.txt | 78 ++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 47 deletions(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index b3431c75be5..3bf5bb319ed 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -5,39 +5,39 @@ find_package(BISON REQUIRED) find_package(GDAL REQUIRED) add_library(GDAL INTERFACE IMPORTED GLOBAL) -set_property( TARGET GDAL PROPERTY INTERFACE_LINK_LIBRARIES ${GDAL_LIBRARY} ) -set_property( TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_DIRS} ) +set_property(TARGET GDAL PROPERTY INTERFACE_LINK_LIBRARIES ${GDAL_LIBRARY} ) +set_property(TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_DIRS} ) find_package(PNG REQUIRED) add_library(LIBPNG INTERFACE IMPORTED GLOBAL) -set_property( TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY} ) -set_property( TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) +set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY} ) +set_property(TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) find_package(JPEG) if(JPEG_FOUND) add_library(LIBJPEG INTERFACE IMPORTED GLOBAL) - set_property( TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY} ) - set_property( TARGET LIBJPEG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR} ) + set_property(TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY} ) + set_property(TARGET LIBJPEG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR} ) endif() find_package(ZLIB REQUIRED) add_library(ZLIB INTERFACE IMPORTED GLOBAL) -set_property( TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY} ) -set_property( TARGET ZLIB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR} ) +set_property(TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY} ) +set_property(TARGET ZLIB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR} ) find_library(M_LIBRARY m) add_library(LIBM INTERFACE IMPORTED GLOBAL) -set_property( TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) +set_property(TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) find_package(PROJ4 REQUIRED) add_library(PROJ4 INTERFACE IMPORTED GLOBAL) -set_property( TARGET PROJ4 PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) -set_property( TARGET PROJ4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIR} ) +set_property(TARGET PROJ4 PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) +set_property(TARGET PROJ4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIR} ) find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) -set_property( TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY} ) -set_property( TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) +set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY} ) +set_property(TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) find_package(FFTW REQUIRED) if(FFTW_FOUND) @@ -49,8 +49,8 @@ endif() if(WITH_CAIRO) find_package(Cairo REQUIRED) add_library(CAIRO INTERFACE IMPORTED GLOBAL) - set_property( TARGET CAIRO PROPERTY INTERFACE_LINK_LIBRARIES ${CAIRO_LIBRARIES} ) - set_property( TARGET CAIRO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIRS} ) + set_property(TARGET CAIRO PROPERTY INTERFACE_LINK_LIBRARIES ${CAIRO_LIBRARIES} ) + set_property(TARGET CAIRO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIRS} ) endif() if(WITH_X11) @@ -76,33 +76,30 @@ set_property(TARGET ICONV PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICONV_INCLUD endif() if(WITH_BZLIB) -find_package(BZip2) -if(BZIP2_FOUND) -add_library(BZIP2 INTERFACE IMPORTED GLOBAL) -set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARIES} ) -set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") -endif() + find_package(BZip2) + if(BZIP2_FOUND) + add_library(BZIP2 INTERFACE IMPORTED GLOBAL) + set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARIES} ) + set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") + endif() endif() if(WITH_BLAS) -find_package(BLAS) -if(BLAS_FOUND) -add_library(BLAS INTERFACE IMPORTED GLOBAL) -set_property(TARGET BLAS PROPERTY INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ) -#set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIR}") -endif() + find_package(BLAS) + if(BLAS_FOUND) + add_library(BLAS INTERFACE IMPORTED GLOBAL) + set_property(TARGET BLAS PROPERTY INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ) + endif() endif() if(WITH_LAPACK) -find_package(LAPACK) -if(LAPACK_FOUND) -add_library(LAPACK INTERFACE IMPORTED GLOBAL) -set_property(TARGET LAPACK PROPERTY INTERFACE_LINK_LIBRARIES ${LAPACK_LIBRARIES} ) -#set_property(TARGET LAPACK PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIR}") -endif() + find_package(LAPACK) + if(LAPACK_FOUND) + add_library(LAPACK INTERFACE IMPORTED GLOBAL) + set_property(TARGET LAPACK PROPERTY INTERFACE_LINK_LIBRARIES ${LAPACK_LIBRARIES} ) + endif() endif() - if(WITH_OPENGL) find_package(OpenGL REQUIRED) add_library(OPENGL INTERFACE IMPORTED GLOBAL) @@ -117,7 +114,6 @@ if(WITH_POSTGRES) set_property(TARGET POSTGRES PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PostgreSQL_INCLUDE_DIRS} ) endif() - if(WITH_SQLITE) find_package(SQLite REQUIRED) add_library(SQLITE INTERFACE IMPORTED GLOBAL) @@ -125,7 +121,6 @@ if(WITH_SQLITE) set_property(TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIR} ) endif() - find_package(GEOS REQUIRED) add_library(GEOS INTERFACE IMPORTED GLOBAL) set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_LIBRARIES} ) @@ -157,16 +152,5 @@ find_package (PythonInterp REQUIRED ) -# message("found gdal") - -# if(TARGET LIB_GDAL) -# message("GRASSLIB_DEPEND=LIB_GDAL") -# get_target_property(VAR LIB_GDAL INTERFACE_INCLUDE_DIRECTORIES) -# message("VAR=${VAR}") -# endif() - -#$ -#$ - From baefee5d613fac41cc4086cfbd602c02aff818c9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 01:13:17 +0100 Subject: [PATCH 032/264] MSVC: check for _WIN32 to use msvc and mingw32 --- include/iostream/rtimer.h | 5 +++-- lib/calc/calc.c | 4 ++-- lib/db/dbmi_client/start.c | 6 +++--- lib/gis/mapset_msc.c | 2 +- lib/gis/paths.c | 10 +++++----- lib/gis/popen.c | 2 +- lib/gis/sleep.c | 6 +++--- lib/gis/spawn.c | 10 +++++----- lib/gis/user_config.c | 4 ++-- lib/gis/whoami.c | 7 +++---- lib/init/clean_temp.c | 5 ++--- lib/init/lock.c | 4 ++-- lib/init/run.c | 2 +- lib/manage/sighold.c | 2 +- lib/pngdriver/graph_close.c | 4 ++-- lib/pngdriver/pngdriver.h | 4 ++-- lib/raster3d/close.c | 4 ++-- raster/r.terraflow/flow.cpp | 2 +- raster/r.terraflow/main.cpp | 2 +- raster/r.to.vect/lines_io.c | 2 +- raster/r.to.vect/util.c | 2 +- 21 files changed, 44 insertions(+), 45 deletions(-) diff --git a/include/iostream/rtimer.h b/include/iostream/rtimer.h index a65fd38650b..9104bb792d9 100644 --- a/include/iostream/rtimer.h +++ b/include/iostream/rtimer.h @@ -38,13 +38,14 @@ #ifndef RTIMER_H #define RTIMER_H -#ifdef __MINGW32__ +#ifdef _WIN32 #include #include #include +#ifdef __MINGW32__ #include - +#endif typedef struct { time_t tv1, tv2; } Rtimer; diff --git a/lib/calc/calc.c b/lib/calc/calc.c index 8de40351837..68a6348ae6f 100644 --- a/lib/calc/calc.c +++ b/lib/calc/calc.c @@ -21,7 +21,7 @@ static RETSIGTYPE handle_fpe(int n) void pre_exec(void) { -#ifndef __MINGW32__ +#ifndef _WIN32 #ifdef SIGFPE struct sigaction act; @@ -38,7 +38,7 @@ void pre_exec(void) void post_exec(void) { -#ifndef __MINGW32__ +#ifndef _WIN32 #ifdef SIGFPE struct sigaction act; diff --git a/lib/db/dbmi_client/start.c b/lib/db/dbmi_client/start.c index 7bc06fa4bf0..0d6d3041719 100644 --- a/lib/db/dbmi_client/start.c +++ b/lib/db/dbmi_client/start.c @@ -16,7 +16,7 @@ #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #include #include @@ -30,7 +30,7 @@ static void close_on_exec(int fd) { -#ifndef __MINGW32__ +#ifndef _WIN32 int flags = fcntl(fd, F_GETFD); fcntl(fd, F_SETFD, flags | FD_CLOEXEC); #endif @@ -129,7 +129,7 @@ dbDriver *db_start_driver(const char *name) /* run the driver as a child process and create pipes to its stdin, stdout */ -#ifdef __MINGW32__ +#ifdef _WIN32 #define pipe(fds) _pipe(fds, 250000, _O_BINARY | _O_NOINHERIT) #endif diff --git a/lib/gis/mapset_msc.c b/lib/gis/mapset_msc.c index e5b4903c46b..634ba962b0e 100644 --- a/lib/gis/mapset_msc.c +++ b/lib/gis/mapset_msc.c @@ -119,7 +119,7 @@ int G__make_mapset_element_misc(const char *dir, const char *name) static int check_owner(const struct stat *info) { -#if defined(__MINGW32__) || defined(SKIP_MAPSET_OWN_CHK) +#if defined(_WIN32) || defined(SKIP_MAPSET_OWN_CHK) return 1; #else const char *check = getenv("GRASS_SKIP_MAPSET_OWNER_CHECK"); diff --git a/lib/gis/paths.c b/lib/gis/paths.c index 3d5ce59d974..b779f0f1704 100644 --- a/lib/gis/paths.c +++ b/lib/gis/paths.c @@ -3,7 +3,7 @@ #include #include -#ifndef __MINGW32__ +#ifndef _WIN32 #include #else #include @@ -26,7 +26,7 @@ int G_mkdir(const char *path) { -#ifdef __MINGW32__ +#ifdef _WIN32 return mkdir(path); #else return mkdir(path, 0777); @@ -62,7 +62,7 @@ int G_is_dirsep(char c) int G_is_absolute_path(const char *path) { if (G_is_dirsep(path[0]) -#ifdef __MINGW32__ +#ifdef _WIN32 || (isalpha(path[0]) && (path[1] == ':') && G_is_dirsep(path[2])) #endif ) @@ -144,7 +144,7 @@ int G_stat(const char *file_name, struct stat *buf) int G_lstat(const char *file_name, struct stat *buf) { -#ifdef __MINGW32__ +#ifdef _WIN32 return stat(file_name, buf); #else return lstat(file_name, buf); @@ -164,7 +164,7 @@ int G_lstat(const char *file_name, struct stat *buf) int G_owner(const char *path) { -#ifndef __MINGW32__ +#ifndef _WIN32 struct stat info; G_stat(path, &info); diff --git a/lib/gis/popen.c b/lib/gis/popen.c index 7d742f46e48..5971ed7838a 100644 --- a/lib/gis/popen.c +++ b/lib/gis/popen.c @@ -6,7 +6,7 @@ #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #include #define pipe(fds) _pipe(fds, 4096, O_BINARY|O_NOINHERIT) diff --git a/lib/gis/sleep.c b/lib/gis/sleep.c index 1a5e2a07ae0..2f3bdce969c 100644 --- a/lib/gis/sleep.c +++ b/lib/gis/sleep.c @@ -1,8 +1,8 @@ #include -#ifndef __MINGW32__ +#ifndef _WIN32 #include #endif -#ifdef __MINGW32__ +#ifdef _WIN32 #include #endif #include @@ -10,7 +10,7 @@ /* Sleep */ void G_sleep(unsigned int seconds) { -#ifdef __MINGW32__ +#ifdef _WIN32 /* note: Sleep() cannot be interrupted */ Sleep((seconds) * 1000); #else diff --git a/lib/gis/spawn.c b/lib/gis/spawn.c index 0c88540ac98..329d6aa0c04 100644 --- a/lib/gis/spawn.c +++ b/lib/gis/spawn.c @@ -24,7 +24,7 @@ #include #include -#ifndef __MINGW32__ +#ifndef _WIN32 #include #else #include @@ -72,7 +72,7 @@ struct signal int action; int signum; int valid; -#ifndef __MINGW32__ +#ifndef _WIN32 struct sigaction old_act; sigset_t old_mask; #endif @@ -101,7 +101,7 @@ struct spawn static void parse_arglist(struct spawn *sp, va_list va); static void parse_argvec(struct spawn *sp, const char **va); -#ifdef __MINGW32__ +#ifdef _WIN32 struct buffer { char *str; @@ -941,7 +941,7 @@ int G_spawn(const char *command, ...) status = G_spawn_ex( command, -#ifndef __MINGW32__ +#ifndef _WIN32 SF_SIGNAL, SST_PRE, SSA_IGNORE, SIGINT, SF_SIGNAL, SST_PRE, SSA_IGNORE, SIGQUIT, SF_SIGNAL, SST_PRE, SSA_BLOCK, SIGCHLD, @@ -954,7 +954,7 @@ int G_spawn(const char *command, ...) int G_wait(int i_pid) { -#ifdef __MINGW32__ +#ifdef _WIN32 DWORD rights = PROCESS_QUERY_INFORMATION | SYNCHRONIZE; HANDLE hProcess = OpenProcess(rights, FALSE, (DWORD) i_pid); DWORD exitcode; diff --git a/lib/gis/user_config.c b/lib/gis/user_config.c index 5267eb355a9..d4e3c834b8c 100644 --- a/lib/gis/user_config.c +++ b/lib/gis/user_config.c @@ -31,7 +31,7 @@ #include #include #include -#ifndef __MINGW32__ +#ifndef _WIN32 #include #endif #include @@ -46,7 +46,7 @@ * path [caller must G_free ()] on success, or NULL on failure *************************************************************************/ -#ifndef __MINGW32__ /* TODO */ +#ifndef _WIN32 /* TODO */ static char *_make_toplevel(void) { size_t len; diff --git a/lib/gis/whoami.c b/lib/gis/whoami.c index 0f704a266b7..590efa702d8 100644 --- a/lib/gis/whoami.c +++ b/lib/gis/whoami.c @@ -10,11 +10,10 @@ * * \author Original author CERL */ - #include #include -#ifndef __MINGW32__ +#ifndef _WIN32 #include #endif @@ -40,7 +39,7 @@ const char *G_whoami(void) if (G_is_initialized(&initialized)) return name; -#ifdef __MINGW32__ +#ifdef _WIN32 name = getenv("USERNAME"); #endif if (!name || !*name) @@ -49,7 +48,7 @@ const char *G_whoami(void) if (!name || !*name) name = getenv("USER"); -#ifndef __MINGW32__ +#ifndef _WIN32 if (!name || !*name) { struct passwd *p = getpwuid(getuid()); if (p && p->pw_name && *p->pw_name) diff --git a/lib/init/clean_temp.c b/lib/init/clean_temp.c index 638db98891d..4e1db10f840 100644 --- a/lib/init/clean_temp.c +++ b/lib/init/clean_temp.c @@ -35,7 +35,6 @@ #define SLEEP 30 /* 30 seconds */ /* Recursively scan the directory pathname, removing directory and files */ - void clean_dir(const char *pathname, uid_t uid, pid_t pid, time_t now, int max_age) { @@ -138,7 +137,7 @@ int main(int argc, char *argv[]) G_file_name(tmppath, element, "", mapset = G_mapset()); /* get user id and current time in seconds */ -#ifdef __MINGW32__ +#ifdef _WIN32 /* TODO */ uid = -1; #else @@ -170,7 +169,7 @@ int main(int argc, char *argv[]) int find_process(int pid) { -#ifdef __MINGW32__ +#ifdef _WIN32 /* TODO */ return -1; #else diff --git a/lib/init/lock.c b/lib/init/lock.c index 9bac591bbf5..926a70ac53a 100644 --- a/lib/init/lock.c +++ b/lib/init/lock.c @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) G_fatal_error(_("Usage: %s file pid"), argv[0]); #define file argv[1] -#ifdef __MINGW32__ +#ifdef _WIN32 G_warning(_("Concurrent mapset locking is not supported on Windows")); exit(0); #else @@ -71,7 +71,7 @@ int find_process(int pid) kill failed because no such process, or because user is not owner of process */ -#ifdef __MINGW32__ +#ifdef _WIN32 return 0; #else if (kill(pid, 0) == 0) diff --git a/lib/init/run.c b/lib/init/run.c index 19162cbbc0c..42a1dd64b13 100644 --- a/lib/init/run.c +++ b/lib/init/run.c @@ -23,7 +23,7 @@ the user's shell to re-activate interrupts in shell-ese. int main(int argc, char *argv[]) { signal(SIGINT, SIG_DFL); -#ifndef __MINGW32__ +#ifndef _WIN32 signal(SIGQUIT, SIG_DFL); #endif diff --git a/lib/manage/sighold.c b/lib/manage/sighold.c index d907df01b23..038f76bdccb 100644 --- a/lib/manage/sighold.c +++ b/lib/manage/sighold.c @@ -27,7 +27,7 @@ int M__hold_signals(int hold) signal(SIGINT, sig); -#ifndef __MINGW32__ +#ifndef _WIN32 signal(SIGQUIT, sig); #endif diff --git a/lib/pngdriver/graph_close.c b/lib/pngdriver/graph_close.c index 9fe2ae4bdce..6f7e1e7e513 100644 --- a/lib/pngdriver/graph_close.c +++ b/lib/pngdriver/graph_close.c @@ -16,7 +16,7 @@ #include #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #else #include @@ -33,7 +33,7 @@ static void unmap_file(void) if (!png.mapped) return; -#ifdef __MINGW32__ +#ifdef _WIN32 UnmapViewOfFile(ptr); CloseHandle(png.handle); #else diff --git a/lib/pngdriver/pngdriver.h b/lib/pngdriver/pngdriver.h index b2fb384700d..3174b63368a 100644 --- a/lib/pngdriver/pngdriver.h +++ b/lib/pngdriver/pngdriver.h @@ -16,7 +16,7 @@ #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #endif @@ -35,7 +35,7 @@ struct png_state int true_color; int has_alpha; int mapped; -#ifdef __MINGW32__ +#ifdef _WIN32 HANDLE handle; #endif diff --git a/lib/raster3d/close.c b/lib/raster3d/close.c index f20bb6abd9a..7e1e5ed551e 100644 --- a/lib/raster3d/close.c +++ b/lib/raster3d/close.c @@ -12,7 +12,7 @@ \author USACERL and many others */ -#ifdef __MINGW32__ +#ifdef _WIN32 # include #endif #include @@ -53,7 +53,7 @@ static int close_new(RASTER3D_Map * map) /* finally move tempfile to data file */ Rast3d_filename(path, RASTER3D_CELL_ELEMENT, map->fileName, map->mapset); -#ifdef __MINGW32__ +#ifdef _WIN32 if (CopyFile(map->tempName, path, FALSE) == 0) { #else if (link(map->tempName, path) < 0) { diff --git a/raster/r.terraflow/flow.cpp b/raster/r.terraflow/flow.cpp index 1d87e9e366a..59e9c92493c 100644 --- a/raster/r.terraflow/flow.cpp +++ b/raster/r.terraflow/flow.cpp @@ -66,7 +66,7 @@ computeFlowAccumulation(AMI_STREAM* fillStream, perror("time"); exit(1); } -#ifdef __MINGW32__ +#ifdef _WIN32 strcpy(buf, ctime(&t)); #else ctime_r(&t, buf); diff --git a/raster/r.terraflow/main.cpp b/raster/r.terraflow/main.cpp index e191a1ad21a..8067a21a221 100644 --- a/raster/r.terraflow/main.cpp +++ b/raster/r.terraflow/main.cpp @@ -300,7 +300,7 @@ void record_args(int argc, char **argv) { exit(1); } -#ifdef __MINGW32__ +#ifdef _WIN32 strcpy(buf, ctime(&t)); #else ctime_r(&t, buf); diff --git a/raster/r.to.vect/lines_io.c b/raster/r.to.vect/lines_io.c index eddc6c23287..470ce65a18a 100644 --- a/raster/r.to.vect/lines_io.c +++ b/raster/r.to.vect/lines_io.c @@ -26,7 +26,7 @@ #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #else #include diff --git a/raster/r.to.vect/util.c b/raster/r.to.vect/util.c index 1219025818b..a58e9ead004 100644 --- a/raster/r.to.vect/util.c +++ b/raster/r.to.vect/util.c @@ -1,7 +1,7 @@ #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #else #include From 2a457349fd58051baec036883eac560895722a1c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 01:47:43 +0100 Subject: [PATCH 033/264] MSVC: disable some programs temporarily --- general/CMakeLists.txt | 9 ++++++++- imagery/CMakeLists.txt | 3 ++- raster/CMakeLists.txt | 20 +++++++++++++------- raster3d/CMakeLists.txt | 4 ++++ 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index a769f3293d6..2f3c5a3fd68 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -6,7 +6,10 @@ build_program_in_subdir(g.filename DEPENDS grass_gis ) build_program_in_subdir(g.findetc DEPENDS grass_gis ) build_program_in_subdir(g.findfile DEPENDS grass_manage ) build_program_in_subdir(g.gisenv DEPENDS grass_gis ) +if(NOT MSVC) build_program_in_subdir(g.list DEPENDS grass_manage) +endif() + build_program_in_subdir(g.mapset DEPENDS grass_gis ) build_program_in_subdir(g.mapsets DEPENDS grass_gis ) build_program_in_subdir(g.message DEPENDS grass_gis ) @@ -18,7 +21,9 @@ build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj GDAL ) build_program_in_subdir(g.region DEPENDS grass_gis grass_gproj grass_vector grass_raster3d grass_gmath) +if(NOT MSVC) build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster ) +endif() build_program_in_subdir(g.rename DEPENDS grass_manage grass_raster ) build_program_in_subdir(g.tempfile DEPENDS grass_gis ) @@ -36,7 +41,9 @@ DEFS "-DGRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" ) if(WITH_CAIRO) - build_program_in_subdir(g.cairocomp DEPENDS grass_gis grass_cairodriver) + if(NOT MSVC) + build_program_in_subdir(g.cairocomp DEPENDS grass_gis CAIRO grass_cairodriver) + endif() endif() # g.cairocomp diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt index f9708103758..09abb6caede 100644 --- a/imagery/CMakeLists.txt +++ b/imagery/CMakeLists.txt @@ -35,10 +35,11 @@ build_program_in_subdir( i.landsat.toar DEPENDS grass_imagery grass_raster grass_vector grass_gis) +if(NOT MSVC) build_program_in_subdir( i.landsat.acca DEPENDS grass_imagery grass_raster grass_vector grass_gis) - +endif() build_program_in_subdir( i.maxlik DEPENDS grass_imagery grass_raster grass_vector grass_gis) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index b6e28593dfe..142366af64d 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -91,10 +91,11 @@ build_program_in_subdir( r.gwflow DEPENDS grass_gis grass_raster grass_gpde) +if(NOT MSVC) build_program_in_subdir( r.horizon DEPENDS grass_gis grass_raster grass_gproj) - +endif() build_program_in_subdir( r.in.ascii DEPENDS grass_gis grass_raster) @@ -122,16 +123,17 @@ build_program_in_subdir( build_program_in_subdir( r.in.png - DEPENDS grass_gis grass_raster) + DEPENDS grass_gis grass_raster LIBPNG) build_program_in_subdir( r.in.poly DEPENDS grass_gis grass_raster) +if(NOT MSVC) build_program_in_subdir( r.in.xyz DEPENDS grass_gis grass_raster) - +endif() build_program_in_subdir( r.info DEPENDS grass_gis grass_raster) @@ -152,8 +154,9 @@ build_program_in_subdir( # build_program_in_subdir( # r.li # DEPENDS grass_gis grass_raster) - +if(NOT MSVC) add_subdirectory(r.mapcalc) +endif() build_program_in_subdir( r.mfilter @@ -374,11 +377,11 @@ build_program_in_subdir( build_program_in_subdir( r.stream.extract DEPENDS grass_gis grass_raster grass_segment grass_vector) - + if(NOT MSVC) build_program_in_subdir( r.sun DEPENDS grass_gis grass_raster grass_gproj) - +endif() build_program_in_subdir( r.sunhours DEPENDS grass_gis grass_raster grass_gproj) @@ -419,13 +422,14 @@ build_program_in_subdir( r.surf.random DEPENDS grass_gis grass_raster grass_gmath ) +if(NOT MSVC) #REVIEW: EXTRA_CFLAGS = -DUSER=\"$(USER)\" -DNODATA_FIX -DELEV_FLOAT -Wno-sign-compare build_program_in_subdir( r.terraflow DEPENDS grass_gis grass_raster grass_iostream SRC_REGEX "*.cpp" DEFS "-DUSER=USER;-DNODATA_FIX;-DELEV_FLOAT") - +endif() build_program_in_subdir( r.texture @@ -478,11 +482,13 @@ build_program_in_subdir( DEPENDS grass_gis grass_raster) #REVIEW: EXTRA_CFLAGS = -DUSER=\"$(USER)\" -Wno-sign-compare +if(NOT MSVC) build_program_in_subdir( r.viewshed DEPENDS grass_gis grass_raster grass_iostream SRC_REGEX "*.cpp" DEFS "-DUSER=USER") +endif() build_program_in_subdir( r.volume diff --git a/raster3d/CMakeLists.txt b/raster3d/CMakeLists.txt index 9077e314091..8d70b7071f8 100644 --- a/raster3d/CMakeLists.txt +++ b/raster3d/CMakeLists.txt @@ -26,9 +26,11 @@ build_program_in_subdir( # r3.in.lidar # DEPENDS grass_gis grass_raster3d ) +if(NOT MSVC) build_program_in_subdir( r3.in.v5d DEPENDS grass_gis grass_raster3d ) +endif() build_program_in_subdir( r3.info @@ -59,9 +61,11 @@ build_program_in_subdir( r3.out.bin DEPENDS grass_gis grass_raster3d ) +if(NOT MSVC) build_program_in_subdir( r3.out.v5d DEPENDS grass_gis grass_raster3d ) +endif() build_program_in_subdir( r3.retile From c5ffdf0373ad2c5f1780385e2554d94dd5d1ff75 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 01:49:33 +0100 Subject: [PATCH 034/264] update cmake scripts to manage thirdparty libs --- thirdparty/CMakeLists.txt | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 3bf5bb319ed..b45dc2ff2da 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -2,6 +2,12 @@ find_package(FLEX REQUIRED) find_package(BISON REQUIRED) +set( grass_build_type "${CMAKE_BUILD_TYPE}" ) +string( TOLOWER "${grass_build_type}" grass_build_type_lc ) +set(find_library_suffix "RELEASE") +if( grass_build_type_lc STREQUAL "debug" ) +set(find_library_suffix "DEBUG") +endif() find_package(GDAL REQUIRED) add_library(GDAL INTERFACE IMPORTED GLOBAL) @@ -10,24 +16,25 @@ set_property(TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_D find_package(PNG REQUIRED) add_library(LIBPNG INTERFACE IMPORTED GLOBAL) -set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY} ) +set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY_DEBUG} ) set_property(TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) find_package(JPEG) if(JPEG_FOUND) add_library(LIBJPEG INTERFACE IMPORTED GLOBAL) - set_property(TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY} ) + set_property(TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY_${find_library_suffix}} ) set_property(TARGET LIBJPEG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR} ) endif() find_package(ZLIB REQUIRED) add_library(ZLIB INTERFACE IMPORTED GLOBAL) -set_property(TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY} ) +set_property(TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY_${find_library_suffix}} ) set_property(TARGET ZLIB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR} ) - +if(UNIX) find_library(M_LIBRARY m) add_library(LIBM INTERFACE IMPORTED GLOBAL) set_property(TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) +endif() find_package(PROJ4 REQUIRED) add_library(PROJ4 INTERFACE IMPORTED GLOBAL) @@ -36,7 +43,7 @@ set_property(TARGET PROJ4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) -set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY} ) +set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY_${find_library_suffix}} ) set_property(TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) find_package(FFTW REQUIRED) @@ -53,17 +60,18 @@ if(WITH_CAIRO) set_property(TARGET CAIRO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIRS} ) endif() +if(NOT WIN32) if(WITH_X11) find_package(X11 REQUIRED) add_library(X11 INTERFACE IMPORTED GLOBAL) set_property(TARGET X11 PROPERTY INTERFACE_LINK_LIBRARIES ${X11_LIBRARIES} ) set_property(TARGET X11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${X11_INCLUDE_DIR}") - +endif() endif() find_package(TIFF REQUIRED) add_library(TIFF INTERFACE IMPORTED GLOBAL) -set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY} ) +set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY_${find_library_suffix}} ) set_property(TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${TIFF_INCLUDE_DIR}") find_package(Iconv) @@ -79,7 +87,7 @@ if(WITH_BZLIB) find_package(BZip2) if(BZIP2_FOUND) add_library(BZIP2 INTERFACE IMPORTED GLOBAL) - set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARIES} ) + set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARY_${find_library_suffix}} ) set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") endif() endif() From c4c931226050d201c919d5c8f686c6d2a31ae98c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 01:51:16 +0100 Subject: [PATCH 035/264] disable X11 on windows --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 805e2545fbd..9c9a3caab4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/find_scripts;${CMAKE_MODULE_PATH}") #TODO option(WITH_CAIRO "Build with cairo support ." ON) +if(WIN32) +option(WITH_X11 "Build with X11 support ." OFF) +else() option(WITH_X11 "Build with X11 support ." ON) +endif() option(WITH_OPENGL "Build with opengl support ." ON) option(WITH_SQLITE "enable sqlite support" ON) option(WITH_POSTGRES "enable postgres support" OFF) @@ -43,6 +47,13 @@ set(BUILD_ARCH "x86_64") file(STRINGS "include/VERSION" GRASS_VERSION_STRINGS) list(LENGTH GRASS_VERSION_STRINGS GRASS_VERSION_FILE_LENGTH) +if(WIN32) +set(CMAKE_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS") +if(CMAKE_C_FLAGS) +set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") +endif() +endif() + if(GRASS_VERSION_FILE_LENGTH LESS 3 ) message(FATAL_ERROR "include/VERSION is not a valid file") endif() From 6a394ec4b6767be65cd6b8dd798648f3bfef1fd4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:02:35 +0100 Subject: [PATCH 036/264] update generation of config.h --- include/CMakeLists.txt | 23 +++-- include/config.h.cmake.in | 176 ++++++++++++++++++++------------------ 2 files changed, 108 insertions(+), 91 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index a49c6246086..dab3aad7068 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,4 +1,5 @@ include(CheckIncludeFile) +include(CheckFunctionExists) #TODO: use CheckSymbolExists check_include_file(limits.h HAVE_LIMITS_H) check_include_file(termio.h HAVE_TERMIO_H) check_include_file(termios.h HAVE_TERMIOS_H) @@ -22,7 +23,6 @@ check_include_file(f2c.h HAVE_F2C_H) check_include_file(cblas.h HAVE_CBLAS_H) check_include_file(clapack.h HAVE_CLAPACK_H) check_include_file(langinfo.h HAVE_LANGINFO_H) - if(TARGET FREETYPE) #check_include_file(ft2build.h HAVE_FT2BUILD_H) set(HAVE_FT2BUILD_H 1) @@ -41,6 +41,12 @@ if(NOT HAVE_FFTW3_H) check_include_file(fftw.h HAVE_FFTW_H) endif() +set(HAVE_ZLIB_H 0) +if(TARGET LIBJPEG) + set(HAVE_ZLIB_H 1) + #check_include_file(zlib.h HAVE_ZLIB_H) +endif() + set(HAVE_JPEGLIB_H 0) if(TARGET LIBJPEG) set(HAVE_JPEGLIB_H 1) @@ -50,7 +56,6 @@ endif() set(HAVE_PNG_H 0) if(TARGET LIBPNG) set(HAVE_PNG_H 1) - #check_include_file(png.h HAVE_PNG_H) endif() set(HAVE_TIFFIO_H 0) @@ -112,12 +117,12 @@ set(USE_NLS 0) set(USE_G_SOCKS 0) set(RETSIGTYPE_RESULT "int") -set(gid_t 0) -set(uid_t 0) -set(off_t 0) - - - +if(MSVC) +set(GID_TYPE int) +set(UID_TYPE int) +set(PID_TYPE int) +set(OFF_TYPE off_t) +endif() set(_OE_SOCKETS 0) set(USE_DELTA_FOR_TZ 0) @@ -240,6 +245,8 @@ endforeach() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") +message("Creating ${CMAKE_BINARY_DIR}/grass/config.h") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index ee1e9378042..3d32e11d1b2 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -6,241 +6,244 @@ #ifndef _config_h #define _config_h -#cmakedefine GDEBUG +#cmakedefine GDEBUG ${GDEBUG} /* define _OE_SOCKETS flag (OS/390 sys/socket.h) */ -#cmakedefine _OE_SOCKETS +#cmakedefine _OE_SOCKETS ${_OE_SOCKETS} /* define _REENTRANT flag (for SunOS) */ -#cmakedefine _REENTRANT +#cmakedefine _REENTRANT ${_REENTRANT} /* define USE_DELTA_FOR_TZ (for AIX) */ -#cmakedefine USE_DELTA_FOR_TZ +#cmakedefine USE_DELTA_FOR_TZ ${USE_DELTA_FOR_TZ} /* define for Windows static build */ -#cmakedefine STATIC_BUILD +#cmakedefine STATIC_BUILD ${STATIC_BUILD} /* define if limits.h exists */ -#cmakedefine HAVE_LIMITS_H +#cmakedefine HAVE_LIMITS_H ${HAVE_LIMITS_H} /* define if termio.h exists */ -#cmakedefine HAVE_TERMIO_H +#cmakedefine HAVE_TERMIO_H ${HAVE_TERMIO_H} /* define if termios.h exists */ -#cmakedefine HAVE_TERMIOS_H +#cmakedefine HAVE_TERMIOS_H ${HAVE_TERMIOS_H} /* define if unistd.h exists */ -#cmakedefine HAVE_UNISTD_H +#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H} /* define if values.h exists */ -#cmakedefine HAVE_VALUES_H +#cmakedefine HAVE_VALUES_H ${HAVE_VALUES_H} /* define if zlib.h exists */ -#cmakedefine HAVE_ZLIB_H +#cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H} /* define if bzlib.h exists */ -#cmakedefine HAVE_BZLIB_H +#cmakedefine HAVE_BZLIB_H ${HAVE_BZLIB_H} /* define if sys/ioctl.h exists */ -#cmakedefine HAVE_SYS_IOCTL_H +#cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H} /* define if sys/mtio.h exists */ -#cmakedefine HAVE_SYS_MTIO_H +#cmakedefine HAVE_SYS_MTIO_H ${HAVE_SYS_MTIO_H} /* define if sys/resource.h exists */ -#cmakedefine HAVE_SYS_RESOURCE_H +#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H} /* define if sys/time.h exists */ -#cmakedefine HAVE_SYS_TIME_H +#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H} /* define if time.h and sys/time.h can be included together */ -#cmakedefine TIME_WITH_SYS_TIME +#cmakedefine TIME_WITH_SYS_TIME ${TIME_WITH_SYS_TIME} /* define if sys/timeb.h exists */ -#cmakedefine HAVE_SYS_TIMEB_H +#cmakedefine HAVE_SYS_TIMEB_H ${HAVE_SYS_TIMEB_H} /* define if sys/types.h exists */ -#cmakedefine HAVE_SYS_TYPES_H +#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H} /* define if sys/utsname.h exists */ -#cmakedefine HAVE_SYS_UTSNAME_H +#cmakedefine HAVE_SYS_UTSNAME_H ${HAVE_SYS_UTSNAME_H} /* define if g2c.h exists */ -#cmakedefine HAVE_G2C_H +#cmakedefine HAVE_G2C_H ${HAVE_G2C_H} /* define if f2c.h exists */ -#cmakedefine HAVE_F2C_H +#cmakedefine HAVE_F2C_H ${HAVE_F2C_H} /* define if cblas.h exists */ -#cmakedefine HAVE_CBLAS_H +#cmakedefine HAVE_CBLAS_H ${HAVE_CBLAS_H} /* define if clapack.h exists */ -#cmakedefine HAVE_CLAPACK_H +#cmakedefine HAVE_CLAPACK_H ${HAVE_CLAPACK_H} /* define gid_t type */ -#cmakedefine gid_t +typedef @GID_TYPE@ gid_t; /* define off_t type */ -#cmakedefine off_t +typedef @OFF_TYPE@ off_t; /* define uid_t type */ -#cmakedefine uid_t +typedef @UID_TYPE@ uid_t; + +/* define pid_t type */ +typedef @PID_TYPE@ pid_t; /* define if "long long" is available */ -#cmakedefine HAVE_LONG_LONG_INT +#cmakedefine HAVE_LONG_LONG_INT ${HAVE_LONG_LONG_INT} /* Define the return type of signal handlers */ #define RETSIGTYPE @RETSIGTYPE_RESULT@ /* define if ftime() exists */ -#cmakedefine HAVE_FTIME +#cmakedefine HAVE_FTIME ${HAVE_FTIME} /* define if gethostname() exists */ -#cmakedefine HAVE_GETHOSTNAME +#cmakedefine HAVE_GETHOSTNAME ${HAVE_GETHOSTNAME} /* define if gettimeofday() exists */ -#cmakedefine HAVE_GETTIMEOFDAY +#cmakedefine HAVE_GETTIMEOFDAY ${HAVE_GETTIMEOFDAY} /* define if lseek() exists */ -#cmakedefine HAVE_LSEEK +#cmakedefine HAVE_LSEEK ${HAVE_LSEEK} /* define if time() exists */ -#cmakedefine HAVE_TIME +#cmakedefine HAVE_TIME ${HAVE_TIME} /* define if uname() exists */ -#cmakedefine HAVE_UNAME +#cmakedefine HAVE_UNAME ${HAVE_UNAME} /* define if seteuid() exists */ -#cmakedefine HAVE_SETEUID +#cmakedefine HAVE_SETEUID ${HAVE_SETEUID} /* define if setpriority() exists */ -#cmakedefine HAVE_SETPRIORITY +#cmakedefine HAVE_SETPRIORITY ${HAVE_SETPRIORITY} /* define if setreuid() exists */ -#cmakedefine HAVE_SETREUID +#cmakedefine HAVE_SETREUID ${HAVE_SETREUID} /* define if setruid() exists */ -#cmakedefine HAVE_SETRUID +#cmakedefine SETPGRP_VOID ${SETPGRP_VOID} /* define if setpgrp() takes no argument */ -#cmakedefine SETPGRP_VOID +#cmakedefine SETPGRP_VOID ${SETPGRP_VOID} /* define if drand48() exists */ -#cmakedefine HAVE_DRAND48 +#cmakedefine HAVE_DRAND48 ${HAVE_DRAND48} /* define if nanosleep() exists */ -#cmakedefine HAVE_NANOSLEEP +#cmakedefine HAVE_NANOSLEEP ${HAVE_NANOSLEEP} /* define if asprintf() exists */ -#cmakedefine HAVE_ASPRINTF @HAVE_ASPRINTF@ +#cmakedefine HAVE_ASPRINTF ${HAVE_ASPRINTF} /* define if postgres is to be used */ -#cmakedefine HAVE_POSTGRES +#cmakedefine HAVE_POSTGRES ${HAVE_POSTGRES} /* define if SQLite is to be used */ -#cmakedefine HAVE_SQLITE @HAVE_SQLITE@ +#cmakedefine HAVE_SQLITE ${HAVE_SQLITE} /* define if GDAL is to be used */ -#cmakedefine HAVE_GDAL @HAVE_GDAL@ +#cmakedefine HAVE_GDAL ${HAVE_GDAL} /* define if OGR is to be used */ -#cmakedefine HAVE_OGR @HAVE_OGR@ +#cmakedefine HAVE_OGR ${HAVE_OGR} /* define if GEOS is to be used */ -#cmakedefine HAVE_GEOS @HAVE_GEOS@ +#cmakedefine HAVE_GEOS ${HAVE_GEOS} /* define if postgres client header exists */ -#cmakedefine HAVE_LIBPQ_FE_H +#cmakedefine HAVE_LIBPQ_FE_H ${HAVE_LIBPQ_FE_H} /* define if PQcmdTuples in lpq */ -#cmakedefine HAVE_PQCMDTUPLES +#cmakedefine HAVE_PQCMDTUPLES ${HAVE_PQCMDTUPLES} /* define if ODBC exists */ -#cmakedefine HAVE_SQL_H +#cmakedefine HAVE_SQL_H ${HAVE_SQL_H} /* define if tiffio.h exists */ -#cmakedefine HAVE_TIFFIO_H +#cmakedefine HAVE_TIFFIO_H ${HAVE_TIFFIO_H} /* define if png.h exists */ -#cmakedefine HAVE_PNG_H +#cmakedefine HAVE_PNG_H ${HAVE_PNG_H} /* define if jpeglib.h exists */ -#cmakedefine HAVE_JPEGLIB_H +#cmakedefine HAVE_JPEGLIB_H ${HAVE_JPEGLIB_H} /* define if fftw3.h exists */ -#cmakedefine HAVE_FFTW3_H +#cmakedefine HAVE_FFTW3_H ${HAVE_FFTW3_H} /* define if fftw.h exists */ -#cmakedefine HAVE_FFTW_H +#cmakedefine HAVE_FFTW_H ${HAVE_FFTW_H} /* define if dfftw.h exists */ -#cmakedefine HAVE_DFFTW_H +#cmakedefine HAVE_DFFTW_H ${HAVE_DFFTW_H} /* define if BLAS exists */ -#cmakedefine HAVE_LIBBLAS +#cmakedefine HAVE_LIBBLAS ${HAVE_LIBBLAS} /* define if LAPACK exists */ -#cmakedefine HAVE_LIBLAPACK +#cmakedefine HAVE_LIBLAPACK ${HAVE_LIBLAPACK} /* define if ATLAS exists */ -#cmakedefine HAVE_LIBATLAS +#cmakedefine HAVE_LIBATLAS ${HAVE_LIBATLAS} /* define if dbm.h exists */ -#cmakedefine HAVE_DBM_H +#cmakedefine HAVE_DBM_H ${HAVE_DBM_H} /* define if readline exists */ -#cmakedefine HAVE_READLINE_READLINE_H +#cmakedefine HAVE_READLINE_READLINE_H ${HAVE_READLINE_READLINE_H} /* define if ft2build.h exists */ -#cmakedefine HAVE_FT2BUILD_H +#cmakedefine HAVE_FT2BUILD_H ${HAVE_FT2BUILD_H} /* Whether or not we are using G_socks for display communications */ -#cmakedefine USE_G_SOCKS +#cmakedefine USE_G_SOCKS ${GDEBUG} /* define if X is disabled or unavailable */ -#cmakedefine X_DISPLAY_MISSING +#cmakedefine X_DISPLAY_MISSING ${X_DISPLAY_MISSING} /* define if libintl.h exists */ -#cmakedefine HAVE_LIBINTL_H +#cmakedefine HAVE_LIBINTL_H ${HAVE_LIBINTL_H} /* define if iconv.h exists */ -#cmakedefine HAVE_ICONV_H +#cmakedefine HAVE_ICONV_H ${HAVE_ICONV_H} /* define if NLS requested */ -#cmakedefine USE_NLS +#cmakedefine USE_NLS ${USE_NLS} /* define if putenv() exists */ -#cmakedefine HAVE_PUTENV +#cmakedefine HAVE_PUTENV ${HAVE_PUTENV} /* define if setenv() exists */ -#cmakedefine HAVE_SETENV +#cmakedefine HAVE_SETENV ${HAVE_SETENV} /* define if socket() exists */ -#cmakedefine HAVE_SOCKET +#cmakedefine HAVE_SOCKET ${HAVE_SOCKET} /* define if glXCreatePbuffer exists */ -#cmakedefine HAVE_PBUFFERS +#cmakedefine HAVE_PBUFFERS ${HAVE_PBUFFERS} /* define if glXCreateGLXPixmap exists */ -#cmakedefine HAVE_PIXMAPS +#cmakedefine HAVE_PIXMAPS ${HAVE_PIXMAPS} /* define if OpenGL uses X11 */ -#cmakedefine OPENGL_X11 +#cmakedefine OPENGL_X11 ${OPENGL_X11} /* define if OpenGL uses Aqua (MacOS X) */ -#cmakedefine OPENGL_AQUA +#cmakedefine OPENGL_AQUA ${OPENGL_AQUA} /* define if OpenGL uses Windows */ -#cmakedefine OPENGL_WINDOWS +#cmakedefine OPENGL_WINDOWS ${OPENGL_WINDOWS} /* define if regex.h exists */ -#cmakedefine HAVE_REGEX_H +#cmakedefine HAVE_REGEX_H ${HAVE_REGEX_H} /* define if pthread.h exists */ -#cmakedefine HAVE_PTHREAD_H +#cmakedefine HAVE_PTHREAD_H ${HAVE_PTHREAD_H} /* define if fseeko() exists */ -#cmakedefine HAVE_FSEEKO +#cmakedefine HAVE_FSEEKO ${HAVE_FSEEKO} /* * configuration information solely dependent on the above @@ -276,11 +279,14 @@ /* XXX We don't use this because glibc2.1.3*/ /* XXX is bad anyway. If we define */ /* XXX _XOPEN_SOURCE we will loose caddr_t */ - #endif +#endif /* HAVE_LARGEFILES */ -#if defined(__MINGW32__) && (!defined(_FILE_OFFSET_BITS) || (_FILE_OFFSET_BITS != 64)) +/* define if langinfo.h exists */ +#cmakedefine HAVE_LANGINFO_H ${HAVE_LANGINFO_H} + +#if defined(__MINGW32__) && (!defined(_FILE_OFFSET_BITS) || (_FILE_OFFSET_BITS != 64)) /* add/remove as needed */ /* redefine off_t */ #include @@ -300,10 +306,14 @@ #endif /* MINGW32 LFS */ -#endif /* HAVE_LARGEFILES */ +#ifdef _MSC_VER +#define strncasecmp _strnicmp +#define strcasecmp _stricmp +#ifndef S_ISDIR +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +#endif -/* define if langinfo.h exists */ -#cmakedefine HAVE_LANGINFO_H +#endif #endif /* _config_h */ From a4e042319e5c6e2aa9b22ad44583d31beb444cc5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:07:36 +0100 Subject: [PATCH 037/264] fix list of cmake depends --- lib/CMakeLists.txt | 64 ++++++++++++++++++++++----------------- lib/gis/CMakeLists.txt | 6 ++-- lib/rst/CMakeLists.txt | 2 +- lib/vector/CMakeLists.txt | 4 +-- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b0d86c9964b..3b8ae1ca051 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -6,18 +6,22 @@ build_library_in_subdir(datetime) add_subdirectory(gis) +build_library_in_subdir(driver DEPENDS grass_gis FREETYPE ICONV ZLIB) + +add_subdirectory(proj) + build_library_in_subdir(raster DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" - DEPENDS GDAL PROJ4 - ) - + DEPENDS GDAL PROJ4 grass_gproj +) if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_library(DL_LIBRARY dl) target_link_libraries(grass_raster ${DL_LIBRARY}) endif() -configure_file(external/ccmath/ccmath.h +message("Creating ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h") +configure_file(external/ccmath/ccmath.cmake.h ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h COPYONLY) @@ -27,12 +31,12 @@ build_library_in_subdir(external/shapelib NAME grass_shape HEADERS "shapefil.h") build_library_in_subdir(gmath - DEPENDS grass_ccmath + DEPENDS grass_ccmath grass_gis OPTIONAL_DEPENDS FFTW ) build_library_in_subdir(linkm) -build_library_in_subdir(driver DEPENDS FREETYPE ICONV) + build_library_in_subdir(pngdriver DEPENDS grass_driver LIBPNG ZLIB @@ -58,20 +62,26 @@ if(WITH_CAIRO) list(APPEND _cairodriver_DEPENDS X11) endif() + file(GLOB cairodriver_SRCS "./cairodriver/*.c") + list(APPEND cairodriver_SRCS "./driver/init.c") build_library_in_subdir(cairodriver DEPENDS ${_cairodriver_DEPENDS} + SOURCES ${cairodriver_SRCS} ) + set(_grass_display_DEFS "-DUSE_CAIRO") list(APPEND _grass_display_DEPENDS grass_cairodriver) endif() -build_library_in_subdir(bitmap SOURCES "./bitmap/bitmap.c" "./bitmap/sparse.c") +build_library_in_subdir(bitmap +SOURCES "./bitmap/bitmap.c" "./bitmap/sparse.c" +DEPENDS grass_linkm) build_library_in_subdir(btree) -build_library_in_subdir(btree2 HEADERS "kdtree.h") +build_library_in_subdir(btree2 HEADERS "kdtree.h" DEPENDS grass_gis) build_library_in_subdir(display DEFS ${_grass_display_DEFS} @@ -82,44 +92,44 @@ add_subdirectory(db) add_subdirectory(fonts) -add_subdirectory(proj) - add_subdirectory(vector) build_library_in_subdir(imagery DEPENDS GDAL GEOS grass_vector) -build_library_in_subdir(cluster) +build_library_in_subdir(cluster DEPENDS grass_imagery) -build_library_in_subdir(rowio) +build_library_in_subdir(rowio DEPENDS grass_gis) -build_library_in_subdir(segment) +build_library_in_subdir(segment DEPENDS grass_gis) #addeed DEPENDS grass_gis for uninstd.h add_subdirectory(rst) -build_library_in_subdir(lidar DEPENDS GDAL GEOS grass_segment HEADERS "lidar.h") +build_library_in_subdir(lidar +DEPENDS GDAL GEOS grass_vector grass_raster grass_dbmibase grass_segment +HEADERS "lidar.h") build_library_in_subdir(raster3d DEPENDS grass_raster) -build_program_in_subdir(raster3d/test - NAME test.raster3d.lib - DEPENDS grass_gis grass_raster3d - ) +#build_program_in_subdir(raster3d/test +# NAME test.raster3d.lib +# DEPENDS grass_gis grass_raster3d grass_raster + # ) build_library_in_subdir(gpde HEADERS "N_*.h" DEPENDS grass_gis grass_raster3d grass_gmath ) -build_library_in_subdir(dspf) +build_library_in_subdir(dspf DEPENDS grass_gis) -build_library_in_subdir(symbol NAME grass_sym) +build_library_in_subdir(symbol NAME grass_sym DEPENDS grass_raster) add_subdirectory(init) -build_library_in_subdir(cdhc) +build_library_in_subdir(cdhc DEPENDS grass_raster) -build_library_in_subdir(stats) +build_library_in_subdir(stats DEPENDS grass_raster) -build_library_in_subdir(arraystats) +build_library_in_subdir(arraystats DEPENDS grass_gis) if(WITH_OPENGL) # set(ogsf_DEPENDS OPENGL GDAL TIFF) @@ -131,10 +141,10 @@ endif() add_subdirectory(temporal) -add_subdirectory(python) +#add_subdirectory(python) -build_library_in_subdir(iostream SRC_REGEX "*.cpp") +build_library_in_subdir(iostream SRC_REGEX "*.cpp" DEPENDS grass_gis) -build_library_in_subdir(manage DEPENDS grass_gis grass_vector grass_raster3d ) +build_library_in_subdir(manage DEPENDS grass_raster grass_vector grass_raster3d ) -build_library_in_subdir(calc) +build_library_in_subdir(calc DEPENDS grass_raster) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index d1e3f583ee5..905b8ff8d48 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -18,14 +18,16 @@ set(gislib_SRCS cmprrle.c find_rast.c key_value3.c mkstemp.c plot.c spawn.c wr_cellhd.c cmprzlib.c find_rast3d.c key_value4.c myname.c pole_in_poly.c strings.c writ_zeros.c color_rules.c find_vect.c legal_name.c named_colr.c popen.c tempfile.c xdr.c - color_str.c line_dist.c nl_to_spaces.c progrm_nme.c timestamp.c zero.c + color_str.c compress.c line_dist.c nl_to_spaces.c progrm_nme.c timestamp.c zero.c commas.c geodesic.c list.c nme_in_mps.c proj1.c token.c zone.c - compress.c geodist.c ll_format.c open.c proj2.c trim_dec.c + geodist.c ll_format.c open.c proj2.c trim_dec.c parser_json.c cmprzstd.c + compress.c band_reference.c ) if(MINGW) list(APPEND gislib_SRCS "fmode.c") endif() + set(GRASS_VERSION_DATE 20160402) build_module(NAME grass_gis SOURCES "${gislib_SRCS}" diff --git a/lib/rst/CMakeLists.txt b/lib/rst/CMakeLists.txt index 901cbfc6606..9aab8557adc 100644 --- a/lib/rst/CMakeLists.txt +++ b/lib/rst/CMakeLists.txt @@ -15,6 +15,6 @@ build_library_in_subdir(qtree build_library_in_subdir(interp_float NAME grass_interpfl - DEPENDS GEOS grass_gis grass_raster grass_bitmap grass_vector + DEPENDS GEOS grass_gis grass_raster grass_bitmap grass_vector grass_qtree grass_interpdata HEADERS "interpf.h") diff --git a/lib/vector/CMakeLists.txt b/lib/vector/CMakeLists.txt index 098607bf011..5104fe24ee5 100644 --- a/lib/vector/CMakeLists.txt +++ b/lib/vector/CMakeLists.txt @@ -27,7 +27,7 @@ # neta: Vlib #add_executable(vectorascii ) -build_library_in_subdir(rtree HEADERS "rtree.h") +build_library_in_subdir(rtree HEADERS "rtree.h" DEPENDS grass_gis) add_subdirectory(dglib) add_subdirectory(diglib) @@ -37,7 +37,7 @@ build_library_in_subdir(Vlib DEPENDS grass_gis grass_raster grass_rtree grass_graph grass_dig2 grass_dbmibase grass_btree2 grass_dbmiclient - grass_linkm grass_gproj + grass_linkm grass_gproj POSTGRES ) add_subdirectory(vedit) From 93a9ef1261179c65a99495c355b7a54ccb0c721d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:09:30 +0100 Subject: [PATCH 038/264] msvc compile fixes --- lib/iostream/rtimer.cpp | 7 ++++++- lib/raster3d/test/test_tools.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/iostream/rtimer.cpp b/lib/iostream/rtimer.cpp index e7041ee3d33..e59db17674e 100644 --- a/lib/iostream/rtimer.cpp +++ b/lib/iostream/rtimer.cpp @@ -33,11 +33,16 @@ * General Public License for more details. * * **************************************************************************/ - +#if !defined(_MSC_VER) #include +#endif + #include #include + +#if !defined(_MSC_VER) #include +#endif //#include #include diff --git a/lib/raster3d/test/test_tools.c b/lib/raster3d/test/test_tools.c index e2bdef8a1d0..5b0565f78f0 100644 --- a/lib/raster3d/test/test_tools.c +++ b/lib/raster3d/test/test_tools.c @@ -20,6 +20,7 @@ #include #include #include "test_raster3d_lib.h" +#include /* *************************************************************** */ /* Compute the difference between two time steps ***************** */ From 6b77a19868c6e336d20196f89c583eef61d532fb Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:28:20 +0100 Subject: [PATCH 039/264] use INIFINITY rather than gcc only division by zero --- lib/vector/Vlib/box.c | 6 +++--- raster/r.out.gdal/main.c | 4 ++-- raster/r.series.accumulate/main.c | 4 ++-- raster/r.series/main.c | 4 ++-- raster/r.univar/r.univar_main.c | 4 ++-- raster/r.univar/r3.univar_main.c | 8 ++++---- raster/r.univar/stats.c | 16 ++++++++-------- vector/v.cluster/main.c | 4 ++-- vector/v.voronoi/skeleton.c | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/vector/Vlib/box.c b/lib/vector/Vlib/box.c index f67184a77c6..7f38fbdee62 100644 --- a/lib/vector/Vlib/box.c +++ b/lib/vector/Vlib/box.c @@ -252,7 +252,7 @@ int Vect_get_line_box(const struct Map_info *Map, int line, struct bound_box *Bo Line = Plus->Line[line]; if (Line == NULL) { /* dead */ - Box->N = Box->S = Box->E = Box->W = Box->T = Box->B = 0. / 0.; + Box->N = Box->S = Box->E = Box->W = Box->T = Box->B = INFINITY; return 0; } @@ -317,7 +317,7 @@ int Vect_get_area_box(const struct Map_info *Map, int area, struct bound_box *Bo Area = Plus->Area[area]; if (Area == NULL) { /* dead */ - Box->N = Box->S = Box->E = Box->W = Box->T = Box->B = 0. / 0.; + Box->N = Box->S = Box->E = Box->W = Box->T = Box->B = INFINITY; return 0; } @@ -363,7 +363,7 @@ int Vect_get_isle_box(const struct Map_info *Map, int isle, struct bound_box *Bo Isle = Plus->Isle[isle]; if (Isle == NULL) { /* dead */ - Box->N = Box->S = Box->E = Box->W = Box->T = Box->B = 0. / 0.; + Box->N = Box->S = Box->E = Box->W = Box->T = Box->B = INFINITY; return 0; } diff --git a/raster/r.out.gdal/main.c b/raster/r.out.gdal/main.c index 5172e144a6b..cfb2bc12c75 100644 --- a/raster/r.out.gdal/main.c +++ b/raster/r.out.gdal/main.c @@ -940,11 +940,11 @@ double set_default_nodata_value(GDALDataType datatype, double min, double max) case GDT_Float32: case GDT_CFloat32: - return 0.0 / 0.0; + return INFINITY; case GDT_Float64: case GDT_CFloat64: - return 0.0 / 0.0; + return INFINITY; default: return 0; diff --git a/raster/r.series.accumulate/main.c b/raster/r.series.accumulate/main.c index e73fa276533..f4c229d04a7 100644 --- a/raster/r.series.accumulate/main.c +++ b/raster/r.series.accumulate/main.c @@ -169,8 +169,8 @@ int main(int argc, char *argv[]) if (G_parser(argc, argv)) exit(EXIT_FAILURE); - lo = -1.0 / 0.0; /* -inf */ - hi = 1.0 / 0.0; /* inf */ + lo = -INFINITY; /* -inf */ + hi = INFINITY; /* inf */ method = METHOD_GDD; if (G_strncasecmp(parm.method->answer, "gdd", 3) == 0) diff --git a/raster/r.series/main.c b/raster/r.series/main.c index d91215912a1..be56dff6b72 100644 --- a/raster/r.series/main.c +++ b/raster/r.series/main.c @@ -194,8 +194,8 @@ int main(int argc, char *argv[]) if (G_parser(argc, argv)) exit(EXIT_FAILURE); - lo = -1.0 / 0.0; /* -inf */ - hi = 1.0 / 0.0; /* inf */ + lo = -INFINITY; /* -inf */ + hi = INFINITY; /* inf */ if (parm.range->answer) { lo = atof(parm.range->answers[0]); hi = atof(parm.range->answers[1]); diff --git a/raster/r.univar/r.univar_main.c b/raster/r.univar/r.univar_main.c index 25112a917b3..6853bf7b66f 100644 --- a/raster/r.univar/r.univar_main.c +++ b/raster/r.univar/r.univar_main.c @@ -133,8 +133,8 @@ int main(int argc, char *argv[]) /* table field separator */ zone_info.sep = G_option_to_separator(param.separator); - zone_info.min = 0.0 / 0.0; /* set to nan as default */ - zone_info.max = 0.0 / 0.0; /* set to nan as default */ + zone_info.min = NAN; /* set to nan as default */ + zone_info.max = NAN; /* set to nan as default */ zone_info.n_zones = 0; fdz = -1; diff --git a/raster/r.univar/r3.univar_main.c b/raster/r.univar/r3.univar_main.c index 8889694d754..f3a09288d0d 100644 --- a/raster/r.univar/r3.univar_main.c +++ b/raster/r.univar/r3.univar_main.c @@ -132,10 +132,10 @@ int main(int argc, char *argv[]) /* table field separator */ zone_info.sep = G_option_to_separator(param.separator); - dmin = 0.0 / 0.0; /* set to nan as default */ - dmax = 0.0 / 0.0; /* set to nan as default */ - zone_info.min = 0.0 / 0.0; /* set to nan as default */ - zone_info.max = 0.0 / 0.0; /* set to nan as default */ + dmin = NAN; /* set to nan as default */ + dmax = NAN; /* set to nan as default */ + zone_info.min = NAN; /* set to nan as default */ + zone_info.max = NAN; /* set to nan as default */ zone_info.n_zones = 0; /* open 3D zoning raster with default region */ diff --git a/raster/r.univar/stats.c b/raster/r.univar/stats.c index d8cd3860fdd..44a16abf13e 100644 --- a/raster/r.univar/stats.c +++ b/raster/r.univar/stats.c @@ -30,8 +30,8 @@ univar_stat *create_univar_stat_struct(int map_type, int n_perc) for (i = 0; i < n_zones; i++) { stats[i].sum = 0.0; stats[i].sumsq = 0.0; - stats[i].min = 0.0 / 0.0; /* set to nan as default */ - stats[i].max = 0.0 / 0.0; /* set to nan as default */ + stats[i].min = NAN; /* set to nan as default */ + stats[i].max = NAN; /* set to nan as default */ stats[i].n_perc = n_perc; if (n_perc > 0) stats[i].perc = (double *)G_malloc(n_perc * sizeof(double)); @@ -128,7 +128,7 @@ int print_stats(univar_stat * stats) var_coef = (stdev / mean) * 100.; /* perhaps stdev/fabs(mean) ? */ if (stats[z].n == 0) - stats[z].sum = stats[z].sum_abs = 0.0 / 0.0; + stats[z].sum = stats[z].sum_abs = NAN; sprintf(sum_str, "%.15g", stats[z].sum); G_trim_decimal(sum_str); @@ -182,9 +182,9 @@ int print_stats(univar_stat * stats) quartile_perc = (double *)G_calloc(stats[z].n_perc, sizeof(double)); if (stats[z].n == 0) { - quartile_25 = median = quartile_75 = 0.0 / 0.0; + quartile_25 = median = quartile_75 = NAN; for (i = 0; i < stats[z].n_perc; i++) - quartile_perc[i] = 0.0 / 0.0; + quartile_perc[i] = NAN; } else { for (i = 0; i < stats[z].n_perc; i++) { @@ -378,7 +378,7 @@ int print_stats_table(univar_stat * stats) var_coef = (stdev / mean) * 100.; /* perhaps stdev/fabs(mean) ? */ if (stats[z].n == 0) - stats[z].sum = stats[z].sum_abs = 0.0 / 0.0; + stats[z].sum = stats[z].sum_abs = NAN; if (zone_info.n_zones) { int z_cat = z + zone_info.min; @@ -424,9 +424,9 @@ int print_stats_table(univar_stat * stats) if (stats[z].n == 0) { - quartile_25 = median = quartile_75 = 0.0 / 0.0; + quartile_25 = median = quartile_75 = NAN; for (i = 0; i < stats[z].n_perc; i++) - quartile_perc[i] = 0.0 / 0.0; + quartile_perc[i] = NAN; } else { for (i = 0; i < stats[z].n_perc; i++) { diff --git a/vector/v.cluster/main.c b/vector/v.cluster/main.c index 91f7135522c..37670607a75 100644 --- a/vector/v.cluster/main.c +++ b/vector/v.cluster/main.c @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) c[2] = 0.0; n = 0; sum = sumsq = 0; - min = 1.0 / 0.0; + min = NAN; max = 0; kd = G_malloc(minpnts * sizeof(double)); ki = G_malloc(minpnts * sizeof(int)); @@ -469,7 +469,7 @@ int main(int argc, char *argv[]) c[2] = 0.0; n = 0; sum = sumsq = 0; - min = 1.0 / 0.0; + min = NAN; max = 0; kd = G_malloc(minpnts * sizeof(double)); ki = G_malloc(minpnts * sizeof(int)); diff --git a/vector/v.voronoi/skeleton.c b/vector/v.voronoi/skeleton.c index cda2113c0e4..3bb06f9c8ac 100644 --- a/vector/v.voronoi/skeleton.c +++ b/vector/v.voronoi/skeleton.c @@ -525,7 +525,7 @@ int tie_up(void) IPoints[i]); } - distmin = 1. / 0.; /* +inf */ + distmin = INFINITY; /* +inf */ xmin = x; ymin = y; From 5bb6fc3f891b2b72101f70bcc2c5aee43cce56c8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:35:45 +0100 Subject: [PATCH 040/264] ignore visual studio, cmake files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b0b67750ceb..0bf80807cf8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ OBJ.* locale/* bin.*/* dist.*/* +.vs/* +CMakeSettings.json config.log config.status* error.log From cfa7d629993ca3de7d9c12bf1754464a32c4aa74 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:36:16 +0100 Subject: [PATCH 041/264] use INFINITY rather than divide by zero --- raster/r.in.bin/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raster/r.in.bin/main.c b/raster/r.in.bin/main.c index 6d7368075e1..720aa347115 100644 --- a/raster/r.in.bin/main.c +++ b/raster/r.in.bin/main.c @@ -228,7 +228,7 @@ int main(int argc, char *argv[]) const char *outpre; char output[GNAME_MAX]; const char *title; - double null_val = 0.0/0.0; + double null_val = INFINITY; int is_fp; int is_signed; int bytes, hbytes; From 098f3a33db70998629abe91b542570ad65cd6e0a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:37:02 +0100 Subject: [PATCH 042/264] use _WIN32 for mingw32 and msvc --- lib/cairodriver/graph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cairodriver/graph.c b/lib/cairodriver/graph.c index 0bca6e87fe1..3d4e1ba7dae 100644 --- a/lib/cairodriver/graph.c +++ b/lib/cairodriver/graph.c @@ -29,7 +29,7 @@ #endif #include -#ifndef __MINGW32__ +#ifndef _WIN32 #include #include #include @@ -390,7 +390,7 @@ static int ends_with(const char *string, const char *suffix) static void map_file(void) { -#ifndef __MINGW32__ +#ifndef _WIN32 size_t size = HEADER_SIZE + ca.width * ca.height * sizeof(unsigned int); void *ptr; int fd; From 295a509442e5c89d58f19d3dd641119124bfdbc2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 02:38:03 +0100 Subject: [PATCH 043/264] add ssize_t for msvc --- include/config.h.cmake.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 3d32e11d1b2..52cd379277f 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -314,6 +314,9 @@ typedef @PID_TYPE@ pid_t; #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #endif -#endif +#include +typedef SSIZE_T ssize_t; + +#endif //_MSC_VER #endif /* _config_h */ From 227cb157196657a3fb7d7b8237475c22e4bec103 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:36:40 +0100 Subject: [PATCH 044/264] msvc add _USE_MATH_DEFINES an d export dll --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c9a3caab4f..7239443a823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.3) project(GRASSGIS) set(BUILD_SHARED_LIBS ON) +if(MSVC) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +endif() set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/find_scripts;${CMAKE_MODULE_PATH}") @@ -249,6 +252,10 @@ add_subdirectory(thirdparty) include(cmake/scripts.cmake) +if(MSVC) +add_definitions(-D_USE_MATH_DEFINES=1) +endif() + add_subdirectory(include) #include_directories("${CMAKE_SOURCE_DIR}/dist.x86_64-unknown-openbsd6.0/include") From 90891e81da55f07e1dab92daf5f129b696bd574d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:37:41 +0100 Subject: [PATCH 045/264] keep check for long long int in cache --- include/CMakeLists.txt | 2 -- include/config.h.cmake.in | 3 --- 2 files changed, 5 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index dab3aad7068..9e1b6934f18 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -150,8 +150,6 @@ include(CheckCSourceCompiles) set(CMAKE_REQUIRED_FLAGS ${CMAKE_C_FLAGS}) -unset(HAVE_LONG_LONG_INT CACHE) - CHECK_C_SOURCE_COMPILES(" int main(int argc, char *argv[]) { diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 52cd379277f..2d53ffb8d3f 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -80,9 +80,6 @@ /* define gid_t type */ typedef @GID_TYPE@ gid_t; -/* define off_t type */ -typedef @OFF_TYPE@ off_t; - /* define uid_t type */ typedef @UID_TYPE@ uid_t; From 93ce04d28a5e5e967c9e713ea7e327982071f4ec Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:38:19 +0100 Subject: [PATCH 046/264] include driver/init.c when building display drivers --- lib/CMakeLists.txt | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 3b8ae1ca051..c69b56bcdd3 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,12 +1,10 @@ -#order is relevant: - - build_library_in_subdir(datetime) add_subdirectory(gis) -build_library_in_subdir(driver DEPENDS grass_gis FREETYPE ICONV ZLIB) +build_library_in_subdir(driver +DEPENDS grass_gis FREETYPE ICONV ZLIB) add_subdirectory(proj) @@ -36,17 +34,28 @@ build_library_in_subdir(gmath build_library_in_subdir(linkm) - - +file(GLOB pngdriver_SRCS "./pngdriver/*.c") +list(APPEND pngdriver_SRCS "./driver/init.c") build_library_in_subdir(pngdriver +SOURCES ${pngdriver_SRCS} DEPENDS grass_driver LIBPNG ZLIB INCLUDES "./driver" ) + +file(GLOB psdriver_SRCS "./psdriver/*.c") +list(APPEND psdriver_SRCS "./driver/init.c") build_library_in_subdir(psdriver +SOURCES ${psdriver_SRCS} DEPENDS grass_driver - ) + INCLUDES "./driver" + ) + +file(GLOB htmldriver_SRCS "./htmldriver/*.c") +list(APPEND htmldriver_SRCS "./driver/init.c") build_library_in_subdir(htmldriver + SOURCES ${htmldriver_SRCS} DEPENDS grass_driver + INCLUDES "./driver" ) set(_grass_display_DEFS) @@ -62,7 +71,7 @@ if(WITH_CAIRO) list(APPEND _cairodriver_DEPENDS X11) endif() - file(GLOB cairodriver_SRCS "./cairodriver/*.c") + file(GLOB cairodriver_SRCS "./cairodriver/*.c") list(APPEND cairodriver_SRCS "./driver/init.c") build_library_in_subdir(cairodriver DEPENDS ${_cairodriver_DEPENDS} From 3f36aff00ec28eae6a82927a12e636b25cfcb525 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:40:26 +0100 Subject: [PATCH 047/264] use _WIN32 to build msvc and mingw32 --- lib/pngdriver/graph_set.c | 4 ++-- lib/raster/close.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pngdriver/graph_set.c b/lib/pngdriver/graph_set.c index 3092e1bac06..263d4c776d2 100644 --- a/lib/pngdriver/graph_set.c +++ b/lib/pngdriver/graph_set.c @@ -18,7 +18,7 @@ #include #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #else #include @@ -41,7 +41,7 @@ static void map_file(void) if (fd < 0) return; -#ifdef __MINGW32__ +#ifdef _WIN32 png.handle = CreateFileMapping((HANDLE) _get_osfhandle(fd), NULL, PAGE_READWRITE, 0, size, NULL); diff --git a/lib/raster/close.c b/lib/raster/close.c index 85ba35ad751..a7773d9ebcb 100644 --- a/lib/raster/close.c +++ b/lib/raster/close.c @@ -12,7 +12,7 @@ * \author USACERL and many others */ -#ifdef __MINGW32__ +#ifdef _WIN32 # include #endif @@ -51,7 +51,7 @@ static void sync_and_close(int fd, char *element, char *name) * after you are done writing all your data. */ -#ifndef __MINGW32__ +#ifndef _WIN32 if (fsync(fd)) { G_warning(_("Unable to flush file %s for raster map %s: %s"), element, name, strerror(errno)); From c486ecd391d88fd257a3fbb52f73012ea2fbfdd9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:41:53 +0100 Subject: [PATCH 048/264] update cmake for lib/db --- lib/db/CMakeLists.txt | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/lib/db/CMakeLists.txt b/lib/db/CMakeLists.txt index b7c674c7ebf..a7afd8928ad 100644 --- a/lib/db/CMakeLists.txt +++ b/lib/db/CMakeLists.txt @@ -1,29 +1,6 @@ - -# MODULE_TOPDIR = ../.. - -# #the order is relevant -# SUBDIRS = \ -# dbmi_base \ -# dbmi_client \ -# stubs \ -# dbmi_driver \ -# sqlp - -# #doxygen: -# DOXNAME=dbmi - -# include $(MODULE_TOPDIR)/include/Make/Dir.make -# include $(MODULE_TOPDIR)/include/Make/Doxygen.make - -# default: parsubdirs - - -# stubs: dbmi_base - -# dbmi_client: dbmi_base - - build_library_in_subdir(dbmi_base NAME grass_dbmibase + INCLUDES "./dbmi_base" + DEPENDS grass_gis HEADERS "dbstubs.h") build_library_in_subdir(dbmi_client NAME grass_dbmiclient From a028530eb1db8cc5bab185a4c49685affd5a1305 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:44:11 +0100 Subject: [PATCH 049/264] link with libm only on unix --- lib/gis/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 905b8ff8d48..0e659e411ee 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -31,7 +31,10 @@ endif() set(GRASS_VERSION_DATE 20160402) build_module(NAME grass_gis SOURCES "${gislib_SRCS}" - DEPENDS grass_datetime ZLIB LIBM + DEPENDS grass_datetime ZLIB OPTIONAL_DEPENDS PTHREAD BZIP2 ICONV DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}" ) +if(UNIX) + target_link_libraries(grass_gis LIBM) +endif() \ No newline at end of file From 9be5cefa8e5e7e51545a82e5cc95f867ef7da341 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:45:24 +0100 Subject: [PATCH 050/264] msvc: skip chmod on windows msvc --- lib/db/dbmi_base/login.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/db/dbmi_base/login.c b/lib/db/dbmi_base/login.c index ac650d73a4e..ffd5a8544f5 100644 --- a/lib/db/dbmi_base/login.c +++ b/lib/db/dbmi_base/login.c @@ -167,8 +167,9 @@ static int write_file(LOGIN * login) /* fchmod is not available on Windows */ /* fchmod ( fileno(fd), S_IRUSR | S_IWUSR ); */ + #ifndef _MSC_VER chmod(file, S_IRUSR | S_IWUSR); - + #endif for (i = 0; i < login->n; i++) { fprintf(fd, "%s|%s", login->data[i].driver, login->data[i].database); if (login->data[i].user) { From 704f33d43b7d781b95139da462acde4f82791d11 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 26 Dec 2019 11:46:14 +0100 Subject: [PATCH 051/264] use INFINITY rather than diivide by zero --- lib/btree2/kdtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/btree2/kdtree.c b/lib/btree2/kdtree.c index 509af0524ff..3a1f0d605e3 100644 --- a/lib/btree2/kdtree.c +++ b/lib/btree2/kdtree.c @@ -524,7 +524,7 @@ int kdtree_knn(struct kdtree *t, double *c, int *uid, double *d, int k, int *ski if (skip) sn.uid = *skip; - maxdist = 1.0 / 0.0; + maxdist = INFINITY; found = 0; /* go down */ From cb2fef8fcb1537c3a610a23f72e8f41a0761d087 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 13:19:27 +0100 Subject: [PATCH 052/264] add msvc specific headers: unistd.h, dirent.h --- CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7239443a823..334fe686983 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,8 +258,9 @@ endif() add_subdirectory(include) -#include_directories("${CMAKE_SOURCE_DIR}/dist.x86_64-unknown-openbsd6.0/include") - +if(MSVC) +include_directories("${CMAKE_SOURCE_DIR}/thirdparty/msvc/") +endif() include_directories("${CMAKE_BINARY_DIR}/include") add_subdirectory(lib) @@ -292,15 +293,10 @@ set(ALL_SUBDIRS # mswindows ) - - foreach(d ${ALL_SUBDIRS}) add_subdirectory(${d}) endforeach() - - - if(WITH_X11) build_program_in_subdir(visualization/ximgview DEPENDS grass_gis X11) endif() From b1af94a513b228141453867ce2fe94f446375ae4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 13:21:13 +0100 Subject: [PATCH 053/264] include grass/gis.h on msvc for __atribute fix --- include/defs/glocale.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/defs/glocale.h b/include/defs/glocale.h index 0d9eee010ea..0a393b5bef6 100644 --- a/include/defs/glocale.h +++ b/include/defs/glocale.h @@ -1,6 +1,8 @@ #ifndef GRASS_GLOCALEDEFS_H #define GRASS_GLOCALEDEFS_H - +#if defined(_MSC_VER) +#include "grass/gis.h" +#endif extern void G_init_locale(void); extern char *G_gettext(const char *, const char *) __attribute__((format_arg (2))); extern char *G_ngettext(const char *, const char *, const char *, unsigned long int) __attribute__((format_arg (2), format_arg (3))); From 170c12508d813358f7a4690223a23ba17f1f1130 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 13:21:55 +0100 Subject: [PATCH 054/264] use _WIN32 rather than__MINGW32__ --- include/gis.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/gis.h b/include/gis.h index 75518a6c1be..6077a10a81f 100644 --- a/include/gis.h +++ b/include/gis.h @@ -61,7 +61,7 @@ static const char *GRASS_copyright __attribute__ ((unused)) /*! \brief Cross-platform Newline Character */ #define NEWLINE '\n' -#ifdef __MINGW32__ +#ifdef _WIN32 # define HOST_NEWLINE "\r\n" #else # define HOST_NEWLINE "\n" @@ -111,13 +111,14 @@ static const char *GRASS_copyright __attribute__ ((unused)) #define UNIT_FILE "PROJ_UNITS" #define EPSG_FILE "PROJ_EPSG" -#ifdef __MINGW32__ +#ifdef _WIN32 #define CONFIG_DIR "GRASS7" #else #define CONFIG_DIR ".grass7" #endif /* define PI and friends */ +#if !defined(_MSC_VER) #undef M_PI #define M_PI 3.14159265358979323846 /* pi */ @@ -126,6 +127,7 @@ static const char *GRASS_copyright __attribute__ ((unused)) #undef M_PI_4 #define M_PI_4 0.78539816339744830962 /* pi/4 */ +#endif #undef M_R2D #define M_R2D 57.295779513082320877 /* 180/pi */ @@ -194,7 +196,7 @@ static const char *GRASS_copyright __attribute__ ((unused)) /* Cross-platform Directory Separator Character and null device stuff */ #define GRASS_DIRSEP '/' -#ifdef __MINGW32__ +#ifdef _WIN32 # define HOST_DIRSEP '\\' # define G_DEV_NULL "NUL:" #else @@ -593,7 +595,7 @@ typedef float FCELL; #if HAVE_INT64_T #include typedef int64_t grass_int64; -#elif defined(__MINGW32__) +#elif defined(_WIN32) typedef __int64 grass_int64; #elif HAVE_LONG_LONG_INT typedef long long int grass_int64; From f996ffa16fe61749bc285ed2a07ca439571d8547 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:25:23 +0100 Subject: [PATCH 055/264] grass moved to git... So follow that in cmake. --- CMakeLists.txt | 26 +++----------------------- cmake/repo_status.cmake | 31 +++++++++++++++++++++++++++++++ general/CMakeLists.txt | 3 +-- lib/CMakeLists.txt | 3 +++ 4 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 cmake/repo_status.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 334fe686983..a5b7ab9b6e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,30 +76,10 @@ set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_V set(NAME_VER ${GRASS_VERSION_MAJOR}) set(LIB_VER "${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.") - -set(GRASS_VERSION_SVN "exported") -find_program(SVN_VERSION NAMES svnversion) -if(SVN_VERSION) - execute_process( - COMMAND ${SVN_VERSION} -c - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE svnversion_OV - ERROR_VARIABLE svnversion_EV - RESULT_VARIABLE svnversion_RV - ) - - if(svnversion_RV ) - message(FATAL_ERROR "Error running svnversion=${svnversion_EV}") - else() - string(REGEX REPLACE "([0-9]+):" "r" GRASS_VERSION_SVN "${svnversion_OV}") - string(STRIP ${GRASS_VERSION_SVN} GRASS_VERSION_SVN) - endif() - #message(FATAL_ERROR "GRASS_VERSION_SVN=${GRASS_VERSION_SVN}| ${svnversion_OV}") - -endif() #SVN_VERSION - message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") -message(STATUS "GRASS_VERSION_SVN = '${GRASS_VERSION_SVN}'") + +include(cmake/repo_status.cmake) +repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) # Setup build locations. if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) diff --git a/cmake/repo_status.cmake b/cmake/repo_status.cmake new file mode 100644 index 00000000000..b19d07cab62 --- /dev/null +++ b/cmake/repo_status.cmake @@ -0,0 +1,31 @@ +function(repo_status repo_dir version_git_var) + +if(NOT EXISTS "${repo_dir}/.git") + message(STATUS ".git directory not found. GRASS_VERSION_GIT is set to 'exported'") + set(GRASS_VERSION_GIT "exported") + return() +endif() +find_package(Git) +if(NOT GIT_FOUND) + message(WARNING "git not found. GRASS_VERSION_GIT is set to 'exported'") + set(GRASS_VERSION_GIT "exported") + return() +endif() + +execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE git_rev_OV + ERROR_VARIABLE git_rev_EV + RESULT_VARIABLE git_rev_RV + ) + + if(git_rev_RV ) + message(FATAL_ERROR "Error running git ${git_rev_EV}") + else() + string(STRIP ${git_rev_OV} GRASS_VERSION_GIT) + endif() + + set(${version_git_var} "${GRASS_VERSION_GIT}" PARENT_SCOPE) + +endfunction() #repo_status \ No newline at end of file diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 2f3c5a3fd68..11eab963f2b 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -33,9 +33,8 @@ set(GRASS_VERSION_UPDATE_PKG "0.2") set(BUILD_ARCH "x86_64") build_program_in_subdir(g.version DEPENDS grass_gis GEOS GDAL -# DEFS "-DGRASS_VERSION_NUMBER=1;-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE};-DGRASS_VERSION_SVN=45454;-DGRASS_VERSION_UPDATE_PKG=0.2;-DARCH='x86_64'" DEFS "-DGRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" - "-DGRASS_VERSION_SVN=\"${GRASS_VERSION_SVN}\"" + "-DGRASS_VERSION_GIT=\"${GRASS_VERSION_GIT}\"" "-DGRASS_VERSION_UPDATE_PKG=${GRASS_VERSION_UPDATE_PKG}" "-DARCH=\"${BUILD_ARCH}\"" ) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c69b56bcdd3..52bfd7e4edb 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -8,8 +8,11 @@ DEPENDS grass_gis FREETYPE ICONV ZLIB) add_subdirectory(proj) +file(GLOB raster_SRCS "./raster/*.c") +list(APPEND raster_SRCS "./gis/gisinit.c") build_library_in_subdir(raster DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" + SOURCES ${raster_SRCS} DEPENDS GDAL PROJ4 grass_gproj ) From e64d0b073e8a39f4f3b3424a2e7d4c8a8c179eca Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:33:50 +0100 Subject: [PATCH 056/264] fix check for HAVE_LONG_LONG --- include/CMakeLists.txt | 20 +++++++++++++++++--- include/defs/gis.h | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 9e1b6934f18..5014c4a68be 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -3,7 +3,11 @@ include(CheckFunctionExists) #TODO: use CheckSymbolExists check_include_file(limits.h HAVE_LIMITS_H) check_include_file(termio.h HAVE_TERMIO_H) check_include_file(termios.h HAVE_TERMIOS_H) -check_include_file(unistd.h HAVE_UNISTD_H) +if(NOT MSVC) + check_include_file(unistd.h HAVE_UNISTD_H) +else() + #set(HAVE_UNISTD_H 1) +endif() check_include_file(values.h HAVE_VALUES_H) check_include_file(zlib.h HAVE_ZLIB_H) if(TARGET BZIP2) @@ -14,7 +18,7 @@ check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) check_include_file(sys/mtio.h HAVE_SYS_MTIO_H) check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) -check_include_file(time.h TIME_WITH_SYS_TIME) +check_include_file(time.h HAVE_TIME_H) check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H) @@ -157,7 +161,17 @@ long long int x; return 0; } " -HAVE_LONG_LONG_INT ) +HAVE_LONG_LONG_INT) + +CHECK_C_SOURCE_COMPILES(" +#include +#include +#include +int main() { +struct tm *tp; +; return 0; } +" +TIME_WITH_SYS_TIME) CHECK_FUNCTION_EXISTS(ftime HAVE_FTIME) CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME) diff --git a/include/defs/gis.h b/include/defs/gis.h index 1110a1397ee..962a1253b77 100644 --- a/include/defs/gis.h +++ b/include/defs/gis.h @@ -79,6 +79,7 @@ * if GDAL is compiled with Visual Studio and GRASS is compiled with * MinGW. This patch must be applied before other GDAL/OGR headers are * included, as done by gprojects.h and vector.h */ +#ifndef _MSC_VER #if defined(__MINGW32__) && HAVE_GDAL # include # if GDAL_VERSION_NUM < 2030000 @@ -90,6 +91,7 @@ # endif # endif #endif +#endif /* _MSC_VER */ /* adj_cellhd.c */ void G_adjust_Cell_head(struct Cell_head *, int, int); From f115c44f59473ca1f8f35a95e5490f6b37d645d3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:34:47 +0100 Subject: [PATCH 057/264] include math.h only on msvc. To be discussed --- lib/cairodriver/text.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cairodriver/text.c b/lib/cairodriver/text.c index bf1ed06583d..f82124eb67f 100644 --- a/lib/cairodriver/text.c +++ b/lib/cairodriver/text.c @@ -11,6 +11,9 @@ \author Lars Ahlzen (original contibutor) \author Glynn Clements */ +#if defined(_MSC_VER) +#include +#endif #include #include "cairodriver.h" From 54116bb33f6f53df312bb681eb42ad26e9accc6a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:35:56 +0100 Subject: [PATCH 058/264] void* arithmetic (GCC extension) is not allowed in msvc --- lib/raster3d/mask.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/raster3d/mask.c b/lib/raster3d/mask.c index c704656c429..2e6df3e4c21 100644 --- a/lib/raster3d/mask.c +++ b/lib/raster3d/mask.c @@ -306,12 +306,12 @@ void Rast3d_mask_tile(RASTER3D_Map * map, int tileIndex, void *tile, int type) for (dy = y; dy < rows; dy++) { for (dx = x; dx < cols; dx++) { RASTER3D_MASKNUM(map, dx, dy, dz, tile, type); - tile += length; + tile = (int*)tile + length; } - tile += xLength; + tile = (int*) + xLength; } - tile += yLength; + tile = (int*) + yLength; } } From d5bfd08bbb56e4a7d7aca0b520ab9b33cdc3e19e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:37:08 +0100 Subject: [PATCH 059/264] disable d.mon, d.font on msvc. TBD --- display/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/display/CMakeLists.txt b/display/CMakeLists.txt index 54cada596cc..fd16882eb2c 100644 --- a/display/CMakeLists.txt +++ b/display/CMakeLists.txt @@ -2,14 +2,17 @@ build_program_in_subdir(d.barscale DEPENDS grass_sym grass_display grass_gis ) build_program_in_subdir(d.colorlist DEPENDS grass_gis grass_display) build_program_in_subdir(d.colortable DEPENDS grass_gis grass_display) build_program_in_subdir(d.erase DEPENDS grass_gis grass_display) -build_program_in_subdir(d.font DEPENDS grass_gis grass_display grass_raster) +if(NOT MSVC) + build_program_in_subdir(d.font DEPENDS grass_gis grass_display grass_raster) + #libgen.h does not exists on windows msvc + build_program_in_subdir(d.mon DEPENDS grass_gis grass_display) +endif() build_program_in_subdir(d.fontlist DEPENDS grass_gis grass_display grass_raster) build_program_in_subdir(d.geodesic DEPENDS grass_gis grass_display) build_program_in_subdir(d.graph DEPENDS grass_gis grass_sym grass_display) build_program_in_subdir(d.grid DEPENDS grass_gis grass_sym grass_gproj grass_display) build_program_in_subdir(d.his DEPENDS grass_gis grass_display) build_program_in_subdir(d.histogram DEPENDS grass_gis grass_display) -build_program_in_subdir(d.mon DEPENDS grass_gis grass_display) build_program_in_subdir(d.info DEPENDS grass_gis grass_display) build_program_in_subdir(d.labels DEPENDS grass_gis grass_display) build_program_in_subdir(d.legend DEPENDS grass_gis grass_display grass_raster3d) @@ -22,4 +25,3 @@ build_program_in_subdir(d.rast DEPENDS grass_gis grass_display grass_raster) build_program_in_subdir(d.rast.arrow DEPENDS grass_gis grass_raster grass_display) build_program_in_subdir(d.rast.num DEPENDS grass_gis grass_display grass_raster) build_program_in_subdir(d.where DEPENDS grass_gis grass_display grass_gproj) - From e730ba2652997ef659e18dc85da7734303a1783a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:39:27 +0100 Subject: [PATCH 060/264] missing O_ACCMODE on msvc --- include/config.h.cmake.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 2d53ffb8d3f..32f7d358f62 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -314,6 +314,9 @@ typedef @PID_TYPE@ pid_t; #include typedef SSIZE_T ssize_t; +/* open for reading, writing, or both (not in fcntl.h) */ +#define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR) + #endif //_MSC_VER #endif /* _config_h */ From bf6329e67a03f5b97e0b760e29d230ad8c900adf Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 14:40:47 +0100 Subject: [PATCH 061/264] Add unistd.h on windows Source copied from http://stackoverflow.com/a/826027 --- thirdparty/msvc/unistd.h | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 thirdparty/msvc/unistd.h diff --git a/thirdparty/msvc/unistd.h b/thirdparty/msvc/unistd.h new file mode 100644 index 00000000000..a09e1d92e09 --- /dev/null +++ b/thirdparty/msvc/unistd.h @@ -0,0 +1,58 @@ +#ifndef _UNISTD_H +#define _UNISTD_H 1 + +/* This file intended to serve as a drop-in replacement for + * unistd.h on Windows. + * Please add functionality as neeeded. + * Original file from: http://stackoverflow.com/a/826027 + */ + +#include +#include +#include /* for getpid() and the exec..() family */ +#include /* for _getcwd() and _chdir() */ + +#define srandom srand +#define random rand + +/* Values for the second argument to access. + These may be OR'd together. */ +#define R_OK 4 /* Test for read permission. */ +#define W_OK 2 /* Test for write permission. */ +#define X_OK R_OK /* execute permission - unsupported in Windows, + use R_OK instead. */ +#define F_OK 0 /* Test for existence. */ + +#define access _access +#define dup2 _dup2 +#define execve _execve +#define ftruncate _chsize +#define unlink _unlink +#define fileno _fileno +#define getcwd _getcwd +#define chdir _chdir +#define isatty _isatty +#define lseek _lseek +/* read, write, and close are NOT being #defined here, + * because while there are file handle specific versions for Windows, + * they probably don't work for sockets. + * You need to look at your app and consider whether + * to call e.g. closesocket(). + */ + +//#define ssize_t int + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +/* should be in some equivalent to */ + +typedef __int16 int16_t; +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int8 uint8_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; + +#endif /* unistd.h */ \ No newline at end of file From 2956f189c2f6f671d76b0b2601ce33968166472d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 15:07:46 +0100 Subject: [PATCH 062/264] dbmi_base: add dirent.h and dirent.c for msvc --- lib/db/CMakeLists.txt | 10 ++- lib/db/dbmi_base/msvc/dirent.c | 113 +++++++++++++++++++++++++++++++++ lib/db/dbmi_base/msvc/dirent.h | 50 +++++++++++++++ 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 lib/db/dbmi_base/msvc/dirent.c create mode 100644 lib/db/dbmi_base/msvc/dirent.h diff --git a/lib/db/CMakeLists.txt b/lib/db/CMakeLists.txt index a7afd8928ad..6f4dfb70da4 100644 --- a/lib/db/CMakeLists.txt +++ b/lib/db/CMakeLists.txt @@ -1,5 +1,13 @@ + +file(GLOB dbmibase_SRCS "./dbmi_base/*.c") +if(MSVC) + set(dbmibase_INCLUDES "./dbmi_base" "./dbmi_base/msvc") + list(APPEND dbmibase_SRCS "./dbmi_base/msvc/dirent.c") +endif() + build_library_in_subdir(dbmi_base NAME grass_dbmibase - INCLUDES "./dbmi_base" + INCLUDES ${dbmibase_INCLUDES} + SOURCES ${dbmibase_SRCS} DEPENDS grass_gis HEADERS "dbstubs.h") diff --git a/lib/db/dbmi_base/msvc/dirent.c b/lib/db/dbmi_base/msvc/dirent.c new file mode 100644 index 00000000000..a5466566ecc --- /dev/null +++ b/lib/db/dbmi_base/msvc/dirent.c @@ -0,0 +1,113 @@ + +#include +#include +#include + +typedef ptrdiff_t handle_type; /* C99's intptr_t not sufficiently portable */ + +struct DIR +{ + handle_type handle; /* -1 for failed rewind */ + struct _finddata_t info; + struct dirent result; /* d_name null iff first time */ + char* name; /* null-terminated char string */ +}; + +DIR* opendir(const char* name) +{ + DIR* dir = 0; + + if (name && name[0]) + { + size_t base_length = strlen(name); + const char* all = /* search pattern must end with suitable wildcard */ + strchr("/\\", name[base_length - 1]) ? "*" : "/*"; + + if ((dir = (DIR*)malloc(sizeof * dir)) != 0 && + (dir->name = (char*)malloc(base_length + strlen(all) + 1)) != 0) + { + strcat(strcpy(dir->name, name), all); + + if ((dir->handle = + (handle_type)_findfirst(dir->name, &dir->info)) != -1) + { + dir->result.d_name = 0; + } + else /* rollback */ + { + free(dir->name); + free(dir); + dir = 0; + } + } + else /* rollback */ + { + free(dir); + dir = 0; + errno = ENOMEM; + } + } + else + { + errno = EINVAL; + } + + return dir; +} + +int closedir(DIR* dir) +{ + int result = -1; + + if (dir) + { + if (dir->handle != -1) + { + result = _findclose(dir->handle); + } + + free(dir->name); + free(dir); + } + + if (result == -1) /* map all errors to EBADF */ + { + errno = EBADF; + } + + return result; +} + +struct dirent* readdir(DIR* dir) +{ + struct dirent* result = 0; + + if (dir && dir->handle != -1) + { + if (!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1) + { + result = &dir->result; + result->d_name = dir->info.name; + } + } + else + { + errno = EBADF; + } + + return result; +} + +void rewinddir(DIR* dir) +{ + if (dir && dir->handle != -1) + { + _findclose(dir->handle); + dir->handle = (handle_type)_findfirst(dir->name, &dir->info); + dir->result.d_name = 0; + } + else + { + errno = EBADF; + } +} diff --git a/lib/db/dbmi_base/msvc/dirent.h b/lib/db/dbmi_base/msvc/dirent.h new file mode 100644 index 00000000000..a02a0d828a7 --- /dev/null +++ b/lib/db/dbmi_base/msvc/dirent.h @@ -0,0 +1,50 @@ +#ifndef DIRENT_INCLUDED +#define DIRENT_INCLUDED + +/* + + Declaration of POSIX directory browsing functions and types for Win32. + + Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) + History: Created March 1997. Updated June 2003. + Rights: See end of file. + +*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct DIR DIR; + +struct dirent +{ + char *d_name; +}; + +DIR *opendir(const char *); +int closedir(DIR *); +struct dirent *readdir(DIR *); +void rewinddir(DIR *); + +/* + + Copyright Kevlin Henney, 1997, 2003. All rights reserved. + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose is hereby granted without fee, provided + that this copyright and permissions notice appear in all copies and + derivatives. + + This software is supplied "as is" without express or implied warranty. + + But that said, if there are any problems please get in touch. + +*/ + +#ifdef __cplusplus +} +#endif + +#endif From 33222231b01ded6460ba9b426ef63e2d70374b55 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 15:19:27 +0100 Subject: [PATCH 063/264] use macro INFINITY rather than GCC divide by zero --- general/g.region/printwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/g.region/printwindow.c b/general/g.region/printwindow.c index 4d167e36502..db67bcdc155 100644 --- a/general/g.region/printwindow.c +++ b/general/g.region/printwindow.c @@ -466,7 +466,7 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag) double convergence; if (G_projection() == PROJECTION_XY) - convergence = 0./0.; + convergence = INFINITY; else if (G_projection() == PROJECTION_LL) convergence = 0.0; else { From 51a740b0f6a5312b98adda0c3f6b3cea685866df Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 15:38:06 +0100 Subject: [PATCH 064/264] Revert "include math.h only on msvc. To be discussed" This reverts commit f115c44f59473ca1f8f35a95e5490f6b37d645d3. --- lib/cairodriver/text.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/cairodriver/text.c b/lib/cairodriver/text.c index f82124eb67f..bf1ed06583d 100644 --- a/lib/cairodriver/text.c +++ b/lib/cairodriver/text.c @@ -11,9 +11,6 @@ \author Lars Ahlzen (original contibutor) \author Glynn Clements */ -#if defined(_MSC_VER) -#include -#endif #include #include "cairodriver.h" From d21a7e37dd17fbcfae6583f919f2ed734042f0e0 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 15:44:43 +0100 Subject: [PATCH 065/264] MSVC: fix missing strings.h --- thirdparty/msvc/strings.h | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 thirdparty/msvc/strings.h diff --git a/thirdparty/msvc/strings.h b/thirdparty/msvc/strings.h new file mode 100644 index 00000000000..dcf9ed87b7f --- /dev/null +++ b/thirdparty/msvc/strings.h @@ -0,0 +1,5 @@ +/* MSVC does not have strings.h */ +#ifndef _INC_STRINGS_H +#define _INC_STRINGS_H 1 +#include +#endif \ No newline at end of file From a5081a9814f6886cf9ea0214fecbcae5adba6bcd Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 18:23:38 +0100 Subject: [PATCH 066/264] use math defines on msvc --- CMakeLists.txt | 8 ++------ include/gis.h | 5 ++++- lib/CMakeLists.txt | 22 +++++++++++++++++----- lib/db/CMakeLists.txt | 1 - lib/gis/CMakeLists.txt | 7 ++++++- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5b7ab9b6e3..9d8ec27c66f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,20 +227,16 @@ macro(build_program_in_subdir dir_name) endif() endmacro() - add_subdirectory(thirdparty) include(cmake/scripts.cmake) -if(MSVC) -add_definitions(-D_USE_MATH_DEFINES=1) -endif() - add_subdirectory(include) if(MSVC) -include_directories("${CMAKE_SOURCE_DIR}/thirdparty/msvc/") + include_directories("${CMAKE_SOURCE_DIR}/thirdparty/msvc/") endif() + include_directories("${CMAKE_BINARY_DIR}/include") add_subdirectory(lib) diff --git a/include/gis.h b/include/gis.h index 6077a10a81f..94777e0c969 100644 --- a/include/gis.h +++ b/include/gis.h @@ -118,7 +118,10 @@ static const char *GRASS_copyright __attribute__ ((unused)) #endif /* define PI and friends */ -#if !defined(_MSC_VER) +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES 1 +#include +#else #undef M_PI #define M_PI 3.14159265358979323846 /* pi */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 52bfd7e4edb..d710f49261f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,10 +1,16 @@ +set(use_math_DEFS "") +if(MSVC) + set(use_math_DEFS "-D_USE_MATH_DEFINES=1") +endif() + build_library_in_subdir(datetime) add_subdirectory(gis) build_library_in_subdir(driver -DEPENDS grass_gis FREETYPE ICONV ZLIB) + DEFS "${use_math_DEFS}" + DEPENDS grass_gis FREETYPE ICONV ZLIB) add_subdirectory(proj) @@ -31,16 +37,18 @@ build_library_in_subdir(external/ccmath) build_library_in_subdir(external/shapelib NAME grass_shape HEADERS "shapefil.h") + build_library_in_subdir(gmath DEPENDS grass_ccmath grass_gis - OPTIONAL_DEPENDS FFTW ) + DEFS "${use_math_DEFS}" + OPTIONAL_DEPENDS FFTW) build_library_in_subdir(linkm) file(GLOB pngdriver_SRCS "./pngdriver/*.c") list(APPEND pngdriver_SRCS "./driver/init.c") build_library_in_subdir(pngdriver -SOURCES ${pngdriver_SRCS} + SOURCES ${pngdriver_SRCS} DEPENDS grass_driver LIBPNG ZLIB INCLUDES "./driver" ) @@ -153,10 +161,14 @@ endif() add_subdirectory(temporal) -#add_subdirectory(python) +# TODO: some issue with windows and ctypesgen.py (To be discussed) +if(NOT MSVC) + add_subdirectory(python) +endif() build_library_in_subdir(iostream SRC_REGEX "*.cpp" DEPENDS grass_gis) build_library_in_subdir(manage DEPENDS grass_raster grass_vector grass_raster3d ) -build_library_in_subdir(calc DEPENDS grass_raster) +build_library_in_subdir(calc +DEPENDS grass_raster) diff --git a/lib/db/CMakeLists.txt b/lib/db/CMakeLists.txt index 6f4dfb70da4..2796781e8e7 100644 --- a/lib/db/CMakeLists.txt +++ b/lib/db/CMakeLists.txt @@ -25,5 +25,4 @@ build_library_in_subdir(dbmi_driver NAME grass_dbmidriver INCLUDES "./dbmi_base" ) - add_subdirectory(sqlp) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 0e659e411ee..2df790021df 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -30,10 +30,15 @@ endif() set(GRASS_VERSION_DATE 20160402) +set(grass_gis_DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}") +if(MSVC) + set(grass_gis_DEFS "${grass_gis_DEFS};-D_USE_MATH_DEFINES=1") +endif() + build_module(NAME grass_gis SOURCES "${gislib_SRCS}" DEPENDS grass_datetime ZLIB OPTIONAL_DEPENDS PTHREAD BZIP2 ICONV - DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}" + DEFS "${grass_gis_DEFS}" ) if(UNIX) target_link_libraries(grass_gis LIBM) From 4d276ea36834d29b925a90740bcf192b9f964f2c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 18:24:32 +0100 Subject: [PATCH 067/264] update find package of fftw added required defines into parent scope --- find_scripts/FindFFTW.cmake | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/find_scripts/FindFFTW.cmake b/find_scripts/FindFFTW.cmake index 120b5fb167d..27f0fdcbb19 100644 --- a/find_scripts/FindFFTW.cmake +++ b/find_scripts/FindFFTW.cmake @@ -1,11 +1,29 @@ find_path(FFTW_INCLUDE_DIR fftw3.h) - +set(HAVE_FFTW3_H 0) +set(HAVE_FFTW_H 0) +set(HAVE_DFFTW_H 0) +if(FFTW_INCLUDE_DIR) + set(HAVE_FFTW3_H 1) + message(STATUS "Found fftw3.h in ${FFTW_INCLUDE_DIR}") +else() + find_path(FFTW_INCLUDE_DIR fftw.h) + if(FFTW_INCLUDE_DIR) + set(HAVE_FFTW_H 1) + message(STATUS "Found fftw.h in ${FFTW_INCLUDE_DIR}") + endif() +endif() + +find_path(DFFTW_INCLUDE_DIR dfftw.h) +if(DFFTW_INCLUDE_DIR) + set(HAVE_DFFTW_H 1) + message(STATUS "Found dfftw.h in ${FFTW_INCLUDE_DIR}") +endif() + #fftw double lib find_library(FFTWD_LIB fftw3 ) find_library(FFTWD_THREADS_LIB fftw3_threads) # threads support set(FFTW_LIBRARIES) - if(FFTWD_LIB) set(FFTWD_FOUND 1) set(FFTW_LIBRARIES ${FFTWD_LIB}) @@ -30,6 +48,10 @@ if(NOT FFTWD_FOUND AND NOT FFTWF_FOUND ) set(FFTW_FOUND FALSE) endif() +#copy HAVE_ to parent scope so that we can use in include/CMakeLists.txt and rest +set(HAVE_FFTW3_H ${HAVE_FFTW3_H} PARENT_SCOPE) +set(HAVE_FFTW_H ${HAVE_FFTW_H} PARENT_SCOPE) +set(HAVE_DFFTW_H ${HAVE_DFFTW_H} PARENT_SCOPE) include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW REQUIRED_VARS FFTW_LIBRARIES FFTW_INCLUDE_DIR) From f6ef68c50157b02ecf05e43d5e063a6dc5deea97 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 18:27:06 +0100 Subject: [PATCH 068/264] update setting of HAVE_* defines. 1/n use cmake target check if possible --- include/config.h.cmake.in | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 32f7d358f62..552867feb12 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -90,7 +90,7 @@ typedef @PID_TYPE@ pid_t; #cmakedefine HAVE_LONG_LONG_INT ${HAVE_LONG_LONG_INT} /* Define the return type of signal handlers */ -#define RETSIGTYPE @RETSIGTYPE_RESULT@ +#define RETSIGTYPE ${RETSIGTYPE} /* define if ftime() exists */ #cmakedefine HAVE_FTIME ${HAVE_FTIME} @@ -195,7 +195,7 @@ typedef @PID_TYPE@ pid_t; #cmakedefine HAVE_FT2BUILD_H ${HAVE_FT2BUILD_H} /* Whether or not we are using G_socks for display communications */ -#cmakedefine USE_G_SOCKS ${GDEBUG} +#cmakedefine USE_G_SOCKS ${USE_G_SOCKS} /* define if X is disabled or unavailable */ #cmakedefine X_DISPLAY_MISSING ${X_DISPLAY_MISSING} @@ -251,34 +251,11 @@ typedef @PID_TYPE@ pid_t; #define INT_MIN -MAXINT #endif - - /* * Defines needed to get large file support - from cdrtools-2.01 */ -/* MINGW32 LFS */ - -/* define if we have LFS */ -#undef HAVE_LARGEFILES - -#ifdef HAVE_LARGEFILES /* If we have working largefiles at all */ - /* This is not defined with glibc-2.1.3 */ - -#if 0 - -/* what to do with these four? configure comments these out */ - -#undef _LARGEFILE_SOURCE /* To make ftello() visible (HP-UX 10.20). */ -#undef _LARGE_FILES /* Large file defined on AIX-style hosts. */ -#undef _XOPEN_SOURCE /* To make ftello() visible (glibc 2.1.3). */ -#undef _XOPEN_SOURCE_EXTENDED - /* XXX We don't use this because glibc2.1.3*/ - /* XXX is bad anyway. If we define */ - /* XXX _XOPEN_SOURCE we will loose caddr_t */ -#endif -#endif /* HAVE_LARGEFILES */ - +#define HAVE_LARGEFILES ${HAVE_LARGEFILES} /* define if langinfo.h exists */ #cmakedefine HAVE_LANGINFO_H ${HAVE_LANGINFO_H} From ff7cd12e47dcf9fbf183aed5f0d47ee93e82dfa2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 18:28:07 +0100 Subject: [PATCH 069/264] add odbc target on windows --- thirdparty/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index b45dc2ff2da..bc9f281da5f 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -69,6 +69,15 @@ if(WITH_X11) endif() endif() +if(WIN32) + find_package(ODBC) + if(ODBC_FOUND) + add_library(ODBC INTERFACE IMPORTED GLOBAL) + set_property(TARGET ODBC PROPERTY INTERFACE_LINK_LIBRARIES ${ODBC_LIBRARIES} ) + set_property(TARGET PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ODBC_INCLUDE_DIRS}") + endif() +endif() + find_package(TIFF REQUIRED) add_library(TIFF INTERFACE IMPORTED GLOBAL) set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY_${find_library_suffix}} ) From f53bfb0a38e8d9f6dfedc88aaf06cdb0632b38b0 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 18:29:03 +0100 Subject: [PATCH 070/264] update values in generated config.h --- include/CMakeLists.txt | 136 +++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 86 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 5014c4a68be..410c94ec9d8 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -6,14 +6,11 @@ check_include_file(termios.h HAVE_TERMIOS_H) if(NOT MSVC) check_include_file(unistd.h HAVE_UNISTD_H) else() - #set(HAVE_UNISTD_H 1) + # unistd.h in stocked in thirdparty/msvc/ + set(HAVE_UNISTD_H 1) endif() check_include_file(values.h HAVE_VALUES_H) check_include_file(zlib.h HAVE_ZLIB_H) -if(TARGET BZIP2) - #check_include_file(bzlib.h HAVE_BZLIB_H) - set(HAVE_BZLIB_H 1) -endif() check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) check_include_file(sys/mtio.h HAVE_SYS_MTIO_H) check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) @@ -24,108 +21,74 @@ check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H) check_include_file(g2c.h HAVE_G2C_H) check_include_file(f2c.h HAVE_F2C_H) -check_include_file(cblas.h HAVE_CBLAS_H) -check_include_file(clapack.h HAVE_CLAPACK_H) -check_include_file(langinfo.h HAVE_LANGINFO_H) -if(TARGET FREETYPE) - #check_include_file(ft2build.h HAVE_FT2BUILD_H) - set(HAVE_FT2BUILD_H 1) -endif() - -set(CMAKE_REQUIRED_INCLUDES "${FFTW_INCLUDE_DIR}") -check_include_file(pthread.h HAVE_PTHREAD_H) -check_include_file(regex.h HAVE_REGEX_H) -check_include_file(iconv.h HAVE_ICONV_H) -check_include_file(libintl.h HAVE_LIBINTL_H) -check_include_file(dbm.h HAVE_DBM_H) - -check_include_file(dfftw.h HAVE_DFFTW_H) -check_include_file(fftw3.h HAVE_FFTW3_H) -if(NOT HAVE_FFTW3_H) - check_include_file(fftw.h HAVE_FFTW_H) -endif() - -set(HAVE_ZLIB_H 0) -if(TARGET LIBJPEG) - set(HAVE_ZLIB_H 1) - #check_include_file(zlib.h HAVE_ZLIB_H) -endif() -set(HAVE_JPEGLIB_H 0) -if(TARGET LIBJPEG) - set(HAVE_JPEGLIB_H 1) - #check_include_file(jpeglib.h HAVE_JPEGLIB_H) +set(HAVE_PTHREAD_H 0) +set(HAVE_REGEX_H 0) +set(HAVE_LIBINTL_H 0) +set(HAVE_LANGINFO_H 0) +set(HAVE_DBM_H 0) +if(NOT MSVC) + check_include_file(pthread.h HAVE_PTHREAD_H) + check_include_file(regex.h HAVE_REGEX_H) + check_include_file(libintl.h HAVE_LIBINTL_H) + check_include_file(langinfo.h HAVE_LANGINFO_H) + check_include_file(dbm.h HAVE_DBM_H) endif() -set(HAVE_PNG_H 0) -if(TARGET LIBPNG) - set(HAVE_PNG_H 1) -endif() +#set(CMAKE_REQUIRED_INCLUDES "${FFTW_INCLUDE_DIR}") -set(HAVE_TIFFIO_H 0) -if(TARGET TIFF) - set(HAVE_TIFFIO_H 1) - #check_include_file(tiffio.h HAVE_TIFFIO_H) -endif() +check_target(ICONV HAVE_ICONV_H) +check_target(BZIP2 HAVE_BZLIB_H) +check_target(ZLIB HAVE_ZLIB_H) +check_target(LIBJPEG HAVE_JPEGLIB_H) +check_target(LIBPNG HAVE_PNG_H) +check_target(TIFF HAVE_TIFFIO_H) +check_target(GEOS HAVE_GEOS) +check_target(GDAL HAVE_GDAL) +check_target(GDAL HAVE_OGR) +check_target(SQLITE HAVE_SQLITE) -set(HAVE_GEOS 0) -if(TARGET GEOS) - set(HAVE_GEOS 1) -endif() +check_target(BLAS HAVE_LIBBLAS) +check_target(BLAS HAVE_CBLAS_H) -set(HAVE_GDAL 0) -set(HAVE_OGR 0) -if(TARGET GDAL) - set(HAVE_GDAL 1) - set(HAVE_OGR 1) -endif() +check_target(LAPACK HAVE_LIBLAPACK) +check_target(LAPACK HAVE_CLAPACK_H) -set(HAVE_SQLITE 0) -if(TARGET SQLITE) - set(HAVE_SQLITE 1) -endif() +check_target(FREETYPE HAVE_FT2BUILD_H) +check_target(POSTGRES HAVE_POSTGRES) +check_target(ODBC HAVE_SQL_H) -if(WITH_NLS) - set(USE_NLS 1) -endif() +# Whether or not we are using G_socks for display communications +set(USE_G_SOCKS 0) -set(HAVE_LIBBLAS 0) -if(TARGET BLAS) - set(HAVE_LIBBLAS 1) +set(HAVE_LARGEFILES 0) +if(WITH_LARGEFILES) + set(HAVE_LARGEFILES 1) endif() -set(HAVE_LIBLAPACK 0) -if(TARGET LAPACK) - set(HAVE_LIBLAPACK 1) +if(MSVC) + set(GID_TYPE int) + set(UID_TYPE int) + set(RETSIGTYPE "void") +else() + set(RETSIGTYPE "int") endif() ########################TODO######################## -set(HAVE_POSTGRES 0) - set(HAVE_LIBPQ_FE_H 0) - set(HAVE_PQCMDTUPLES 0) -if(TARGET POSTGRES) - set(HAVE_POSTGRES 1) - set(HAVE_LIBPQ_FE_H 0) - set(HAVE_PQCMDTUPLES 0) -endif() +#no target ATLAS in thirdpary/CMakeLists.txt +check_target(ATLAS HAVE_LIBATLAS) +set(HAVE_LIBPQ_FE_H 0) +set(HAVE_PQCMDTUPLES 0) -set(HAVE_LIBATLAS 0) -if(TARGET ATLAS) - set(HAVE_LIBATLAS 1) +set(USE_NLS 0) +if(WITH_NLS) + set(USE_NLS 1) endif() - set(HAVE_READLINE_READLINE_H 0) -set(HAVE_SQL_H 0) -set(USE_NLS 0) -set(USE_G_SOCKS 0) -set(RETSIGTYPE_RESULT "int") if(MSVC) -set(GID_TYPE int) -set(UID_TYPE int) set(PID_TYPE int) -set(OFF_TYPE off_t) endif() set(_OE_SOCKETS 0) @@ -133,6 +96,7 @@ set(USE_DELTA_FOR_TZ 0) set(_REENTRANT 0) ########################TODO######################## + set(X_DISPLAY_MISSING 1) if(TARGET X11) set(X_DISPLAY_MISSING 0) From 898c1345919cc0885ab1948a38804904e47a3fab Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 18:31:42 +0100 Subject: [PATCH 071/264] reorganize cmake option defaults, cmake flags, macros cmake c and cxx flags include _CRT_SECURE_NO_WARNINGS to avoid a lot msdn warnings check_target macro is a helper to reduce number of lines in include/CMakeLists.txt --- CMakeLists.txt | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d8ec27c66f..d8e301a9327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,21 +9,21 @@ endif() set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/find_scripts;${CMAKE_MODULE_PATH}") -#TODO -option(WITH_CAIRO "Build with cairo support ." ON) +set(default_option_enabled ON) if(WIN32) -option(WITH_X11 "Build with X11 support ." OFF) -else() -option(WITH_X11 "Build with X11 support ." ON) + set(default_option_enabled OFF) endif() + +option(WITH_CAIRO "Build with cairo support ." ON) +option(WITH_X11 "Build with X11 support ." ${default_option_enabled}) option(WITH_OPENGL "Build with opengl support ." ON) option(WITH_SQLITE "enable sqlite support" ON) option(WITH_POSTGRES "enable postgres support" OFF) -option(WITH_NLS "enable sqlite support" ON) +option(WITH_NLS "enable sqlite support" ${default_option_enabled}) option(WITH_BZLIB "enable sqlite support" ON) option(WITH_BLAS "enable sqlite support" ON) option(WITH_LAPACK "enable sqlite support" ON) - +option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) if(APPLE) if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) @@ -50,11 +50,16 @@ set(BUILD_ARCH "x86_64") file(STRINGS "include/VERSION" GRASS_VERSION_STRINGS) list(LENGTH GRASS_VERSION_STRINGS GRASS_VERSION_FILE_LENGTH) -if(WIN32) -set(CMAKE_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS") -if(CMAKE_C_FLAGS) -set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") -endif() +if(MSVC) + set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS") + if(CMAKE_C_FLAGS) + set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") + endif() + + set(GRASS_CXX_FLAGS "/D_CRT_SECURE_NO_WARNINGS") + if(CMAKE_CXX_FLAGS) + set(CMAKE_CXX_FLAGS "${GRASS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") + endif() endif() if(GRASS_VERSION_FILE_LENGTH LESS 3 ) @@ -227,6 +232,14 @@ macro(build_program_in_subdir dir_name) endif() endmacro() +macro(check_target target_name have_define_var) +set(${have_define_var} 0) +if(TARGET ${target_name}) + message(STATUS "${target_name} package found. Setting ${have_define_var} to 1") + set(${have_define_var} 1) +endif() +endmacro() + add_subdirectory(thirdparty) include(cmake/scripts.cmake) From ab2b96127e66198f32b6799342b1fae6365f9fc3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 19:24:53 +0100 Subject: [PATCH 072/264] simlib: min, max are already available Find which C standard library does not provide them And if there is one, see if grass support that compiler/platform combination To be discussed --- raster/r.sim/simlib/utils.c | 29 ----------------------------- raster/r.sim/simlib/waterglobs.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/raster/r.sim/simlib/utils.c b/raster/r.sim/simlib/utils.c index 4f2dae3404a..32aa2f7ca82 100644 --- a/raster/r.sim/simlib/utils.c +++ b/raster/r.sim/simlib/utils.c @@ -29,32 +29,3 @@ double amin1(double arg1, double arg2) return res; } - -int min(int arg1, int arg2) -{ - int res; - - if (arg1 <= arg2) { - res = arg1; - } - else { - res = arg2; - } - - return res; -} - -int max(int arg1, int arg2) -{ - int res; - - if (arg1 >= arg2) { - res = arg1; - } - else { - res = arg2; - } - - return res; -} - diff --git a/raster/r.sim/simlib/waterglobs.h b/raster/r.sim/simlib/waterglobs.h index aece1fa582e..09f937b28aa 100644 --- a/raster/r.sim/simlib/waterglobs.h +++ b/raster/r.sim/simlib/waterglobs.h @@ -76,8 +76,6 @@ extern double gasdev(void); extern void gasdev_for_paralel(double *, double *); extern double amax1(double, double); extern double amin1(double, double); -extern int min(int, int); -extern int max(int, int); extern void create_observation_points(); extern double xmin, ymin, xmax, ymax; From 59d3a0d0752adbda6a5481d3b5814d3beca59d7a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 20:17:56 +0100 Subject: [PATCH 073/264] CMake: reorganize cmake functions, macros, find_scripts (Like a Pro) make_script_in_dir is renamed to build_script_in_subdir I still don't the naming of macro is clear. One without knowledge of CMake, AutoMake or any other build scripting experience must be able to deduct what is the macro/functions. Even if there will be a header comment with 'PURPOSE' field. --- CMakeLists.txt | 155 +------------- .../find_scripts}/FindCairo.cmake | 0 .../find_scripts}/FindFFTW.cmake | 0 .../find_scripts}/FindFontConfig.cmake | 0 .../find_scripts}/FindGEOS.cmake | 0 .../find_scripts}/FindIconv.cmake | 0 .../find_scripts}/FindPROJ4.cmake | 0 .../find_scripts}/FindSQLite.cmake | 0 .../build_grass_script.cmake} | 6 - cmake/modules/build_library_in_subdir.cmake | 17 ++ cmake/modules/build_module.cmake | 83 ++++++++ cmake/modules/build_program.cmake | 8 + cmake/modules/build_program_in_subdir.cmake | 17 ++ cmake/modules/build_script_in_subdir.cmake | 7 + cmake/modules/check_target.cmake | 7 + cmake/{ => modules}/repo_status.cmake | 0 cmake/modules/update_per_group_target.cmake | 19 ++ {thirdparty/msvc => msvc}/strings.h | 0 {thirdparty/msvc => msvc}/unistd.h | 0 scripts/CMakeLists.txt | 12 +- scripts/tmp.cmakelists.txt | 198 ------------------ temporal/CMakeLists.txt | 2 +- 22 files changed, 176 insertions(+), 355 deletions(-) rename {find_scripts => cmake/find_scripts}/FindCairo.cmake (100%) rename {find_scripts => cmake/find_scripts}/FindFFTW.cmake (100%) rename {find_scripts => cmake/find_scripts}/FindFontConfig.cmake (100%) rename {find_scripts => cmake/find_scripts}/FindGEOS.cmake (100%) rename {find_scripts => cmake/find_scripts}/FindIconv.cmake (100%) rename {find_scripts => cmake/find_scripts}/FindPROJ4.cmake (100%) rename {find_scripts => cmake/find_scripts}/FindSQLite.cmake (100%) rename cmake/{scripts.cmake => modules/build_grass_script.cmake} (96%) create mode 100644 cmake/modules/build_library_in_subdir.cmake create mode 100644 cmake/modules/build_module.cmake create mode 100644 cmake/modules/build_program.cmake create mode 100644 cmake/modules/build_program_in_subdir.cmake create mode 100644 cmake/modules/build_script_in_subdir.cmake create mode 100644 cmake/modules/check_target.cmake rename cmake/{ => modules}/repo_status.cmake (100%) create mode 100644 cmake/modules/update_per_group_target.cmake rename {thirdparty/msvc => msvc}/strings.h (100%) rename {thirdparty/msvc => msvc}/unistd.h (100%) delete mode 100644 scripts/tmp.cmakelists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index d8e301a9327..15ebb7216da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if(MSVC) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) endif() -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/find_scripts;${CMAKE_MODULE_PATH}") +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find_scripts;${CMAKE_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}") set(default_option_enabled ON) if(WIN32) @@ -83,7 +83,7 @@ set(NAME_VER ${GRASS_VERSION_MAJOR}) set(LIB_VER "${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.") message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") -include(cmake/repo_status.cmake) +include(repo_status) repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) # Setup build locations. @@ -97,157 +97,24 @@ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) endif() -function(update_per_group_target t_name) - if(${t_name} MATCHES "(^([a-z|0-9]+)\\.)") - string(REPLACE "." ";" name_to_list "${t_name}") - list(GET name_to_list 0 all_target_name) - if(all_target_name) - set(all_target_name ${all_target_name}-all) - else() - message(FATAL_ERROR "all_target_name=${all_target_name} \t t_name=${t_name}") - endif() - - if(TARGET ${all_target_name}) - add_dependencies(${all_target_name} ${t_name}) - else() - add_custom_target(${all_target_name} DEPENDS ${t_name}) - endif() - endif() - -endfunction() - -function(build_module) - cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) - - if(NOT G_NAME) - message(FATAL_ERROR "G_NAME empty") - endif() - update_per_group_target( ${G_NAME} ) - - if(NOT G_SRC_REGEX) - set(G_SRC_REGEX "*.c") - endif() - - if(NOT G_SRCDIR) - set(G_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}) - endif() +include(update_per_group_target) - foreach(G_HEADER ${G_HEADERS}) - if( EXISTS "${G_SRCDIR}/${G_HEADER}" ) - file(COPY ${G_SRCDIR}/${G_HEADER} DESTINATION "${CMAKE_BINARY_DIR}/include/grass") - else() - file(GLOB header_list_from_glob LIST_DIRECTORIES false "${G_SRCDIR}/${G_HEADER}") - if(NOT header_list_from_glob) - message(FATAL_ERROR "MUST copy '${G_SRCDIR}/${G_HEADER}' to ${CMAKE_BINARY_DIR}/include/grass") - endif() - foreach(header_I ${header_list_from_glob}) - file(COPY ${header_I} DESTINATION "${CMAKE_BINARY_DIR}/include/grass") - endforeach() - endif() - endforeach() - - if(NOT G_SOURCES) - file(GLOB ${G_NAME}_SRCS "${G_SRCDIR}/${G_SRC_REGEX}") - else() - set(${G_NAME}_SRCS ${G_SOURCES}) - endif() - - if(G_EXE) - add_executable(${G_NAME} ${${G_NAME}_SRCS}) - else() - add_library(${G_NAME} ${${G_NAME}_SRCS}) - set_target_properties(${G_NAME} - PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER} - ) - endif() +include(build_module) +include(build_program) +include(build_program_in_subdir) +include(build_library_in_subdir) - foreach(G_OPTIONAL_DEPEND ${G_OPTIONAL_DEPENDS}) - if(TARGET ${G_OPTIONAL_DEPEND}) - add_dependencies(${G_NAME} ${G_OPTIONAL_DEPEND}) - endif() - endforeach() - foreach(G_DEPEND ${G_DEPENDS}) - if(NOT TARGET ${G_DEPEND}) - message(FATAL_ERROR "${G_DEPEND} not a target") - break() - endif() - - add_dependencies(${G_NAME} ${G_DEPEND}) - - set(${G_NAME}_INCLUDE_DIRS) - list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_SRCDIR}") - foreach(G_INCLUDE ${G_INCLUDES}) - list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_INCLUDE}") - endforeach() - - if(${G_NAME}_INCLUDE_DIRS) - list(REMOVE_DUPLICATES ${G_NAME}_INCLUDE_DIRS ) - endif() - - target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIRS}) - - endforeach() - - foreach(G_DEF ${G_DEFS}) - target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") - endforeach() - - - target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) - if(G_EXE) - install(TARGETS ${G_NAME} DESTINATION bin) - else() - install(TARGETS ${G_NAME} DESTINATION lib) - endif() - - - -endfunction() - - -macro(build_library_in_subdir dir_name) - set (extra_args ${ARGN}) - if ("NAME" IN_LIST extra_args) - #message("dir_name=${dir_name} ${extra_args}") - build_module(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) - else() - get_filename_component(g_name ${dir_name} NAME) - #message("dir_name=${dir_name} |g_name= ${g_name}") - build_module(NAME grass_${g_name} SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN}) - endif() -endmacro() - -macro(build_program) - build_module(${ARGN} EXE) -endmacro() - -macro(build_program_in_subdir dir_name) - set (extra_args ${ARGN}) - if ("NAME" IN_LIST extra_args) - #message("dir_name=${dir_name} ${extra_args}") - build_program(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) - else() - get_filename_component(pgm_name ${dir_name} NAME) - build_program(NAME ${pgm_name} SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) - endif() -endmacro() +include(build_grass_script) +include(build_script_in_subdir) -macro(check_target target_name have_define_var) -set(${have_define_var} 0) -if(TARGET ${target_name}) - message(STATUS "${target_name} package found. Setting ${have_define_var} to 1") - set(${have_define_var} 1) -endif() -endmacro() +include(check_target) add_subdirectory(thirdparty) -include(cmake/scripts.cmake) - add_subdirectory(include) if(MSVC) - include_directories("${CMAKE_SOURCE_DIR}/thirdparty/msvc/") + include_directories("${CMAKE_SOURCE_DIR}/msvc/") endif() include_directories("${CMAKE_BINARY_DIR}/include") diff --git a/find_scripts/FindCairo.cmake b/cmake/find_scripts/FindCairo.cmake similarity index 100% rename from find_scripts/FindCairo.cmake rename to cmake/find_scripts/FindCairo.cmake diff --git a/find_scripts/FindFFTW.cmake b/cmake/find_scripts/FindFFTW.cmake similarity index 100% rename from find_scripts/FindFFTW.cmake rename to cmake/find_scripts/FindFFTW.cmake diff --git a/find_scripts/FindFontConfig.cmake b/cmake/find_scripts/FindFontConfig.cmake similarity index 100% rename from find_scripts/FindFontConfig.cmake rename to cmake/find_scripts/FindFontConfig.cmake diff --git a/find_scripts/FindGEOS.cmake b/cmake/find_scripts/FindGEOS.cmake similarity index 100% rename from find_scripts/FindGEOS.cmake rename to cmake/find_scripts/FindGEOS.cmake diff --git a/find_scripts/FindIconv.cmake b/cmake/find_scripts/FindIconv.cmake similarity index 100% rename from find_scripts/FindIconv.cmake rename to cmake/find_scripts/FindIconv.cmake diff --git a/find_scripts/FindPROJ4.cmake b/cmake/find_scripts/FindPROJ4.cmake similarity index 100% rename from find_scripts/FindPROJ4.cmake rename to cmake/find_scripts/FindPROJ4.cmake diff --git a/find_scripts/FindSQLite.cmake b/cmake/find_scripts/FindSQLite.cmake similarity index 100% rename from find_scripts/FindSQLite.cmake rename to cmake/find_scripts/FindSQLite.cmake diff --git a/cmake/scripts.cmake b/cmake/modules/build_grass_script.cmake similarity index 96% rename from cmake/scripts.cmake rename to cmake/modules/build_grass_script.cmake index 83afd21ed55..8a6918bc945 100644 --- a/cmake/scripts.cmake +++ b/cmake/modules/build_grass_script.cmake @@ -1,6 +1,3 @@ -macro(make_script_in_dir dir_name) - build_grass_script(NAME ${dir_name}) -endmacro() function(build_grass_script) cmake_parse_arguments(G "" "NAME;SRCDIR;SRC_REGEX" "SOURCES;DEPENDS" ${ARGN} ) @@ -83,6 +80,3 @@ foreach(pyfile ${SRC_FILES}) endforeach() endfunction() - - - diff --git a/cmake/modules/build_library_in_subdir.cmake b/cmake/modules/build_library_in_subdir.cmake new file mode 100644 index 00000000000..28e1179bb70 --- /dev/null +++ b/cmake/modules/build_library_in_subdir.cmake @@ -0,0 +1,17 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: CMake macro to build a grass library under sub directory +# which is passed as argument to macro +# COPYRIGHT: (C) 2000 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + +macro(build_library_in_subdir dir_name) + set (extra_args ${ARGN}) + if ("NAME" IN_LIST extra_args) + build_module(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) + else() + get_filename_component(g_name ${dir_name} NAME) + #message("dir_name=${dir_name} |g_name= ${g_name}") + build_module(NAME grass_${g_name} SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN}) + endif() +endmacro() \ No newline at end of file diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake new file mode 100644 index 00000000000..0767c3818f2 --- /dev/null +++ b/cmake/modules/build_module.cmake @@ -0,0 +1,83 @@ +function(build_module) + cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) + + if(NOT G_NAME) + message(FATAL_ERROR "G_NAME empty") + endif() + update_per_group_target( ${G_NAME} ) + + if(NOT G_SRC_REGEX) + set(G_SRC_REGEX "*.c") + endif() + + if(NOT G_SRCDIR) + set(G_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + + foreach(G_HEADER ${G_HEADERS}) + if( EXISTS "${G_SRCDIR}/${G_HEADER}" ) + file(COPY ${G_SRCDIR}/${G_HEADER} DESTINATION "${CMAKE_BINARY_DIR}/include/grass") + else() + file(GLOB header_list_from_glob LIST_DIRECTORIES false "${G_SRCDIR}/${G_HEADER}") + if(NOT header_list_from_glob) + message(FATAL_ERROR "MUST copy '${G_SRCDIR}/${G_HEADER}' to ${CMAKE_BINARY_DIR}/include/grass") + endif() + foreach(header_I ${header_list_from_glob}) + file(COPY ${header_I} DESTINATION "${CMAKE_BINARY_DIR}/include/grass") + endforeach() + endif() + endforeach() + + if(NOT G_SOURCES) + file(GLOB ${G_NAME}_SRCS "${G_SRCDIR}/${G_SRC_REGEX}") + else() + set(${G_NAME}_SRCS ${G_SOURCES}) + endif() + + if(G_EXE) + add_executable(${G_NAME} ${${G_NAME}_SRCS}) + else() + add_library(${G_NAME} ${${G_NAME}_SRCS}) + set_target_properties(${G_NAME} + PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER} + ) + endif() + + foreach(G_OPTIONAL_DEPEND ${G_OPTIONAL_DEPENDS}) + if(TARGET ${G_OPTIONAL_DEPEND}) + add_dependencies(${G_NAME} ${G_OPTIONAL_DEPEND}) + endif() + endforeach() + foreach(G_DEPEND ${G_DEPENDS}) + if(NOT TARGET ${G_DEPEND}) + message(FATAL_ERROR "${G_DEPEND} not a target") + break() + endif() + + add_dependencies(${G_NAME} ${G_DEPEND}) + + set(${G_NAME}_INCLUDE_DIRS) + list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_SRCDIR}") + foreach(G_INCLUDE ${G_INCLUDES}) + list(APPEND ${G_NAME}_INCLUDE_DIRS "${G_INCLUDE}") + endforeach() + + if(${G_NAME}_INCLUDE_DIRS) + list(REMOVE_DUPLICATES ${G_NAME}_INCLUDE_DIRS ) + endif() + + target_include_directories(${G_NAME} PUBLIC ${${G_NAME}_INCLUDE_DIRS}) + endforeach() + + foreach(G_DEF ${G_DEFS}) + target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") + endforeach() + + target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) + if(G_EXE) + install(TARGETS ${G_NAME} DESTINATION bin) + else() + install(TARGETS ${G_NAME} DESTINATION lib) + endif() + +endfunction() \ No newline at end of file diff --git a/cmake/modules/build_program.cmake b/cmake/modules/build_program.cmake new file mode 100644 index 00000000000..1595426a542 --- /dev/null +++ b/cmake/modules/build_program.cmake @@ -0,0 +1,8 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Shortcut macro to call build_module with EXE argument set +# COPYRIGHT: (C) 2000 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. +macro(build_program) + build_module(${ARGN} EXE) +endmacro() \ No newline at end of file diff --git a/cmake/modules/build_program_in_subdir.cmake b/cmake/modules/build_program_in_subdir.cmake new file mode 100644 index 00000000000..a026022aee6 --- /dev/null +++ b/cmake/modules/build_program_in_subdir.cmake @@ -0,0 +1,17 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: CMake macro to build a grass executable (program) under sub directory +# which is passed as argument to macro +# COPYRIGHT: (C) 2000 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + +macro(build_program_in_subdir dir_name) + set (extra_args ${ARGN}) + if ("NAME" IN_LIST extra_args) + #message("dir_name=${dir_name} ${extra_args}") + build_program(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) + else() + get_filename_component(pgm_name ${dir_name} NAME) + build_program(NAME ${pgm_name} SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${dir_name} ${ARGN} ) + endif() +endmacro() diff --git a/cmake/modules/build_script_in_subdir.cmake b/cmake/modules/build_script_in_subdir.cmake new file mode 100644 index 00000000000..2c69793a3e5 --- /dev/null +++ b/cmake/modules/build_script_in_subdir.cmake @@ -0,0 +1,7 @@ +macro(build_script_in_subdir dir_name) + build_grass_script(NAME ${dir_name}) +endmacro() + + + + diff --git a/cmake/modules/check_target.cmake b/cmake/modules/check_target.cmake new file mode 100644 index 00000000000..4c1502d268a --- /dev/null +++ b/cmake/modules/check_target.cmake @@ -0,0 +1,7 @@ +macro(check_target target_name have_define_var) +set(${have_define_var} 0) +if(TARGET ${target_name}) + message(STATUS "${target_name} package found. Setting ${have_define_var} to 1") + set(${have_define_var} 1) +endif() +endmacro() diff --git a/cmake/repo_status.cmake b/cmake/modules/repo_status.cmake similarity index 100% rename from cmake/repo_status.cmake rename to cmake/modules/repo_status.cmake diff --git a/cmake/modules/update_per_group_target.cmake b/cmake/modules/update_per_group_target.cmake new file mode 100644 index 00000000000..b08bef7cf64 --- /dev/null +++ b/cmake/modules/update_per_group_target.cmake @@ -0,0 +1,19 @@ + +function(update_per_group_target t_name) + if(${t_name} MATCHES "(^([a-z|0-9]+)\\.)") + string(REPLACE "." ";" name_to_list "${t_name}") + list(GET name_to_list 0 all_target_name) + if(all_target_name) + set(all_target_name ${all_target_name}-all) + else() + message(FATAL_ERROR "all_target_name=${all_target_name} \t t_name=${t_name}") + endif() + + if(TARGET ${all_target_name}) + add_dependencies(${all_target_name} ${t_name}) + else() + add_custom_target(${all_target_name} DEPENDS ${t_name}) + endif() + endif() + +endfunction() diff --git a/thirdparty/msvc/strings.h b/msvc/strings.h similarity index 100% rename from thirdparty/msvc/strings.h rename to msvc/strings.h diff --git a/thirdparty/msvc/unistd.h b/msvc/unistd.h similarity index 100% rename from thirdparty/msvc/unistd.h rename to msvc/unistd.h diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 16440ab53e2..ac702f78d23 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,12 +1,12 @@ -make_script_in_dir(r.shade) +build_script_in_subdir(r.shade) -make_script_in_dir(d.correlate) +build_script_in_subdir(d.correlate) -make_script_in_dir(d.frame) +build_script_in_subdir(d.frame) -make_script_in_dir(d.out.file ) +build_script_in_subdir(d.out.file ) set(scripts_SUBDIRS d.to.rast @@ -84,10 +84,10 @@ set(scripts_SUBDIRS #TODO #r.in.wms #wxpyimgview - make_script_in_dir( r.in.wms ) + build_script_in_subdir( r.in.wms ) foreach(d ${scripts_SUBDIRS}) -make_script_in_dir(${d} ) +build_script_in_subdir(${d} ) endforeach() diff --git a/scripts/tmp.cmakelists.txt b/scripts/tmp.cmakelists.txt deleted file mode 100644 index c6ef2a34a24..00000000000 --- a/scripts/tmp.cmakelists.txt +++ /dev/null @@ -1,198 +0,0 @@ - -macro(make_script_in_dir script_name) - -set(SCRIPTDIR ${CMAKE_CURRENT_SOURCE_DIR}/${script_name}) -set(PGM ${script_name}) -#message(FATAL_ERROR "SCRIPTDI=${PGM}") - -#file(GLOB ETCPYCFILES "${SCRIPTDIR}/*.pyc") - -file(GLOB ETCPYFILES "${SCRIPTDIR}/*.py") - - -if(NOT ETCPYFILES) - message(FATAL_ERROR "ETCPYFILES empty") -endif() - - -#install(FILES ${ETCPYCFILES} DESTINATION etc) - -#set(ETCDIR "$(ETC)/$(PGM)") - -if(MINGW) - # $(BIN)/$(PGM).bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat - # sed -e "s#SCRIPT_NAME#$(PGM)#" -e "s#SCRIPT_DIR#$(SCRIPT_DIR)#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@ - # unix2dos $@ - configure_file( - ${CMAKE_SOURCE_DIR}/scripts/windows_launch.bat - ${CMAKE_BINARY_DIR}/bin/${PGM}.bat - ) - install( PROGRAMS ${CMAKE_BINARY_DIR}/bin/${PGM}.bat DESTINATION bin ) -endif() - -foreach(pyfile ${ETCPYFILES}) - get_filename_component(pyfile_NAME ${pyfile} NAME) -add_custom_target(generate_locale_for_${pyfile_NAME} - COMMAND ${CMAKE_COMMAND} - -DPGM=${pyfile_NAME} - -DINPUT_FILE=${pyfile} - -DSTRINGDIR=${CMAKE_BINARY_DIR}/locale/scriptstrings - -DBIN_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/generate_strings.cmake - DEPENDS g.parser - ) - -install(FILES ${pyfile} DESTINATION etc) - -add_custom_target(${PGM} DEPENDS generate_locale_for_${pyfile_NAME} ) -endforeach() - -endmacro() - -# run_grass = \ -# GISRC=$(RUN_GISRC) \ -# GISBASE=$(RUN_GISBASE) \ -# PATH="$(ARCH_DISTDIR)/bin:$(GISBASE)/bin:$(GISBASE)/scripts:$$PATH" \ -# PYTHONPATH="$(GRASS_PYTHONPATH)" \ -# $(LD_LIBRARY_PATH_VAR)="$(BIN):$(GISBASE)/bin:$(GISBASE)/scripts:$(ARCH_LIBDIR):$(BASE_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \ -# LC_ALL=C \ -# $(1) - -set(GRASS_VERSION_MAJOR "7") -set(GRASS_VERSION_MINOR "2") -set(GISDBASE ${CMAKE_SOURCE_DIR}) - -configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl - "${CMAKE_BINARY_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") - -# macro(run_grass PGM prog) -# set(ENV{GISRC} "${CMAKE_BINARY_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") -# set(ENV{GISBASE} "${CMAKE_BINARY_DIR}") -# set(ENV{PATH} "${CMAKE_BINARY_DIR}/bin:${CMAKE_BINARY_DIR}/scripts:$ENV{PATH}") -# set(ENV{PYTHONPATH} "${CMAKE_BINARY_DIR}/gui/wxpython:${CMAKE_BINARY_DIR}/etc/python:$ENV{PYTHONPATH}") -# set(ENV{LD_LIBRARY_PATH} "${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}") -# set(ENV{LC_ALL} C) -# execute_process(COMMAND ${prog} ${ARGN} -# OUTPUT_VARIABLE run_grass_OV -# ERROR_VARIABLE run_grass_EV -# #OUTPUT_FILE /tmp/tt.out -# RESULT_VARIABLE run_grass_RV -# ) -# string(REGEX REPLACE "\n" ";" varname "${run_grass_OV}") -# set(${PGM}_to_translate_contents) - -# foreach(line ${varname}) -# string(REPLACE "\"" "\\\"" line "${line}") -# set(line "_(\"${line}\")") -# message("line=${line}") -# list(APPEND ${PGM}_to_translate_contents "${line}") -# endforeach() - -# string(REGEX REPLACE ";" "\n" ${PGM}_to_translate_contents "${${PGM}_to_translate_contents}") -# file(WRITE "${STRINGDIR}/${PGM}_to_translate.c" "${${PGM}_to_translate_contents}\n") -# endmacro() #run_grass - - -# strings = $(call run_grass,g.parser -t $(1) | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' > $(2)) - -# $(STRINGDIR)/%_to_translate.c: %.py -# -$(call strings,$<,$@) - -# $(STRINGDIR)/%_to_translate.c: % -# -$(call strings,$<,$@) - - -# install: -# $(INSTALL) $(SCRIPT) $(INST_DIR)/scripts/ -# $(INSTALL_DATA) $(HTMLDIR)/$(PGM).html $(INST_DIR)/docs/html/ -# $(eval IMG := $(wildcard $(HTMLDIR)/*.png) $(wildcard $(HTMLDIR)/*.jpg)) -# if [ -n "$(IMG)" ] ; then \ -# $(INSTALL_DATA) $(IMG) $(INST_DIR)/docs/html/ ; \ -# fi -# $(INSTALL_DATA) $(ARCH_DISTDIR)/docs/man/man1/$(PGM).1 $(INST_DIR)/docs/man/man1/ -# if [ -d "$(ETC)/$(PGM)" ] ; then \ -# cp -RL $(ETC)/$(PGM) $(INST_DIR)/etc/ ; \ -# fi - -# .PHONY: script scriptstrings - -make_script_in_dir(r.shade) - -make_script_in_dir(d.correlate) -set(scripts_SUBDIRS - d.correlate - d.frame - d.out.file - d.to.rast - d.polar - d.rast.edit - d.rast.leg - d.redraw - d.shade - d.what.rast - d.what.vect - db.dropcolumn - db.droptable - db.in.ogr - db.out.ogr - db.test - db.univar - g.extension - g.extension.all - g.manual - g.search.modules - i.colors.enhance - i.image.mosaic - i.in.spotvgt - i.oif - i.pansharpen - i.spectral - i.tasscap - m.proj - r.blend - r.buffer.lowmem - r.colors.stddev - r.fillnulls - r.grow - r.import - r.in.aster - r.in.srtm - r.in.wms - r.mask - r.out.xyz - r.pack - r.plane - r.reclass.area - r.rgb - r.shade - r.tileset - r.unpack - r3.in.xyz - v.build.all - v.centroids - v.db.addcolumn - v.db.addtable - v.db.join - v.db.dropcolumn - v.db.droprow - v.db.droptable - v.db.renamecolumn - v.db.reconnect.all - v.db.univar - v.db.update - v.dissolve - v.import - v.in.e00 - v.in.geonames - v.in.lines - v.in.mapgen - v.in.wfs - v.rast.stats - v.report - v.pack - v.to.lines - v.unpack - v.what.strds - v.what.vect - wxpyimgview - ) diff --git a/temporal/CMakeLists.txt b/temporal/CMakeLists.txt index cabb6db2985..e43be22b524 100644 --- a/temporal/CMakeLists.txt +++ b/temporal/CMakeLists.txt @@ -52,6 +52,6 @@ set(temporal_SUBDIRS build_program_in_subdir(t.connect DEPENDS grass_gis grass_temporal) foreach(d ${temporal_SUBDIRS}) - make_script_in_dir(${d}) + build_script_in_subdir(${d}) endforeach() From b507d3aded20fcf7c9caa0fa672b271f80bb4417 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 20:51:46 +0100 Subject: [PATCH 074/264] fix define used in lib/rst/interp_float --- lib/rst/CMakeLists.txt | 1 + lib/rst/interp_float/point2d.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rst/CMakeLists.txt b/lib/rst/CMakeLists.txt index 9aab8557adc..ff48fe130f4 100644 --- a/lib/rst/CMakeLists.txt +++ b/lib/rst/CMakeLists.txt @@ -15,6 +15,7 @@ build_library_in_subdir(qtree build_library_in_subdir(interp_float NAME grass_interpfl + DEFS "-DPOINT2D_C=1" DEPENDS GEOS grass_gis grass_raster grass_bitmap grass_vector grass_qtree grass_interpdata HEADERS "interpf.h") diff --git a/lib/rst/interp_float/point2d.c b/lib/rst/interp_float/point2d.c index e6472caf303..e1e9fd44e9e 100644 --- a/lib/rst/interp_float/point2d.c +++ b/lib/rst/interp_float/point2d.c @@ -31,7 +31,9 @@ #include #include -#define POINT2D_C +#ifndef POINT2D_C +#define POINT2D_C 1 +#endif #include /* needed for AIX */ From 2eafaea132dd9608013592c8094a762850ae5d5d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 20:54:19 +0100 Subject: [PATCH 075/264] fix tools/timer build add gettimeofday windowss implemenation from postgresql --- tools/CMakeLists.txt | 13 +++- tools/timer/main.c | 8 ++- tools/timer/msvc/gettimeofday.c | 115 ++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 tools/timer/msvc/gettimeofday.c diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index f2224717c56..e3f5b8f88cf 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -12,7 +12,7 @@ foreach(py_file ${py_files}) add_custom_command( OUTPUT ${py_file}.stamp DEPENDS g.parser - COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${py_file} + COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${py_file} COMMAND ${CMAKE_COMMAND} -E touch ${py_file}.stamp COMMENT "Generating ${py_file}c" VERBATIM @@ -28,10 +28,17 @@ foreach(py_file ${py_files}) # COMMENT "Generating ${py_file}c" # ) - install(FILES ${py_file} DESTINATION tools ) + install(FILES ${py_file} DESTINATION tools) endforeach() -build_program_in_subdir(timer NAME current_time_s_ms DEPENDS grass_gis ) +set(current_time_s_ms_SRCS "timer/main.c") +if(MSVC) + list(APPEND current_time_s_ms_SRCS "timer/msvc/gettimeofday.c") +endif() +build_program_in_subdir(timer +NAME current_time_s_ms +DEPENDS grass_gis +SOURCES "${current_time_s_ms_SRCS}") add_executable(g.echo g.echo.c) diff --git a/tools/timer/main.c b/tools/timer/main.c index c8dc720439b..70de9ed1916 100644 --- a/tools/timer/main.c +++ b/tools/timer/main.c @@ -12,8 +12,14 @@ * for details. * *****************************************************************************/ - +#ifdef HAVE_SYS_TIME_H #include +#else +#include +#endif +#ifdef _MSC_VER +#include +#endif #include #include diff --git a/tools/timer/msvc/gettimeofday.c b/tools/timer/msvc/gettimeofday.c new file mode 100644 index 00000000000..a881b993e80 --- /dev/null +++ b/tools/timer/msvc/gettimeofday.c @@ -0,0 +1,115 @@ +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + + /* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */ +static const unsigned __int64 epoch = UINT64CONST(116444736000000000); + +/* + * FILETIME represents the number of 100-nanosecond intervals since + * January 1, 1601 (UTC). + */ +#define FILETIME_UNITS_PER_SEC 10000000L +#define FILETIME_UNITS_PER_USEC 10 + + /* + * Both GetSystemTimeAsFileTime and GetSystemTimePreciseAsFileTime share a + * signature, so we can just store a pointer to whichever we find. This + * is the pointer's type. + */ +typedef VOID(WINAPI * PgGetSystemTimeFn) (LPFILETIME); + +/* One-time initializer function, must match that signature. */ +static void WINAPI init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime); + +/* Storage for the function we pick at runtime */ +static PgGetSystemTimeFn pg_get_system_time = &init_gettimeofday; + +/* + * One time initializer. Determine whether GetSystemTimePreciseAsFileTime + * is available and if so, plan to use it; if not, fall back to + * GetSystemTimeAsFileTime. + */ +static void WINAPI +init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime) +{ + /* + * Because it's guaranteed that kernel32.dll will be linked into our + * address space already, we don't need to LoadLibrary it and worry about + * closing it afterwards, so we're not using Pg's dlopen/dlsym() wrapper. + * + * We'll just look up the address of GetSystemTimePreciseAsFileTime if + * present. + * + * While we could look up the Windows version and skip this on Windows + * versions below Windows 8 / Windows Server 2012 there isn't much point, + * and determining the windows version is its self somewhat Windows + * version and development SDK specific... + */ + pg_get_system_time = (PgGetSystemTimeFn)GetProcAddress( + GetModuleHandle(TEXT("kernel32.dll")), + "GetSystemTimePreciseAsFileTime"); + if (pg_get_system_time == NULL) + { + /* + * The expected error from GetLastError() is ERROR_PROC_NOT_FOUND, if + * the function isn't present. No other error should occur. + * + * We can't report an error here because this might be running in + * frontend code; and even if we're in the backend, it's too early to + * elog(...) if we get some unexpected error. Also, it's not a + * serious problem, so just silently fall back to + * GetSystemTimeAsFileTime irrespective of why the failure occurred. + */ + pg_get_system_time = &GetSystemTimeAsFileTime; + } + + (*pg_get_system_time) (lpSystemTimeAsFileTime); +} + +/* + * timezone information is stored outside the kernel so tzp isn't used anymore. + * + * Note: this function is not for Win32 high precision timing purposes. See + * elapsed_time(). + */ +int +gettimeofday(struct timeval* tp, struct timezone* tzp) +{ + FILETIME file_time; + ULARGE_INTEGER ularge; + + (*pg_get_system_time) (&file_time); + ularge.LowPart = file_time.dwLowDateTime; + ularge.HighPart = file_time.dwHighDateTime; + + tp->tv_sec = (long)((ularge.QuadPart - epoch) / FILETIME_UNITS_PER_SEC); + tp->tv_usec = (long)(((ularge.QuadPart - epoch) % FILETIME_UNITS_PER_SEC) + / FILETIME_UNITS_PER_USEC); + + return 0; +} \ No newline at end of file From eae5f0bbffe0e930d3bac0b1adcaff98a4b9bdc0 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 21:50:16 +0100 Subject: [PATCH 076/264] CMake: reorganize cmake functions (2) --- CMakeLists.txt | 75 +++++++++----------------- cmake/modules/get_host_arch.cmake | 35 ++++++++++++ cmake/modules/get_versions.cmake | 28 ++++++++++ cmake/modules/set_compiler_flags.cmake | 13 +++++ 4 files changed, 100 insertions(+), 51 deletions(-) create mode 100644 cmake/modules/get_host_arch.cmake create mode 100644 cmake/modules/get_versions.cmake create mode 100644 cmake/modules/set_compiler_flags.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 15ebb7216da..03b7acca128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ option(WITH_BZLIB "enable sqlite support" ON) option(WITH_BLAS "enable sqlite support" ON) option(WITH_LAPACK "enable sqlite support" ON) option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) +option(WITH_DOCS "Build documentation" OFF) if(APPLE) if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) @@ -40,48 +41,22 @@ if("${isSystemDir}" STREQUAL "-1") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") endif("${isSystemDir}" STREQUAL "-1") -set(GRASS_VERSION_MAJOR) -set(GRASS_VERSION_MINOR) -set(GRASS_VERSION_PATCH) +include(get_host_arch) +get_host_arch(BUILD_ARCH) -set(GRASS_VERSION_UPDATE_PKG "0.2") -set(BUILD_ARCH "x86_64") - -file(STRINGS "include/VERSION" GRASS_VERSION_STRINGS) -list(LENGTH GRASS_VERSION_STRINGS GRASS_VERSION_FILE_LENGTH) - -if(MSVC) - set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS") - if(CMAKE_C_FLAGS) - set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") - endif() - - set(GRASS_CXX_FLAGS "/D_CRT_SECURE_NO_WARNINGS") - if(CMAKE_CXX_FLAGS) - set(CMAKE_CXX_FLAGS "${GRASS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") - endif() -endif() - -if(GRASS_VERSION_FILE_LENGTH LESS 3 ) - message(FATAL_ERROR "include/VERSION is not a valid file") -endif() - -list(GET GRASS_VERSION_STRINGS 0 GRASS_VERSION_MAJOR) -list(GET GRASS_VERSION_STRINGS 1 GRASS_VERSION_MINOR) - -if(GRASS_VERSION_FILE_LENGTH GREATER 3 ) - list(GET GRASS_VERSION_STRINGS 2 GRASS_VERSION_RELEASE) -endif() - -if(GRASS_VERSION_FILE_LENGTH GREATER 4 ) - list(GET GRASS_VERSION_STRINGS 3 GRASS_VERSION_DATE) -endif() +include(get_versions) +get_versions("include/VERSION" + GRASS_VERSION_MAJOR + GRASS_VERSION_MINOR + GRASS_VERSION_RELEASE + GRASS_VERSION_DATE) set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}) - -set(NAME_VER ${GRASS_VERSION_MAJOR}) -set(LIB_VER "${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.") message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") +set(GRASS_VERSION_UPDATE_PKG "0.2") + +include(set_compiler_flags) +set_compiler_flags() include(repo_status) repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) @@ -98,15 +73,12 @@ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) endif() include(update_per_group_target) - include(build_module) include(build_program) include(build_program_in_subdir) include(build_library_in_subdir) - include(build_grass_script) include(build_script_in_subdir) - include(check_target) add_subdirectory(thirdparty) @@ -134,25 +106,26 @@ set(ALL_SUBDIRS vector temporal tools - gui - - - # ps # locale - # man - # doc - # testsuite - # demolocation - # macosx - # mswindows ) foreach(d ${ALL_SUBDIRS}) add_subdirectory(${d}) endforeach() +if(WITH_DOCS) + add_subdirectory(doc) + if(NOT MSVC) + add_subdirectory(man) + endif() +endif() # WITH_DOCS + +# TODO: To be discussed +# add_subdirectory(testsuite) +# add_subdirectory(macosx) +# add_subdirectory(mswindows) if(WITH_X11) build_program_in_subdir(visualization/ximgview DEPENDS grass_gis X11) endif() diff --git a/cmake/modules/get_host_arch.cmake b/cmake/modules/get_host_arch.cmake new file mode 100644 index 00000000000..3e23f2111db --- /dev/null +++ b/cmake/modules/get_host_arch.cmake @@ -0,0 +1,35 @@ + +function(get_host_arch var_arch) + set(host_arch_value "x86_64") # default value + + if(WIN32) + if(MSVC) + execute_process( + COMMAND ${CMAKE_C_COMPILER} + ERROR_VARIABLE ev + OUTPUT_VARIABLE ov + OUTPUT_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if("${ev}" MATCHES "x86") + set(${host_arch_value} "x86") + else() + set(${host_arch_value} "x86_64") + endif() + + elseif(MINGW) + else() + message(FATAL_ERROR "compiler/platform is not supported") + endif() # if(MSVC) + + elseif(UNIX) + execute_process( + COMMAND uname -m + ERROR_VARIABLE ev + OUTPUT_VARIABLE ov + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(${host_arch_value} "${ov}") + endif() + + set(${var_arch} ${host_arch_value} PARENT_SCOPE) +endfunction() diff --git a/cmake/modules/get_versions.cmake b/cmake/modules/get_versions.cmake new file mode 100644 index 00000000000..3a7912f8b91 --- /dev/null +++ b/cmake/modules/get_versions.cmake @@ -0,0 +1,28 @@ +function(get_versions file_path var_major var_minor var_release var_date) + +set(version_major 0) +set(version_minor 0) +set(version_release 0) +set(version_date 00000000) +file(STRINGS "${file_path}" grass_version_strings) +list(LENGTH grass_version_strings grass_version_file_length) + +if(grass_version_file_length LESS 3 ) + message(FATAL_ERROR "include/VERSION is not a valid file") +endif() + +list(GET grass_version_strings 0 version_major) +list(GET grass_version_strings 1 version_minor) + +if(grass_version_file_length GREATER 3 ) + list(GET grass_version_strings 2 version_release) +endif() + +if(grass_version_file_length GREATER 4 ) + list(GET grass_version_strings 3 version_date) +endif() +set(${var_major} ${version_major} PARENT_SCOPE) +set(${var_minor} ${version_minor} PARENT_SCOPE) +set(${var_release} ${version_release} PARENT_SCOPE) +set(${var_date} ${version_date} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/cmake/modules/set_compiler_flags.cmake b/cmake/modules/set_compiler_flags.cmake new file mode 100644 index 00000000000..844001187b2 --- /dev/null +++ b/cmake/modules/set_compiler_flags.cmake @@ -0,0 +1,13 @@ +macro(set_compiler_flags) +if(MSVC) + set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS") + if(CMAKE_C_FLAGS) + set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") + endif() + + set(GRASS_CXX_FLAGS "/D_CRT_SECURE_NO_WARNINGS") + if(CMAKE_CXX_FLAGS) + set(CMAKE_CXX_FLAGS "${GRASS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") + endif() +endif() +endmacro() \ No newline at end of file From ee35d8dff3d308852eb18b26d66a7d1632fd66ff Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 22:05:29 +0100 Subject: [PATCH 077/264] MSVC: copy UINT64CONST(x) from postgresql --- tools/timer/msvc/gettimeofday.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/timer/msvc/gettimeofday.c b/tools/timer/msvc/gettimeofday.c index a881b993e80..16206c30bd5 100644 --- a/tools/timer/msvc/gettimeofday.c +++ b/tools/timer/msvc/gettimeofday.c @@ -25,8 +25,15 @@ * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ +#include - /* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */ + /* + * 64-bit integers + */ + +#define UINT64CONST(x) (x##UL) + +/* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */ static const unsigned __int64 epoch = UINT64CONST(116444736000000000); /* From 653de5d7d428be9980890173403f4dce51b4ca28 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 22:06:33 +0100 Subject: [PATCH 078/264] WIP: disable pyc generation with g.parser on msvc --- tools/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index e3f5b8f88cf..ef3ac58e5d3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,3 +1,4 @@ +if(NOT MSVC) set(py_files g.html2man/g.html2man.py g.html2man/ghtml.py g.html2man/ggroff.py) foreach(py_file ${py_files}) get_filename_component(py_file_NAME ${py_file} NAME) @@ -12,7 +13,7 @@ foreach(py_file ${py_files}) add_custom_command( OUTPUT ${py_file}.stamp DEPENDS g.parser - COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${py_file} + COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${py_file} COMMAND ${CMAKE_COMMAND} -E touch ${py_file}.stamp COMMENT "Generating ${py_file}c" VERBATIM @@ -30,6 +31,7 @@ foreach(py_file ${py_files}) install(FILES ${py_file} DESTINATION tools) endforeach() +endif() #MSVC set(current_time_s_ms_SRCS "timer/main.c") if(MSVC) From 1eec8b1f5e5a9da0e8b179d3e650ca4af5de71ea Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 22:11:54 +0100 Subject: [PATCH 079/264] fix ccmath complex struct for msvc --- lib/CMakeLists.txt | 28 +++++++--------------------- lib/external/ccmath/ccmath.h | 12 +++++++++--- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d710f49261f..ec357f546f6 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -19,25 +19,18 @@ list(APPEND raster_SRCS "./gis/gisinit.c") build_library_in_subdir(raster DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" SOURCES ${raster_SRCS} - DEPENDS GDAL PROJ4 grass_gproj -) + DEPENDS GDAL PROJ4 grass_gproj) if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_library(DL_LIBRARY dl) target_link_libraries(grass_raster ${DL_LIBRARY}) endif() -message("Creating ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h") -configure_file(external/ccmath/ccmath.cmake.h - ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h - COPYONLY) - build_library_in_subdir(external/ccmath) build_library_in_subdir(external/shapelib NAME grass_shape HEADERS "shapefil.h") - build_library_in_subdir(gmath DEPENDS grass_ccmath grass_gis DEFS "${use_math_DEFS}" @@ -50,24 +43,21 @@ list(APPEND pngdriver_SRCS "./driver/init.c") build_library_in_subdir(pngdriver SOURCES ${pngdriver_SRCS} DEPENDS grass_driver LIBPNG ZLIB - INCLUDES "./driver" - ) + INCLUDES "./driver") file(GLOB psdriver_SRCS "./psdriver/*.c") list(APPEND psdriver_SRCS "./driver/init.c") build_library_in_subdir(psdriver -SOURCES ${psdriver_SRCS} + SOURCES ${psdriver_SRCS} DEPENDS grass_driver - INCLUDES "./driver" - ) + INCLUDES "./driver") file(GLOB htmldriver_SRCS "./htmldriver/*.c") list(APPEND htmldriver_SRCS "./driver/init.c") build_library_in_subdir(htmldriver SOURCES ${htmldriver_SRCS} DEPENDS grass_driver - INCLUDES "./driver" - ) + INCLUDES "./driver") set(_grass_display_DEFS) @@ -86,15 +76,12 @@ if(WITH_CAIRO) list(APPEND cairodriver_SRCS "./driver/init.c") build_library_in_subdir(cairodriver DEPENDS ${_cairodriver_DEPENDS} - SOURCES ${cairodriver_SRCS} - ) - + SOURCES ${cairodriver_SRCS}) set(_grass_display_DEFS "-DUSE_CAIRO") list(APPEND _grass_display_DEPENDS grass_cairodriver) endif() - build_library_in_subdir(bitmap SOURCES "./bitmap/bitmap.c" "./bitmap/sparse.c" DEPENDS grass_linkm) @@ -105,8 +92,7 @@ build_library_in_subdir(btree2 HEADERS "kdtree.h" DEPENDS grass_gis) build_library_in_subdir(display DEFS ${_grass_display_DEFS} - DEPENDS ${_grass_display_DEPENDS} - ) + DEPENDS ${_grass_display_DEPENDS}) add_subdirectory(db) diff --git a/lib/external/ccmath/ccmath.h b/lib/external/ccmath/ccmath.h index 3a90ce68df2..69ab5e34c46 100644 --- a/lib/external/ccmath/ccmath.h +++ b/lib/external/ccmath/ccmath.h @@ -33,10 +33,16 @@ #endif /* Complex Types */ - #ifndef CPX -struct complex {double re,im;}; -typedef struct complex Cpx; +#ifndef _MSC_VER + struct complex {double re,im;}; + typedef struct complex Cpx; +#else + /* _MSVC has complex struct and cannot be used */ + struct gcomplex {double re,im;}; + typedef struct gcomplex Cpx; +#endif /* _MSC_VER */ + #define CPX 1 #endif From 7597fbed6acae49a2546b1afa4e506abe763c7b9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 30 Dec 2019 22:26:29 +0100 Subject: [PATCH 080/264] fix use of ifdef loop for msvc This fix might have something to do with msvc not having __atribute__ GCC extension ? Does anyone build gdal without ogr these days ? --- general/g.proj/main.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/general/g.proj/main.c b/general/g.proj/main.c index 08e0f93c4cb..26f0a995da4 100644 --- a/general/g.proj/main.c +++ b/general/g.proj/main.c @@ -103,12 +103,13 @@ int main(int argc, char *argv[]) dontprettify = G_define_flag(); dontprettify->key = 'f'; dontprettify->guisection = _("Print"); - dontprettify->description = - _("Print 'flat' output with no linebreaks (applies to " -#ifdef HAVE_OGR - "WKT and " -#endif - "PROJ.4 output)"); + /* Does anyone build gdal without ogr these days ?. Anyway.. */ + #ifdef HAVE_OGR + dontprettify->description = _("Print 'flat' output with no linebreaks (applies to WKT PROJ.4 output)"); + #else + dontprettify->description = _("Print 'flat' output with no linebreaks (applies to PROJ.4 output)"); + #endif + #ifdef HAVE_OGR printwkt = G_define_flag(); @@ -295,18 +296,17 @@ int main(int argc, char *argv[]) (printwkt->answer ? 1 : 0) + #endif (create->answer ? 1 : 0)); - if (formats > 1) - G_fatal_error(_("Only one of -%c, -%c, -%c, -%c" + if (formats > 1) + /* Does anyone build gdal without ogr these days ?. Anyway.. */ #ifdef HAVE_OGR - ", -%c" -#endif - " or -%c flags may be specified"), - printinfo->key, shellinfo->key, datuminfo->key, printproj4->key, -#ifdef HAVE_OGR - printwkt->key, -#endif - create->key); - + G_fatal_error(_("Only one of -%c, -%c, -%c, -%c, %c or -%c flags may be specified"), + printinfo->key, shellinfo->key, datuminfo->key, + printproj4->key, printwkt->key, create->key); + #else + G_fatal_error(_("Only one of -%c, -%c, -%c, -%c or -%c flags may be specified"), + printinfo->key, shellinfo->key, datuminfo->key, + printproj4->key, create->key); + #endif if (printinfo->answer || shellinfo->answer) print_projinfo(shellinfo->answer); else if (datuminfo->answer) From 0818322a30f56b6aaa7f00ad8e2297c0976ed5a8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 01:04:45 +0100 Subject: [PATCH 081/264] take out GCC'sim and stick to C standard --- lib/imagery/iscatt_core.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/imagery/iscatt_core.c b/lib/imagery/iscatt_core.c index 0a713404a63..1be92b9ba6d 100644 --- a/lib/imagery/iscatt_core.c +++ b/lib/imagery/iscatt_core.c @@ -700,19 +700,23 @@ int I_compute_scatts(struct Cell_head *region, struct scCats *scatt_conds, const char *mapset; char header[1024]; - int fd_cats_rasts[scatt_conds->n_a_cats]; - FILE *f_cats_rasts_conds[scatt_conds->n_a_cats]; - - struct rast_row bands_rows[n_bands]; + int *fd_cats_rasts; + FILE **f_cats_rasts_conds; + struct rast_row *bands_rows; + int *fd_bands; + int *bands_ids; + int *b_needed_bands; RASTER_MAP_TYPE data_type; - int nrows, i_band, n_a_bands, band_id; int i_row, head_nchars, i_cat, id_cat; - int fd_bands[n_bands]; - int bands_ids[n_bands]; - int b_needed_bands[n_bands]; + fd_cats_rasts = calloc(scatt_conds->n_a_cats, sizeof(*fd_cats_rasts)); + f_cats_rasts_conds = calloc(scatt_conds->n_a_cats, sizeof(*f_cats_rasts_conds)); + bands_rows = calloc(n_bands, sizeof(*bands_rows)); + fd_bands = calloc(n_bands, sizeof(*fd_bands)); + bands_ids = calloc(n_bands, sizeof(*bands_ids)); + b_needed_bands = calloc(n_bands, sizeof(*b_needed_bands)); Rast_set_window(region); From f520af06e3577c376700b3227317820713021ebc Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 01:35:02 +0100 Subject: [PATCH 082/264] copy external/ccmath/ccmath.h to include/grass/ccmath_grass.h --- lib/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index ec357f546f6..a118589cbba 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -26,6 +26,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") target_link_libraries(grass_raster ${DL_LIBRARY}) endif() +message("Copying external/ccmath/ccmath.h to ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h") +configure_file(external/ccmath/ccmath.h + ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h + COPYONLY) build_library_in_subdir(external/ccmath) build_library_in_subdir(external/shapelib NAME grass_shape From 90c24068ad137181823f7854634c87db8b387484 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 01:37:18 +0100 Subject: [PATCH 083/264] CMake: enable cmake export all symbols on for shared libs --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03b7acca128..db8cb0d42e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,9 @@ project(GRASSGIS) set(BUILD_SHARED_LIBS ON) if(MSVC) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + endif() endif() set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find_scripts;${CMAKE_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}") From 31c4d4905d54dbd05985fd2aac8d5290d8ead951 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 04:35:28 +0100 Subject: [PATCH 084/264] CMake: build lib/python on MSVC fix ctypesgen.cmake reorg cmake functions used by python add new cmake function to copy_python_files and compile --- cmake/ctypesgen.cmake | 31 ++-- cmake/modules/build_pymodule_in_subdir.cmake | 14 ++ cmake/modules/copy_python_file.cmake | 34 +++++ lib/CMakeLists.txt | 20 +-- lib/python/CMakeLists.txt | 143 +++++-------------- lib/python/ctypes/CMakeLists.txt | 41 +++--- 6 files changed, 130 insertions(+), 153 deletions(-) create mode 100644 cmake/modules/build_pymodule_in_subdir.cmake create mode 100644 cmake/modules/copy_python_file.cmake diff --git a/cmake/ctypesgen.cmake b/cmake/ctypesgen.cmake index 6eab941a568..d2f03a74a45 100644 --- a/cmake/ctypesgen.cmake +++ b/cmake/ctypesgen.cmake @@ -2,12 +2,23 @@ set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VE set(ENV{GISBASE} "${BIN_DIR}") set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") set(ENV{PYTHONPATH} "${BIN_DIR}/gui/wxpython:${BIN_DIR}/etc/python:$ENV{PYTHONPATH}") -set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +if(WIN32) + set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +else() + set(ENV{PATH} "${BIN_DIR}/bin:$ENV{PATH}") +endif() set(ENV{LC_ALL} C) set(LIBRARIES) foreach(LIB ${LIBS}) - list(APPEND LIBRARIES "--library=${BIN_DIR}/lib/lib${LIB}.so") + if(WIN32) + list(APPEND LIBRARIES "--library=${BIN_DIR}/bin/${LIB}.dll") + elseif(APPLE) + list(APPEND LIBRARIES "--library=${BIN_DIR}/lib/lib${LIB}.so") + else() + #This can be linux or unix + list(APPEND LIBRARIES "--library=${BIN_DIR}/lib/lib${LIB}.so") + endif() endforeach() set(HEADERS) @@ -15,21 +26,19 @@ foreach(HDR ${HDRS}) list(APPEND HEADERS "${BIN_DIR}/include/grass/${HDR}") endforeach() - foreach(req OUT_FILE HDRS LIBS CTYPESGEN_PY COMPILER ) if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "") message(FATAL_ERROR "you must set ${req}") endif() endforeach() +if(MSVC) + set(CTYPESFLAGS "${COMPILER} -E -DPACKAGE=\"grasslibs\"") +else() + set(CTYPESFLAGS "${COMPILER} -E -DPACKAGE=\"grasslibs\" -D__GLIBC_HAVE_LONG_LONG") +endif() -#NLS_CFLAGS = -DPACKAGE=\"$(PACKAGE)\" -#USE_LARGEFILES = 1 -#LFS_CFLAGS = -#CTYPESFLAGS = --cpp "$(CC) -E $(CPPFLAGS) $(LFS_CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(DEFS) $(EXTRA_INC) $(INC) -D__GLIBC_HAVE_LONG_LONG" - -set(CTYPESFLAGS "${COMPILER} -E -DPACKAGE=\"grasslibs\" -D__GLIBC_HAVE_LONG_LONG") - +message(STATUS "Running ${PYTHON_EXECUTABLE} ${CTYPESGEN_PY} --cpp=${CTYPESFLAGS} --includedir=\"${BIN_DIR}/include\" --runtime-libdir=\"${BIN_DIR}/lib\" ${HEADERS} ${LIBRARIES} --output=${OUT_FILE}") execute_process( COMMAND ${PYTHON_EXECUTABLE} ${CTYPESGEN_PY} --cpp=${CTYPESFLAGS} @@ -46,5 +55,3 @@ execute_process( if( ctypesgen_RV ) message(FATAL_ERROR "ctypesgen.py: ${ctypesgen_EV} \n ${ctypesgen_OV}") endif() - -#message(FATAL_ERROR "ctypesgen_RV = ${ctypesgen_OV}") diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake new file mode 100644 index 00000000000..8f1c8c043d3 --- /dev/null +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -0,0 +1,14 @@ +include(copy_python_file) +function(build_pymodule_in_subdir py_DIR_PATH) + set(py_FILES ${ARGN}) + if (NOT "__init__.py" IN_LIST py_FILES) + get_filename_component(py_init_py_file_path ${py_DIR_PATH}/__init__.py REALPATH) + list(APPEND py_FILES "__init__.py") + endif() + #find leaf of py_DIR_PATH which will be name of module + get_filename_component(py_module_name ${py_DIR_PATH} NAME) + set(install_dest etc/python/grass/${py_DIR_PATH}) + foreach(py_file ${py_FILES}) + copy_python_file(${py_file} ${py_module_name} ${py_DIR_PATH} ${install_dest} ) + endforeach() +endfunction() \ No newline at end of file diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake new file mode 100644 index 00000000000..f6c36db5693 --- /dev/null +++ b/cmake/modules/copy_python_file.cmake @@ -0,0 +1,34 @@ +function(copy_python_file py_file py_module_name py_DIR_PATH install_dest) + # A single case where setup.py from cmake binary directory is added. + # For this corner case we need to check for IS_ABSOLUTE first!s + if(NOT IS_ABSOLUTE ${py_file}) + get_filename_component(py_file_REALPATH ${py_DIR_PATH}/${py_file} REALPATH) + else() + set(py_file_REALPATH ${py_file}) + endif() + + get_filename_component(py_file_NAME ${py_file_REALPATH} NAME) + + set(output_path ${CMAKE_CURRENT_BINARY_DIR}/${py_DIR_PATH}) + file(COPY ${py_file_REALPATH} DESTINATION ${output_path}) + set(copied_py_file ${output_path}/${py_file_NAME}) + #rkm: TEMPORARY + if(NOT EXISTS ${copied_py_file}) + message(FATAL_ERROR "not exists temp ${output_path};;${py_file_NAME} ") + endif() + + set(stamp_file_path ${output_path}/CMakeFiles/${py_file_NAME}.stamp) + add_custom_command( + OUTPUT ${stamp_file_path} + COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_py_file} + COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} + COMMENT "Generating ${copied_py_file}c" + VERBATIM) + + add_custom_target(${py_module_name}.${py_file_NAME} ALL + DEPENDS ${stamp_file_path}) + + set_source_files_properties("${copied_py_file}c" GENERATED) + install(FILES ${copied_py_file} DESTINATION ${install_dest}) + +endfunction() \ No newline at end of file diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a118589cbba..29f20982c02 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -120,10 +120,10 @@ HEADERS "lidar.h") build_library_in_subdir(raster3d DEPENDS grass_raster) -#build_program_in_subdir(raster3d/test -# NAME test.raster3d.lib -# DEPENDS grass_gis grass_raster3d grass_raster - # ) +build_program_in_subdir(raster3d/test + NAME test.raster3d.lib + DEPENDS grass_gis grass_raster3d grass_raster +) build_library_in_subdir(gpde HEADERS "N_*.h" DEPENDS grass_gis grass_raster3d grass_gmath @@ -142,19 +142,13 @@ build_library_in_subdir(stats DEPENDS grass_raster) build_library_in_subdir(arraystats DEPENDS grass_gis) if(WITH_OPENGL) - # set(ogsf_DEPENDS OPENGL GDAL TIFF) - # build_library_in_subdir(ogsf DEPENDS ${ogsf_DEPENDS}) - build_library_in_subdir(ogsf DEPENDS OPENGL GDAL TIFF) - build_library_in_subdir(nviz DEPENDS OPENGL GDAL TIFF) + build_library_in_subdir(ogsf DEPENDS OPENGL GDAL TIFF) + build_library_in_subdir(nviz DEPENDS OPENGL GDAL TIFF) endif() - add_subdirectory(temporal) -# TODO: some issue with windows and ctypesgen.py (To be discussed) -if(NOT MSVC) - add_subdirectory(python) -endif() +add_subdirectory(python) build_library_in_subdir(iostream SRC_REGEX "*.cpp" DEPENDS grass_gis) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 5514c0f38b3..0c7066e1222 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -1,61 +1,18 @@ -function(build_pyfiles_in_sudir gpy_dir_name) - # cmake_parse_arguments(GPY "" "NAME" "FILES" ${ARGN} ) - set( gpy_files ${ARGN} ) - if (NOT "__init__.py" IN_LIST gpy_files) - list(APPEND gpy_files "__init__.py") - endif() - - get_filename_component(gpy_name ${gpy_dir_name} NAME) - foreach(gpy_file ${gpy_files}) - if(NOT IS_ABSOLUTE ${gpy_file}) - #message("gpy_file=${gpy_dir_name}/${gpy_file}") - get_filename_component(gpy_file ${gpy_dir_name}/${gpy_file} REALPATH) - endif() - if(NOT EXISTS ${gpy_file}) - message(FATAL_ERROR "Cannot find '${gpy_file}'") - endif() - get_filename_component(gpy_file_NAME ${gpy_file} NAME) - file(COPY ${gpy_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${gpy_dir_name}) - # <----- RESET HERE -----> - set(gpy_file ${CMAKE_CURRENT_BINARY_DIR}/${gpy_dir_name}/${gpy_file_NAME}) - # <----- RESET HERE -----> +include(build_pymodule_in_subdir) +build_pymodule_in_subdir(exceptions) +if(WIN32) + set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}") +else() + set(LD_LIBRARY_PATH_VAR "$ENV{PATH}") +endif() - add_custom_command( - OUTPUT ${gpy_file}.stamp - COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${gpy_file} - COMMAND ${CMAKE_COMMAND} -E touch ${gpy_file}.stamp - COMMENT "Generating ${gpy_file}c" - VERBATIM - ) - - add_custom_target(${gpy_name}.${gpy_file_NAME} ALL - DEPENDS ${gpy_file}.stamp - ) - - # add_custom_target(${gpy_name}_${gpy_file_NAME} ALL - # COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${gpy_file} - # COMMENT "Generating ${gpy_file}c" - # ) - - #set_source_files_properties("${gpy_file}c" GENERATED) - - - install(FILES ${gpy_file} DESTINATION etc/python/grass/${gpy_dir_name} ) - - endforeach() -endfunction() - -build_pyfiles_in_sudir(exceptions) - -set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}") - -configure_file( script/setup.py +configure_file(script/setup.py ${CMAKE_BINARY_DIR}/lib/python/script/setup.py COPYONLY) -build_pyfiles_in_sudir(script +build_pymodule_in_subdir(script core.py db.py raster.py @@ -64,25 +21,11 @@ build_pyfiles_in_sudir(script array.py ${CMAKE_BINARY_DIR}/lib/python/script/setup.py task.py - utils.py - ) - - + utils.py) -# build_pyfiles_in_sudir(NAME ctypes -# FILES -# date.py gis.py raster.py gmath.py proj.py -# imagery.py vector.py rtree.py display.py -# stats.py dbmi.py raster3d.py arraystats.py -# cluster.py vedit.py segment.py rowio.py -# temporal.py -# ctypes_preamble.py ctypes_loader.py -# ) - -add_subdirectory(ctypes) - - - build_pyfiles_in_sudir(temporal + add_subdirectory(ctypes) + + build_pymodule_in_subdir(temporal base.py core.py abstract_dataset.py @@ -116,63 +59,51 @@ add_subdirectory(ctypes) temporal_raster_base_algebra.py temporal_raster_algebra.py temporal_raster3d_algebra.py - temporal_operator.py - ) + temporal_operator.py) - build_pyfiles_in_sudir(pygrass - errors.py utils.py orderdict.py - ) + build_pymodule_in_subdir(pygrass + errors.py utils.py orderdict.py) - build_pyfiles_in_sudir(pygrass/messages ) + build_pymodule_in_subdir(pygrass/messages) - build_pyfiles_in_sudir(pygrass/modules - shortcuts.py ) + build_pymodule_in_subdir(pygrass/modules shortcuts.py) - build_pyfiles_in_sudir(pygrass/modules/interface + build_pymodule_in_subdir(pygrass/modules/interface docstring.py read.py typedict.py flag.py - parameter.py module.py env.py - ) + parameter.py module.py env.py) - build_pyfiles_in_sudir(pygrass/modules/grid - split.py patch.py grid.py ) + build_pymodule_in_subdir(pygrass/modules/grid + split.py patch.py grid.py) - build_pyfiles_in_sudir(pygrass/raster + build_pymodule_in_subdir(pygrass/raster abstract.py buffer.py category.py - history.py raster_type.py rowio.py segment.py - ) + history.py raster_type.py rowio.py segment.py) - build_pyfiles_in_sudir(pygrass/vector + build_pymodule_in_subdir(pygrass/vector abstract.py basic.py find.py geometry.py - sql.py table.py vector_type.py - ) + sql.py table.py vector_type.py) - build_pyfiles_in_sudir(pygrass/gis - region.py - ) + build_pymodule_in_subdir(pygrass/gis + region.py) - build_pyfiles_in_sudir(pygrass/shell - conversion.py show.py - ) + build_pymodule_in_subdir(pygrass/shell + conversion.py show.py) - build_pyfiles_in_sudir(pygrass/tests - benchmark.py set_mapset.py - ) + build_pymodule_in_subdir(pygrass/tests + benchmark.py set_mapset.py) - build_pyfiles_in_sudir(pygrass/rpc - base.py - ) + build_pymodule_in_subdir(pygrass/rpc base.py) - build_pyfiles_in_sudir(pydispatch + build_pymodule_in_subdir(pydispatch dispatcher.py errors.py robustapply.py - robust.py saferef.py signal.py - ) + robust.py saferef.py signal.py) - build_pyfiles_in_sudir(imaging + build_pymodule_in_subdir(imaging images2avi.py images2gif.py images2ims.py images2swf.py) - build_pyfiles_in_sudir(gunittest + build_pymodule_in_subdir(gunittest case.py gmodules.py loader.py runner.py checkers.py gutils.py invoker.py main.py reporters.py utils.py) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index 5eff36dff69..7f3d59626b1 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -39,7 +39,6 @@ set(cluster_HDRS cluster.h defs/cluster.h) # set(vector_INC "${PQINCPATH};${GDAL_INCLUDE_DIR}") # set(vedit_INC "${GDAL_INCLUDE_DIR}") - foreach(module ${MODULES}) @@ -67,27 +66,25 @@ foreach(module ${MODULES}) endif() set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${module}.py") - - add_custom_command( - OUTPUT ${output_file}.stamp - DEPENDS ${${module}_LIBS} - COMMAND ${CMAKE_COMMAND} -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py - -DCOMPILER=${CMAKE_C_COMPILER} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -DHDRS=${${module}_HDRS} - -DLIBS=${${module}_LIBS} - -DOUT_FILE=${output_file} - -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake - COMMAND ${CMAKE_COMMAND} -E touch ${output_file}.stamp - COMMENT "Generating ${output_file}" - VERBATIM - ) - - add_custom_target(${${module}_TARGET_NAME} ALL - DEPENDS ${output_file}.stamp - ) - + set(stamp_file_path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${module}.py.stamp) + add_custom_command( + OUTPUT ${stamp_file_path} + DEPENDS ${${module}_LIBS} + COMMAND ${CMAKE_COMMAND} + -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DCOMPILER=${CMAKE_C_COMPILER} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -DHDRS=${${module}_HDRS} + -DLIBS=${${module}_LIBS} + -DOUT_FILE=${output_file} + -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake + COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} + COMMENT "Generating ${output_file}" + VERBATIM) + + add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${stamp_file_path}) install(FILES ${output_file} DESTINATION etc/python/grass/lib) - + endforeach() From f84631c7db8628a279c8cdaa5468ad82feff506d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 04:36:33 +0100 Subject: [PATCH 085/264] fix yaac.py to work with py3 --- lib/python/ctypes/ctypesgencore/parser/yacc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/python/ctypes/ctypesgencore/parser/yacc.py b/lib/python/ctypes/ctypesgencore/parser/yacc.py index da0d48c6735..434f5e74f56 100644 --- a/lib/python/ctypes/ctypesgencore/parser/yacc.py +++ b/lib/python/ctypes/ctypesgencore/parser/yacc.py @@ -2276,7 +2276,8 @@ def yacc( raise YaccError("no rules of the form p_rulename are defined.") # Sort the symbols by line number - symbols.sort(lambda x, y: cmp(get_func_code(x).co_firstlineno, get_func_code(y).co_firstlineno)) + symbols.sort(key=lambda x: x.__code__.co_firstlineno) + # Add all of the symbols to the grammar for f in symbols: @@ -2288,7 +2289,7 @@ def yacc( # Make a signature of the docstrings for f in symbols: if f.__doc__: - Signature.update(f.__doc__) + Signature.update(f.__doc__.encode()) lr_init_vars() From 01eb0bae8bf0e4ec958d4d0b6fdfda2f1939528d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 04:37:17 +0100 Subject: [PATCH 086/264] MSVC: include sys/time.h if available or time.h --- lib/raster3d/test/test_raster3d_lib.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/raster3d/test/test_raster3d_lib.h b/lib/raster3d/test/test_raster3d_lib.h index d71cd0edcfb..4c25e9526f9 100644 --- a/lib/raster3d/test/test_raster3d_lib.h +++ b/lib/raster3d/test/test_raster3d_lib.h @@ -21,8 +21,11 @@ #include #include #include +#ifdef HAVE_SYS_TIME_H #include - +#else +#include +#endif double compute_time_difference(struct timeval, struct timeval); int unit_test_coordinate_transform(void); int unit_test_put_get_value(void); From 6ba4b4f60893f1a58220596285a091adbd186a47 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 04:45:01 +0100 Subject: [PATCH 087/264] CMake: remove debug trace --- cmake/modules/copy_python_file.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake index f6c36db5693..37d9c9d7df1 100644 --- a/cmake/modules/copy_python_file.cmake +++ b/cmake/modules/copy_python_file.cmake @@ -12,10 +12,6 @@ function(copy_python_file py_file py_module_name py_DIR_PATH install_dest) set(output_path ${CMAKE_CURRENT_BINARY_DIR}/${py_DIR_PATH}) file(COPY ${py_file_REALPATH} DESTINATION ${output_path}) set(copied_py_file ${output_path}/${py_file_NAME}) - #rkm: TEMPORARY - if(NOT EXISTS ${copied_py_file}) - message(FATAL_ERROR "not exists temp ${output_path};;${py_file_NAME} ") - endif() set(stamp_file_path ${output_path}/CMakeFiles/${py_file_NAME}.stamp) add_custom_command( From 2550dcb43aa08f8b269ea44deafa2eb97a770b53 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 04:45:16 +0100 Subject: [PATCH 088/264] CMake: minor cleanup --- lib/python/ctypes/CMakeLists.txt | 3 --- tools/CMakeLists.txt | 36 +++++++++----------------------- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index 7f3d59626b1..de600b2be5c 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -2,7 +2,6 @@ set(MODULES date gis raster gmath proj imagery vector rtree display stats dbmi raster3d arraystats cluster vedit segment rowio temporal) - if(WITH_OPENGL) list(APPEND MODULES ogsf nviz) endif() @@ -40,8 +39,6 @@ set(cluster_HDRS cluster.h defs/cluster.h) # set(vedit_INC "${GDAL_INCLUDE_DIR}") foreach(module ${MODULES}) - - if(NOT ${module}_LIBS) set(${module}_LIBS grass_${module}) endif() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index ef3ac58e5d3..8f87ce5aa4f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,37 +1,21 @@ -if(NOT MSVC) set(py_files g.html2man/g.html2man.py g.html2man/ghtml.py g.html2man/ggroff.py) foreach(py_file ${py_files}) get_filename_component(py_file_NAME ${py_file} NAME) - - - file(COPY ${py_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - # <----- RESET HERE -----> - set(py_file ${CMAKE_CURRENT_BINARY_DIR}/${py_file_NAME}) - # <----- RESET HERE -----> - - + file(COPY ${py_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + set(copied_file_path ${CMAKE_CURRENT_BINARY_DIR}/${py_file_NAME}) + set(stamp_file_path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${py_file_NAME}.stamp) add_custom_command( - OUTPUT ${py_file}.stamp + OUTPUT ${stamp_file_path} DEPENDS g.parser - COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${py_file} - COMMAND ${CMAKE_COMMAND} -E touch ${py_file}.stamp - COMMENT "Generating ${py_file}c" - VERBATIM - ) - + COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} + COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} + COMMENT "Generating ${copied_file_path}c" + VERBATIM) add_custom_target(tools.${py_file_NAME} ALL - DEPENDS ${py_file}.stamp - ) + DEPENDS ${stamp_file_path}) - - # add_custom_target(tools_${py_file_NAME} ALL - # COMMAND ${PYTHON_EXECUTABLE} -t -3 -m py_compile ${py_file} - # COMMENT "Generating ${py_file}c" - # ) - - install(FILES ${py_file} DESTINATION tools) + install(FILES ${copied_file_path} DESTINATION tools) endforeach() -endif() #MSVC set(current_time_s_ms_SRCS "timer/main.c") if(MSVC) From 5a185debf42ebd4d305760b767fabc27ab807145 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 05:27:03 +0100 Subject: [PATCH 089/264] CMake: make gui/images --- gui/CMakeLists.txt | 2 +- gui/images/CMakeLists.txt | 8 ++++++++ lib/python/ctypes/CMakeLists.txt | 1 - 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 gui/images/CMakeLists.txt diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index ea84ef4e015..7253513642a 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,6 +1,6 @@ #TODO add_subdirectory(icons) -#add_subdirectory(images) +add_subdirectory(images) #add_subdirectory(scripts) add_subdirectory(wxpython) diff --git a/gui/images/CMakeLists.txt b/gui/images/CMakeLists.txt new file mode 100644 index 00000000000..2e89c003087 --- /dev/null +++ b/gui/images/CMakeLists.txt @@ -0,0 +1,8 @@ +# images +file(GLOB png_files "${CMAKE_CURRENT_SOURCE_DIR}/*.png") +install(FILES ${png_files} DESTINATION gui/images/) +# symbols +foreach(category "basic" "demo" "extra" "geology" "legend" "n_arrows") + file(GLOB cat_png_files "${CMAKE_CURRENT_SOURCE_DIR}/${category}/*.png") + install(FILES ${cat_png_files} DESTINATION gui/images/symbols/${category}/) +endforeach() diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index de600b2be5c..3fe953a9776 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -84,4 +84,3 @@ foreach(module ${MODULES}) install(FILES ${output_file} DESTINATION etc/python/grass/lib) endforeach() - From 2da0825ec28d205fed8a20e5e2240e96f3f345c1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 05:28:07 +0100 Subject: [PATCH 090/264] CMake: fix run_grass of locale_strings and ctypesgen --- cmake/ctypesgen.cmake | 4 +--- cmake/locale_strings.cmake | 20 +++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/cmake/ctypesgen.cmake b/cmake/ctypesgen.cmake index d2f03a74a45..9c6eb98df94 100644 --- a/cmake/ctypesgen.cmake +++ b/cmake/ctypesgen.cmake @@ -2,10 +2,8 @@ set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VE set(ENV{GISBASE} "${BIN_DIR}") set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") set(ENV{PYTHONPATH} "${BIN_DIR}/gui/wxpython:${BIN_DIR}/etc/python:$ENV{PYTHONPATH}") -if(WIN32) +if(NOT MSVC) set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") -else() - set(ENV{PATH} "${BIN_DIR}/bin:$ENV{PATH}") endif() set(ENV{LC_ALL} C) diff --git a/cmake/locale_strings.cmake b/cmake/locale_strings.cmake index 10f2ab5c444..3f2327bb682 100644 --- a/cmake/locale_strings.cmake +++ b/cmake/locale_strings.cmake @@ -3,22 +3,18 @@ set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VE set(ENV{GISBASE} "${BIN_DIR}") set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") set(ENV{PYTHONPATH} "${BIN_DIR}/gui/wxpython:${BIN_DIR}/etc/python:$ENV{PYTHONPATH}") -set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +if(NOT MSVC) + set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") +endif() set(ENV{LC_ALL} C) - execute_process(COMMAND ${BIN_DIR}/bin/g.parser -t ${INPUT_FILE} - OUTPUT_VARIABLE run_grass_OV - ERROR_VARIABLE run_grass_EV - #OUTPUT_FILE /tmp/tt.out - RESULT_VARIABLE run_grass_RV - ) + OUTPUT_VARIABLE run_g_parser_OV + ERROR_VARIABLE run_g_parser_EV + RESULT_VARIABLE run_g_parser_RV) -string(REGEX REPLACE "\n" ";" varname "${run_grass_OV}") +string(REGEX REPLACE "\n" ";" varname "${run_g_parser_OV}") set(output_to_write) - -#message("run_grass_OV = ${run_grass_OV}") - foreach(line ${varname}) string(REPLACE "\"" "\\\"" line "${line}") set(line "_(\"${line}\")") @@ -27,6 +23,4 @@ foreach(line ${varname}) endforeach() string(REGEX REPLACE ";" "\n" output_to_write "${output_to_write}") - - file(WRITE "${OUTPUT_FILE}" "${output_to_write}\n") From d91ec1d9c569b1c5475dabc8a2eee782687065e6 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 06:30:21 +0100 Subject: [PATCH 091/264] CMake: link with postgres is optional --- lib/vector/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vector/CMakeLists.txt b/lib/vector/CMakeLists.txt index 5104fe24ee5..05708264824 100644 --- a/lib/vector/CMakeLists.txt +++ b/lib/vector/CMakeLists.txt @@ -37,9 +37,13 @@ build_library_in_subdir(Vlib DEPENDS grass_gis grass_raster grass_rtree grass_graph grass_dig2 grass_dbmibase grass_btree2 grass_dbmiclient - grass_linkm grass_gproj POSTGRES + grass_linkm grass_gproj ) +if(TARGET POSTGRES) + target_link_libraries(grass_vector POSTGRES) +endif() + add_subdirectory(vedit) add_subdirectory(neta) From e4da936ed0f7165e3139f255e3c5c204a99512f5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 06:31:00 +0100 Subject: [PATCH 092/264] gid_t, uid_t, pid_t exists on *nix --- include/CMakeLists.txt | 1 + include/config.h.cmake.in | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 410c94ec9d8..3ed05b4a6b7 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -69,6 +69,7 @@ endif() if(MSVC) set(GID_TYPE int) set(UID_TYPE int) + set(UID_TYPE int) set(RETSIGTYPE "void") else() set(RETSIGTYPE "int") diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 552867feb12..e13ca46d92a 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -77,15 +77,6 @@ /* define if clapack.h exists */ #cmakedefine HAVE_CLAPACK_H ${HAVE_CLAPACK_H} -/* define gid_t type */ -typedef @GID_TYPE@ gid_t; - -/* define uid_t type */ -typedef @UID_TYPE@ uid_t; - -/* define pid_t type */ -typedef @PID_TYPE@ pid_t; - /* define if "long long" is available */ #cmakedefine HAVE_LONG_LONG_INT ${HAVE_LONG_LONG_INT} @@ -284,6 +275,15 @@ typedef @PID_TYPE@ pid_t; #define strncasecmp _strnicmp #define strcasecmp _stricmp +/* define gid_t type */ +typedef @GID_TYPE@ gid_t; + +/* define uid_t type */ +typedef @UID_TYPE@ uid_t; + +/* define pid_t type */ +typedef @PID_TYPE@ pid_t; + #ifndef S_ISDIR #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #endif From 52469e21a35f030ec92405cfded74614538ca2e1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 06:54:51 +0100 Subject: [PATCH 093/264] use find_library_suffix to switch between debug and rest --- thirdparty/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index bc9f281da5f..1c3a53c5946 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -16,7 +16,7 @@ set_property(TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_D find_package(PNG REQUIRED) add_library(LIBPNG INTERFACE IMPORTED GLOBAL) -set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY_DEBUG} ) +set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY_${find_library_suffix}} ) set_property(TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) find_package(JPEG) From cd8d72f16f95dd74cca86d470ad291efdc094c0e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:29:33 +0100 Subject: [PATCH 094/264] avoid touch .stamp files and depend on generated pyc file --- cmake/modules/copy_python_file.cmake | 22 +++++++++++----------- tools/CMakeLists.txt | 9 ++++----- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake index 37d9c9d7df1..68eba7dea70 100644 --- a/cmake/modules/copy_python_file.cmake +++ b/cmake/modules/copy_python_file.cmake @@ -11,20 +11,20 @@ function(copy_python_file py_file py_module_name py_DIR_PATH install_dest) set(output_path ${CMAKE_CURRENT_BINARY_DIR}/${py_DIR_PATH}) file(COPY ${py_file_REALPATH} DESTINATION ${output_path}) - set(copied_py_file ${output_path}/${py_file_NAME}) + set(copied_file_path ${output_path}/${py_file_NAME}) - set(stamp_file_path ${output_path}/CMakeFiles/${py_file_NAME}.stamp) + set(pyc_file_path "${copied_file_path}c") add_custom_command( - OUTPUT ${stamp_file_path} - COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_py_file} - COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} - COMMENT "Generating ${copied_py_file}c" + OUTPUT ${pyc_file_path} + COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} + COMMENT "Generating ${pyc_file_path}" VERBATIM) - + + set_source_files_properties("${pyc_file_path}" GENERATED) + add_custom_target(${py_module_name}.${py_file_NAME} ALL - DEPENDS ${stamp_file_path}) - - set_source_files_properties("${copied_py_file}c" GENERATED) - install(FILES ${copied_py_file} DESTINATION ${install_dest}) + DEPENDS ${pyc_file_path}) + + install(FILES ${copied_file_path} DESTINATION ${install_dest}) endfunction() \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 8f87ce5aa4f..ef4cc30e37b 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -3,16 +3,15 @@ foreach(py_file ${py_files}) get_filename_component(py_file_NAME ${py_file} NAME) file(COPY ${py_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) set(copied_file_path ${CMAKE_CURRENT_BINARY_DIR}/${py_file_NAME}) - set(stamp_file_path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${py_file_NAME}.stamp) + set(pyc_file_path "${copied_file_path}c") add_custom_command( - OUTPUT ${stamp_file_path} + OUTPUT ${pyc_file_path} DEPENDS g.parser COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} - COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} - COMMENT "Generating ${copied_file_path}c" + COMMENT "Generating ${pyc_file_path}" VERBATIM) add_custom_target(tools.${py_file_NAME} ALL - DEPENDS ${stamp_file_path}) + DEPENDS ${pyc_file_path}) install(FILES ${copied_file_path} DESTINATION tools) endforeach() From f1a5765de43b480725f3c4cbbcf710ea7ee38265 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:30:52 +0100 Subject: [PATCH 095/264] CMake: update definiition of HAVE_PROJ_H --- include/CMakeLists.txt | 1 + include/config.h.cmake.in | 3 +++ lib/CMakeLists.txt | 2 +- lib/proj/CMakeLists.txt | 2 +- lib/python/ctypes/CMakeLists.txt | 2 +- thirdparty/CMakeLists.txt | 6 +++--- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 3ed05b4a6b7..9c30a903c0b 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -47,6 +47,7 @@ check_target(GEOS HAVE_GEOS) check_target(GDAL HAVE_GDAL) check_target(GDAL HAVE_OGR) check_target(SQLITE HAVE_SQLITE) +check_target(PROJ HAVE_PROJ_H) check_target(BLAS HAVE_LIBBLAS) check_target(BLAS HAVE_CBLAS_H) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index e13ca46d92a..8b714a94f13 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -158,6 +158,9 @@ /* define if jpeglib.h exists */ #cmakedefine HAVE_JPEGLIB_H ${HAVE_JPEGLIB_H} +/* define if proj.h exists */ +#cmakedefine HAVE_PROJ_H ${HAVE_PROJ_H} + /* define if fftw3.h exists */ #cmakedefine HAVE_FFTW3_H ${HAVE_FFTW3_H} diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 29f20982c02..87256301c42 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -19,7 +19,7 @@ list(APPEND raster_SRCS "./gis/gisinit.c") build_library_in_subdir(raster DEFS "-DGDAL_DYNAMIC=1;-DGDAL_LINK=1" SOURCES ${raster_SRCS} - DEPENDS GDAL PROJ4 grass_gproj) + DEPENDS GDAL PROJ grass_gproj) if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_library(DL_LIBRARY dl) diff --git a/lib/proj/CMakeLists.txt b/lib/proj/CMakeLists.txt index c4c13ec1904..77c7663ef30 100644 --- a/lib/proj/CMakeLists.txt +++ b/lib/proj/CMakeLists.txt @@ -47,7 +47,7 @@ set(PROJ_TABLES desc.table parms.table units.table) # PROJ_DSTFILES := $(patsubst %,$(PROJ_DIR)/%,$(PROJ_TABLES)) build_module(NAME grass_gproj - DEPENDS grass_driver GDAL ZLIB PROJ4 + DEPENDS grass_driver GDAL ZLIB PROJ SOURCES "${grass_gproj_SOURCES}" INCLUDES "../driver" ) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index 3fe953a9776..b70144f27e8 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -34,7 +34,7 @@ set(cluster_HDRS cluster.h defs/cluster.h) #TODO # set(VECT_INC ${PQINCPATH} ) -# set(proj_INC "${PROJ4_INCLUDE_DIR}") +# set(proj_INC "${PROJ_INCLUDE_DIR}") # set(vector_INC "${PQINCPATH};${GDAL_INCLUDE_DIR}") # set(vedit_INC "${GDAL_INCLUDE_DIR}") diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 1c3a53c5946..491711fd410 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -37,9 +37,9 @@ set_property(TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) endif() find_package(PROJ4 REQUIRED) -add_library(PROJ4 INTERFACE IMPORTED GLOBAL) -set_property(TARGET PROJ4 PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) -set_property(TARGET PROJ4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIR} ) +add_library(PROJ INTERFACE IMPORTED GLOBAL) +set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) +set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIRS} ) find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) From ca1a9e0dc10fd396388e56d7f38dada94d1c8fa6 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:33:12 +0100 Subject: [PATCH 096/264] include winsock.h only on msvc --- lib/raster3d/test/test_tools.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/raster3d/test/test_tools.c b/lib/raster3d/test/test_tools.c index 5b0565f78f0..1b934656356 100644 --- a/lib/raster3d/test/test_tools.c +++ b/lib/raster3d/test/test_tools.c @@ -20,7 +20,9 @@ #include #include #include "test_raster3d_lib.h" -#include +#ifdef _MSC_VER + #include +#endif /* *************************************************************** */ /* Compute the difference between two time steps ***************** */ From e5ec2bcf5293d79d305a34ee8c7433a2e79f1d64 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:37:05 +0100 Subject: [PATCH 097/264] CMake: remove annoying logs --- lib/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 87256301c42..b8436a91800 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -26,7 +26,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") target_link_libraries(grass_raster ${DL_LIBRARY}) endif() -message("Copying external/ccmath/ccmath.h to ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h") configure_file(external/ccmath/ccmath.h ${CMAKE_BINARY_DIR}/include/grass/ccmath_grass.h COPYONLY) From d496f8932803ff3f1043d4948f750df8ba495f25 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:51:17 +0100 Subject: [PATCH 098/264] for fix TODO for g.version --- general/CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 11eab963f2b..9a010ac3b51 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -27,12 +27,7 @@ endif() build_program_in_subdir(g.rename DEPENDS grass_manage grass_raster ) build_program_in_subdir(g.tempfile DEPENDS grass_gis ) - -#TODO -set(GRASS_VERSION_UPDATE_PKG "0.2") -set(BUILD_ARCH "x86_64") - -build_program_in_subdir(g.version DEPENDS grass_gis GEOS GDAL +build_program_in_subdir(g.version DEPENDS grass_gis GEOS GDAL SQLITE DEFS "-DGRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" "-DGRASS_VERSION_GIT=\"${GRASS_VERSION_GIT}\"" "-DGRASS_VERSION_UPDATE_PKG=${GRASS_VERSION_UPDATE_PKG}" From df452d31814d9b50d45658480b9375e598ab2535 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:52:17 +0100 Subject: [PATCH 099/264] CMake: depend on pyc file not on a new .stamp file --- lib/python/ctypes/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index b70144f27e8..26af001ccdb 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -63,9 +63,8 @@ foreach(module ${MODULES}) endif() set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${module}.py") - set(stamp_file_path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${module}.py.stamp) - add_custom_command( - OUTPUT ${stamp_file_path} + + add_custom_commandOUTPUT ${output_file} DEPENDS ${${module}_LIBS} COMMAND ${CMAKE_COMMAND} -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py @@ -76,11 +75,10 @@ foreach(module ${MODULES}) -DLIBS=${${module}_LIBS} -DOUT_FILE=${output_file} -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake - COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} COMMENT "Generating ${output_file}" VERBATIM) - add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${stamp_file_path}) + add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${output_file}) install(FILES ${output_file} DESTINATION etc/python/grass/lib) endforeach() From 10c4e8b2b82cc481f9c4c29746df6b3019534a5c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 07:57:04 +0100 Subject: [PATCH 100/264] CMake: fix syntax error --- lib/python/ctypes/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index 26af001ccdb..a7b8a60cb4a 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -64,7 +64,7 @@ foreach(module ${MODULES}) set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${module}.py") - add_custom_commandOUTPUT ${output_file} + add_custom_command(OUTPUT ${output_file} DEPENDS ${${module}_LIBS} COMMAND ${CMAKE_COMMAND} -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py From f03a58d72c19d3bc06a5c4d4298f66d01ad6657d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 08:00:00 +0100 Subject: [PATCH 101/264] CMake: fix sqlite include dir variable --- include/CMakeLists.txt | 2 +- thirdparty/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 9c30a903c0b..fc4bfbfa261 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -223,7 +223,7 @@ endforeach() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") -message("Creating ${CMAKE_BINARY_DIR}/grass/config.h") +message(STATUS "Creating ${CMAKE_BINARY_DIR}/grass/config.h") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 491711fd410..b10865fecbd 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -135,7 +135,7 @@ if(WITH_SQLITE) find_package(SQLite REQUIRED) add_library(SQLITE INTERFACE IMPORTED GLOBAL) set_property(TARGET SQLITE PROPERTY INTERFACE_LINK_LIBRARIES ${SQLITE_LIBRARY} ) - set_property(TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIR} ) + set_property(TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIRS} ) endif() find_package(GEOS REQUIRED) From 0f9f384b99e854917e554372682f456a55be6c04 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 16:06:07 +0100 Subject: [PATCH 102/264] CMake: detect version of proj4 before activating defines --- .../{FindPROJ4.cmake => FindPROJ.cmake} | 42 +++++++++---------- include/CMakeLists.txt | 19 +++++---- thirdparty/CMakeLists.txt | 2 +- 3 files changed, 32 insertions(+), 31 deletions(-) rename cmake/find_scripts/{FindPROJ4.cmake => FindPROJ.cmake} (54%) diff --git a/cmake/find_scripts/FindPROJ4.cmake b/cmake/find_scripts/FindPROJ.cmake similarity index 54% rename from cmake/find_scripts/FindPROJ4.cmake rename to cmake/find_scripts/FindPROJ.cmake index b65f7d2f273..a2935ae8e49 100644 --- a/cmake/find_scripts/FindPROJ4.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -15,30 +15,28 @@ # ############################################################################### -# Try to use OSGeo4W installation -IF(WIN32) - SET(PROJ4_OSGEO4W_HOME "C:/OSGeo4W") - - IF($ENV{OSGEO4W_HOME}) - SET(PROJ4_OSGEO4W_HOME "$ENV{OSGEO4W_HOME}") - ENDIF() -ENDIF(WIN32) - -FIND_PATH(PROJ4_INCLUDE_DIR proj_api.h - PATHS ${PROJ4_OSGEO4W_HOME}/include - DOC "Path to PROJ.4 library include directory") - -SET(PROJ4_NAMES ${PROJ4_NAMES} proj proj_i) -FIND_LIBRARY(PROJ4_LIBRARY - NAMES ${PROJ4_NAMES} - PATHS ${PROJ4_OSGEO4W_HOME}/lib - DOC "Path to PROJ.4 library file") +FIND_PATH(PROJ_INCLUDE_DIR proj_api.h + DOC "Path to PROJ.4 include directory") + + file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_api_h_CONTENTS) + string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_api_h_CONTENTS}") + #if(MUPARSER_VERSION MATCHES "^[0-9]+\$") + # set(MUPARSER_VERSION "${MUPARSER_VERSION}.0.0") +FIND_LIBRARY(PROJ_LIBRARY + NAMES proj proj_i proj_d + DOC "Path to PROJ library file") +if(PROJ_INCLUDE_DIR AND PROJ_LIBRARY) +set(PROJ_FOUND TRUE) +endif() +IF(PROJ_FOUND) + SET(PROJ_LIBRARIES ${PROJ_LIBRARY}) +ENDIF() # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE # if all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ + FOUND_VAR PROJ_FOUND + REQUIRED_VARS PROJ_LIBRARY PROJ_INCLUDE_DIR PROJ_VERSION_STRING + VERSION_VAR PROJ_VERSION_STRING) -IF(PROJ4_FOUND) - SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY}) -ENDIF() diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index fc4bfbfa261..b692eb8a2bb 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -22,12 +22,13 @@ check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H) check_include_file(g2c.h HAVE_G2C_H) check_include_file(f2c.h HAVE_F2C_H) -set(HAVE_PTHREAD_H 0) -set(HAVE_REGEX_H 0) -set(HAVE_LIBINTL_H 0) -set(HAVE_LANGINFO_H 0) -set(HAVE_DBM_H 0) -if(NOT MSVC) +if(MSVC) + set(HAVE_PTHREAD_H 0) + set(HAVE_REGEX_H 0) + set(HAVE_LIBINTL_H 0) + set(HAVE_LANGINFO_H 0) + set(HAVE_DBM_H 0) +else() check_include_file(pthread.h HAVE_PTHREAD_H) check_include_file(regex.h HAVE_REGEX_H) check_include_file(libintl.h HAVE_LIBINTL_H) @@ -36,7 +37,6 @@ if(NOT MSVC) endif() #set(CMAKE_REQUIRED_INCLUDES "${FFTW_INCLUDE_DIR}") - check_target(ICONV HAVE_ICONV_H) check_target(BZIP2 HAVE_BZLIB_H) check_target(ZLIB HAVE_ZLIB_H) @@ -47,7 +47,10 @@ check_target(GEOS HAVE_GEOS) check_target(GDAL HAVE_GDAL) check_target(GDAL HAVE_OGR) check_target(SQLITE HAVE_SQLITE) -check_target(PROJ HAVE_PROJ_H) + +if(PROJ_VERSION_STRING LESS 500) + check_target(PROJ HAVE_PROJ_H) +endif() check_target(BLAS HAVE_LIBBLAS) check_target(BLAS HAVE_CBLAS_H) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index b10865fecbd..a18ce3bf114 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -36,7 +36,7 @@ add_library(LIBM INTERFACE IMPORTED GLOBAL) set_property(TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) endif() -find_package(PROJ4 REQUIRED) +find_package(PROJ REQUIRED) add_library(PROJ INTERFACE IMPORTED GLOBAL) set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIRS} ) From b82cee58fe2416339ffdd93bdca85282b5dcc0c7 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 18:03:29 +0100 Subject: [PATCH 103/264] MSVC: avoid pulling min max on windows --- cmake/modules/set_compiler_flags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/set_compiler_flags.cmake b/cmake/modules/set_compiler_flags.cmake index 844001187b2..a1ca8d5d00d 100644 --- a/cmake/modules/set_compiler_flags.cmake +++ b/cmake/modules/set_compiler_flags.cmake @@ -1,11 +1,11 @@ macro(set_compiler_flags) if(MSVC) - set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS") + set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS /DNOMINMAX") if(CMAKE_C_FLAGS) set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") endif() - set(GRASS_CXX_FLAGS "/D_CRT_SECURE_NO_WARNINGS") + set(GRASS_CXX_FLAGS "/D_CRT_SECURE_NO_WARNINGS /DNOMINMAX") if(CMAKE_CXX_FLAGS) set(CMAKE_CXX_FLAGS "${GRASS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") endif() From 7d81a382e355bcbcef97bc31ecd8f5aa1bf6f752 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 18:10:29 +0100 Subject: [PATCH 104/264] CMake: update list of enabled modules --- raster/CMakeLists.txt | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index 142366af64d..9a0ab8ef290 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -6,7 +6,6 @@ build_program_in_subdir( r.buffer DEPENDS grass_gis grass_raster ) - build_program_in_subdir( r.carve DEPENDS grass_gis grass_raster grass_vector grass_bitmap) @@ -24,7 +23,7 @@ build_program_in_subdir( DEPENDS grass_gis grass_raster grass_btree2) build_program_in_subdir( - r.coin +r.coin DEPENDS grass_gis grass_raster ) add_subdirectory(r.colors) @@ -91,11 +90,10 @@ build_program_in_subdir( r.gwflow DEPENDS grass_gis grass_raster grass_gpde) -if(NOT MSVC) build_program_in_subdir( r.horizon DEPENDS grass_gis grass_raster grass_gproj) -endif() + build_program_in_subdir( r.in.ascii DEPENDS grass_gis grass_raster) @@ -186,7 +184,6 @@ build_program_in_subdir( r.out.gdal DEPENDS grass_gis grass_raster grass_dbmibase grass_imagery) -#TODO set_source_files_properties(r.out.gdal/main.c PROPERTIES COMPILE_DEFINITIONS "GRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\";GDAL_VERSION_MAJOR=\"2\";GDAL_VERSION_MINOR=\"1\";GDAL_VERSION_REV=\"1\"" @@ -200,7 +197,6 @@ build_program_in_subdir( r.out.mat DEPENDS grass_gis grass_raster) - build_program_in_subdir( r.out.mpeg DEPENDS grass_gis grass_raster) @@ -377,11 +373,11 @@ build_program_in_subdir( build_program_in_subdir( r.stream.extract DEPENDS grass_gis grass_raster grass_segment grass_vector) - if(NOT MSVC) + build_program_in_subdir( r.sun - DEPENDS grass_gis grass_raster grass_gproj) -endif() + DEPENDS grass_gmath grass_raster grass_gproj) + build_program_in_subdir( r.sunhours DEPENDS grass_gis grass_raster grass_gproj) @@ -422,14 +418,17 @@ build_program_in_subdir( r.surf.random DEPENDS grass_gis grass_raster grass_gmath ) -if(NOT MSVC) -#REVIEW: EXTRA_CFLAGS = -DUSER=\"$(USER)\" -DNODATA_FIX -DELEV_FLOAT -Wno-sign-compare +if(MSVC) + set(USER_NAME $ENV{USERNAME}) +else() + set(USER_NAME $ENV{USER}) +endif() + build_program_in_subdir( r.terraflow DEPENDS grass_gis grass_raster grass_iostream SRC_REGEX "*.cpp" - DEFS "-DUSER=USER;-DNODATA_FIX;-DELEV_FLOAT") -endif() + DEFS "-DUSER=${USER_NAME};-DNODATA_FIX;-DELEV_FLOAT") build_program_in_subdir( r.texture @@ -481,14 +480,11 @@ build_program_in_subdir( r.usler DEPENDS grass_gis grass_raster) -#REVIEW: EXTRA_CFLAGS = -DUSER=\"$(USER)\" -Wno-sign-compare -if(NOT MSVC) - build_program_in_subdir( +build_program_in_subdir( r.viewshed DEPENDS grass_gis grass_raster grass_iostream SRC_REGEX "*.cpp" - DEFS "-DUSER=USER") -endif() + DEFS "-DUSER=${USER_NAME}") build_program_in_subdir( r.volume @@ -502,11 +498,10 @@ build_program_in_subdir( r.water.outlet DEPENDS grass_gis grass_raster) -#TODO -# build_program_in_subdir( -# r.watershed -# DEPENDS grass_gis grass_raster -# SRC_REGEX "*.cpp") +build_program_in_subdir( + r.watershed + DEPENDS grass_gis grass_raster + SRC_REGEX "*.cpp") build_program_in_subdir( r.what From 7f94310d8a413c2b93035fd4da1d13fce1caa83b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 18:37:06 +0100 Subject: [PATCH 105/264] TODO r.watershed, fix cmake proj4 library varname --- lib/init/CMakeLists.txt | 2 +- raster/CMakeLists.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index b1e985e5df1..04748a38692 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -25,7 +25,7 @@ if(DEFINED ENV{PROJSHARE}) message(WARNING "External PROJ.4 directory not specified; default will be used") set(PROJSHARE "$ENV{PROJSHARE}") else() - get_filename_component(PROJ_INSTALL_PREFIX ${PROJ4_LIBRARY} PATH) + get_filename_component(PROJ_INSTALL_PREFIX ${PROJ_LIBRARY} PATH) set(PROJSHARE "${PROJ_INSTALL_PREFIX}/share/proj") if(EXISTS ${PROJSHARE}/epsg) message("PROJ.4 directory ${PROJSHARE}") diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index 9a0ab8ef290..6c6db8342d5 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -498,10 +498,10 @@ build_program_in_subdir( r.water.outlet DEPENDS grass_gis grass_raster) -build_program_in_subdir( - r.watershed - DEPENDS grass_gis grass_raster - SRC_REGEX "*.cpp") +# build_program_in_subdir( +# r.watershed +# DEPENDS grass_gis grass_raster +# SRC_REGEX "*.cpp") build_program_in_subdir( r.what From 9e4ff953f26bf60f85c70225ba9c44ec2c9cf990 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 18:47:36 +0100 Subject: [PATCH 106/264] Revert "simlib: min, max are already available" This reverts commit ab2b96127e66198f32b6799342b1fae6365f9fc3. --- raster/r.sim/simlib/utils.c | 29 +++++++++++++++++++++++++++++ raster/r.sim/simlib/waterglobs.h | 2 ++ 2 files changed, 31 insertions(+) diff --git a/raster/r.sim/simlib/utils.c b/raster/r.sim/simlib/utils.c index 32aa2f7ca82..4f2dae3404a 100644 --- a/raster/r.sim/simlib/utils.c +++ b/raster/r.sim/simlib/utils.c @@ -29,3 +29,32 @@ double amin1(double arg1, double arg2) return res; } + +int min(int arg1, int arg2) +{ + int res; + + if (arg1 <= arg2) { + res = arg1; + } + else { + res = arg2; + } + + return res; +} + +int max(int arg1, int arg2) +{ + int res; + + if (arg1 >= arg2) { + res = arg1; + } + else { + res = arg2; + } + + return res; +} + diff --git a/raster/r.sim/simlib/waterglobs.h b/raster/r.sim/simlib/waterglobs.h index 09f937b28aa..aece1fa582e 100644 --- a/raster/r.sim/simlib/waterglobs.h +++ b/raster/r.sim/simlib/waterglobs.h @@ -76,6 +76,8 @@ extern double gasdev(void); extern void gasdev_for_paralel(double *, double *); extern double amax1(double, double); extern double amin1(double, double); +extern int min(int, int); +extern int max(int, int); extern void create_observation_points(); extern double xmin, ymin, xmax, ymax; From 39cffc5659e042c6bbaee3a2e37212cb94cd2785 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 18:57:37 +0100 Subject: [PATCH 107/264] CMake: update proj library variables (remove suffix 4) --- include/CMakeLists.txt | 1 + thirdparty/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index b692eb8a2bb..edec16b8f94 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -48,6 +48,7 @@ check_target(GDAL HAVE_GDAL) check_target(GDAL HAVE_OGR) check_target(SQLITE HAVE_SQLITE) +#TODO: check with more version of proj if(PROJ_VERSION_STRING LESS 500) check_target(PROJ HAVE_PROJ_H) endif() diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index a18ce3bf114..ba65fe57347 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -38,8 +38,8 @@ endif() find_package(PROJ REQUIRED) add_library(PROJ INTERFACE IMPORTED GLOBAL) -set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ4_LIBRARY} ) -set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ4_INCLUDE_DIRS} ) +set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARIES} ) +set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) From 72b35caac045c9ad34c37c7b79af75aef9fa1d1a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 19:54:27 +0100 Subject: [PATCH 108/264] undef min max on msvc --- include/gis.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/gis.h b/include/gis.h index 94777e0c969..fea824cc434 100644 --- a/include/gis.h +++ b/include/gis.h @@ -121,6 +121,8 @@ static const char *GRASS_copyright __attribute__ ((unused)) #if defined(_MSC_VER) #define _USE_MATH_DEFINES 1 #include +#undef min +#undef max #else #undef M_PI #define M_PI 3.14159265358979323846 /* pi */ From d7da905e0222d93d4964180b664ee15a977a69d4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 31 Dec 2019 19:54:54 +0100 Subject: [PATCH 109/264] use macro INFINITY --- raster/r.horizon/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raster/r.horizon/main.c b/raster/r.horizon/main.c index c9d29134e49..7b40aab4e78 100644 --- a/raster/r.horizon/main.c +++ b/raster/r.horizon/main.c @@ -773,7 +773,7 @@ double horizon_height(void) { double height; - tanh0 = -1.0 / 0.0; /* -inf */ + tanh0 = -INFINITY; /* -inf */ length = 0; height = searching(); From 87c67cc488d90ca371fe4d09bf88c19e61ed66bf Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 14:22:17 +0100 Subject: [PATCH 110/264] MSVC: fix gisinit initialized flag export initialized using dllexport when building. export macros has been generated by CMake's GenerateExportHeader. cmake calls this for all libraries in build_module function. There is a change in initialized variable decl on msvc and rest of compilers. This point has to be discussed with other devs --- cmake/modules/build_module.cmake | 10 +++++++--- include/CMakeLists.txt | 6 +++--- include/config.h.cmake.in | 3 +++ lib/gis/gisinit.c | 16 +++++++++++++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 0767c3818f2..746bd8e4a5a 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,3 +1,4 @@ +include(GenerateExportHeader) function(build_module) cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) @@ -38,9 +39,12 @@ function(build_module) add_executable(${G_NAME} ${${G_NAME}_SRCS}) else() add_library(${G_NAME} ${${G_NAME}_SRCS}) - set_target_properties(${G_NAME} - PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER} - ) + set_target_properties(${G_NAME} PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER}) + + set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") + generate_export_header(${G_NAME} + STATIC_DEFINE "STATIC_BUILD" + EXPORT_FILE_NAME ${export_file_name}) endif() foreach(G_OPTIONAL_DEPEND ${G_OPTIONAL_DEPENDS}) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index edec16b8f94..55d3cbc234c 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -109,9 +109,9 @@ if(TARGET X11) endif() #used in config.cmake.in -set(STATIC_BUILD TRUE) -if(BUILD_SHARED_LIBS) - set(STATIC_BUILD FALSE) +set(STATIC_BUILD 0) +if(NOT BUILD_SHARED_LIBS) + set(STATIC_BUILD 1) endif() #used in config.cmake.in diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 8b714a94f13..939ffb2942a 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -299,4 +299,7 @@ typedef SSIZE_T ssize_t; #endif //_MSC_VER +/* To include export.h generated by cmake */ + +#define GRASS_CMAKE_BUILD 1 #endif /* _config_h */ diff --git a/lib/gis/gisinit.c b/lib/gis/gisinit.c index 864a44924a7..87be9c5dc16 100644 --- a/lib/gis/gisinit.c +++ b/lib/gis/gisinit.c @@ -26,9 +26,23 @@ #include "G.h" #include "gis_local_proto.h" +#ifdef GRASS_CMAKE_BUILD +#include +#endif struct G__ G__; -static int initialized = 0; /** Is set when engine is initialized */ +/** initialized is set to 1 when engine is initialized */ +/* GRASS_GIS_EXPORT static int initialized on windows msvc throws below error. +"Error C2201 'initialized': must have external linkage in order to be exported/imported" +So we do an ifndef on msvc. without GRASS_GIS_EXPORT it will be exported in DLL. +*/ +#ifndef _MSC_VER +static int initialized = 0; +#else +GRASS_GIS_EXPORT int initialized; +#endif + + static int gisinit(void); /*! From f83bdb1520502aca90f83e8d96f4f35c03c325c6 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 14:23:00 +0100 Subject: [PATCH 111/264] MSVC: fix min, max macro stuff --- raster/r.series/main.c | 1 + raster/r.sim/simlib/waterglobs.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/raster/r.series/main.c b/raster/r.series/main.c index be56dff6b72..3408b24e9fc 100644 --- a/raster/r.series/main.c +++ b/raster/r.series/main.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/raster/r.sim/simlib/waterglobs.h b/raster/r.sim/simlib/waterglobs.h index aece1fa582e..87107c9691f 100644 --- a/raster/r.sim/simlib/waterglobs.h +++ b/raster/r.sim/simlib/waterglobs.h @@ -6,6 +6,10 @@ #define UNDEF -9999 #include +#ifdef _MSC_VER +#undef min +#undef max +#endif extern char *elevin; extern char *dxin; From 712d13826313fc5532568933fc9317920800e12f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 21:24:04 +0100 Subject: [PATCH 112/264] update TODO, list of modules not built by cmake --- db/CMakeLists.txt | 6 ++-- general/CMakeLists.txt | 12 ++++---- imagery/CMakeLists.txt | 18 +++++------ misc/CMakeLists.txt | 1 + raster/CMakeLists.txt | 59 ++++++++++++++++++------------------- raster/r.sim/CMakeLists.txt | 8 +---- raster3d/CMakeLists.txt | 32 ++++++++++---------- vector/CMakeLists.txt | 33 ++++++++++----------- 8 files changed, 79 insertions(+), 90 deletions(-) diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index e536df3a90c..470e5a8cee2 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -1,6 +1,3 @@ -#TODO -#add_subdirectory(drivers) - build_program_in_subdir(db.columns DEPENDS grass_gis grass_dbmiclient ) build_program_in_subdir(db.createdb DEPENDS grass_gis grass_dbmiclient ) @@ -19,8 +16,9 @@ build_program_in_subdir(db.databases DEPENDS grass_gis grass_dbmiclient ) build_program_in_subdir(db.dropdb DEPENDS grass_gis grass_dbmiclient ) - +# TODO: MODULES DISABLED #add_subdirectory(dbf) +#add_subdirectory(drivers) # MODULE_TOPDIR = .. diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 9a010ac3b51..6e992940a2b 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -6,10 +6,6 @@ build_program_in_subdir(g.filename DEPENDS grass_gis ) build_program_in_subdir(g.findetc DEPENDS grass_gis ) build_program_in_subdir(g.findfile DEPENDS grass_manage ) build_program_in_subdir(g.gisenv DEPENDS grass_gis ) -if(NOT MSVC) -build_program_in_subdir(g.list DEPENDS grass_manage) -endif() - build_program_in_subdir(g.mapset DEPENDS grass_gis ) build_program_in_subdir(g.mapsets DEPENDS grass_gis ) build_program_in_subdir(g.message DEPENDS grass_gis ) @@ -21,9 +17,6 @@ build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj GDAL ) build_program_in_subdir(g.region DEPENDS grass_gis grass_gproj grass_vector grass_raster3d grass_gmath) -if(NOT MSVC) -build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster ) -endif() build_program_in_subdir(g.rename DEPENDS grass_manage grass_raster ) build_program_in_subdir(g.tempfile DEPENDS grass_gis ) @@ -42,6 +35,11 @@ endif() # g.cairocomp # g.gui +# TODO: MODULES DISABLED +if(NOT MSVC) +build_program_in_subdir(g.list DEPENDS grass_manage) +build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster ) +endif() add_subdirectory(manage/lister) diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt index 09abb6caede..0fbeb7a9dbf 100644 --- a/imagery/CMakeLists.txt +++ b/imagery/CMakeLists.txt @@ -49,11 +49,6 @@ build_program_in_subdir( DEPENDS grass_imagery grass_raster grass_vector grass_gis) -# build_program_in_subdir( -# i.ortho.photo -# DEPENDS grass_imagery grass_raster grass_vector grass_gis) - - build_program_in_subdir( i.rectify DEPENDS grass_imagery grass_raster grass_vector grass_gis) @@ -66,10 +61,6 @@ build_program_in_subdir( i.segment DEPENDS grass_imagery grass_raster grass_vector grass_gis grass_segment) -# build_program_in_subdir( -# i.superpixels.slic -# DEPENDS grass_imagery grass_raster grass_vector grass_gis) - build_program_in_subdir( i.smap DEPENDS grass_imagery grass_raster grass_vector grass_gis) @@ -100,3 +91,12 @@ build_program_in_subdir( DEPENDS grass_imagery grass_raster grass_vector grass_gis) build_program_in_subdir(i.atcorr DEPENDS grass_imagery grass_raster grass_vector grass_gis SRC_REGEX "*.cpp") + +# TODO: MODULES DISABLED +# build_program_in_subdir( +# i.ortho.photo +# DEPENDS grass_imagery grass_raster grass_vector grass_gis) + +# build_program_in_subdir( +# i.superpixels.slic +# DEPENDS grass_imagery grass_raster grass_vector grass_gis) \ No newline at end of file diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index 93fcc972937..d1991a63e72 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -11,6 +11,7 @@ build_program_in_subdir( m.transform DEPENDS grass_gis grass_imagery grass_raster grass_vector) +# TODO: MODULES DISABLED # build_program_in_subdir( # m.nviz.image # DEPENDS grass_gis) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index 6c6db8342d5..e102e7e4945 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -110,11 +110,6 @@ build_program_in_subdir( r.in.gridatb DEPENDS grass_gis grass_raster) -#TODO -# build_program_in_subdir( -# r.in.lidar -# DEPENDS grass_gis grass_raster grass_lidar) - build_program_in_subdir( r.in.mat DEPENDS grass_gis grass_raster) @@ -148,14 +143,6 @@ build_program_in_subdir( r.lake DEPENDS grass_gis grass_raster) -#TODO -# build_program_in_subdir( -# r.li -# DEPENDS grass_gis grass_raster) -if(NOT MSVC) -add_subdirectory(r.mapcalc) -endif() - build_program_in_subdir( r.mfilter DEPENDS grass_gis grass_raster grass_rowio) @@ -424,12 +411,6 @@ else() set(USER_NAME $ENV{USER}) endif() - build_program_in_subdir( - r.terraflow - DEPENDS grass_gis grass_raster grass_iostream - SRC_REGEX "*.cpp" - DEFS "-DUSER=${USER_NAME};-DNODATA_FIX;-DELEV_FLOAT") - build_program_in_subdir( r.texture DEPENDS grass_gis grass_raster) @@ -480,12 +461,6 @@ build_program_in_subdir( r.usler DEPENDS grass_gis grass_raster) -build_program_in_subdir( - r.viewshed - DEPENDS grass_gis grass_raster grass_iostream - SRC_REGEX "*.cpp" - DEFS "-DUSER=${USER_NAME}") - build_program_in_subdir( r.volume DEPENDS grass_gis grass_raster grass_vector) @@ -498,11 +473,6 @@ build_program_in_subdir( r.water.outlet DEPENDS grass_gis grass_raster) -# build_program_in_subdir( -# r.watershed -# DEPENDS grass_gis grass_raster -# SRC_REGEX "*.cpp") - build_program_in_subdir( r.what DEPENDS grass_gis grass_raster grass_vector) @@ -510,3 +480,32 @@ build_program_in_subdir( build_program_in_subdir( r.what.color DEPENDS grass_gis grass_raster) + +# TODO: MODULES DISABLED +# build_program_in_subdir( +# r.in.lidar +# DEPENDS grass_gis grass_raster grass_lidar) + +# build_program_in_subdir( +# r.watershed +# DEPENDS grass_gis grass_raster +# SRC_REGEX "*.cpp") + +# build_program_in_subdir( +# r.li +# DEPENDS grass_gis grass_raster) +if(NOT MSVC) +add_subdirectory(r.mapcalc) + +build_program_in_subdir( + r.viewshed + DEPENDS grass_gis grass_raster grass_iostream + SRC_REGEX "*.cpp" + DEFS "-DUSER=${USER_NAME}") + + build_program_in_subdir( + r.terraflow + DEPENDS grass_gis grass_raster grass_iostream + SRC_REGEX "*.cpp" + DEFS "-DUSER=${USER_NAME};-DNODATA_FIX;-DELEV_FLOAT") +endif() \ No newline at end of file diff --git a/raster/r.sim/CMakeLists.txt b/raster/r.sim/CMakeLists.txt index e80601d0c52..1e87178a9d3 100644 --- a/raster/r.sim/CMakeLists.txt +++ b/raster/r.sim/CMakeLists.txt @@ -1,14 +1,8 @@ - build_library_in_subdir(simlib NAME grass_sim DEPENDS grass_datetime grass_raster grass_vector - HEADERS "waterglobs.h" "simlib.h" ) - -#add_subdirectory(simlib) -# build_module(NAME simlib -# DEPENDS grass_datetime grass_raster grass_vector -# HEADERS "waterglobs.h;simlib.h" ) + HEADERS "waterglobs.h" "simlib.h") build_program_in_subdir( r.sim.water diff --git a/raster3d/CMakeLists.txt b/raster3d/CMakeLists.txt index 8d70b7071f8..c628a49be7a 100644 --- a/raster3d/CMakeLists.txt +++ b/raster3d/CMakeLists.txt @@ -21,16 +21,7 @@ build_program_in_subdir( r3.in.bin DEPENDS grass_gis grass_raster3d ) -#TODO -# build_program_in_subdir( -# r3.in.lidar -# DEPENDS grass_gis grass_raster3d ) -if(NOT MSVC) -build_program_in_subdir( - r3.in.v5d - DEPENDS grass_gis grass_raster3d ) -endif() build_program_in_subdir( r3.info @@ -40,11 +31,6 @@ build_program_in_subdir( r3.mask DEPENDS grass_gis grass_raster3d ) -#TODO -# build_program_in_subdir( -# r3.mkdspf -# DEPENDS grass_gis grass_raster3d grass_gpde ) - build_program_in_subdir( r3.null DEPENDS grass_gis grass_raster3d ) @@ -87,11 +73,25 @@ build_program_in_subdir( r3.to.rast DEPENDS grass_gis grass_raster3d ) -#TODO +build_program_in_subdir( + r3.out.vtk + DEPENDS grass_gis grass_raster3d ) + +# TODO: MODULES DISABLED # build_program_in_subdir( # r3.out.netcdf # DEPENDS grass_gis grass_raster3d ) +# build_program_in_subdir( +# r3.mkdspf +# DEPENDS grass_gis grass_raster3d grass_gpde ) + +# build_program_in_subdir( +# r3.in.lidar +# DEPENDS grass_gis grass_raster3d ) + +if(NOT MSVC) build_program_in_subdir( - r3.out.vtk + r3.in.v5d DEPENDS grass_gis grass_raster3d ) +endif() \ No newline at end of file diff --git a/vector/CMakeLists.txt b/vector/CMakeLists.txt index 61d94ace625..37dceeed1a3 100644 --- a/vector/CMakeLists.txt +++ b/vector/CMakeLists.txt @@ -188,10 +188,6 @@ build_program_in_subdir( v.normal DEPENDS grass_gis grass_vector grass_cdhc) -#TODO -# v.lidar.correction \ -# v.lidar.edgedetection \ -# v.lidar.growing \ build_program_in_subdir( v.out.ascii DEPENDS grass_gis grass_vector) @@ -200,15 +196,6 @@ build_program_in_subdir( v.out.dxf DEPENDS grass_gis grass_vector) -#TODO -# build_program_in_subdir( -# v.out.lidar -# DEPENDS grass_gis grass_vector) - -# build_program_in_subdir( -# v.out.postgis -# DEPENDS grass_gis grass_vector) - build_program_in_subdir( v.out.pov DEPENDS grass_gis grass_vector) @@ -361,7 +348,13 @@ build_program_in_subdir( v.external DEPENDS grass_gis grass_vector ) -#TODO +build_program_in_subdir( + v.external.out + DEPENDS grass_gis grass_vector ) + + + +#TODO: MODULES DISABLED # build_program_in_subdir( # v.in.dwg # DEPENDS grass_gis grass_vector ) @@ -370,7 +363,13 @@ build_program_in_subdir( # v.in.lidar # DEPENDS grass_gis grass_vector ) -build_program_in_subdir( - v.external.out - DEPENDS grass_gis grass_vector ) +# v.lidar.correction \ +# v.lidar.edgedetection \ +# v.lidar.growing \ +# build_program_in_subdir( +# v.out.lidar +# DEPENDS grass_gis grass_vector) +# build_program_in_subdir( +# v.out.postgis +# DEPENDS grass_gis grass_vector) \ No newline at end of file From c22d567048eb91d2ed32ce4a64796d2f31618290 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 21:26:43 +0100 Subject: [PATCH 113/264] CMake: update find scripts to find debug then release update list of options. WITH_PYTHON addded to build python bindings (default is OFF) --- CMakeLists.txt | 23 ++++++++++++++++------- cmake/find_scripts/FindGDAL.cmake | 21 +++++++++++++++++++++ cmake/find_scripts/FindGEOS.cmake | 29 +++++++++-------------------- cmake/find_scripts/FindPROJ.cmake | 28 +++++++++++++++++++--------- lib/CMakeLists.txt | 4 +++- thirdparty/CMakeLists.txt | 25 ++++++++----------------- 6 files changed, 76 insertions(+), 54 deletions(-) create mode 100644 cmake/find_scripts/FindGDAL.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index db8cb0d42e5..b4e68ac0c25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,16 +15,23 @@ set(default_option_enabled ON) if(WIN32) set(default_option_enabled OFF) endif() +set( grass_build_type "${CMAKE_BUILD_TYPE}" ) +string( TOLOWER "${grass_build_type}" grass_build_type_lc ) +set(find_library_suffix "RELEASE") +if( grass_build_type_lc STREQUAL "debug" ) +set(find_library_suffix "DEBUG") +endif() option(WITH_CAIRO "Build with cairo support ." ON) option(WITH_X11 "Build with X11 support ." ${default_option_enabled}) option(WITH_OPENGL "Build with opengl support ." ON) option(WITH_SQLITE "enable sqlite support" ON) option(WITH_POSTGRES "enable postgres support" OFF) -option(WITH_NLS "enable sqlite support" ${default_option_enabled}) -option(WITH_BZLIB "enable sqlite support" ON) -option(WITH_BLAS "enable sqlite support" ON) -option(WITH_LAPACK "enable sqlite support" ON) +option(WITH_NLS "enable nls support" ${default_option_enabled}) +option(WITH_BZLIB "enable bzlib support" ON) +option(WITH_BLAS "enable blas support" ON) +option(WITH_LAPACK "enable lapack support" ON) +option(WITH_PYTHON "Build python bindings" OFF) option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) option(WITH_DOCS "Build documentation" OFF) if(APPLE) @@ -103,12 +110,10 @@ set(ALL_SUBDIRS misc raster raster3d - demolocation scripts vector temporal tools - gui # ps # locale ) @@ -117,6 +122,10 @@ foreach(d ${ALL_SUBDIRS}) add_subdirectory(${d}) endforeach() +if(WITH_PYTHON) + add_subdirectory(gui) +endif() + if(WITH_DOCS) add_subdirectory(doc) if(NOT MSVC) @@ -127,7 +136,7 @@ endif() # WITH_DOCS # TODO: To be discussed # add_subdirectory(testsuite) # add_subdirectory(macosx) -# add_subdirectory(mswindows) + if(WITH_X11) build_program_in_subdir(visualization/ximgview DEPENDS grass_gis X11) endif() diff --git a/cmake/find_scripts/FindGDAL.cmake b/cmake/find_scripts/FindGDAL.cmake new file mode 100644 index 00000000000..bf80ac7f776 --- /dev/null +++ b/cmake/find_scripts/FindGDAL.cmake @@ -0,0 +1,21 @@ +find_path(GDAL_INCLUDE_DIR gdal.h) + +find_library(GDAL_LIBRARY_RELEASE NAMES gdal_i gdal) +find_library(GDAL_LIBRARY_DEBUG NAMES gdald) +set(GDAL_FOUND FALSE) + +set(GDAL_LIBRARY) +if(GDAL_LIBRARY_DEBUG) + set( GDAL_LIBRARY ${GDAL_LIBRARY_DEBUG}) +elseif(GDAL_LIBRARY_RELEASE) + set( GDAL_LIBRARY ${GDAL_LIBRARY_RELEASE}) +endif() + +#--- +# This function sets GEOS_FOUND if variables are valid. +#--- +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( GDAL DEFAULT_MSG + GDAL_LIBRARY + GDAL_INCLUDE_DIR ) + diff --git a/cmake/find_scripts/FindGEOS.cmake b/cmake/find_scripts/FindGEOS.cmake index 554b76724a9..bf254963531 100644 --- a/cmake/find_scripts/FindGEOS.cmake +++ b/cmake/find_scripts/FindGEOS.cmake @@ -27,29 +27,18 @@ # Instead looking for Geometry.h #--- -find_path( GEOS_INCLUDE_DIR geos/geom/Geometry.h - PATHS - ${CMAKE_INSTALL_PREFIX}/include - $ENV{GEOS_DIR}/include - ${GEOS_DIR}/include - /usr/include - /usr/local/include - /usr/local/ossim/include ) +find_path( GEOS_INCLUDE_DIR geos/geom/Geometry.h) # Find GEOS C library: -find_library( GEOS_C_LIB NAMES geos_c ) - +find_library( GEOS_C_LIBRARY_RELEASE NAMES geos_c ) +find_library( GEOS_C_LIBRARY_DEBUG NAMES geos_cd ) set(GEOS_FOUND FALSE) -set( GEOS_LIBRARIES) -if(GEOS_C_LIB) - set( GEOS_LIBRARIES ${GEOS_C_LIB}) -endif() -# # Find GEOS c++ library: -# find_library( GEOS_CPP_LIB NAMES geos ) - -if(GEOS_CPP_LIB) - set(GEOS_LIBRARIES ${GEOS_C_LIB} ${GEOS_CPP_LIB} ) +set(GEOS_LIBRARY) +if(GEOS_C_LIBRARY_DEBUG) + set( GEOS_LIBRARY ${GEOS_C_LIBRARY_DEBUG}) +elseif(GEOS_C_LIBRARY_RELEASE) + set( GEOS_LIBRARY ${GEOS_C_LIBRARY_RELEASE}) endif() #--- @@ -57,6 +46,6 @@ endif() #--- include(FindPackageHandleStandardArgs) find_package_handle_standard_args( GEOS DEFAULT_MSG - GEOS_LIBRARIES + GEOS_LIBRARY GEOS_INCLUDE_DIR ) diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index a2935ae8e49..741993ff4ea 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -2,11 +2,11 @@ # CMake module to search for PROJ.4 library # # On success, the macro sets the following variables: -# PROJ4_FOUND = if the library found -# PROJ4_LIBRARY = full path to the library -# PROJ4_INCLUDE_DIR = where to find the library headers +# PROJ_FOUND = if the library found +# PROJ_LIBRARY = full path to the library +# PROJ_INCLUDE_DIR = where to find the library headers # also defined, but not for general use are -# PROJ4_LIBRARY, where to find the PROJ.4 library. +# PROJ_LIBRARY, where to find the PROJ.4 library. # # Copyright (c) 2009 Mateusz Loskot # @@ -22,16 +22,26 @@ FIND_PATH(PROJ_INCLUDE_DIR proj_api.h string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_api_h_CONTENTS}") #if(MUPARSER_VERSION MATCHES "^[0-9]+\$") # set(MUPARSER_VERSION "${MUPARSER_VERSION}.0.0") -FIND_LIBRARY(PROJ_LIBRARY - NAMES proj proj_i proj_d + +FIND_LIBRARY(PROJ_LIBRARY_RELEASE + NAMES proj proj_i DOC "Path to PROJ library file") +FIND_LIBRARY(PROJ_LIBRARY_DEBUG + NAMES projd + DOC "Path to PROJ debug library file") + +set(PROJ_LIBRARY) +if(PROJ_LIBRARY_DEBUG) + set( PROJ_LIBRARY ${PROJ_LIBRARY_DEBUG}) +elseif(PROJ_LIBRARY_RELEASE) + set( PROJ_LIBRARY ${PROJ_LIBRARY_RELEASE}) +endif() + if(PROJ_INCLUDE_DIR AND PROJ_LIBRARY) set(PROJ_FOUND TRUE) endif() -IF(PROJ_FOUND) - SET(PROJ_LIBRARIES ${PROJ_LIBRARY}) -ENDIF() + # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE # if all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b8436a91800..905d580afb7 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -147,7 +147,9 @@ endif() add_subdirectory(temporal) -add_subdirectory(python) +if(WITH_PYTHON) + add_subdirectory(python) +endif() build_library_in_subdir(iostream SRC_REGEX "*.cpp" DEPENDS grass_gis) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index ba65fe57347..ee6b9109712 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -2,17 +2,10 @@ find_package(FLEX REQUIRED) find_package(BISON REQUIRED) -set( grass_build_type "${CMAKE_BUILD_TYPE}" ) -string( TOLOWER "${grass_build_type}" grass_build_type_lc ) -set(find_library_suffix "RELEASE") -if( grass_build_type_lc STREQUAL "debug" ) -set(find_library_suffix "DEBUG") -endif() - find_package(GDAL REQUIRED) add_library(GDAL INTERFACE IMPORTED GLOBAL) set_property(TARGET GDAL PROPERTY INTERFACE_LINK_LIBRARIES ${GDAL_LIBRARY} ) -set_property(TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_DIRS} ) +set_property(TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_DIR} ) find_package(PNG REQUIRED) add_library(LIBPNG INTERFACE IMPORTED GLOBAL) @@ -38,7 +31,7 @@ endif() find_package(PROJ REQUIRED) add_library(PROJ INTERFACE IMPORTED GLOBAL) -set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARIES} ) +set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY_${find_library_suffix}} ) set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) find_package(Freetype REQUIRED) @@ -60,13 +53,11 @@ if(WITH_CAIRO) set_property(TARGET CAIRO PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIRS} ) endif() -if(NOT WIN32) if(WITH_X11) find_package(X11 REQUIRED) add_library(X11 INTERFACE IMPORTED GLOBAL) set_property(TARGET X11 PROPERTY INTERFACE_LINK_LIBRARIES ${X11_LIBRARIES} ) - set_property(TARGET X11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${X11_INCLUDE_DIR}") -endif() + set_property(TARGET X11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${X11_INCLUDE_DIR}) endif() if(WIN32) @@ -74,20 +65,20 @@ if(WIN32) if(ODBC_FOUND) add_library(ODBC INTERFACE IMPORTED GLOBAL) set_property(TARGET ODBC PROPERTY INTERFACE_LINK_LIBRARIES ${ODBC_LIBRARIES} ) - set_property(TARGET PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ODBC_INCLUDE_DIRS}") + set_property(TARGET PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ODBC_INCLUDE_DIRS}) endif() endif() find_package(TIFF REQUIRED) add_library(TIFF INTERFACE IMPORTED GLOBAL) set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY_${find_library_suffix}} ) -set_property(TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${TIFF_INCLUDE_DIR}") +set_property(TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR}) find_package(Iconv) if(ICONV_FOUND) add_library(ICONV INTERFACE IMPORTED GLOBAL) set_property(TARGET ICONV PROPERTY INTERFACE_LINK_LIBRARIES ${ICONV_LIBRARIES} ) -set_property(TARGET ICONV PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICONV_INCLUDE_DIR}") +set_property(TARGET ICONV PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ICONV_INCLUDE_DIR}) #if(ICONV_SECOND_ARGUMENT_IS_CONST) #set() update this value in include/config.cmake.in endif() @@ -97,7 +88,7 @@ if(WITH_BZLIB) if(BZIP2_FOUND) add_library(BZIP2 INTERFACE IMPORTED GLOBAL) set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARY_${find_library_suffix}} ) - set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") + set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${BZIP2_INCLUDE_DIR}) endif() endif() @@ -140,7 +131,7 @@ endif() find_package(GEOS REQUIRED) add_library(GEOS INTERFACE IMPORTED GLOBAL) -set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_LIBRARIES} ) +set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_C_LIBRARY_${find_library_suffix}} ) set_property(TARGET GEOS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GEOS_INCLUDE_DIR} ) set(THREADS_PREFER_PTHREAD_FLAG ON) From 4c1455e70a50b9f0ac6dbb35fa9246fa6d99e78a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 21:27:44 +0100 Subject: [PATCH 114/264] CMake: zlib is check with cmake target --- include/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 55d3cbc234c..bc3406f4e44 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -10,7 +10,6 @@ else() set(HAVE_UNISTD_H 1) endif() check_include_file(values.h HAVE_VALUES_H) -check_include_file(zlib.h HAVE_ZLIB_H) check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) check_include_file(sys/mtio.h HAVE_SYS_MTIO_H) check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) From 6c1d9c48a1d2123b339435965b10706e4952935f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 21:28:19 +0100 Subject: [PATCH 115/264] demolocation is configured in lib/init/CMakeLists.txt --- demolocation/CMakeLists.txt | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 demolocation/CMakeLists.txt diff --git a/demolocation/CMakeLists.txt b/demolocation/CMakeLists.txt deleted file mode 100644 index 354693094a8..00000000000 --- a/demolocation/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -set(GISDBASE ${CMAKE_SOURCE_DIR}) - -configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl - "${CMAKE_BINARY_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") - - -# SRCFILES = WIND DEFAULT_WIND VAR PROJ_INFO PROJ_UNITS MYNAME -# DBFMAPS = mysites point -# SQLITEMAPS = country_boundaries -# MAPFILES = dbln coor topo head cidx sidx hist -# DBFFILES := $(foreach map,$(DBFMAPS),dbf/$(map).dbf) -# SQLITEFILES = sqlite/sqlite.db -# VECTFILES := $(foreach map,$(DBFMAPS),$(foreach file,$(MAPFILES),vector/$(map)/$(file))) $(foreach map,$(SQLITEMAPS),$(foreach file,$(MAPFILES),vector/$(map)/$(file))) -# SRC := $(SRCFILES) $(DBFFILES) $(SQLITEFILES) $(VECTFILES) -# SRCDIRS := PERMANENT PERMANENT/vector PERMANENT/dbf PERMANENT/sqlite $(patsubst %,PERMANENT/vector/%,$(DBFMAPS)) $(patsubst %,PERMANENT/vector/%,$(SQLITEMAPS)) - -# DSTDIR = $(ARCH_DISTDIR)/demolocation -# DST := $(patsubst %,$(DSTDIR)/PERMANENT/%,$(SRC)) -# DSTDIRS := $(patsubst %,$(DSTDIR)/%,$(SRCDIRS)) -# RCFILE = $(DSTDIR)/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) - -# default: $(DST) $(RCFILE) - -# $(DSTDIR)/PERMANENT/%: PERMANENT/% | $(DSTDIRS) -# $(INSTALL_DATA) $< $@ - -# $(DSTDIRS): %: -# $(MKDIR) $@ - -# $(RCFILE): grassrc.tmpl | $(DSTDIRS) -# sed 's!@GISDBASE@!$(RUN_GISBASE)!' < $< > $@ - From cf7af726a57ecef09cebef4ac551f44f3e32d160 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 21:32:50 +0100 Subject: [PATCH 116/264] CMake: generate grass.py and grass.sh scripts (build tree) --- lib/init/CMakeLists.txt | 126 +++++++++++++++++++++++++++++----------- lib/init/env.sh | 0 lib/init/grass.bat | 25 ++++++++ lib/init/grass.py | 5 +- lib/init/grass.sh | 2 +- 5 files changed, 121 insertions(+), 37 deletions(-) create mode 100644 lib/init/env.sh create mode 100644 lib/init/grass.bat diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 04748a38692..f1aeca83bb1 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -6,33 +6,58 @@ # #for i18N support set(PACKAGE "grasslibs") -set(START_UP grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ) - file(GLOB init_HTMLFILES "*.html") -set(BINDIR "${CMAKE_BINARY_DIR}/bin") -configure_file(grass.sh ${CMAKE_BINARY_DIR}/bin/grass.sh @ONLY) - -set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") -configure_file(grass.sh ${CMAKE_CURRENT_BINARY_DIR}/grass.sh @ONLY) -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/grass.sh DESTINATION bin) - -set(GRASS_CONFIG_DIR) +#START_UP is the variable used in grass.py +if(WIN32) +set(script_file_name "grass.bat") +set(START_UP "grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.py") +else() +set(script_file_name "grass.sh") +set(env_file_name "env.sh") +set(START_UP "grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") +endif() -set(PROJSHARE) +set(CONFIG_PROJSHARE) +get_filename_component(PROJ_INSTALL_PREFIX ${PROJ_INCLUDE_DIR} PATH) if(DEFINED ENV{PROJSHARE}) message(WARNING "External PROJ.4 directory not specified; default will be used") - set(PROJSHARE "$ENV{PROJSHARE}") + set(CONFIG_PROJSHARE "$ENV{PROJSHARE}") else() - get_filename_component(PROJ_INSTALL_PREFIX ${PROJ_LIBRARY} PATH) - set(PROJSHARE "${PROJ_INSTALL_PREFIX}/share/proj") - if(EXISTS ${PROJSHARE}/epsg) - message("PROJ.4 directory ${PROJSHARE}") + set(CONFIG_PROJSHARE "${PROJ_INSTALL_PREFIX}/share/proj") + if(EXISTS ${CONFIG_PROJSHARE}/epsg) + message(STATUS "PROJ.4 directory ${CONFIG_PROJSHARE}") endif() endif() -set(CONFIG_PROJSHARE "${PROJSHARE}") +file(TO_NATIVE_PATH "${PROJ_INSTALL_PREFIX}/share/proj" PROJ_LIB) +file(TO_NATIVE_PATH ${CONFIG_PROJSHARE} GRASS_PROJSHARE) + +find_path(gdal_share_dir "gdal" PATH_SUFFIXES share) +if(NOT gdal_share_dir) + message(FATAL_ERROR "Cannot find share/gdal") +endif() +file(TO_NATIVE_PATH "${gdal_share_dir}/gdal" GDAL_DATA) +find_path(geotiff_share_dir "epsg_csv" PATH_SUFFIXES share) +if(NOT geotiff_share_dir) + message(FATAL_ERROR "Cannot find share/epsg_csv") +endif() +file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) + +#For build tree +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/bin grass_dll_dir) +set(DLL_PATH_LIST) +list(APPEND DLL_PATH_LIST ${grass_dll_dir}) + +file(TO_NATIVE_PATH ${GDAL_INSTALL_PREFIX}/bin DEPS_DLL_PATH) +if(find_library_suffix STREQUAL "DEBUG") + if(MSVC) + file(TO_NATIVE_PATH ${GDAL_INSTALL_PREFIX}/bin DEPS_DLL_PATH) + endif() # MSVC +endif() +list(APPEND DLL_PATH_LIST ${DEPS_DLL_PATH}) +separate_arguments(DLL_PATH_LIST) set(LD_LIBRARY_PATH_VAR) if(UNIX OR MINGW) @@ -43,12 +68,34 @@ if(UNIX OR MINGW) endif() endif() -configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.tmp @ONLY) -set(RUN_GISBASE "${CMAKE_INSTALL_PREFIX}") -set(GISBASE "${RUN_GISBASE}") -configure_file(grass.py ${CMAKE_BINARY_DIR}/${START_UP}.py @ONLY) -install(PROGRAMS ${CMAKE_BINARY_DIR}/${START_UP}.py - DESTINATION bin) +#file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISBASE) +set(GISBASE ${CMAKE_BINARY_DIR}) +file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) +file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) + +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) +set(BINDIR "${CMAKE_BINARY_DIR}/bin") +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/etc/config" GRASS_CONFIG_DIR) + +configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl +"${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) + +if(NOT MSVC) + configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/env @ONLY) +endif() +configure_file(${script_file_name} ${CMAKE_BINARY_DIR}/${script_file_name} @ONLY) + +configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) + + + + + + +#For install tree +set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") +configure_file(${script_file_name} ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) if(UNIX OR MINGW) if( DEFINED ENV{LD_LIBRARY_PATH}) @@ -58,33 +105,41 @@ if(UNIX OR MINGW) endif() endif() -set(OUTPUT_STARTUP_FILE "${START_UP}") -if(MINGW) - set(OUTPUT_STARTUP_FILE "${START_UP}.py") -endif() -configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} @ONLY) -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_STARTUP_FILE} DESTINATION bin) - +set(RUN_GISBASE "${CMAKE_INSTALL_PREFIX}") +set(GISBASE "${RUN_GISBASE}") +set(output_file_path "${CMAKE_INSTALL_PREFIX}/etc") +configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} DESTINATION etc) add_executable(echo echo.c) install(TARGETS echo DESTINATION etc) +set_target_properties(echo + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") add_executable(run run.c) install(TARGETS run DESTINATION etc) - +set_target_properties(run + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") + add_executable(clean_temp clean_temp.c) add_dependencies(clean_temp grass_gis) target_link_libraries(clean_temp grass_gis) install(TARGETS clean_temp DESTINATION etc) +set_target_properties(clean_temp + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") add_executable(lock lock.c) add_dependencies(lock grass_gis grass_datetime) target_link_libraries(lock grass_gis grass_datetime) +set_target_properties(lock + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") install(TARGETS lock DESTINATION etc) if(MINGW) add_executable(winlocale winlocale.c) install(TARGETS winlocale DESTINATION etc) + set_target_properties(winlocale + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") endif() set(VERSIONNUMBER_CONTENTS "${GRASS_VERSION_NUMBER}") @@ -92,9 +147,10 @@ if(GRASS_VERSION_SVN) list(APPEND VERSIONNUMBER_CONTENTS "${VERSIONNUMBER_CONTENTS} ${GRASS_VERSION_SVN}") endif() -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/VERSIONNUMBER "${VERSIONNUMBER_CONTENTS}") -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) +file(WRITE ${CMAKE_BINARY_DIR}/VERSIONNUMBER "${VERSIONNUMBER_CONTENTS}") +install(FILES ${CMAKE_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) -configure_file(license.txt.in ${CMAKE_CURRENT_BINARY_DIR}/license) +configure_file(license.txt.in ${CMAKE_BINARY_DIR}/license) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) +install(FILES ${CMAKE_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) +install(FILES ${CMAKE_BINARY_DIR}/license DESTINATION etc) \ No newline at end of file diff --git a/lib/init/env.sh b/lib/init/env.sh new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/init/grass.bat b/lib/init/grass.bat new file mode 100644 index 00000000000..d7c2eb5d588 --- /dev/null +++ b/lib/init/grass.bat @@ -0,0 +1,25 @@ +@echo off +::set PYTHONHOME=%GISBASE%\Python37 + +set GRASS_PROJSHARE=@GRASS_PROJSHARE@ + +set PROJ_LIB=@PROJ_LIB@ + +set GDAL_DATA=@GDAL_DATA@ + +set GEOTIFF_CSV=@GEOTIFF_CSV@ + +::set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf + +set PATH=@DLL_PATH_LIST@;%PATH% + +set GRASS_PYTHON=@GRASS_PYTHON@ + +set GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@ + +"@GRASS_PYTHON@" "@GISBASE@\etc\@START_UP@" %* + +rem +rem Pause on error +rem +if %ERRORLEVEL% GEQ 1 pause diff --git a/lib/init/grass.py b/lib/init/grass.py index 1d7887177a9..711b3354664 100644 --- a/lib/init/grass.py +++ b/lib/init/grass.py @@ -371,6 +371,8 @@ def get_grass_config_dir(): Configuration directory is for example used for grass env file (the one which caries mapset settings from session to session). """ + if 'GRASS_CONFIG_DIR' in os.environ: + return os.environ['GRASS_CONFIG_DIR'] if sys.platform == 'win32': grass_config_dirname = "GRASS7" win_conf_path = os.getenv('APPDATA') @@ -627,7 +629,8 @@ def set_paths(grass_config_dir): # Set LD_LIBRARY_PATH (etc) to find GRASS shared libraries # this works for subprocesses but won't affect the current process - path_prepend(gpath("lib"), LD_LIBRARY_PATH_VAR) + if not LD_LIBRARY_PATH_VAR == '': + path_prepend(gpath("lib"), LD_LIBRARY_PATH_VAR) def find_exe(pgm): diff --git a/lib/init/grass.sh b/lib/init/grass.sh index bb1ef1711df..654abc6d3ce 100755 --- a/lib/init/grass.sh +++ b/lib/init/grass.sh @@ -24,7 +24,7 @@ trap "echo 'User break!' ; exit" 2 3 9 15 if [ -z "$GRASS_PYTHON" ] ; then - GRASS_PYTHON=python2.7 + GRASS_PYTHON=python3 fi export GRASS_PYTHON From 5b50a9579e50b83abf7aeec572bde35eb491900d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 1 Jan 2020 22:17:48 +0100 Subject: [PATCH 117/264] CMake: fix startup script generation (install tree) --- lib/init/CMakeLists.txt | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index f1aeca83bb1..726d6ae37ad 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -1,7 +1,3 @@ -# MODULE_TOPDIR = ../.. - -# include $(MODULE_TOPDIR)/include/Make/Other.make -# include $(MODULE_TOPDIR)/include/Make/Compile.make # #for i18N support set(PACKAGE "grasslibs") @@ -18,7 +14,6 @@ set(env_file_name "env.sh") set(START_UP "grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") endif() - set(CONFIG_PROJSHARE) get_filename_component(PROJ_INSTALL_PREFIX ${PROJ_INCLUDE_DIR} PATH) if(DEFINED ENV{PROJSHARE}) @@ -33,6 +28,7 @@ endif() file(TO_NATIVE_PATH "${PROJ_INSTALL_PREFIX}/share/proj" PROJ_LIB) file(TO_NATIVE_PATH ${CONFIG_PROJSHARE} GRASS_PROJSHARE) + find_path(gdal_share_dir "gdal" PATH_SUFFIXES share) if(NOT gdal_share_dir) message(FATAL_ERROR "Cannot find share/gdal") @@ -44,19 +40,33 @@ if(NOT geotiff_share_dir) message(FATAL_ERROR "Cannot find share/epsg_csv") endif() file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) +get_filename_component(GDAL_DIR ${GDAL_LIBRARY} PATH) +get_filename_component(GDAL_DIR ${GDAL_DIR} PATH) +file(TO_NATIVE_PATH ${GDAL_DIR}/bin DEPS_DLL_PATH) +if(find_library_suffix STREQUAL "DEBUG") + if(MSVC) + file(TO_NATIVE_PATH ${GDAL_DIR}/debug/bin DEPS_DLL_PATH) + endif() # MSVC +endif() +list(APPEND DLL_PATH_LIST ${DEPS_DLL_PATH}) + +file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) + + #For build tree +file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) + +configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl +"${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) + + + + file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/bin grass_dll_dir) set(DLL_PATH_LIST) list(APPEND DLL_PATH_LIST ${grass_dll_dir}) -file(TO_NATIVE_PATH ${GDAL_INSTALL_PREFIX}/bin DEPS_DLL_PATH) -if(find_library_suffix STREQUAL "DEBUG") - if(MSVC) - file(TO_NATIVE_PATH ${GDAL_INSTALL_PREFIX}/bin DEPS_DLL_PATH) - endif() # MSVC -endif() -list(APPEND DLL_PATH_LIST ${DEPS_DLL_PATH}) separate_arguments(DLL_PATH_LIST) set(LD_LIBRARY_PATH_VAR) @@ -70,15 +80,11 @@ endif() #file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISBASE) set(GISBASE ${CMAKE_BINARY_DIR}) -file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) -file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) set(BINDIR "${CMAKE_BINARY_DIR}/bin") file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/etc/config" GRASS_CONFIG_DIR) -configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl -"${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) if(NOT MSVC) configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/env @ONLY) @@ -105,9 +111,7 @@ if(UNIX OR MINGW) endif() endif() -set(RUN_GISBASE "${CMAKE_INSTALL_PREFIX}") -set(GISBASE "${RUN_GISBASE}") -set(output_file_path "${CMAKE_INSTALL_PREFIX}/etc") +set(GISBASE "${CMAKE_INSTALL_PREFIX}") configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} DESTINATION etc) From e854b84a4e9b26ab68a83176fbc073971d0cf39e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 01:46:28 +0100 Subject: [PATCH 118/264] fix generation of startup scripts --- lib/init/CMakeLists.txt | 50 +++++++++++++++++++++++------------------ lib/init/env.sh | 10 +++++++++ 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 726d6ae37ad..e86f6d3ed77 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -40,28 +40,26 @@ if(NOT geotiff_share_dir) message(FATAL_ERROR "Cannot find share/epsg_csv") endif() file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) -get_filename_component(GDAL_DIR ${GDAL_LIBRARY} PATH) + +get_filename_component(GDAL_DIR ${GDAL_LIBRARY_${find_library_suffix}} PATH) get_filename_component(GDAL_DIR ${GDAL_DIR} PATH) + file(TO_NATIVE_PATH ${GDAL_DIR}/bin DEPS_DLL_PATH) -if(find_library_suffix STREQUAL "DEBUG") - if(MSVC) - file(TO_NATIVE_PATH ${GDAL_DIR}/debug/bin DEPS_DLL_PATH) - endif() # MSVC -endif() list(APPEND DLL_PATH_LIST ${DEPS_DLL_PATH}) file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) - -#For build tree +# For build tree file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) +set(GISBASE ${CMAKE_BINARY_DIR}) +set(BINDIR "${CMAKE_BINARY_DIR}/bin") +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl "${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) - - +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/etc/config" GRASS_CONFIG_DIR) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/bin grass_dll_dir) set(DLL_PATH_LIST) @@ -78,13 +76,6 @@ if(UNIX OR MINGW) endif() endif() -#file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISBASE) -set(GISBASE ${CMAKE_BINARY_DIR}) - -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) -set(BINDIR "${CMAKE_BINARY_DIR}/bin") -file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/etc/config" GRASS_CONFIG_DIR) - if(NOT MSVC) configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/env @ONLY) @@ -94,11 +85,7 @@ configure_file(${script_file_name} ${CMAKE_BINARY_DIR}/${script_file_name} @ONL configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) - - - - -#For install tree +# For install tree set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") configure_file(${script_file_name} ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) @@ -111,7 +98,26 @@ if(UNIX OR MINGW) endif() endif() + +if(WIN32) + set(app_data_dir $ENV{APPDATA}) + if(NOT EXISTS ${app_data_dir}) + # this can happen with some strange settings + message(FATAL_ERROR "The APPDATA variable is not set, ask your operating system support") + endif() + file(TO_NATIVE_PATH "${app_data_dir}/GRASS7" GRASS_CONFIG_DIR) +else() + set(GRASS_CONFIG_DIR "${ENV{HOME}}/.grass7") +endif() + set(GISBASE "${CMAKE_INSTALL_PREFIX}") + +if(NOT MSVC) + configure_file(env.sh ${CMAKE_CURRENT_BINARY_DIR}/bashrc @ONLY) + file(INSTALL ${CMAKE_CURRENT_BINARY_DIR}/bashrc + DESTINATION ${GRASS_CONFIG_DIR}/bashrc) +endif() + configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} DESTINATION etc) diff --git a/lib/init/env.sh b/lib/init/env.sh index e69de29bb2d..4551e256717 100644 --- a/lib/init/env.sh +++ b/lib/init/env.sh @@ -0,0 +1,10 @@ +export GRASS_PROJSHARE=@GRASS_PROJSHARE@ +export PROJ_LIB=@PROJ_LIB@ +export GDAL_DATA=@GDAL_DATA@ +export GEOTIFF_CSV=@GEOTIFF_CSV@ +export GRASS_PYTHON=@GRASS_PYTHON@ +export GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@ + +# export PYTHONHOME=$GISBASE\Python37 +# export FONTCONFIG_FILE=@GISBASE@\etc\fonts.conf +# export LD_LIBRARY_PATH=@DLL_PATH_LIST@:PATH% From 955aa1a87608b2a58fa7cbef5af4300be78f4297 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 03:03:57 +0100 Subject: [PATCH 119/264] fix g.list building 1/2 --- general/CMakeLists.txt | 14 ++++++++++---- general/manage/lister/CMakeLists.txt | 12 ++++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 6e992940a2b..ccec2e0a380 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -33,14 +33,20 @@ if(WITH_CAIRO) endif() endif() -# g.cairocomp -# g.gui +add_subdirectory(manage/lister) + +build_program_in_subdir(g.list DEPENDS grass_manage) +add_dependencies(g.list cell vector) + # TODO: MODULES DISABLED +# g.gui + + + if(NOT MSVC) -build_program_in_subdir(g.list DEPENDS grass_manage) build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster ) endif() -add_subdirectory(manage/lister) + diff --git a/general/manage/lister/CMakeLists.txt b/general/manage/lister/CMakeLists.txt index b7dc24ffeae..7694cce2365 100644 --- a/general/manage/lister/CMakeLists.txt +++ b/general/manage/lister/CMakeLists.txt @@ -15,5 +15,13 @@ # $(ETC)/lister: # $(MKDIR) $@ -build_module(NAME cell EXE SOURCES "cell.c" DEPENDS grass_vector grass_dbmibase grass_gis grass_raster) -build_module(NAME vector EXE SOURCES "vector.c" DEPENDS grass_vector grass_dbmibase grass_gis grass_raster ) +build_module(NAME cell EXE +SOURCES "cell.c" +DEPENDS grass_vector grass_dbmibase grass_gis grass_raster) +set_target_properties(cell + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc/lister") +build_module(NAME vector EXE +SOURCES "vector.c" +DEPENDS grass_vector grass_dbmibase grass_gis grass_raster ) +set_target_properties(vector + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc/lister") From 1fc01ce9bf74bc1aac07c246508272b1c9ae5bc5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 03:05:09 +0100 Subject: [PATCH 120/264] MSVC: missing regex, use PCRE (wip) --- cmake/find_scripts/FindPCRE.cmake | 28 +++++++++++ include/CMakeLists.txt | 3 ++ include/config.h.cmake.in | 3 ++ include/defs/gis.h | 2 +- lib/CMakeLists.txt | 2 + lib/gis/CMakeLists.txt | 4 ++ lib/gis/ls_filter.c | 84 ++++++++++++++++++++++++++++--- thirdparty/CMakeLists.txt | 7 +++ 8 files changed, 124 insertions(+), 9 deletions(-) create mode 100644 cmake/find_scripts/FindPCRE.cmake diff --git a/cmake/find_scripts/FindPCRE.cmake b/cmake/find_scripts/FindPCRE.cmake new file mode 100644 index 00000000000..0dcf0f33c10 --- /dev/null +++ b/cmake/find_scripts/FindPCRE.cmake @@ -0,0 +1,28 @@ + +find_path(PCRE_INCLUDE_DIR NAMES pcre.h) + +find_library(PCRE_LIBRARY_RELEASE NAMES pcre) +find_library(PCRE_LIBRARY_DEBUG NAMES pcred) +if(PCRE_LIBRARY_DEBUG) +set(PCRE_LIBRARY ${PCRE_LIBRARY_DEBUG}) +elseif(PCRE_LIBRARY_RELEASE) +set(PCRE_LIBRARY ${PCRE_LIBRARY_RELEASE}) +endif() + +set(PCRE_FOUND FALSE) +if(PCRE_INCLUDE_DIR AND PCRE_LIBRARY) + set(PCRE_FOUND TRUE) +endif() + +if(PCRE_FOUND) + set(PCRE_LIBRARIES ${PCRE_LIBRARY}) + set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE + DEFAULT_MSG + PCRE_LIBRARY + PCRE_INCLUDE_DIR) + + diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index bc3406f4e44..a6794ac0e1f 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -61,6 +61,9 @@ check_target(LAPACK HAVE_CLAPACK_H) check_target(FREETYPE HAVE_FT2BUILD_H) check_target(POSTGRES HAVE_POSTGRES) check_target(ODBC HAVE_SQL_H) +if(MSVC) +check_target(PCRE HAVE_PCRE_H) +endif() # Whether or not we are using G_socks for display communications set(USE_G_SOCKS 0) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 939ffb2942a..3350a165e85 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -230,6 +230,9 @@ /* define if regex.h exists */ #cmakedefine HAVE_REGEX_H ${HAVE_REGEX_H} +/* define if pcre.h exists */ +#cmakedefine HAVE_PCRE_H ${HAVE_PCRE_H} + /* define if pthread.h exists */ #cmakedefine HAVE_PTHREAD_H ${HAVE_PTHREAD_H} diff --git a/include/defs/gis.h b/include/defs/gis.h index 962a1253b77..58f81f4f5ef 100644 --- a/include/defs/gis.h +++ b/include/defs/gis.h @@ -503,7 +503,7 @@ void G_ls(const char *, FILE *); void G_ls_format(char **, int, int, FILE *); /* ls_filter.c */ -#ifdef HAVE_REGEX_H +#if defined(HAVE_REGEX_H) || defined(HAVE_PCRE_H) void *G_ls_regex_filter(const char *, int, int, int); void *G_ls_glob_filter(const char *, int, int); void G_free_ls_filter(void *); diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 905d580afb7..ca956e95c05 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -154,6 +154,8 @@ endif() build_library_in_subdir(iostream SRC_REGEX "*.cpp" DEPENDS grass_gis) build_library_in_subdir(manage DEPENDS grass_raster grass_vector grass_raster3d ) +file(COPY manage/element_list DESTINATION ${CMAKE_BINARY_DIR}/etc) +install(FILES ${CMAKE_BINARY_DIR}/etc/element_list DESTINATION etc) build_library_in_subdir(calc DEPENDS grass_raster) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 2df790021df..7ef9d3e637f 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -42,4 +42,8 @@ build_module(NAME grass_gis SOURCES "${gislib_SRCS}" ) if(UNIX) target_link_libraries(grass_gis LIBM) +endif() + +if(MSVC) +target_link_libraries(grass_gis PCRE) endif() \ No newline at end of file diff --git a/lib/gis/ls_filter.c b/lib/gis/ls_filter.c index 44d3d803d38..5d7d0921fd2 100644 --- a/lib/gis/ls_filter.c +++ b/lib/gis/ls_filter.c @@ -13,10 +13,13 @@ #include #include - #ifdef HAVE_REGEX_H - #include +#endif + +#ifdef HAVE_PCRE_H +#include +#endif struct buffer { @@ -144,14 +147,36 @@ static int wc2regex(struct buffer *buf, const char *pat) static int re_filter(const char *filename, void *closure) { +#ifdef HAVE_REGEX_H regex_t *regex = closure; + return filename[0] != '.' && regexec(regex, filename, 0, NULL, 0) == 0; +#endif +#ifdef HAVE_PCRE_H + const char* pcreErrorStr; + pcre_extra* pcreExtra; + int pcreExecRet; + pcre* pcre_regex = closure; + // Optimize the regex + pcreExtra = pcre_study(pcre_regex, 0, &pcreErrorStr); + pcreExecRet = pcre_exec(pcre_regex, + pcreExtra, + filename, + strlen(filename), // length of string + 0, // Start looking at this point + 0, // OPTIONS + NULL, + 0); // Length of subStrVec + + return filename[0] != '.' && pcreExecRet == 0; +#endif - return filename[0] != '.' && regexec(regex, filename, 0, NULL, 0) == 0; + } void *G_ls_regex_filter(const char *pat, int exclude, int extended, int ignorecase) { +#ifdef HAVE_REGEX_H regex_t *regex = G_malloc(sizeof(regex_t)); if (regcomp(regex, pat, REG_NOSUB | @@ -167,12 +192,41 @@ void *G_ls_regex_filter(const char *pat, int exclude, int extended, G_set_ls_filter(re_filter, regex); return regex; +#endif + +#ifdef HAVE_PCRE_H + pcre* pcre_regex; + const char* pcreErrorStr; + int pcreErrorOffset; + // First, the regex string must be compiled. + pcre_regex = pcre_compile(pat, 0, &pcreErrorStr, &pcreErrorOffset, NULL); + /* + if (regcomp(regex, pat, REG_NOSUB | + (extended ? REG_EXTENDED : 0) | + (ignorecase ? REG_ICASE : 0)) != 0) { + pcre_free(pcre_regex); + return NULL; + } + */ + if (exclude) + G_set_ls_exclude_filter(re_filter, pcre_regex); + else + G_set_ls_filter(re_filter, pcre_regex); + + return pcre_regex; +#endif + } void *G_ls_glob_filter(const char *pat, int exclude, int ignorecase) { struct buffer buf; +#ifdef HAVE_REGEX_H regex_t *regex; +#endif +#ifdef HAVE_PCRE_H + pcre* pcre_regex; +#endif init(&buf); @@ -180,22 +234,36 @@ void *G_ls_glob_filter(const char *pat, int exclude, int ignorecase) fini(&buf); return NULL; } - +#ifdef HAVE_REGEX_H regex = G_ls_regex_filter(buf.buf, exclude, 1, ignorecase); +#endif +#ifdef HAVE_PCRE_H + pcre_regex = G_ls_regex_filter(buf.buf, exclude, 1, ignorecase); +#endif fini(&buf); - return regex; +#ifdef HAVE_REGEX_H + return regex; +#endif +#ifdef HAVE_PCRE_H + return pcre_regex; +#endif + } void G_free_ls_filter(void *regex) { if (!regex) return; - +#ifdef HAVE_REGEX_H regfree(regex); +#endif +#ifdef HAVE_PCRE_H + pcre_free(regex); +#endif + G_free(regex); -} -#endif +} diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index ee6b9109712..7946699a6ff 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -146,6 +146,13 @@ if(Threads_FOUND) endif() endif() +if(MSVC) + find_package(PCRE REQUIRED) + add_library(PCRE INTERFACE IMPORTED GLOBAL) + set_property(TARGET PCRE PROPERTY INTERFACE_LINK_LIBRARIES ${PCRE_LIBRARY_${find_library_suffix}} ) + set_property(TARGET PCRE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PCRE_INCLUDE_DIR} ) +endif() + #find_package (PythonLibs REQUIRED ) set(Python_ADDITIONAL_VERSIONS 3.5 3.6) #2.7 2.6 2.5) From f76a3e0644517e9059d9b293079a968eea05f5ca Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 03:35:52 +0100 Subject: [PATCH 121/264] lib/init: fix startup script on linux --- lib/init/CMakeLists.txt | 20 ++++++++++---------- lib/init/{grass.bat => grass.bat.in} | 0 lib/init/grass.sh.in | 6 ++++++ 3 files changed, 16 insertions(+), 10 deletions(-) rename lib/init/{grass.bat => grass.bat.in} (100%) create mode 100644 lib/init/grass.sh.in diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index e86f6d3ed77..2c39c3d4bd3 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -36,10 +36,12 @@ endif() file(TO_NATIVE_PATH "${gdal_share_dir}/gdal" GDAL_DATA) find_path(geotiff_share_dir "epsg_csv" PATH_SUFFIXES share) -if(NOT geotiff_share_dir) - message(FATAL_ERROR "Cannot find share/epsg_csv") +if(geotiff_share_dir) + file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) +else() + set(GEOTIFF_CSV "") + message(WARNING "Cannot find share/epsg_csv. GEOTIFF_CSV will not be set") endif() -file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) get_filename_component(GDAL_DIR ${GDAL_LIBRARY_${find_library_suffix}} PATH) get_filename_component(GDAL_DIR ${GDAL_DIR} PATH) @@ -54,7 +56,6 @@ file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) set(GISBASE ${CMAKE_BINARY_DIR}) -set(BINDIR "${CMAKE_BINARY_DIR}/bin") file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl "${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) @@ -78,15 +79,14 @@ endif() if(NOT MSVC) - configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/env @ONLY) + configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/bashrc @ONLY) endif() -configure_file(${script_file_name} ${CMAKE_BINARY_DIR}/${script_file_name} @ONLY) +configure_file(${script_file_name}.in ${CMAKE_BINARY_DIR}/${script_file_name} @ONLY) configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) # For install tree -set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") configure_file(${script_file_name} ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) @@ -107,15 +107,15 @@ if(WIN32) endif() file(TO_NATIVE_PATH "${app_data_dir}/GRASS7" GRASS_CONFIG_DIR) else() - set(GRASS_CONFIG_DIR "${ENV{HOME}}/.grass7") + set(GRASS_CONFIG_DIR "$ENV{HOME}/.grass7") endif() set(GISBASE "${CMAKE_INSTALL_PREFIX}") if(NOT MSVC) configure_file(env.sh ${CMAKE_CURRENT_BINARY_DIR}/bashrc @ONLY) - file(INSTALL ${CMAKE_CURRENT_BINARY_DIR}/bashrc - DESTINATION ${GRASS_CONFIG_DIR}/bashrc) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bashrc + DESTINATION ${GRASS_CONFIG_DIR}) endif() configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} @ONLY) diff --git a/lib/init/grass.bat b/lib/init/grass.bat.in similarity index 100% rename from lib/init/grass.bat rename to lib/init/grass.bat.in diff --git a/lib/init/grass.sh.in b/lib/init/grass.sh.in new file mode 100644 index 00000000000..853137c22c0 --- /dev/null +++ b/lib/init/grass.sh.in @@ -0,0 +1,6 @@ +#! /bin/sh +trap "echo 'User break!' ; exit" 2 3 9 15 + +. @GRASS_CONFIG_DIR@/bashrc + +exec "$GRASS_PYTHON" "@GISBASE@/etc/@START_UP@" "$@" & From daf6199c1a3c695622793766ee213f34f8db7fef Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 04:35:21 +0100 Subject: [PATCH 122/264] fix input configure_file --- lib/init/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 2c39c3d4bd3..887916ead9f 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -87,7 +87,7 @@ configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) # For install tree -configure_file(${script_file_name} ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) +configure_file(${script_file_name}.in ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) if(UNIX OR MINGW) From 101ed9c6e1bbc73d8b8b5d803b1cd3c5b79ed118 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 04:50:46 +0100 Subject: [PATCH 123/264] activate building g.remove on msvc --- general/CMakeLists.txt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index ccec2e0a380..50360bffdf1 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -38,15 +38,6 @@ add_subdirectory(manage/lister) build_program_in_subdir(g.list DEPENDS grass_manage) add_dependencies(g.list cell vector) +build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster) # TODO: MODULES DISABLED # g.gui - - - -if(NOT MSVC) -build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster ) -endif() - - - - From 5536d6319b87e441e890ed8a67c25b71acd9280e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 04:51:38 +0100 Subject: [PATCH 124/264] support shell ash (alpine) --- lib/init/grass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init/grass.py b/lib/init/grass.py index 711b3354664..f8bab414a74 100644 --- a/lib/init/grass.py +++ b/lib/init/grass.py @@ -1536,7 +1536,7 @@ def get_grass_env_file(sh, grass_config_dir): """Get name of the shell-specific GRASS environment (rc) file""" if sh in ['csh', 'tcsh']: grass_env_file = os.path.join(grass_config_dir, 'cshrc') - elif sh in ['bash', 'msh', 'cygwin', 'sh']: + elif sh in ['bash','ash', 'msh', 'cygwin', 'sh']: grass_env_file = os.path.join(grass_config_dir, 'bashrc') elif sh == 'zsh': grass_env_file = os.path.join(grass_config_dir, 'zshrc') From 2fc77e73cd1c890cdba055d63b2b989a43a2a8f8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 04:52:26 +0100 Subject: [PATCH 125/264] add cmake messages for lib/init/ --- lib/init/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 887916ead9f..bf2c693cb43 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -76,15 +76,18 @@ if(UNIX OR MINGW) set(LD_LIBRARY_PATH_VAR "${CMAKE_BINARY_DIR}/lib") endif() endif() - - +message(STATUS "GISBASE (build) : ${GISBASE}") +message(STATUS "grass config directory (build): ${GRASS_CONFIG_DIR}") if(NOT MSVC) configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/bashrc @ONLY) + message(STATUS "env variables: ${CMAKE_BINARY_DIR}/etc/config/bashrc") endif() configure_file(${script_file_name}.in ${CMAKE_BINARY_DIR}/${script_file_name} @ONLY) configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) +message(STATUS "Startup script: ${CMAKE_BINARY_DIR}/${script_file_name}") +message(STATUS "gisrc: ${CMAKE_BINARY_DIR}/etc/config/rc") # For install tree configure_file(${script_file_name}.in ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) @@ -109,9 +112,11 @@ if(WIN32) else() set(GRASS_CONFIG_DIR "$ENV{HOME}/.grass7") endif() - set(GISBASE "${CMAKE_INSTALL_PREFIX}") +message(STATUS "GISBASE (install) : ${GISBASE}") +message(STATUS "grass config directory (install): ${GRASS_CONFIG_DIR}") + if(NOT MSVC) configure_file(env.sh ${CMAKE_CURRENT_BINARY_DIR}/bashrc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bashrc From 64da2ae342911b7af1aa4335c0b913f56bfbe2c1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 05:02:20 +0100 Subject: [PATCH 126/264] include sys/time.h if not on msvc. As we don't include grass/config.h we cannot simply check against HAVE_SYS_TIME_H --- tools/timer/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/timer/main.c b/tools/timer/main.c index 70de9ed1916..7f03cddde0f 100644 --- a/tools/timer/main.c +++ b/tools/timer/main.c @@ -12,14 +12,13 @@ * for details. * *****************************************************************************/ -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif #ifdef _MSC_VER #include +#include +#else +#include #endif + #include #include From 7c4d721d216866f18a30174c6c58717a7441a690 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 05:07:54 +0100 Subject: [PATCH 127/264] install proj data files --- lib/proj/CMakeLists.txt | 49 +++++------------------------------------ 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/lib/proj/CMakeLists.txt b/lib/proj/CMakeLists.txt index 77c7663ef30..6481331b3a4 100644 --- a/lib/proj/CMakeLists.txt +++ b/lib/proj/CMakeLists.txt @@ -1,53 +1,14 @@ -# MODULE_TOPDIR = ../.. +file(COPY desc.table DESTINATION etc/proj) +file(COPY parms.table DESTINATION etc/proj) +file(COPY units.table DESTINATION etc/proj) -# LIB = GPROJ - -# include $(MODULE_TOPDIR)/include/Make/Vars.make - -# MOD_OBJS := $(filter-out ftol.o,$(AUTO_OBJS)) - -# include $(MODULE_TOPDIR)/include/Make/Lib.make -# include $(MODULE_TOPDIR)/include/Make/Doxygen.make - -# EXTRA_CFLAGS = $(ZLIBINCPATH) $(GDALCFLAGS) -# EXTRA_INC = $(PROJINC) - -# PROJ_DIR = $(ETC)/proj - -# PROJ_TABLES := desc.table parms.table units.table -# PROJ_DSTFILES := $(patsubst %,$(PROJ_DIR)/%,$(PROJ_TABLES)) - -# default: lib $(FTOL_OBJ) -# $(MAKE) $(PROJ_DSTFILES) - -# ifdef MINGW -# $(FTOL_OBJ): $(OBJDIR)/ftol.o -# $(INSTALL) $< $@ -# endif - -# $(PROJ_DSTFILES): $(PROJ_DIR)/%: % | $(PROJ_DIR) -# $(INSTALL_DATA) $< $@ - -# $(PROJ_DIR): -# $(MKDIR) $@ - -# #doxygen: -# DOXNAME=proj set(grass_gproj_SOURCES -convert.c datum.c do_proj.c -ellipse.c get_proj.c - ) + convert.c datum.c do_proj.c ellipse.c get_proj.c) if(MINGW) list(APPEND grass_gproj_SOURCES "ftol.c") endif() -set(PROJ_DIR) - -set(PROJ_TABLES desc.table parms.table units.table) -# PROJ_DSTFILES := $(patsubst %,$(PROJ_DIR)/%,$(PROJ_TABLES)) - build_module(NAME grass_gproj DEPENDS grass_driver GDAL ZLIB PROJ SOURCES "${grass_gproj_SOURCES}" - INCLUDES "../driver" - ) + INCLUDES "../driver") From ee16556255ca3ae37ad6d6881256983b00f4573d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 05:10:02 +0100 Subject: [PATCH 128/264] geotiff_csv only required in windows check this with devs --- lib/init/CMakeLists.txt | 6 +++--- lib/init/env.sh | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index bf2c693cb43..5c2030a65d2 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -35,14 +35,14 @@ if(NOT gdal_share_dir) endif() file(TO_NATIVE_PATH "${gdal_share_dir}/gdal" GDAL_DATA) +if(MSVC) find_path(geotiff_share_dir "epsg_csv" PATH_SUFFIXES share) if(geotiff_share_dir) file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) else() - set(GEOTIFF_CSV "") - message(WARNING "Cannot find share/epsg_csv. GEOTIFF_CSV will not be set") + message(FATAL_ERROR "Cannot find share/epsg_csv.") endif() - +endif() #MSVC get_filename_component(GDAL_DIR ${GDAL_LIBRARY_${find_library_suffix}} PATH) get_filename_component(GDAL_DIR ${GDAL_DIR} PATH) diff --git a/lib/init/env.sh b/lib/init/env.sh index 4551e256717..66729b414a9 100644 --- a/lib/init/env.sh +++ b/lib/init/env.sh @@ -1,7 +1,6 @@ export GRASS_PROJSHARE=@GRASS_PROJSHARE@ export PROJ_LIB=@PROJ_LIB@ export GDAL_DATA=@GDAL_DATA@ -export GEOTIFF_CSV=@GEOTIFF_CSV@ export GRASS_PYTHON=@GRASS_PYTHON@ export GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@ From 647999d81bfc2080d3513ff166f3c1e6994bc823 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 05:28:11 +0100 Subject: [PATCH 129/264] wip: add compile defs via interface library --- cmake/modules/build_module.cmake | 9 +++++++++ thirdparty/CMakeLists.txt | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 746bd8e4a5a..5678e4a1bfa 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -77,6 +77,15 @@ function(build_module) target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") endforeach() + foreach(dep ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) + if(TARGET ${dep}) + get_target_property(interface_def ${dep} INTERFACE_COMPILE_DEFINITIONS) + if(interface_def) + target_compile_definitions(${G_NAME} PRIVATE "${interface_def}") + endif() + endif() + endforeach() + target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) if(G_EXE) install(TARGETS ${G_NAME} DESTINATION bin) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 7946699a6ff..176ac8d56d0 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -33,7 +33,10 @@ find_package(PROJ REQUIRED) add_library(PROJ INTERFACE IMPORTED GLOBAL) set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY_${find_library_suffix}} ) set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) - +if(PROJ_VERSION_STRING GREATER 500) +set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS +"-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) +endif() find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY_${find_library_suffix}} ) From b77832e7157f326b43d9cce729d67d489cce4e51 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 05:36:18 +0100 Subject: [PATCH 130/264] fix g.version, grass_gproj with proj6 --- cmake/find_scripts/FindPROJ.cmake | 2 -- general/CMakeLists.txt | 5 +++-- thirdparty/CMakeLists.txt | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index 741993ff4ea..f7eca3ea64e 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -20,8 +20,6 @@ FIND_PATH(PROJ_INCLUDE_DIR proj_api.h file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_api_h_CONTENTS) string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_api_h_CONTENTS}") - #if(MUPARSER_VERSION MATCHES "^[0-9]+\$") - # set(MUPARSER_VERSION "${MUPARSER_VERSION}.0.0") FIND_LIBRARY(PROJ_LIBRARY_RELEASE NAMES proj proj_i diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 50360bffdf1..62fb863364b 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -20,8 +20,9 @@ build_program_in_subdir(g.region DEPENDS grass_gis grass_gproj build_program_in_subdir(g.rename DEPENDS grass_manage grass_raster ) build_program_in_subdir(g.tempfile DEPENDS grass_gis ) -build_program_in_subdir(g.version DEPENDS grass_gis GEOS GDAL SQLITE -DEFS "-DGRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" +build_program_in_subdir(g.version + DEPENDS grass_gis PROJ GEOS GDAL SQLITE + DEFS "-DGRASS_VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" "-DGRASS_VERSION_GIT=\"${GRASS_VERSION_GIT}\"" "-DGRASS_VERSION_UPDATE_PKG=${GRASS_VERSION_UPDATE_PKG}" "-DARCH=\"${BUILD_ARCH}\"" diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 176ac8d56d0..aa4e975a86c 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -34,8 +34,7 @@ add_library(PROJ INTERFACE IMPORTED GLOBAL) set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY_${find_library_suffix}} ) set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) if(PROJ_VERSION_STRING GREATER 500) -set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS -"-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) + set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS "ACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) endif() find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) From d3398728f4577f027e67ce0fa731e115ab065caf Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 13:34:32 +0100 Subject: [PATCH 131/264] Revert "support shell ash (alpine)" This reverts commit 5536d6319b87e441e890ed8a67c25b71acd9280e. --- lib/init/grass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init/grass.py b/lib/init/grass.py index f8bab414a74..711b3354664 100644 --- a/lib/init/grass.py +++ b/lib/init/grass.py @@ -1536,7 +1536,7 @@ def get_grass_env_file(sh, grass_config_dir): """Get name of the shell-specific GRASS environment (rc) file""" if sh in ['csh', 'tcsh']: grass_env_file = os.path.join(grass_config_dir, 'cshrc') - elif sh in ['bash','ash', 'msh', 'cygwin', 'sh']: + elif sh in ['bash', 'msh', 'cygwin', 'sh']: grass_env_file = os.path.join(grass_config_dir, 'bashrc') elif sh == 'zsh': grass_env_file = os.path.join(grass_config_dir, 'zshrc') From 5a0197c3c85b21a647b22f2bf7e6e6a196532289 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 2 Jan 2020 13:43:39 +0100 Subject: [PATCH 132/264] create startup shell scripts in bin --- gui/wxpython/CMakeLists.txt | 16 ++++++++++++++++ lib/init/grass.sh.in | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index ca4f5e949fa..8175156c734 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -63,3 +63,19 @@ # $(DSTDIR): # $(MKDIR) $@ +function(run_grass_python) + set(c "${ARGN}") + set(stamp_file_path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${module}.py.stamp) + add_custom_command( + OUTPUT ${stamp_file_path} + #DEPENDS ${${module}_LIBS} + COMMAND ${CMAKE_COMMAND} + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/cmake/python.cmake + COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} + COMMENT "Running ${python_args}" + VERBATIM) + + add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${stamp_file_path}) +endfunction() \ No newline at end of file diff --git a/lib/init/grass.sh.in b/lib/init/grass.sh.in index 853137c22c0..8871d41da59 100644 --- a/lib/init/grass.sh.in +++ b/lib/init/grass.sh.in @@ -3,4 +3,4 @@ trap "echo 'User break!' ; exit" 2 3 9 15 . @GRASS_CONFIG_DIR@/bashrc -exec "$GRASS_PYTHON" "@GISBASE@/etc/@START_UP@" "$@" & +"$GRASS_PYTHON" "@GISBASE@/etc/@START_UP@" "$@" From b45f646a89c973c66575d8b2e8fac3f2c3e9b1d9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:36:12 +0100 Subject: [PATCH 133/264] fix startup script --- lib/init/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 5c2030a65d2..e42ece6421d 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -4,14 +4,12 @@ set(PACKAGE "grasslibs") file(GLOB init_HTMLFILES "*.html") -#START_UP is the variable used in grass.py +#START_UP is the variable used in grass.py, grass.sh.in and grass.bat.in +set(START_UP "grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.py") if(WIN32) set(script_file_name "grass.bat") -set(START_UP "grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.py") else() set(script_file_name "grass.sh") -set(env_file_name "env.sh") -set(START_UP "grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") endif() set(CONFIG_PROJSHARE) @@ -82,7 +80,8 @@ if(NOT MSVC) configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/bashrc @ONLY) message(STATUS "env variables: ${CMAKE_BINARY_DIR}/etc/config/bashrc") endif() -configure_file(${script_file_name}.in ${CMAKE_BINARY_DIR}/${script_file_name} @ONLY) +configure_file(${script_file_name}.in + ${CMAKE_BINARY_DIR}/bin/${script_file_name} @ONLY) configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) message(STATUS "Startup script: ${CMAKE_BINARY_DIR}/${script_file_name}") From 0ff53cd79004ed8079fa71b34787455a60977b31 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:43:56 +0100 Subject: [PATCH 134/264] MSVC: configure run_grass.bat, run_python.bat --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4e68ac0c25..9f35eb46586 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ if(MSVC) if(BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) endif() + + set_property(GLOBAL PROPERTY USE_FOLDERS ON) endif() set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find_scripts;${CMAKE_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}") @@ -63,6 +65,11 @@ get_versions("include/VERSION" set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}) message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") set(GRASS_VERSION_UPDATE_PKG "0.2") +set(VERSION_DATE 2019) +file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) +configure_file(cmake/run_python.bat ${CMAKE_BINARY_DIR}/tools/run_python.bat @ONLY) +configure_file(cmake/run_grass.bat ${CMAKE_BINARY_DIR}/tools/run_grass.bat @ONLY) include(set_compiler_flags) set_compiler_flags() From bb3d796a3681e0a3c8ad4a88915bd83a8a5e6883 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:45:57 +0100 Subject: [PATCH 135/264] generate html docs --- cmake/modules/build_module.cmake | 37 +++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 5678e4a1bfa..97d87870c2c 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,10 +1,11 @@ include(GenerateExportHeader) function(build_module) - cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) + cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX;NO_HTML_DESCR" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) if(NOT G_NAME) message(FATAL_ERROR "G_NAME empty") endif() + update_per_group_target( ${G_NAME} ) if(NOT G_SRC_REGEX) @@ -14,6 +15,7 @@ function(build_module) if(NOT G_SRCDIR) set(G_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}) endif() + set(html_file "${G_SRCDIR}/${G_NAME}.html") foreach(G_HEADER ${G_HEADERS}) if( EXISTS "${G_SRCDIR}/${G_HEADER}" ) @@ -37,8 +39,10 @@ function(build_module) if(G_EXE) add_executable(${G_NAME} ${${G_NAME}_SRCS}) + SET_TARGET_PROPERTIES (${G_NAME} PROPERTIES FOLDER bin) else() add_library(${G_NAME} ${${G_NAME}_SRCS}) + SET_TARGET_PROPERTIES (${G_NAME} PROPERTIES FOLDER lib) set_target_properties(${G_NAME} PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER}) set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") @@ -53,6 +57,7 @@ function(build_module) endif() endforeach() foreach(G_DEPEND ${G_DEPENDS}) + if(NOT TARGET ${G_DEPEND}) message(FATAL_ERROR "${G_DEPEND} not a target") break() @@ -84,13 +89,39 @@ function(build_module) target_compile_definitions(${G_NAME} PRIVATE "${interface_def}") endif() endif() + target_link_libraries(${G_NAME} ${dep}) endforeach() - target_link_libraries(${G_NAME} ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) if(G_EXE) install(TARGETS ${G_NAME} DESTINATION bin) else() install(TARGETS ${G_NAME} DESTINATION lib) endif() -endfunction() \ No newline at end of file + set(html_file "${G_SRCDIR}/${G_NAME}.html") + if(EXISTS "${html_file}") + if(NOT ${G_NO_HTML_DESCR}) + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_grass.bat + ${CMAKE_BINARY_DIR}/bin/${G_NAME} + --html-description > ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html + DEPENDS ${G_NAME} + COMMENT "Generating ${G_NAME}.tmp.html" + VERBATIM) + else() + file(WRITE ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html "") + endif() + + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${CMAKE_BINARY_DIR}/bin/${G_NAME} + ${html_file} > ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html + DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html + COMMENT "Generating docs/html/${G_NAME}.html" + VERBATIM) + + add_custom_target(${G_NAME}_doc ALL + COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html + DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html) + endif() +endfunction() From 5acb30826612978555270d01a0789aae8c543a0a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:47:48 +0100 Subject: [PATCH 136/264] fix copy_python_file (used in gui/wxpython, lib/python) --- cmake/modules/copy_python_file.cmake | 34 ++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake index 68eba7dea70..9acfc29879e 100644 --- a/cmake/modules/copy_python_file.cmake +++ b/cmake/modules/copy_python_file.cmake @@ -1,30 +1,26 @@ -function(copy_python_file py_file py_module_name py_DIR_PATH install_dest) - # A single case where setup.py from cmake binary directory is added. - # For this corner case we need to check for IS_ABSOLUTE first!s - if(NOT IS_ABSOLUTE ${py_file}) - get_filename_component(py_file_REALPATH ${py_DIR_PATH}/${py_file} REALPATH) - else() - set(py_file_REALPATH ${py_file}) - endif() - - get_filename_component(py_file_NAME ${py_file_REALPATH} NAME) - - set(output_path ${CMAKE_CURRENT_BINARY_DIR}/${py_DIR_PATH}) - file(COPY ${py_file_REALPATH} DESTINATION ${output_path}) +function(copy_python_file py_file install_dest) + get_filename_component(py_file_NAME ${py_file} NAME) + set(output_path ${CMAKE_BINARY_DIR}/${install_dest}) set(copied_file_path ${output_path}/${py_file_NAME}) - + add_custom_command(OUTPUT ${copied_file_path} + COMMAND ${CMAKE_COMMAND} -E copy ${py_file} ${output_path} + DEPENDS g.parser + COMMENT "Copy ${output_path}/${py_file_NAME}" + VERBATIM) set(pyc_file_path "${copied_file_path}c") add_custom_command( OUTPUT ${pyc_file_path} COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} + DEPENDS ${copied_file_path} COMMENT "Generating ${pyc_file_path}" VERBATIM) - set_source_files_properties("${pyc_file_path}" GENERATED) - - add_custom_target(${py_module_name}.${py_file_NAME} ALL + #set_source_files_properties("${pyc_file_path}" GENERATED) + string(REPLACE "/" "_" targ_name ${install_dest}) + #message(FATAL_ERROR "targ_name=${targ_name}") + add_custom_target(${targ_name}_${py_file_NAME} ALL DEPENDS ${pyc_file_path}) - +SET_TARGET_PROPERTIES (${targ_name}_${py_file_NAME} PROPERTIES FOLDER copy) install(FILES ${copied_file_path} DESTINATION ${install_dest}) -endfunction() \ No newline at end of file +endfunction() From 7b0d5d3ce7104d8ae960c24058c1e8280c420bb7 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:48:25 +0100 Subject: [PATCH 137/264] build all gui/wxpython modules --- gui/wxpython/CMakeLists.txt | 152 +++++++++++++++++------------------- 1 file changed, 73 insertions(+), 79 deletions(-) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 8175156c734..e5cbd4969ab 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -1,81 +1,75 @@ -# MODULE_TOPDIR = ../.. -# SUBDIRS = docs animation datacatalog mapswipe gmodeler rlisetup psmap dbmgr vdigit iclass gcp timeline tplot -# EXTRA_CLEAN_FILES = menustrings.py build_ext.pyc xml/menudata.xml xml/module_tree_menudata.xml */*.pyc -# include $(MODULE_TOPDIR)/include/Make/Dir.make -# include $(MODULE_TOPDIR)/include/Make/Python.make - -# DSTDIR = $(GUIDIR)/wxpython - -# SRCFILES := $(wildcard icons/*.py scripts/*.py xml/*) \ -# $(wildcard animation/*.py core/*.py datacatalog/*.py dbmgr/*.py gcp/*.py gmodeler/*.py \ -# gui_core/*.py iclass/*.py lmgr/*.py location_wizard/*.py mapwin/*.py mapdisp/*.py \ -# mapswipe/*.py modules/*.py nviz/*.py psmap/*.py rdigit/*.py rlisetup/*.py timeline/*.py vdigit/*.py \ -# vnet/*.py web_services/*.py wxplot/*.py iscatt/*.py tplot/*.py) \ -# gis_set.py gis_set_error.py wxgui.py README - -# DSTFILES := $(patsubst %,$(DSTDIR)/%,$(SRCFILES)) \ -# $(patsubst %.py,$(DSTDIR)/%.pyc,$(filter %.py,$(SRCFILES))) - -# PYDSTDIRS := $(patsubst %,$(DSTDIR)/%,animation core datacatalog dbmgr gcp gmodeler \ -# gui_core iclass lmgr location_wizard mapwin mapdisp modules nviz psmap \ -# mapswipe vdigit wxplot web_services rdigit rlisetup vnet timeline iscatt tplot) - - -# DSTDIRS := $(patsubst %,$(DSTDIR)/%,icons scripts xml) - -# default: $(DSTFILES) -# -$(MAKE) $(DSTDIR)/xml/module_items.xml -# -$(MAKE) xml/menudata.xml -# -$(MAKE) xml/module_tree_menudata.xml -# -$(MAKE) menustrings.py -# $(MAKE) parsubdirs - - -# $(DSTDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS) -# $(INSTALL_DATA) $< $@ - -# xml/menudata.xml: core/toolboxes.py -# $(call run_grass,$(PYTHON) $< > $@) -# $(call run_grass,$(PYTHON) $< "validate" $@) - -# xml/module_tree_menudata.xml: core/toolboxes.py -# $(call run_grass,$(PYTHON) $< "module_tree" > $@) -# $(call run_grass,$(PYTHON) $< "validate" $@) - -# menustrings.py: core/menutree.py $(DSTDIR)/xml/menudata.xml $(DSTDIR)/xml/module_tree_menudata.xml $(DSTDIR)/xml/menudata_modeler.xml $(DSTDIR)/xml/menudata_psmap.xml -# @echo "# This is a generated file.\n" > $@ -# $(call run_grass,$(PYTHON) $< "manager" >> $@) -# $(call run_grass,$(PYTHON) $< "module_tree" >> $@) -# $(call run_grass,$(PYTHON) $< "modeler" >> $@) -# $(call run_grass,$(PYTHON) $< "psmap" >> $@) - -# $(DSTDIR)/xml/module_items.xml: tools/build_modules_xml.py -# @echo "Generating interface description for all modules..." -# $(call run_grass,$(PYTHON) $< > $@) - -# $(PYDSTDIRS): %: | $(DSTDIR) -# $(MKDIR) $@ - -# $(DSTDIRS): %: | $(DSTDIR) -# $(MKDIR) $@ - -# $(DSTDIR): -# $(MKDIR) $@ -function(run_grass_python) - set(c "${ARGN}") - set(stamp_file_path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${module}.py.stamp) - add_custom_command( - OUTPUT ${stamp_file_path} - #DEPENDS ${${module}_LIBS} - COMMAND ${CMAKE_COMMAND} - -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/cmake/python.cmake - COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file_path} - COMMENT "Running ${python_args}" - VERBATIM) - - add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${stamp_file_path}) -endfunction() \ No newline at end of file +include(copy_python_file) +function(build_gui_module_in_dir module_name) + +file(GLOB py_files ${module_name}/*.py) +file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg ) + +set(g_gui_found FALSE) +foreach(py_file ${py_files}) +if(py_file MATCHES "g.gui.*") +set(g_gui_found TRUE) +copy_python_file(${py_file} scripts) +endif() +copy_python_file(${py_file} gui/wxpython/${module_name}) +endforeach() + +foreach(img_file ${img_files}) +file(COPY ${img_file} DESTINATION ${CMAKE_BINARY_DIR}/docs/html/) +endforeach() +if(g_gui_found) +if(WIN32) +set(python_script "g.gui.${module_name}.py") +else() +set(python_script "g.gui.${module_name}") +endif() +set(gui_module_name "g.gui.${module_name}") + +set(html_file_path ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/g.gui.${module_name}.html ) +#message(FATAL_ERROR "html_file_path=${html_file_path}") +add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + ${CMAKE_BINARY_DIR}/scripts/${python_script} + --html-description > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html + DEPENDS ${CMAKE_BINARY_DIR}/scripts/${python_script} + COMMENT "Generating ${gui_module_name}.tmp.html" + VERBATIM) + + +add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} + ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html + COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html + DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html + COMMENT "Generating docs/html/${gui_module_name}.html" + VERBATIM) + + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} + ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html + COMMENT "Generating docs/html/wxGUI.${module_name}.html" + VERBATIM) + + add_custom_target(g_gui_${module_name}_docs ALL + DEPENDS + ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html + ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html) +endif() #g_gui_found +endfunction() +#missing docs +set(gui_sub_dirs animation core datacatalog dbmgr gcp gmodeler gui_core iclass +icons image2target iscatt lmgr location_wizard mapdisp mapswipe mapwin modules nviz +photo2image psmap rdigit rlisetup startup timeline tools tplot vdigit +vnet web_services wxplot) + +foreach(gui_sub_dir ${gui_sub_dirs}) + build_gui_module_in_dir(${gui_sub_dir}) +endforeach() +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py gui/wxpython) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py gui/wxpython) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py gui/wxpython) + +install(FILES README DESTINATION gui/wxpython) From b1236ea35e7f5d44e61c29f0b589fafdfe3e0ae3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:49:08 +0100 Subject: [PATCH 138/264] wrapper scripts to build html docs --- cmake/run_grass.bat | 12 ++++++++++++ cmake/run_python.bat | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 cmake/run_grass.bat create mode 100644 cmake/run_python.bat diff --git a/cmake/run_grass.bat b/cmake/run_grass.bat new file mode 100644 index 00000000000..5acfc92ec5d --- /dev/null +++ b/cmake/run_grass.bat @@ -0,0 +1,12 @@ +@echo off +set MODULE_TOPDIR=@module_top_dir@ +set GISBASE=@bin_dir@ +set GISRC=@bin_dir@\etc\config\rc +set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% +set LC_ALL=C +set LANG=C +set LANGUAGE=C +set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ +set VERSION_DATE=@VERSION_DATE@ +%* + diff --git a/cmake/run_python.bat b/cmake/run_python.bat new file mode 100644 index 00000000000..3ac625474f1 --- /dev/null +++ b/cmake/run_python.bat @@ -0,0 +1,13 @@ +@echo off +set MODULE_TOPDIR=@module_top_dir@ +set GISBASE=@bin_dir@ +set GISRC=@bin_dir@\etc\config\rc +set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% +set PYTHONPATH=@bin_dir@\etc\python;@bin_dir@\gui\wxpython;%PYTHONPATH% +set LC_ALL=C +set LANG=C +set LANGUAGE=C +set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ +set VERSION_DATE=@VERSION_DATE@ +"@PYTHON_EXECUTABLE@" %* + From 22e320a657b302eb4a5e8a8622a069b5d1070ea9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:51:47 +0100 Subject: [PATCH 139/264] skip html-description for g.parser --- general/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 62fb863364b..1f8ab4d1608 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -10,7 +10,7 @@ build_program_in_subdir(g.mapset DEPENDS grass_gis ) build_program_in_subdir(g.mapsets DEPENDS grass_gis ) build_program_in_subdir(g.message DEPENDS grass_gis ) build_program_in_subdir(g.mkfontcap DEPENDS grass_gis FREETYPE ) -build_program_in_subdir(g.parser DEPENDS grass_gis FREETYPE ) +build_program_in_subdir(g.parser DEPENDS grass_gis FREETYPE NO_HTML_DESCR "TRUE") build_program_in_subdir(g.pnmcomp DEPENDS grass_gis ) build_program_in_subdir(g.ppmtopng DEPENDS grass_gis LIBPNG) build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj GDAL ) From fb68e47f90416c17e7474ee447a2286cc04fef8b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 01:52:17 +0100 Subject: [PATCH 140/264] update mkhtml.py to with cmake and autoconf --- tools/mkhtml.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/mkhtml.py b/tools/mkhtml.py index 84915375d6b..778cd77bc81 100644 --- a/tools/mkhtml.py +++ b/tools/mkhtml.py @@ -66,11 +66,18 @@ def decode(bytes_): return bytes_.decode(enc) return unicode(bytes_) - +# check for a strange case where autoconf sends two arguments pgm = sys.argv[1] +if len(sys.argv) > 2: + src_file = sys.argv[2] + if not os.path.isfile(src_file): + src_file = "%s.html" % pgm + tmp_file = src_file.replace(".html", '.tmp.html') + +if src_file is None: + src_file = "%s.html" % pgm + tmp_file = "%s.tmp.html" % pgm -src_file = "%s.html" % pgm -tmp_file = "%s.tmp.html" % pgm trunk_url = "https://github.com/OSGeo/grass/tree/master/" addons_url = "https://github.com/OSGeo/grass-addons/tree/master/" From b0123adc229d2466f44b4168999cd1b3f9a83937 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 02:14:42 +0100 Subject: [PATCH 141/264] update msvc target properties --- cmake/modules/build_grass_script.cmake | 7 +++---- cmake/modules/build_module.cmake | 5 +++-- cmake/modules/build_pymodule_in_subdir.cmake | 22 ++++++++------------ gui/wxpython/CMakeLists.txt | 2 ++ lib/python/ctypes/CMakeLists.txt | 1 + 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/cmake/modules/build_grass_script.cmake b/cmake/modules/build_grass_script.cmake index 8a6918bc945..b1c3e35f7b8 100644 --- a/cmake/modules/build_grass_script.cmake +++ b/cmake/modules/build_grass_script.cmake @@ -53,11 +53,10 @@ foreach(pyfile ${SRC_FILES}) VERBATIM ) - add_custom_target(${pyfile_NAME} - ALL - DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp - ) + add_custom_target(${pyfile_NAME} ALL + DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp) + set_target_properties (${pyfile_NAME} PROPERTIES FOLDER scripts) # add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" # COMMAND ${CMAKE_COMMAND} # -DINPUT_FILE=${pyfile} diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 97d87870c2c..ebe80ebf51a 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -39,10 +39,10 @@ function(build_module) if(G_EXE) add_executable(${G_NAME} ${${G_NAME}_SRCS}) - SET_TARGET_PROPERTIES (${G_NAME} PROPERTIES FOLDER bin) + set_target_properties (${G_NAME} PROPERTIES FOLDER bin) else() add_library(${G_NAME} ${${G_NAME}_SRCS}) - SET_TARGET_PROPERTIES (${G_NAME} PROPERTIES FOLDER lib) + set_target_properties (${G_NAME} PROPERTIES FOLDER lib) set_target_properties(${G_NAME} PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER}) set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") @@ -123,5 +123,6 @@ function(build_module) add_custom_target(${G_NAME}_doc ALL COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html) + set_target_properties (${G_NAME}_doc PROPERTIES FOLDER docs) endif() endfunction() diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 8f1c8c043d3..6275f2abd1d 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -1,14 +1,10 @@ include(copy_python_file) -function(build_pymodule_in_subdir py_DIR_PATH) - set(py_FILES ${ARGN}) - if (NOT "__init__.py" IN_LIST py_FILES) - get_filename_component(py_init_py_file_path ${py_DIR_PATH}/__init__.py REALPATH) - list(APPEND py_FILES "__init__.py") - endif() - #find leaf of py_DIR_PATH which will be name of module - get_filename_component(py_module_name ${py_DIR_PATH} NAME) - set(install_dest etc/python/grass/${py_DIR_PATH}) - foreach(py_file ${py_FILES}) - copy_python_file(${py_file} ${py_module_name} ${py_DIR_PATH} ${install_dest} ) - endforeach() -endfunction() \ No newline at end of file +function(build_pymodule_in_subdir module_name) + + file(GLOB py_files ${module_name}/*.py) + file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg ) + foreach(py_file ${py_files}) + copy_python_file(${py_file} etc/python/grass/${module_name} ) + endforeach() + +endfunction() diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index e5cbd4969ab..465b384c2db 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -57,6 +57,8 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html) + + set_target_properties (g_gui_${module_name}_docs PROPERTIES FOLDER docs) endif() #g_gui_found endfunction() #missing docs diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index a7b8a60cb4a..b6a0466f1d8 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -79,6 +79,7 @@ foreach(module ${MODULES}) VERBATIM) add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${output_file}) + set_target_properties (${${module}_TARGET_NAME} PROPERTIES FOLDER lib/python) install(FILES ${output_file} DESTINATION etc/python/grass/lib) endforeach() From 51226e8344bbbc9c56fc5c4ba20dc06d18f7958a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 02:24:25 +0100 Subject: [PATCH 142/264] fix install directory for running from binary tree --- lib/python/ctypes/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index b6a0466f1d8..c819a93f99c 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -62,7 +62,7 @@ foreach(module ${MODULES}) message(FATAL_ERROR "${${module}_TARGET_NAME} is not set") endif() - set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${module}.py") + set(output_file "${CMAKE_BINARY_DIR}/etc/python/grass/lib/${module}.py") add_custom_command(OUTPUT ${output_file} DEPENDS ${${module}_LIBS} From 66ee1e59ccd9719da93ca05123fcb878dcfc5a2e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 02:31:57 +0100 Subject: [PATCH 143/264] install tools for buildtree and installtree --- tools/CMakeLists.txt | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index ef4cc30e37b..922a83138c6 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,20 +1,7 @@ -set(py_files g.html2man/g.html2man.py g.html2man/ghtml.py g.html2man/ggroff.py) -foreach(py_file ${py_files}) - get_filename_component(py_file_NAME ${py_file} NAME) - file(COPY ${py_file} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - set(copied_file_path ${CMAKE_CURRENT_BINARY_DIR}/${py_file_NAME}) - set(pyc_file_path "${copied_file_path}c") - add_custom_command( - OUTPUT ${pyc_file_path} - DEPENDS g.parser - COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} - COMMENT "Generating ${pyc_file_path}" - VERBATIM) - add_custom_target(tools.${py_file_NAME} ALL - DEPENDS ${pyc_file_path}) - - install(FILES ${copied_file_path} DESTINATION tools) -endforeach() +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py tools) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.html2man.py tools) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.ghtml.py tools) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.ggroff.py tools) set(current_time_s_ms_SRCS "timer/main.c") if(MSVC) From 5119729a01450b04089e282d81b7f7e11308e619 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 17:53:07 +0100 Subject: [PATCH 144/264] fix build docs using cmake POST_BUILD --- cmake/modules/build_module.cmake | 62 +++++---- cmake/modules/build_pymodule_in_subdir.cmake | 138 ++++++++++++++++++- general/CMakeLists.txt | 2 +- gui/wxpython/CMakeLists.txt | 64 +-------- lib/python/CMakeLists.txt | 107 ++------------ lib/python/pygrass/CMakeLists.txt | 23 ++++ thirdparty/CMakeLists.txt | 18 +-- 7 files changed, 207 insertions(+), 207 deletions(-) create mode 100644 lib/python/pygrass/CMakeLists.txt diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index ebe80ebf51a..d9b121b4a4e 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,6 +1,6 @@ include(GenerateExportHeader) function(build_module) - cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX;NO_HTML_DESCR" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) + cmake_parse_arguments(G "EXE;NO_HTML_DESCRIPTION" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) if(NOT G_NAME) message(FATAL_ERROR "G_NAME empty") @@ -35,8 +35,8 @@ function(build_module) file(GLOB ${G_NAME}_SRCS "${G_SRCDIR}/${G_SRC_REGEX}") else() set(${G_NAME}_SRCS ${G_SOURCES}) - endif() - + endif() + if(G_EXE) add_executable(${G_NAME} ${${G_NAME}_SRCS}) set_target_properties (${G_NAME} PROPERTIES FOLDER bin) @@ -97,32 +97,42 @@ function(build_module) else() install(TARGETS ${G_NAME} DESTINATION lib) endif() - + #TODO glob for *.html + file(GLOB html_files "${G_SRCDIR}/*.html") set(html_file "${G_SRCDIR}/${G_NAME}.html") + + file(GLOB img_files ${G_NAME}/*.png ${G_NAME}/*.jpg) + if(img_files) + set(img_cmd ${CMAKE_COMMAND} -E copy ${img_files} ${CMAKE_BINARY_DIR}/docs/html) + else() + set(img_cmd ${CMAKE_COMMAND} -E echo "") + endif() + +# if(EXISTS "${html_files}") if(EXISTS "${html_file}") - if(NOT ${G_NO_HTML_DESCR}) - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_grass.bat - ${CMAKE_BINARY_DIR}/bin/${G_NAME} - --html-description > ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html - DEPENDS ${G_NAME} - COMMENT "Generating ${G_NAME}.tmp.html" - VERBATIM) - else() - file(WRITE ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html "") + if(${G_NO_HTML_DESCRIPTION}) + set(tmp_html_cmd ${CMAKE_COMMAND} -E echo "") + else() + set(tmp_html_cmd ${CMAKE_BINARY_DIR}/tools/run_grass.bat ${G_NAME} --html-description) endif() + set(mkhtml_cmd ${CMAKE_BINARY_DIR}/tools/run_python.bat ${CMAKE_BINARY_DIR}/tools/mkhtml.py) + + set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html") + set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html") + + ADD_CUSTOM_COMMAND(TARGET ${G_NAME} POST_BUILD + COMMAND ${tmp_html_cmd} > ${html_file_tmp} + COMMAND ${mkhtml_cmd} ${G_NAME} ${html_file} ${html_file_tmp} > ${html_file_out} + COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} + COMMAND ${img_cmd} + ) + + - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat - ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${CMAKE_BINARY_DIR}/bin/${G_NAME} - ${html_file} > ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html - DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html - COMMENT "Generating docs/html/${G_NAME}.html" - VERBATIM) - - add_custom_target(${G_NAME}_doc ALL - COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html - DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html) - set_target_properties (${G_NAME}_doc PROPERTIES FOLDER docs) + #set_source_files_properties(${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html PROPERTIES GENERATED TRUE) + #add_custom_target(${G_NAME}_doc ALL + # COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html + # + # set_target_properties (${G_NAME}_doc PROPERTIES FOLDER docs) endif() endfunction() diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 6275f2abd1d..81294bdef31 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -1,10 +1,138 @@ include(copy_python_file) -function(build_pymodule_in_subdir module_name) +function(build_pymodule_in_subdir module_name dest_dir) + #set(pyc_depends) + file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg) file(GLOB py_files ${module_name}/*.py) - file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg ) - foreach(py_file ${py_files}) - copy_python_file(${py_file} etc/python/grass/${module_name} ) - endforeach() + + string(REPLACE "/" "_" target_name ${module_name}) + string(REPLACE "/" "_" targ_prefix ${dest_dir}) + set(targ_name ${targ_prefix}_${target_name} ) + + set(g_gui_found FALSE) + file(GLOB g_gui_files ${module_name}/g.gui.*.py) + + add_custom_target(py_${targ_name} + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} + COMMAND ${CMAKE_COMMAND} -E copy ${py_files} ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} + DEPENDS g.parser + ) + set_target_properties (py_${targ_name} PROPERTIES FOLDER ${dest_dir}) + if(img_files) + add_custom_target(docs_images_${targ_name} + COMMAND ${CMAKE_COMMAND} -E copy ${img_files} ${CMAKE_BINARY_DIR}/docs/html) + set_target_properties (docs_images_${targ_name} PROPERTIES FOLDER docs) + endif() + + if(g_gui_files) + add_custom_target(py_g_gui_${targ_name} + COMMAND ${CMAKE_COMMAND} -E copy ${g_gui_files} ${CMAKE_BINARY_DIR}/scripts + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/scripts + ) + set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) + install(FILES ${py_files} DESTINATION scripts) + + if(WIN32) +set(python_script "g.gui.${module_name}.py") +else() +set(python_script "g.gui.${module_name}") +endif() +set(gui_module_name "g.gui.${module_name}") + + + +set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${gui_module_name}.html ) +#message(FATAL_ERROR "html_file_path=${html_file_path}") + + set(tmp_html_cmd ${CMAKE_BINARY_DIR}/tools/run_grass.bat ${python_script} --html-description) + set(mkhtml_cmd ${CMAKE_BINARY_DIR}/tools/run_python.bat ${CMAKE_BINARY_DIR}/tools/mkhtml.py) + + set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html") + set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html") + set(html_file_gui "${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html") + ADD_CUSTOM_COMMAND(TARGET py_g_gui_${targ_name} POST_BUILD + COMMAND ${tmp_html_cmd} > ${html_file_tmp} + COMMAND ${mkhtml_cmd} ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} + COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} + COMMAND ${mkhtml_cmd} ${gui_module_name} ${html_file} > ${html_file_gui} + ) + + endif() + + #add_custom_target(py_compile_all_${targ_name} + #COMMAND ${PYTHON_EXECUTABLBE} -m compileall ${CMAKE_BINARY_DIR}/${dest_dir} + #COMMAND ${PYTHON_EXECUTABLBE} -m compileall ${CMAKE_BINARY_DIR}/scripts + + install(FILES ${py_files} DESTINATION ${dest_dir}) + install(FILES ${img_files} DESTINATION docs/html) + + #set(last_depends_file) + #foreach(py_file ${py_files}) + # get_filename_component(py_file_NAME ${py_file} NAME) +# set(output_path ${CMAKE_BINARY_DIR}/${dest_dir}) +# set(copied_file_path ${output_path}/${py_file_NAME}) + #add_custom_command(OUTPUT ${copied_file_path} +# COMMAND ${CMAKE_COMMAND} -E copy ${py_file} ${output_path} + #DEPENDS g.parser + #COMMENT "Copied ${copied_file_path}" + #VERBATIM) + #set(last_depends_file "${copied_file_path}c") + #add_custom_command( + # OUTPUT ${last_depends_file} +# COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} +# DEPENDS ${copied_file_path} +# COMMENT "Generating ${last_depends_file}" + #VERBATIM) + + + + + + #install(FILES ${py_file} DESTINATION ${dest_dir}) + + + #copy_python_file(${py_file} ${dest_dir}/${module_name}) + #list(APPEND pyc_depends ${output_pyc_file}) + #endforeach() + + #string(REPLACE "/" "_" targ_name ${dest_dir}) + #add_custom_target(py_${module} DEPENDS ${pyc_depends}) + + #file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg) + #foreach(img_file ${img_files}) +# get_filename_component(img_file_NAME ${img_file} NAME) +# set(copied_file_path ${CMAKE_BINARY_DIR}/docs/html/${img_file_NAME}) + #add_custom_command(OUTPUT ${copied_file_path} + #COMMAND ${CMAKE_COMMAND} -E copy ${img_file} ${CMAKE_BINARY_DIR}/docs/html + #DEPENDS ${last_depends_file} + #COMMENT "Copied ${copied_file_path}" + #VERBATIM) + # install(FILES ${img_file} DESTINATION ${dest_dir}) + #endforeach() + + endfunction() + + + + + + + +add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} + ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html + COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html + DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html + COMMENT "Generating docs/html/${gui_module_name}.html" + VERBATIM) + + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html + COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} + ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html + COMMENT "Generating docs/html/wxGUI.${module_name}.html" + VERBATIM) diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 1f8ab4d1608..7833811c782 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -10,7 +10,7 @@ build_program_in_subdir(g.mapset DEPENDS grass_gis ) build_program_in_subdir(g.mapsets DEPENDS grass_gis ) build_program_in_subdir(g.message DEPENDS grass_gis ) build_program_in_subdir(g.mkfontcap DEPENDS grass_gis FREETYPE ) -build_program_in_subdir(g.parser DEPENDS grass_gis FREETYPE NO_HTML_DESCR "TRUE") +build_program_in_subdir(g.parser NO_HTML_DESCRIPTION DEPENDS grass_gis FREETYPE) build_program_in_subdir(g.pnmcomp DEPENDS grass_gis ) build_program_in_subdir(g.ppmtopng DEPENDS grass_gis LIBPNG) build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj GDAL ) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 465b384c2db..cbda9eed0fb 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -1,66 +1,4 @@ - -include(copy_python_file) -function(build_gui_module_in_dir module_name) - -file(GLOB py_files ${module_name}/*.py) -file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg ) - -set(g_gui_found FALSE) -foreach(py_file ${py_files}) -if(py_file MATCHES "g.gui.*") -set(g_gui_found TRUE) -copy_python_file(${py_file} scripts) -endif() -copy_python_file(${py_file} gui/wxpython/${module_name}) -endforeach() - -foreach(img_file ${img_files}) -file(COPY ${img_file} DESTINATION ${CMAKE_BINARY_DIR}/docs/html/) -endforeach() -if(g_gui_found) -if(WIN32) -set(python_script "g.gui.${module_name}.py") -else() -set(python_script "g.gui.${module_name}") -endif() -set(gui_module_name "g.gui.${module_name}") - -set(html_file_path ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/g.gui.${module_name}.html ) -#message(FATAL_ERROR "html_file_path=${html_file_path}") -add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat - ${CMAKE_BINARY_DIR}/scripts/${python_script} - --html-description > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html - DEPENDS ${CMAKE_BINARY_DIR}/scripts/${python_script} - COMMENT "Generating ${gui_module_name}.tmp.html" - VERBATIM) - - -add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat - ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} - ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html - COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html - DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html - COMMENT "Generating docs/html/${gui_module_name}.html" - VERBATIM) - - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat - ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} - ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html - COMMENT "Generating docs/html/wxGUI.${module_name}.html" - VERBATIM) - - add_custom_target(g_gui_${module_name}_docs ALL - DEPENDS - ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html - ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html) - - set_target_properties (g_gui_${module_name}_docs PROPERTIES FOLDER docs) -endif() #g_gui_found -endfunction() #missing docs set(gui_sub_dirs animation core datacatalog dbmgr gcp gmodeler gui_core iclass icons image2target iscatt lmgr location_wizard mapdisp mapswipe mapwin modules nviz @@ -68,7 +6,7 @@ photo2image psmap rdigit rlisetup startup timeline tools tplot vdigit vnet web_services wxplot) foreach(gui_sub_dir ${gui_sub_dirs}) - build_gui_module_in_dir(${gui_sub_dir}) + build_pymodule_in_subdir(${gui_sub_dir} gui/wxpython) endforeach() copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py gui/wxpython) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 0c7066e1222..2fa048ed19e 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -1,111 +1,24 @@ include(build_pymodule_in_subdir) -build_pymodule_in_subdir(exceptions) +build_pymodule_in_subdir(exceptions etc/python/grass) -if(WIN32) - set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}") -else() - set(LD_LIBRARY_PATH_VAR "$ENV{PATH}") -endif() +build_pymodule_in_subdir(script etc/python/grass) configure_file(script/setup.py - ${CMAKE_BINARY_DIR}/lib/python/script/setup.py + ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py COPYONLY) -build_pymodule_in_subdir(script - core.py - db.py - raster.py - raster3d.py - vector.py - array.py - ${CMAKE_BINARY_DIR}/lib/python/script/setup.py - task.py - utils.py) - add_subdirectory(ctypes) - build_pymodule_in_subdir(temporal - base.py - core.py - abstract_dataset.py - abstract_map_dataset.py - abstract_space_time_dataset.py - space_time_datasets.py - open_stds.py - factory.py - gui_support.py - list_stds.py - register.py - sampling.py - metadata.py - spatial_extent.py - temporal_extent.py - datetime_math.py - temporal_granularity.py - spatio_temporal_relationships.py - unit_tests.py - aggregation.py - stds_export.py - stds_import.py - extract.py - mapcalc.py - univar_statistics.py - temporal_topology_dataset_connector.py - spatial_topology_dataset_connector.py - c_libraries_interface.py - temporal_algebra.py - temporal_vector_algebra.py - temporal_raster_base_algebra.py - temporal_raster_algebra.py - temporal_raster3d_algebra.py - temporal_operator.py) - - - build_pymodule_in_subdir(pygrass - errors.py utils.py orderdict.py) - - build_pymodule_in_subdir(pygrass/messages) - - build_pymodule_in_subdir(pygrass/modules shortcuts.py) - - build_pymodule_in_subdir(pygrass/modules/interface - docstring.py read.py typedict.py flag.py - parameter.py module.py env.py) - - build_pymodule_in_subdir(pygrass/modules/grid - split.py patch.py grid.py) - - build_pymodule_in_subdir(pygrass/raster - abstract.py buffer.py category.py - history.py raster_type.py rowio.py segment.py) - - build_pymodule_in_subdir(pygrass/vector - abstract.py basic.py find.py geometry.py - sql.py table.py vector_type.py) - - build_pymodule_in_subdir(pygrass/gis - region.py) - - build_pymodule_in_subdir(pygrass/shell - conversion.py show.py) + build_pymodule_in_subdir(temporal etc/python/grass) - build_pymodule_in_subdir(pygrass/tests - benchmark.py set_mapset.py) + add_subdirectory(pygrass) - build_pymodule_in_subdir(pygrass/rpc base.py) - - build_pymodule_in_subdir(pydispatch - dispatcher.py errors.py robustapply.py - robust.py saferef.py signal.py) + build_pymodule_in_subdir(pydispatch etc/python/grass) - build_pymodule_in_subdir(imaging - images2avi.py images2gif.py - images2ims.py images2swf.py) + build_pymodule_in_subdir(imaging etc/python/grass) - build_pymodule_in_subdir(gunittest - case.py gmodules.py loader.py - runner.py checkers.py gutils.py - invoker.py main.py reporters.py utils.py) + build_pymodule_in_subdir(gunittest etc/python/grass) -install(FILES __init__.py DESTINATION etc/python/grass) +file(INSTALL __init__.py DESTINATION ${CMAKE_BINARY_DIR}/etc/python) +install(FILES __init__.py DESTINATION etc/python) diff --git a/lib/python/pygrass/CMakeLists.txt b/lib/python/pygrass/CMakeLists.txt new file mode 100644 index 00000000000..b00b192958c --- /dev/null +++ b/lib/python/pygrass/CMakeLists.txt @@ -0,0 +1,23 @@ + copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/errors.py etc/python/grass/pygrass) + copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/utils.py etc/python/grass/pygrass) + copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/orderdict.py etc/python/grass/pygrass) + + build_pymodule_in_subdir(messages etc/python/grass/pygrass) + + build_pymodule_in_subdir(modules etc/python/grass/pygrass) + + build_pymodule_in_subdir(modules/interface etc/python/grass/pygrass/modules) + + build_pymodule_in_subdir(modules/grid etc/python/grass/pygrass/modules) + + build_pymodule_in_subdir(raster etc/python/grass/pygrass) + + build_pymodule_in_subdir(vector etc/python/grass/pygrass) + + build_pymodule_in_subdir(gis etc/python/grass/pygrass) + + build_pymodule_in_subdir(shell etc/python/grass/pygrass) + + build_pymodule_in_subdir(tests etc/python/grass/pygrass) + + build_pymodule_in_subdir(rpc etc/python/grass/pygrass) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index aa4e975a86c..8fc0a43f936 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -155,19 +155,7 @@ if(MSVC) set_property(TARGET PCRE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PCRE_INCLUDE_DIR} ) endif() -#find_package (PythonLibs REQUIRED ) - -set(Python_ADDITIONAL_VERSIONS 3.5 3.6) #2.7 2.6 2.5) +# find_package (PythonLibs REQUIRED ) +set(Python_ADDITIONAL_VERSIONS 3.5 3.6) find_package (PythonInterp REQUIRED ) -#find_package ( Numpy ) - -# if (PYTHON_VERSION_MAJOR GREATER 2 ) -# message(FATAL_ERROR "cannot use python 3 or higher") -# endif() - - - - - - - +# find_package ( Numpy ) From 22611e2ff2c5792e9715880b4e85446054939555 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 17:53:48 +0100 Subject: [PATCH 145/264] update mkhtml.py for cmake --- tools/CMakeLists.txt | 5 +++-- tools/mkhtml.py | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 922a83138c6..ba84800549d 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,7 +1,8 @@ copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py tools) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.html2man.py tools) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.ghtml.py tools) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.ggroff.py tools) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/ghtml.py tools) +copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/ggroff.py tools) set(current_time_s_ms_SRCS "timer/main.c") if(MSVC) diff --git a/tools/mkhtml.py b/tools/mkhtml.py index 778cd77bc81..4eb128d0379 100644 --- a/tools/mkhtml.py +++ b/tools/mkhtml.py @@ -69,16 +69,14 @@ def decode(bytes_): # check for a strange case where autoconf sends two arguments pgm = sys.argv[1] if len(sys.argv) > 2: - src_file = sys.argv[2] - if not os.path.isfile(src_file): - src_file = "%s.html" % pgm - tmp_file = src_file.replace(".html", '.tmp.html') + src_file = sys.argv[2] if os.path.isfile(sys.argv[2]) else "%s.html" % pgm + tmp_file = sys.argv[3] if os.path.isfile(sys.argv[2]) else "%s.tmp.html" % pgm if src_file is None: src_file = "%s.html" % pgm tmp_file = "%s.tmp.html" % pgm - +#print('src_file', src_file) trunk_url = "https://github.com/OSGeo/grass/tree/master/" addons_url = "https://github.com/OSGeo/grass-addons/tree/master/" From 062bc86c36eb604b7b60bde9bd462c7eed938723 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 17:54:18 +0100 Subject: [PATCH 146/264] copy header to binary directory using add_custom_command --- include/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index a6794ac0e1f..68affc59e8c 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -213,19 +213,24 @@ if(WITH_OPENGL) set(OPENGL_X11 1) endif() endif() -#message(STATUS "Copying headers to ${CMAKE_BINARY_DIR}/include/grass/") - -execute_process(COMMAND ${CMAKE_COMMAND} - -E make_directory - ${CMAKE_BINARY_DIR}/include/grass/) file(GLOB_RECURSE SRCHS "*.h") + set(include_depends) foreach(srch ${SRCHS}) get_filename_component(srch_PATH ${srch} PATH) + get_filename_component(srch_NAME ${srch} NAME) STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" dsth_PATH "${srch_PATH}") - file(COPY ${srch} DESTINATION ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}) + set(output_dir ${CMAKE_BINARY_DIR}/include/xgrass${dsth_PATH}) + add_custom_command( + OUTPUT ${output_dir}/${srch_NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${srch} ${output_dir} + COMMENT "Copy ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}" + ) + list(APPEND include_depends ${output_dir}/${srch_NAME} ) endforeach() +add_custom_target(copy_header DEPENDS ${include_depends} COMMENT "${CMAKE_BINARY_DIR}/include/grass") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") From 3bf55ef79411897be0a78aeb743a5284fbcdf5e5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 17:55:00 +0100 Subject: [PATCH 147/264] install extra files in lib/gis using post_build --- lib/gis/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 7ef9d3e637f..110e4e6adea 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -40,6 +40,27 @@ build_module(NAME grass_gis SOURCES "${gislib_SRCS}" OPTIONAL_DEPENDS PTHREAD BZIP2 ICONV DEFS "${grass_gis_DEFS}" ) + +add_custom_command(TARGET grass_gis POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/etc/proj + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/colors ${CMAKE_BINARY_DIR}/etc/colors/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ellipse.table ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/datum.table ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/datumtransform.table ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/FIPS.code ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/state27 ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/state83 ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/projections ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ellipse.table.solar.system ${CMAKE_BINARY_DIR}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/colors.desc ${CMAKE_BINARY_DIR}/etc/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/renamed_options ${CMAKE_BINARY_DIR}/etc/ + ) + install(DIRECTORY colors DESTINATION etc/colors) + install(FILES ellipse.table ellipse.table.solar.system + datum.table datumtransform.table + FIPS.code state27 state83 projections DESTINATION etc/proj) + install(FILES colors.desc renamed_options DESTINATION etc) + if(UNIX) target_link_libraries(grass_gis LIBM) endif() From 35b5d74571e26e3740b406e8e5111f8a8d705a6b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 18:01:27 +0100 Subject: [PATCH 148/264] add copy_header as depdendency to grass_datetime --- lib/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index ca956e95c05..e02daf9602d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -5,6 +5,7 @@ if(MSVC) endif() build_library_in_subdir(datetime) +add_dependencies(grass_datetime copy_header) add_subdirectory(gis) @@ -121,12 +122,10 @@ build_library_in_subdir(raster3d DEPENDS grass_raster) build_program_in_subdir(raster3d/test NAME test.raster3d.lib - DEPENDS grass_gis grass_raster3d grass_raster -) + DEPENDS grass_gis grass_raster3d grass_raster) build_library_in_subdir(gpde HEADERS "N_*.h" - DEPENDS grass_gis grass_raster3d grass_gmath - ) + DEPENDS grass_gis grass_raster3d grass_gmath) build_library_in_subdir(dspf DEPENDS grass_gis) From 773996d55168fb6be5594e9b6899c00e2128ad97 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 18:03:55 +0100 Subject: [PATCH 149/264] first install tools directory --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f35eb46586..e87e51e72a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) endif() include(update_per_group_target) +include(copy_python_file) include(build_module) include(build_program) include(build_program_in_subdir) @@ -108,6 +109,7 @@ endif() include_directories("${CMAKE_BINARY_DIR}/include") add_subdirectory(lib) +add_subdirectory(tools) set(ALL_SUBDIRS general @@ -120,7 +122,6 @@ set(ALL_SUBDIRS scripts vector temporal - tools # ps # locale ) From 7b9811b5fd637dc9be8e112430aa017802807c02 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 18:04:40 +0100 Subject: [PATCH 150/264] find cairo debug and then release libs --- cmake/find_scripts/FindCairo.cmake | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cmake/find_scripts/FindCairo.cmake b/cmake/find_scripts/FindCairo.cmake index 51ea0b293e8..2212b220de8 100644 --- a/cmake/find_scripts/FindCairo.cmake +++ b/cmake/find_scripts/FindCairo.cmake @@ -38,12 +38,26 @@ FIND_PATH(CAIRO_INCLUDE_DIRS PATH_SUFFIXES cairo ) -FIND_LIBRARY(CAIRO_LIBRARIES +FIND_LIBRARY(CAIRO_LIBRARY_RELEASE NAMES cairo HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS} ) +FIND_LIBRARY(CAIRO_LIBRARY_DEBUG + NAMES cairod + HINTS ${PC_CAIRO_LIBDIR} + ${PC_CAIRO_LIBRARY_DIRS} +) + +set(GDAL_LIBRARY) +if(CAIRO_LIBRARY_DEBUG) + set( CAIRO_LIBRARY ${CAIRO_LIBRARY_DEBUG}) +elseif(CAIRO_LIBRARY_RELEASE) + set( CAIRO_LIBRARY ${CAIRO_LIBRARY_RELEASE}) +endif() + + IF (CAIRO_INCLUDE_DIRS) IF (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h") FILE(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT) @@ -88,7 +102,7 @@ endif() find_library(FONTCONFIG_LIBRARY NAMES fontconfig) if(FONTCONFIG_LIBRARY) - set(CAIRO_LIBRARIES ${CAIRO_LIBRARIES} ${FONTCONFIG_LIBRARY} ) + set(CAIRO_LIBRARIES ${CAIRO_LIBRARY} ${FONTCONFIG_LIBRARY} ) else() message(STATUS "fontconfig library file was not found. \n I had to unset(CAIRO_LIBRARIES) to make find_package() fail \n ") unset(CAIRO_LIBRARIES CACHE) From 9918ce316e3b1d670babffb23897d5b8ea81f5eb Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 4 Jan 2020 18:08:23 +0100 Subject: [PATCH 151/264] add POST_BUILD target for documentation only if WITH_DOCS --- cmake/modules/build_module.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index d9b121b4a4e..0960ed11e19 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -97,6 +97,8 @@ function(build_module) else() install(TARGETS ${G_NAME} DESTINATION lib) endif() + + if(WITH_DOCS) #TODO glob for *.html file(GLOB html_files "${G_SRCDIR}/*.html") set(html_file "${G_SRCDIR}/${G_NAME}.html") @@ -127,12 +129,8 @@ function(build_module) COMMAND ${img_cmd} ) + endif() # if(EXISTS "${html_file}") + endif() #WITH_DOCS - #set_source_files_properties(${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html PROPERTIES GENERATED TRUE) - #add_custom_target(${G_NAME}_doc ALL - # COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html - # - # set_target_properties (${G_NAME}_doc PROPERTIES FOLDER docs) - endif() endfunction() From 3511784350f233d7e0423758487a8fde548b5635 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 5 Jan 2020 19:17:36 +0100 Subject: [PATCH 152/264] build gui/wxpython, fix html description generation --- CMakeLists.txt | 23 ++++-- cmake/modules/build_grass_script.cmake | 42 +++++----- cmake/modules/build_module.cmake | 13 +++- cmake/modules/build_pymodule_in_subdir.cmake | 81 ++++---------------- cmake/{run_grass.bat => run_grass.bat.in} | 0 cmake/run_grass.sh.in | 13 ++++ cmake/run_python.bat.in | 14 ++++ cmake/{run_python.bat => run_python.sh.in} | 3 +- cmake/windows_launch.bat.in | 2 + doc/CMakeLists.txt | 0 general/CMakeLists.txt | 4 +- gui/CMakeLists.txt | 46 +++++++++++ lib/gis/CMakeLists.txt | 2 - lib/init/CMakeLists.txt | 3 +- lib/init/grass.bat.in | 5 ++ man/CMakeLists.txt | 5 ++ 16 files changed, 154 insertions(+), 102 deletions(-) rename cmake/{run_grass.bat => run_grass.bat.in} (100%) create mode 100644 cmake/run_grass.sh.in create mode 100644 cmake/run_python.bat.in rename cmake/{run_python.bat => run_python.sh.in} (76%) create mode 100644 cmake/windows_launch.bat.in create mode 100644 doc/CMakeLists.txt create mode 100644 man/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index e87e51e72a2..3187437af6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ option(WITH_BLAS "enable blas support" ON) option(WITH_LAPACK "enable lapack support" ON) option(WITH_PYTHON "Build python bindings" OFF) option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) -option(WITH_DOCS "Build documentation" OFF) +option(WITH_DOCS "Build documentation" ON) if(APPLE) if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) @@ -68,8 +68,19 @@ set(GRASS_VERSION_UPDATE_PKG "0.2") set(VERSION_DATE 2019) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) -configure_file(cmake/run_python.bat ${CMAKE_BINARY_DIR}/tools/run_python.bat @ONLY) -configure_file(cmake/run_grass.bat ${CMAKE_BINARY_DIR}/tools/run_grass.bat @ONLY) +file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) +if(WIN32) +set(SCRIPT_EXT ".bat") +set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.bat) +set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.bat) +else() +set(SCRIPT_EXT ".sh") +set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.sh) +set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.sh) +endif() +configure_file(cmake/run_python${SCRIPT_EXT}.in ${RUN_PYTHON} @ONLY) +configure_file(ccmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) + include(set_compiler_flags) set_compiler_flags() @@ -77,6 +88,8 @@ set_compiler_flags() include(repo_status) repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) + + # Setup build locations. if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -136,9 +149,7 @@ endif() if(WITH_DOCS) add_subdirectory(doc) - if(NOT MSVC) - add_subdirectory(man) - endif() + add_subdirectory(man) endif() # WITH_DOCS # TODO: To be discussed diff --git a/cmake/modules/build_grass_script.cmake b/cmake/modules/build_grass_script.cmake index b1c3e35f7b8..fafe7d94afb 100644 --- a/cmake/modules/build_grass_script.cmake +++ b/cmake/modules/build_grass_script.cmake @@ -17,17 +17,11 @@ function(build_grass_script) message(FATAL_ERROR "[ ${G_NAME} ]: SRC_FILES empty ") endif() +if(WIN32) + file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} script_install_dir) -# message(FATAL_ERROR "ETCPYFILES=${ETCPYFILES}") -#install(FILES ${ETCPYCFILES} DESTINATION etc) - -if(MINGW) - #PGM script_name - # $(BIN)/$(PGM).bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat - # sed -e "s#SCRIPT_NAME#$(PGM)#" -e "s#SCRIPT_DIR#$(SCRIPT_DIR)#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@ - # unix2dos $@ configure_file( - ${CMAKE_SOURCE_DIR}/scripts/windows_launch.bat + ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat ) install( PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin ) @@ -54,25 +48,33 @@ foreach(pyfile ${SRC_FILES}) ) add_custom_target(${pyfile_NAME} ALL + COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} ${CMAKE_BINARY_DIR}/scripts DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp) set_target_properties (${pyfile_NAME} PROPERTIES FOLDER scripts) - # add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" - # COMMAND ${CMAKE_COMMAND} - # -DINPUT_FILE=${pyfile} - # -DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} - # -DBIN_DIR=${CMAKE_BINARY_DIR} - # -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake - # DEPENDS g.parser - # COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" - # ) + add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" + COMMAND ${CMAKE_COMMAND} + -DINPUT_FILE=${pyfile} + -DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + DEPENDS g.parser + COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" + ) -# set_source_files_properties("${${pyfile_NAME}_OUTPUT_FILE}" GENERATED) + set_source_files_properties("${${pyfile_NAME}_OUTPUT_FILE}" GENERATED) foreach(G_DEPEND ${G_DEPENDS}) add_dependencies(${G_DEPEND}) endforeach() - + + get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) +if(MSVC) + set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST} ${G_NAME}.bat") + else() + set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST} ${G_NAME}") + endif() + install(FILES ${pyfile} RENAME ${pyfile_NAME} DESTINATION scripts) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 0960ed11e19..796968e5f33 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -38,6 +38,13 @@ function(build_module) endif() if(G_EXE) + #set(MODULE_LIST "${MODULE_LIST} ${G_NAME}") + #list(APPEND MODULE_LIST ${G_NAME}) + #SET(MODULE_LIST "${MODULE_LIST} ${G_NAME}" CACHE INTERNAL "source_list") + get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) + set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST} ${G_NAME}") + +#message(FATAL_ERROR "EXCLUDED_MODULE_LIST=${EXCLUDED_MODULE_LIST}") add_executable(${G_NAME} ${${G_NAME}_SRCS}) set_target_properties (${G_NAME} PROPERTIES FOLDER bin) else() @@ -115,9 +122,9 @@ function(build_module) if(${G_NO_HTML_DESCRIPTION}) set(tmp_html_cmd ${CMAKE_COMMAND} -E echo "") else() - set(tmp_html_cmd ${CMAKE_BINARY_DIR}/tools/run_grass.bat ${G_NAME} --html-description) + set(tmp_html_cmd ${RUN_GRASS} ${G_NAME} --html-description) endif() - set(mkhtml_cmd ${CMAKE_BINARY_DIR}/tools/run_python.bat ${CMAKE_BINARY_DIR}/tools/mkhtml.py) + set(mkhtml_cmd ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py) set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html") set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html") @@ -128,7 +135,7 @@ function(build_module) COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} COMMAND ${img_cmd} ) - + install(FILES ${html_file_out} docs/html) endif() # if(EXISTS "${html_file}") endif() #WITH_DOCS diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 81294bdef31..1fbc9d13b84 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -12,7 +12,7 @@ function(build_pymodule_in_subdir module_name dest_dir) set(g_gui_found FALSE) file(GLOB g_gui_files ${module_name}/g.gui.*.py) - add_custom_target(py_${targ_name} + add_custom_target(py_${targ_name} ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} COMMAND ${CMAKE_COMMAND} -E copy ${py_files} ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} @@ -21,32 +21,33 @@ function(build_pymodule_in_subdir module_name dest_dir) set_target_properties (py_${targ_name} PROPERTIES FOLDER ${dest_dir}) if(img_files) add_custom_target(docs_images_${targ_name} - COMMAND ${CMAKE_COMMAND} -E copy ${img_files} ${CMAKE_BINARY_DIR}/docs/html) + COMMAND ${CMAKE_COMMAND} -E copy ${img_files} ${CMAKE_BINARY_DIR}/docs/html + DEPENDS py_${targ_name}) set_target_properties (docs_images_${targ_name} PROPERTIES FOLDER docs) endif() if(g_gui_files) - add_custom_target(py_g_gui_${targ_name} + add_custom_target(py_g_gui_${targ_name} ALL COMMAND ${CMAKE_COMMAND} -E copy ${g_gui_files} ${CMAKE_BINARY_DIR}/scripts COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/scripts + DEPENDS py_${targ_name} ) set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) install(FILES ${py_files} DESTINATION scripts) if(WIN32) -set(python_script "g.gui.${module_name}.py") +set(python_script "${CMAKE_BINARY_DIR}/scripts/g.gui.${module_name}.py") else() -set(python_script "g.gui.${module_name}") +set(python_script "${CMAKE_BINARY_DIR}/scripts/g.gui.${module_name}") endif() set(gui_module_name "g.gui.${module_name}") - - set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${gui_module_name}.html ) #message(FATAL_ERROR "html_file_path=${html_file_path}") - set(tmp_html_cmd ${CMAKE_BINARY_DIR}/tools/run_grass.bat ${python_script} --html-description) - set(mkhtml_cmd ${CMAKE_BINARY_DIR}/tools/run_python.bat ${CMAKE_BINARY_DIR}/tools/mkhtml.py) + + set(tmp_html_cmd ${RUN_PYTHON} ${python_script} --html-description) + set(mkhtml_cmd ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py) set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html") set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html") @@ -55,74 +56,20 @@ set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${gui_module_name}.html COMMAND ${tmp_html_cmd} > ${html_file_tmp} COMMAND ${mkhtml_cmd} ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} - COMMAND ${mkhtml_cmd} ${gui_module_name} ${html_file} > ${html_file_gui} + COMMAND ${mkhtml_cmd} ${gui_module_name} ${html_file} ${html_file_tmp} > ${html_file_gui} + DEPENDS py_g_gui_${targ_name} ) endif() - #add_custom_target(py_compile_all_${targ_name} - #COMMAND ${PYTHON_EXECUTABLBE} -m compileall ${CMAKE_BINARY_DIR}/${dest_dir} - #COMMAND ${PYTHON_EXECUTABLBE} -m compileall ${CMAKE_BINARY_DIR}/scripts - install(FILES ${py_files} DESTINATION ${dest_dir}) install(FILES ${img_files} DESTINATION docs/html) - #set(last_depends_file) - #foreach(py_file ${py_files}) - # get_filename_component(py_file_NAME ${py_file} NAME) -# set(output_path ${CMAKE_BINARY_DIR}/${dest_dir}) -# set(copied_file_path ${output_path}/${py_file_NAME}) - #add_custom_command(OUTPUT ${copied_file_path} -# COMMAND ${CMAKE_COMMAND} -E copy ${py_file} ${output_path} - #DEPENDS g.parser - #COMMENT "Copied ${copied_file_path}" - #VERBATIM) - #set(last_depends_file "${copied_file_path}c") - #add_custom_command( - # OUTPUT ${last_depends_file} -# COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} -# DEPENDS ${copied_file_path} -# COMMENT "Generating ${last_depends_file}" - #VERBATIM) - - - - - - #install(FILES ${py_file} DESTINATION ${dest_dir}) - - - #copy_python_file(${py_file} ${dest_dir}/${module_name}) - #list(APPEND pyc_depends ${output_pyc_file}) - #endforeach() - - #string(REPLACE "/" "_" targ_name ${dest_dir}) - #add_custom_target(py_${module} DEPENDS ${pyc_depends}) - - #file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg) - #foreach(img_file ${img_files}) -# get_filename_component(img_file_NAME ${img_file} NAME) -# set(copied_file_path ${CMAKE_BINARY_DIR}/docs/html/${img_file_NAME}) - #add_custom_command(OUTPUT ${copied_file_path} - #COMMAND ${CMAKE_COMMAND} -E copy ${img_file} ${CMAKE_BINARY_DIR}/docs/html - #DEPENDS ${last_depends_file} - #COMMENT "Copied ${copied_file_path}" - #VERBATIM) - # install(FILES ${img_file} DESTINATION ${dest_dir}) - #endforeach() - - - endfunction() - - - - - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html @@ -131,7 +78,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html VERBATIM) add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html - COMMAND ${CMAKE_BINARY_DIR}/tools/run_python.bat + COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html COMMENT "Generating docs/html/wxGUI.${module_name}.html" diff --git a/cmake/run_grass.bat b/cmake/run_grass.bat.in similarity index 100% rename from cmake/run_grass.bat rename to cmake/run_grass.bat.in diff --git a/cmake/run_grass.sh.in b/cmake/run_grass.sh.in new file mode 100644 index 00000000000..0b72572e66f --- /dev/null +++ b/cmake/run_grass.sh.in @@ -0,0 +1,13 @@ +#!/bin/sh +export MODULE_TOPDIR=@module_top_dir@ +export GISBASE=@bin_dir@ +export GISRC=@bin_dir@/etc/config/rc +export PATH=@bin_dir@/bin:@bin_dir@/scripts:$PATH +export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH +export LC_ALL=C +export LANG=C +export LANGUAGE=C +export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ +export VERSION_DATE=@VERSION_DATE@ +"$@" + diff --git a/cmake/run_python.bat.in b/cmake/run_python.bat.in new file mode 100644 index 00000000000..1b977dd326b --- /dev/null +++ b/cmake/run_python.bat.in @@ -0,0 +1,14 @@ +#!/bin/sh +export MODULE_TOPDIR=@module_top_dir@ +export GISBASE=@bin_dir@ +export GISRC=@bin_dir@/etc/config/rc +export PATH=@bin_dir@/bin:@bin_dir@/scripts:$PATH +export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH +export PYTHONPATH=@bin_dir@/etc/python:@bin_dir@/gui/wxpython:$PYTHONPATH +export LC_ALL=C +export LANG=C +export LANGUAGE=C +export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ +export VERSION_DATE=@VERSION_DATE@ +"@GRASS_PYTHON@" "$@" + diff --git a/cmake/run_python.bat b/cmake/run_python.sh.in similarity index 76% rename from cmake/run_python.bat rename to cmake/run_python.sh.in index 3ac625474f1..d87a0abd4f2 100644 --- a/cmake/run_python.bat +++ b/cmake/run_python.sh.in @@ -3,11 +3,12 @@ set MODULE_TOPDIR=@module_top_dir@ set GISBASE=@bin_dir@ set GISRC=@bin_dir@\etc\config\rc set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% +set "PATH=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64;%PATH%" set PYTHONPATH=@bin_dir@\etc\python;@bin_dir@\gui\wxpython;%PYTHONPATH% set LC_ALL=C set LANG=C set LANGUAGE=C set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ set VERSION_DATE=@VERSION_DATE@ -"@PYTHON_EXECUTABLE@" %* +"@GRASS_PYTHON@" %* diff --git a/cmake/windows_launch.bat.in b/cmake/windows_launch.bat.in new file mode 100644 index 00000000000..06b70ebf655 --- /dev/null +++ b/cmake/windows_launch.bat.in @@ -0,0 +1,2 @@ +@echo off +"@GRASS_PYTHON@" "@script_install_dir@\scripts\@G_NAME@.py" %* diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 7833811c782..2fd0500644f 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -40,5 +40,5 @@ build_program_in_subdir(g.list DEPENDS grass_manage) add_dependencies(g.list cell vector) build_program_in_subdir(g.remove DEPENDS grass_manage grass_raster) -# TODO: MODULES DISABLED -# g.gui + +build_program_in_subdir(g.gui DEPENDS grass_raster) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 7253513642a..bc9b5c8e3b9 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -6,3 +6,49 @@ add_subdirectory(images) add_subdirectory(wxpython) install(FILES xml/grass-interface.dtd DESTINATION gui/xml) +get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) +separate_arguments(MODULE_LIST) +set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") +list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) +list(REMOVE_DUPLICATES MODULE_LIST ) +#message(FATAL_ERROR "MODULE_LIST=${MODULE_LIST}") + add_custom_target(copy_build_module_xml + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${CMAKE_CURRENT_BINARY_DIR}/tools/build_modules_xml.py) + + add_custom_target(build_modulesitems_xml + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/tools/build_modules_xml.py ${MODULE_LIST} > ${CMAKE_BINARY_DIR}/gui/wxpython/xml/module_items.xml + DEPENDS copy_build_module_xml) + + add_custom_target(build_xml_menudata + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml + DEPENDS build_modulesitems_xml) + + add_custom_target(build_module_tree_menudata + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py "module_tree" > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml + DEPENDS build_xml_menudata) + + add_custom_target(build_menustrings ALL + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/menutree.py "manager" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/menutree.py "psmap" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + DEPENDS build_module_tree_menudata) + + + #install after validate ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml/module_tree_menudata.xml + #python3 core/menutree.py "" >> menustrings.py + #python3 core/menutree.py "module_tree" >> menustrings.py + #python3 core/menutree.py "" >> menustrings.py diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 110e4e6adea..16057ea2cb2 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -28,8 +28,6 @@ if(MINGW) list(APPEND gislib_SRCS "fmode.c") endif() -set(GRASS_VERSION_DATE 20160402) - set(grass_gis_DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}") if(MSVC) set(grass_gis_DEFS "${grass_gis_DEFS};-D_USE_MATH_DEFINES=1") diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index e42ece6421d..d9decc6e004 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -53,7 +53,8 @@ file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) # For build tree file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) -set(GISBASE ${CMAKE_BINARY_DIR}) + +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISBASE) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl "${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) diff --git a/lib/init/grass.bat.in b/lib/init/grass.bat.in index d7c2eb5d588..47e1094d1e1 100644 --- a/lib/init/grass.bat.in +++ b/lib/init/grass.bat.in @@ -13,6 +13,11 @@ set GEOTIFF_CSV=@GEOTIFF_CSV@ set PATH=@DLL_PATH_LIST@;%PATH% +GISBASE=@GISBASE@ + +set PYTHONPATH=@GISBASE@\etc\python;=@GISBASE@\gui\wxpython; + + set GRASS_PYTHON=@GRASS_PYTHON@ set GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@ diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt new file mode 100644 index 00000000000..5eaf13287f9 --- /dev/null +++ b/man/CMakeLists.txt @@ -0,0 +1,5 @@ + +set(data_files grassdocs.css grass_logo.png grass_icon.png jquery.fixedheadertable.min.js parser_standard_options.js parser_standard_options.css) + +file(COPY ${data_files} DESTINATON docs/html) +install(FILES ${data_files} docs/html) From 1016dc6cb88fce015981a9c7afe1c81337b8c6aa Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 5 Jan 2020 19:18:08 +0100 Subject: [PATCH 153/264] MSVC: uninitialized variable --- lib/gis/parser_interface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/gis/parser_interface.c b/lib/gis/parser_interface.c index bab6a794303..b2edaf48e5e 100644 --- a/lib/gis/parser_interface.c +++ b/lib/gis/parser_interface.c @@ -107,16 +107,17 @@ void G__usage_xml(void) char *type; char *s, *top; int i; - const char *encoding; + const char *encoding = ""; int new_prompt = 0; new_prompt = G__uses_new_gisprompt(); /* gettext converts strings to encoding returned by nl_langinfo(CODESET) */ +/* check if local_charset() comes from iconv. If so check for iconv library before using it */ #if defined(HAVE_LANGINFO_H) encoding = nl_langinfo(CODESET); -#elif defined(__MINGW32__) && defined(USE_NLS) +#elif defined(_WIN32) && defined(USE_NLS) encoding = locale_charset(); #endif From 5ea91408fa087fa63738ae434c9b5227b5a504e2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 5 Jan 2020 19:21:09 +0100 Subject: [PATCH 154/264] CMake: update to work with autoconf and cmake --- gui/wxpython/tools/build_modules_xml.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gui/wxpython/tools/build_modules_xml.py b/gui/wxpython/tools/build_modules_xml.py index 3dc63921ee1..f2a3f1697dc 100644 --- a/gui/wxpython/tools/build_modules_xml.py +++ b/gui/wxpython/tools/build_modules_xml.py @@ -48,10 +48,11 @@ def new_translator(string): __builtin__._ = new_translator -def parse_modules(fd): +def parse_modules(fd, mlist=None): """Writes metadata to xml file.""" # TODO: what about ms windows? does gtask handle this? - mlist = list(gcore.get_commands()[0]) + if mlist is None: + mlist = list(gcore.get_commands()[0]) indent = 4 for m in sorted(mlist): # TODO: get rid of g.mapsets_picker.py @@ -89,7 +90,6 @@ def get_module_metadata(name): return task.get_description(full=True), \ task.get_keywords() - def header(fd): fd.write('\n') fd.write('\n') @@ -135,22 +135,23 @@ def module_test(): print(get_module_metadata('t.rast.univar')) -def main(): +def main(module_list=None): fh = sys.stdout header(fh) - parse_modules(fh) + parse_modules(fh, module_list) footer(fh) return 0 if __name__ == "__main__": + mlist = None if len(sys.argv) > 1: if sys.argv[1] == 'doctest': sys.exit(doc_test()) elif sys.argv[1] == 'test': sys.exit(module_test()) else: - gcore.fatal('Unrecognized parameter.') - sys.exit(main()) + mlist = sys.argv[1:] + sys.exit(main(mlist)) From c45ccb5f610f44f3f99313540c2d72bca0f3cf4a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 5 Jan 2020 19:40:06 +0100 Subject: [PATCH 155/264] CMake: install et copy gui/images gui/icons --- CMakeLists.txt | 2 +- cmake/modules/build_grass_script.cmake | 18 +++++++++--------- gui/CMakeLists.txt | 5 +++-- gui/icons/CMakeLists.txt | 25 +++++++++++++++++++++++-- gui/images/CMakeLists.txt | 25 ++++++++++++++++++++----- 5 files changed, 56 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3187437af6b..5d8a5598b2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.sh) set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.sh) endif() configure_file(cmake/run_python${SCRIPT_EXT}.in ${RUN_PYTHON} @ONLY) -configure_file(ccmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) +configure_file(cmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) include(set_compiler_flags) diff --git a/cmake/modules/build_grass_script.cmake b/cmake/modules/build_grass_script.cmake index fafe7d94afb..28dbdce5962 100644 --- a/cmake/modules/build_grass_script.cmake +++ b/cmake/modules/build_grass_script.cmake @@ -52,15 +52,15 @@ foreach(pyfile ${SRC_FILES}) DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp) set_target_properties (${pyfile_NAME} PROPERTIES FOLDER scripts) - add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" - COMMAND ${CMAKE_COMMAND} - -DINPUT_FILE=${pyfile} - -DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake - DEPENDS g.parser - COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" - ) + #add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" + #COMMAND ${CMAKE_COMMAND} + #-DINPUT_FILE=${pyfile} + #-DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} + #-DBIN_DIR=${CMAKE_BINARY_DIR} + #-P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + #DEPENDS g.parser + #COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" + #) set_source_files_properties("${${pyfile_NAME}_OUTPUT_FILE}" GENERATED) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index bc9b5c8e3b9..7738b699714 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -11,10 +11,11 @@ separate_arguments(MODULE_LIST) set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) list(REMOVE_DUPLICATES MODULE_LIST ) -#message(FATAL_ERROR "MODULE_LIST=${MODULE_LIST}") + add_custom_target(copy_build_module_xml COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${CMAKE_CURRENT_BINARY_DIR}/tools/build_modules_xml.py) + ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${CMAKE_CURRENT_BINARY_DIR}/tools/build_modules_xml.py + DEPENDS copy_docs_html_icons copy_gui_symbols) add_custom_target(build_modulesitems_xml COMMAND ${RUN_PYTHON} diff --git a/gui/icons/CMakeLists.txt b/gui/icons/CMakeLists.txt index b2777cf3c8a..6e4e949e9c2 100644 --- a/gui/icons/CMakeLists.txt +++ b/gui/icons/CMakeLists.txt @@ -2,17 +2,38 @@ file(GLOB SRCICO "*.ico" "*.png") file(GLOB SRCICONS "grass/*.png") file(GLOB SRCFLAGS "flags/*.png") +add_custom_target(make_images_dir +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/gui/icons +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/gui/flags +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docs/html/icons +COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols) + +add_custom_target(copy_gui_icons +COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons/ +DEPENDS make_images_dir) + +add_custom_target(copy_gui_icons_grass +COMMAND ${CMAKE_COMMAND} -E copy ${SRCICONS} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons/grass +DEPENDS copy_gui_icons) + +add_custom_target(copy_gui_icons_flags +COMMAND ${CMAKE_COMMAND} -E copy ${SRCFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons/flags +DEPENDS copy_gui_icons_grass) + +add_custom_target(copy_docs_html_icons +COMMAND ${CMAKE_COMMAND} -E copy ${SRCICONS} ${CMAKE_CURRENT_BINARY_DIR}/docs/html/icons +DEPENDS copy_gui_icons_flags) + install(FILES ${SRCICO} DESTINATION gui/icons/) install(FILES ${SRCICONS} DESTINATION gui/icons/grass) install(FILES ${SRCFLAGS} DESTINATION gui/icons/flags) - install(FILES ${SRCICONS} DESTINATION docs/html/icons) install(FILES grass.desktop DESTINATION share/applications) foreach(icon_type 8 16 22 24 32 36 40 42 48 64 72 80 96 128 192) set(icon_size "${icon_type}x${icon_type}") install(FILES grass-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}/apps) - endforeach() install(FILES grass.svg diff --git a/gui/images/CMakeLists.txt b/gui/images/CMakeLists.txt index 2e89c003087..a11f5268021 100644 --- a/gui/images/CMakeLists.txt +++ b/gui/images/CMakeLists.txt @@ -1,8 +1,23 @@ # images file(GLOB png_files "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -install(FILES ${png_files} DESTINATION gui/images/) +install(FILES ${png_files} DESTINATION gui/images ) # symbols -foreach(category "basic" "demo" "extra" "geology" "legend" "n_arrows") - file(GLOB cat_png_files "${CMAKE_CURRENT_SOURCE_DIR}/${category}/*.png") - install(FILES ${cat_png_files} DESTINATION gui/images/symbols/${category}/) -endforeach() +add_custom_target(copy_gui_images +COMMAND ${CMAKE_COMMAND} -E copy ${png_files} ${CMAKE_CURRENT_BINARY_DIR}/gui/images +DEPENDS make_images_dir ) + +add_custom_target(copy_gui_symbols +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/basic ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/demo ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extra ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/geology ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/legend ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/n_arrows ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ +DEPENDS make_images_dir) + +install(DIRECTORY basic DESTINATION gui/images/symbols/) +install(DIRECTORY demo DESTINATION gui/images/symbols/) +install(DIRECTORY extra DESTINATION gui/images/symbols/) +install(DIRECTORY geology DESTINATION gui/images/symbols/) +install(DIRECTORY legend DESTINATION gui/images/symbols/) +install(DIRECTORY n_arrows DESTINATION gui/images/symbols/) From a1764569badaad1ee79402271cf2d4d3ec949de7 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 5 Jan 2020 19:46:46 +0100 Subject: [PATCH 156/264] CMake: fix grass version date --- cmake/modules/get_versions.cmake | 5 +++-- lib/gis/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/modules/get_versions.cmake b/cmake/modules/get_versions.cmake index 3a7912f8b91..28555710875 100644 --- a/cmake/modules/get_versions.cmake +++ b/cmake/modules/get_versions.cmake @@ -14,13 +14,14 @@ endif() list(GET grass_version_strings 0 version_major) list(GET grass_version_strings 1 version_minor) -if(grass_version_file_length GREATER 3 ) +if(grass_version_file_length GREATER 2 ) list(GET grass_version_strings 2 version_release) endif() -if(grass_version_file_length GREATER 4 ) +if(grass_version_file_length GREATER 3 ) list(GET grass_version_strings 3 version_date) endif() + set(${var_major} ${version_major} PARENT_SCOPE) set(${var_minor} ${version_minor} PARENT_SCOPE) set(${var_release} ${version_release} PARENT_SCOPE) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 16057ea2cb2..2a59a980804 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -28,7 +28,7 @@ if(MINGW) list(APPEND gislib_SRCS "fmode.c") endif() -set(grass_gis_DEFS "-DGRASS_VERSION_DATE=${GRASS_VERSION_DATE}") +set(grass_gis_DEFS "-DGRASS_VERSION_DATE=\"${GRASS_VERSION_DATE}\"") if(MSVC) set(grass_gis_DEFS "${grass_gis_DEFS};-D_USE_MATH_DEFINES=1") endif() From b33c47175b845d1747876de4ae29d5e81e3dfd2a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 01:25:58 +0100 Subject: [PATCH 157/264] CMake: fix building gui (python files, docs, html) --- CMakeLists.txt | 1 + cmake/modules/build_grass_script.cmake | 4 +- cmake/modules/build_pymodule_in_subdir.cmake | 94 +++++++++----------- cmake/modules/copy_python_file.cmake | 2 +- cmake/run_python.bat.in | 27 +++--- cmake/run_python.sh.in | 27 +++--- cmake/windows_launch.bat.in | 2 +- gui/CMakeLists.txt | 21 ++++- gui/icons/CMakeLists.txt | 25 +++--- gui/images/CMakeLists.txt | 22 ++--- gui/wxpython/tools/build_modules_xml.py | 4 +- 11 files changed, 115 insertions(+), 114 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d8a5598b2d..e211fd57b8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ set(VERSION_DATE 2019) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) + if(WIN32) set(SCRIPT_EXT ".bat") set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.bat) diff --git a/cmake/modules/build_grass_script.cmake b/cmake/modules/build_grass_script.cmake index 28dbdce5962..8c7af9ba1fe 100644 --- a/cmake/modules/build_grass_script.cmake +++ b/cmake/modules/build_grass_script.cmake @@ -18,7 +18,7 @@ function(build_grass_script) endif() if(WIN32) - file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} script_install_dir) + configure_file( ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in @@ -48,7 +48,7 @@ foreach(pyfile ${SRC_FILES}) ) add_custom_target(${pyfile_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} ${CMAKE_BINARY_DIR}/scripts + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${pyfile} ${CMAKE_BINARY_DIR}/scripts DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp) set_target_properties (${pyfile_NAME} PROPERTIES FOLDER scripts) diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 1fbc9d13b84..ae8afa79cea 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -10,55 +10,66 @@ function(build_pymodule_in_subdir module_name dest_dir) set(targ_name ${targ_prefix}_${target_name} ) set(g_gui_found FALSE) - file(GLOB g_gui_files ${module_name}/g.gui.*.py) + set(G_NAME g.gui.${module_name}) #Important as it is used in windows_launch.bat.in - add_custom_target(py_${targ_name} ALL + set(g_gui_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.py) + + add_custom_target(py_${targ_name} COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} - COMMAND ${CMAKE_COMMAND} -E copy ${py_files} ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_files} ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} DEPENDS g.parser ) set_target_properties (py_${targ_name} PROPERTIES FOLDER ${dest_dir}) if(img_files) - add_custom_target(docs_images_${targ_name} - COMMAND ${CMAKE_COMMAND} -E copy ${img_files} ${CMAKE_BINARY_DIR}/docs/html + add_custom_target(docs_images_${targ_name} ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${img_files} ${CMAKE_BINARY_DIR}/docs/html DEPENDS py_${targ_name}) set_target_properties (docs_images_${targ_name} PROPERTIES FOLDER docs) endif() - if(g_gui_files) - add_custom_target(py_g_gui_${targ_name} ALL - COMMAND ${CMAKE_COMMAND} -E copy ${g_gui_files} ${CMAKE_BINARY_DIR}/scripts - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/scripts - DEPENDS py_${targ_name} - ) - set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) - install(FILES ${py_files} DESTINATION scripts) + if(EXISTS ${g_gui_file}) + if(WIN32) + configure_file(${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat) + install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin) + else() + file(COPY ${g_gui_file} ${CMAKE_BINARY_DIR}/bin/${G_NAME}) + install(PROGRAM ${CMAKE_BINARY_DIR}/bin/${G_NAME} DESTINATION bin) + endif() - if(WIN32) -set(python_script "${CMAKE_BINARY_DIR}/scripts/g.gui.${module_name}.py") -else() -set(python_script "${CMAKE_BINARY_DIR}/scripts/g.gui.${module_name}") -endif() -set(gui_module_name "g.gui.${module_name}") + add_custom_target(py_g_gui_${targ_name} ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${g_gui_file} ${CMAKE_BINARY_DIR}/scripts/ + DEPENDS py_${targ_name}) + set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) + install(FILES ${g_gui_file} DESTINATION scripts) + file(COPY ${g_gui_file} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) -set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${gui_module_name}.html ) -#message(FATAL_ERROR "html_file_path=${html_file_path}") + set(python_script ${CMAKE_BINARY_DIR}/scripts/${G_NAME}.py) + set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.html ) - set(tmp_html_cmd ${RUN_PYTHON} ${python_script} --html-description) - set(mkhtml_cmd ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py) + set(tmp_html_cmd ) + set(mkhtml_cmd ) - set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html") - set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html") - set(html_file_gui "${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html") - ADD_CUSTOM_COMMAND(TARGET py_g_gui_${targ_name} POST_BUILD - COMMAND ${tmp_html_cmd} > ${html_file_tmp} - COMMAND ${mkhtml_cmd} ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} - COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} - COMMAND ${mkhtml_cmd} ${gui_module_name} ${html_file} ${html_file_tmp} > ${html_file_gui} + set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html") + set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html") + set(html_file_gui "${CMAKE_BINARY_DIR}/docs/html/wxGUI.${G_NAME}.html") + + add_custom_target(py_g_gui_${targ_name}_html_descr + COMMAND ${RUN_PYTHON} ${python_script} --html-description > ${html_file_tmp} DEPENDS py_g_gui_${targ_name} - ) + ) + + add_custom_target(py_g_gui_${targ_name}_mkhtml + COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} + COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} + COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} + DEPENDS py_g_gui_${targ_name}_html_descr + ) + + add_custom_target(py_g_gui_${targ_name}_mkhtml_wxgui ALL + COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} + DEPENDS py_g_gui_${targ_name}_mkhtml + ) endif() @@ -66,20 +77,3 @@ set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${gui_module_name}.html install(FILES ${img_files} DESTINATION docs/html) endfunction() - - -add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html - COMMAND ${RUN_PYTHON} - ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} - ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.html - COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html - DEPENDS ${CMAKE_BINARY_DIR}/docs/html/${gui_module_name}.tmp.html - COMMENT "Generating docs/html/${gui_module_name}.html" - VERBATIM) - - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html - COMMAND ${RUN_PYTHON} - ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${gui_module_name} - ${html_file_path} > ${CMAKE_BINARY_DIR}/docs/html/wxGUI.${module_name}.html - COMMENT "Generating docs/html/wxGUI.${module_name}.html" - VERBATIM) diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake index 9acfc29879e..ea9e2bd0931 100644 --- a/cmake/modules/copy_python_file.cmake +++ b/cmake/modules/copy_python_file.cmake @@ -3,7 +3,7 @@ function(copy_python_file py_file install_dest) set(output_path ${CMAKE_BINARY_DIR}/${install_dest}) set(copied_file_path ${output_path}/${py_file_NAME}) add_custom_command(OUTPUT ${copied_file_path} - COMMAND ${CMAKE_COMMAND} -E copy ${py_file} ${output_path} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_file} ${output_path} DEPENDS g.parser COMMENT "Copy ${output_path}/${py_file_NAME}" VERBATIM) diff --git a/cmake/run_python.bat.in b/cmake/run_python.bat.in index 1b977dd326b..bdd473e3ed8 100644 --- a/cmake/run_python.bat.in +++ b/cmake/run_python.bat.in @@ -1,14 +1,13 @@ -#!/bin/sh -export MODULE_TOPDIR=@module_top_dir@ -export GISBASE=@bin_dir@ -export GISRC=@bin_dir@/etc/config/rc -export PATH=@bin_dir@/bin:@bin_dir@/scripts:$PATH -export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH -export PYTHONPATH=@bin_dir@/etc/python:@bin_dir@/gui/wxpython:$PYTHONPATH -export LC_ALL=C -export LANG=C -export LANGUAGE=C -export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -export VERSION_DATE=@VERSION_DATE@ -"@GRASS_PYTHON@" "$@" - +@echo off +set MODULE_TOPDIR=@module_top_dir@ +set GISBASE=@bin_dir@ +set GISRC=@bin_dir@\etc\config\rc +set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% +set "PATH=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64;%PATH%" +set PYTHONPATH=@bin_dir@\etc\python;@bin_dir@\gui\wxpython;%PYTHONPATH% +set LC_ALL=C +set LANG=C +set LANGUAGE=C +set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ +set VERSION_DATE=@VERSION_DATE@ +"@GRASS_PYTHON@" %* diff --git a/cmake/run_python.sh.in b/cmake/run_python.sh.in index d87a0abd4f2..36c7f93ea88 100644 --- a/cmake/run_python.sh.in +++ b/cmake/run_python.sh.in @@ -1,14 +1,13 @@ -@echo off -set MODULE_TOPDIR=@module_top_dir@ -set GISBASE=@bin_dir@ -set GISRC=@bin_dir@\etc\config\rc -set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% -set "PATH=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64;%PATH%" -set PYTHONPATH=@bin_dir@\etc\python;@bin_dir@\gui\wxpython;%PYTHONPATH% -set LC_ALL=C -set LANG=C -set LANGUAGE=C -set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -set VERSION_DATE=@VERSION_DATE@ -"@GRASS_PYTHON@" %* - +#!/bin/sh +export MODULE_TOPDIR=@module_top_dir@ +export GISBASE=@bin_dir@ +export GISRC=@bin_dir@/etc/config/rc +export PATH=@bin_dir@/bin:@bin_dir@/scripts:$PATH +export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH +export PYTHONPATH=@bin_dir@/etc/python:@bin_dir@/gui/wxpython:$PYTHONPATH +export LC_ALL=C +export LANG=C +export LANGUAGE=C +export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ +export VERSION_DATE=@VERSION_DATE@ +"@GRASS_PYTHON@" "$@" diff --git a/cmake/windows_launch.bat.in b/cmake/windows_launch.bat.in index 06b70ebf655..c689d36fd30 100644 --- a/cmake/windows_launch.bat.in +++ b/cmake/windows_launch.bat.in @@ -1,2 +1,2 @@ @echo off -"@GRASS_PYTHON@" "@script_install_dir@\scripts\@G_NAME@.py" %* +"@GRASS_PYTHON@" "@bin_dir@\scripts\@G_NAME@.py" %* diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 7738b699714..47b125b818b 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,6 +1,17 @@ #TODO add_subdirectory(icons) -add_subdirectory(images) +# images +#file(GLOB gui_images "${CMAKE_CURRENT_SOURCE_DIR}/images/*.png") +#install(FILES ${gui_images} DESTINATION gui/images ) + +add_custom_target(copy_gui_images +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_BINARY_DIR}/gui/ +DEPENDS copy_gui_icons_flags) + +install(DIRECTORY gui/images DESTINATION gui) + +#add_subdirectory(images) + #add_subdirectory(scripts) add_subdirectory(wxpython) @@ -14,12 +25,14 @@ list(REMOVE_DUPLICATES MODULE_LIST ) add_custom_target(copy_build_module_xml COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${CMAKE_CURRENT_BINARY_DIR}/tools/build_modules_xml.py - DEPENDS copy_docs_html_icons copy_gui_symbols) + ${CMAKE_CURRENT_SOURCE_DIR}/wxpython/tools/build_modules_xml.py ${CMAKE_CURRENT_BINARY_DIR}/wxpython/tools/build_modules_xml.py + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/scripts + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/gui/wxpython + DEPENDS copy_gui_images) add_custom_target(build_modulesitems_xml COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/tools/build_modules_xml.py ${MODULE_LIST} > ${CMAKE_BINARY_DIR}/gui/wxpython/xml/module_items.xml + ${CMAKE_CURRENT_BINARY_DIR}/wxpython/tools/build_modules_xml.py ${MODULE_LIST} > ${CMAKE_BINARY_DIR}/gui/wxpython/xml/module_items.xml DEPENDS copy_build_module_xml) add_custom_target(build_xml_menudata diff --git a/gui/icons/CMakeLists.txt b/gui/icons/CMakeLists.txt index 6e4e949e9c2..bf3b6227f2a 100644 --- a/gui/icons/CMakeLists.txt +++ b/gui/icons/CMakeLists.txt @@ -3,29 +3,30 @@ file(GLOB SRCICONS "grass/*.png") file(GLOB SRCFLAGS "flags/*.png") add_custom_target(make_images_dir -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/gui/icons -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/gui/flags -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/docs/html/icons -COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols) +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gui/icons/grass +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gui/flags +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/docs/html/icons +COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gui/images/symbols) add_custom_target(copy_gui_icons -COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons/ +COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${CMAKE_BINARY_DIR}/gui/icons/ DEPENDS make_images_dir) add_custom_target(copy_gui_icons_grass -COMMAND ${CMAKE_COMMAND} -E copy ${SRCICONS} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons/grass +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/grass ${CMAKE_BINARY_DIR}/gui/icons/ DEPENDS copy_gui_icons) add_custom_target(copy_gui_icons_flags -COMMAND ${CMAKE_COMMAND} -E copy ${SRCFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/gui/icons/flags +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/flags ${CMAKE_BINARY_DIR}/gui/icons/ DEPENDS copy_gui_icons_grass) -add_custom_target(copy_docs_html_icons -COMMAND ${CMAKE_COMMAND} -E copy ${SRCICONS} ${CMAKE_CURRENT_BINARY_DIR}/docs/html/icons -DEPENDS copy_gui_icons_flags) +foreach(icon_file ${SRCICONS}) + add_custom_command(TARGET copy_gui_icons_flags POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${icon_file} ${CMAKE_BINARY_DIR}/docs/html/ + COMMENT "Copying icon: ${icon_file}") +endforeach() -install(FILES ${SRCICO} DESTINATION gui/icons/) +install(FILES ${SRCICO} DESTINATION gui/icons) install(FILES ${SRCICONS} DESTINATION gui/icons/grass) install(FILES ${SRCFLAGS} DESTINATION gui/icons/flags) install(FILES ${SRCICONS} DESTINATION docs/html/icons) diff --git a/gui/images/CMakeLists.txt b/gui/images/CMakeLists.txt index a11f5268021..f6e10ccbbfe 100644 --- a/gui/images/CMakeLists.txt +++ b/gui/images/CMakeLists.txt @@ -1,19 +1,13 @@ -# images -file(GLOB png_files "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -install(FILES ${png_files} DESTINATION gui/images ) -# symbols -add_custom_target(copy_gui_images -COMMAND ${CMAKE_COMMAND} -E copy ${png_files} ${CMAKE_CURRENT_BINARY_DIR}/gui/images -DEPENDS make_images_dir ) +# symbols add_custom_target(copy_gui_symbols -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/basic ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/demo ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extra ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/geology ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/legend ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/n_arrows ${CMAKE_CURRENT_BINARY_DIR}/gui/images/symbols/ -DEPENDS make_images_dir) +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/basic ${CMAKE_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/demo ${CMAKE_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extra ${CMAKE_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/geology ${CMAKE_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/legend ${CMAKE_BINARY_DIR}/gui/images/symbols/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/n_arrows ${CMAKE_BINARY_DIR}/gui/images/symbols/ +DEPENDS copy_gui_images) install(DIRECTORY basic DESTINATION gui/images/symbols/) install(DIRECTORY demo DESTINATION gui/images/symbols/) diff --git a/gui/wxpython/tools/build_modules_xml.py b/gui/wxpython/tools/build_modules_xml.py index f2a3f1697dc..aadb3718f3b 100644 --- a/gui/wxpython/tools/build_modules_xml.py +++ b/gui/wxpython/tools/build_modules_xml.py @@ -51,8 +51,8 @@ def new_translator(string): def parse_modules(fd, mlist=None): """Writes metadata to xml file.""" # TODO: what about ms windows? does gtask handle this? - if mlist is None: - mlist = list(gcore.get_commands()[0]) + if mlist is None: + mlist = list(gcore.get_commands()[0]) indent = 4 for m in sorted(mlist): # TODO: get rid of g.mapsets_picker.py From 7d14e354fe09ba5f6cca37cb644c3ab4f5b4c933 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 01:29:24 +0100 Subject: [PATCH 158/264] fix dist include dir name --- include/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 68affc59e8c..2826874f874 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -220,7 +220,7 @@ foreach(srch ${SRCHS}) get_filename_component(srch_PATH ${srch} PATH) get_filename_component(srch_NAME ${srch} NAME) STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" dsth_PATH "${srch_PATH}") - set(output_dir ${CMAKE_BINARY_DIR}/include/xgrass${dsth_PATH}) + set(output_dir ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}) add_custom_command( OUTPUT ${output_dir}/${srch_NAME} COMMAND ${CMAKE_COMMAND} -E copy ${srch} ${output_dir} From 5101a2c3d7405261601456db69af8b4e5fa2bfb2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 01:33:16 +0100 Subject: [PATCH 159/264] build docs only if requested --- cmake/modules/build_module.cmake | 2 +- cmake/modules/build_pymodule_in_subdir.cmake | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 796968e5f33..7e4df9a0388 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -135,7 +135,7 @@ function(build_module) COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} COMMAND ${img_cmd} ) - install(FILES ${html_file_out} docs/html) + install(FILES ${html_file_out} DESTINATION docs/html) endif() # if(EXISTS "${html_file}") endif() #WITH_DOCS diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index ae8afa79cea..1f317ce14ad 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -45,6 +45,7 @@ function(build_pymodule_in_subdir module_name dest_dir) set(python_script ${CMAKE_BINARY_DIR}/scripts/${G_NAME}.py) +if(WITH_DOCS) set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.html ) set(tmp_html_cmd ) @@ -70,10 +71,12 @@ function(build_pymodule_in_subdir module_name dest_dir) COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} DEPENDS py_g_gui_${targ_name}_mkhtml ) - +endif() #WITH_DOCS endif() install(FILES ${py_files} DESTINATION ${dest_dir}) + if(WITH_DOCS) install(FILES ${img_files} DESTINATION docs/html) + endif() endfunction() From a6d3fd350c12c74465c7ed1e330368c301bc7788 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 01:34:30 +0100 Subject: [PATCH 160/264] fix typo --- cmake/modules/build_pymodule_in_subdir.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 1f317ce14ad..a80dc54dd2b 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -33,7 +33,7 @@ function(build_pymodule_in_subdir module_name dest_dir) install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin) else() file(COPY ${g_gui_file} ${CMAKE_BINARY_DIR}/bin/${G_NAME}) - install(PROGRAM ${CMAKE_BINARY_DIR}/bin/${G_NAME} DESTINATION bin) + install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME} DESTINATION bin) endif() add_custom_target(py_g_gui_${targ_name} ALL From 8eb448258ef4335c07e3404604ecfa2048af8681 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 01:44:53 +0100 Subject: [PATCH 161/264] fix cmake syntax errors --- cmake/modules/build_pymodule_in_subdir.cmake | 2 +- man/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index a80dc54dd2b..194b9011f4a 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -32,7 +32,7 @@ function(build_pymodule_in_subdir module_name dest_dir) configure_file(${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat) install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin) else() - file(COPY ${g_gui_file} ${CMAKE_BINARY_DIR}/bin/${G_NAME}) + configure_file(${g_gui_file} ${CMAKE_BINARY_DIR}/bin/${G_NAME} COPYONLY) install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME} DESTINATION bin) endif() diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 5eaf13287f9..d5137a06571 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -1,5 +1,5 @@ set(data_files grassdocs.css grass_logo.png grass_icon.png jquery.fixedheadertable.min.js parser_standard_options.js parser_standard_options.css) -file(COPY ${data_files} DESTINATON docs/html) -install(FILES ${data_files} docs/html) +file(COPY ${data_files} DESTINATION docs/html) +install(FILES ${data_files} DESTINATION docs/html) From 9be152f7aead2dbaf42a725d0e1d56944116364c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 01:38:11 +0000 Subject: [PATCH 162/264] cmake linux fixes --- CMakeLists.txt | 1 + cmake/modules/build_pymodule_in_subdir.cmake | 2 +- cmake/run_grass.sh.in | 0 cmake/run_python.sh.in | 0 lib/python/pygrass/CMakeLists.txt | 1 + 5 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 cmake/run_grass.sh.in mode change 100644 => 100755 cmake/run_python.sh.in diff --git a/CMakeLists.txt b/CMakeLists.txt index e211fd57b8f..3a2a5f414ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,7 @@ endif() include_directories("${CMAKE_BINARY_DIR}/include") +execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/docs/html) add_subdirectory(lib) add_subdirectory(tools) diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 194b9011f4a..fd9bb05b740 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -14,7 +14,7 @@ function(build_pymodule_in_subdir module_name dest_dir) set(g_gui_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.py) - add_custom_target(py_${targ_name} + add_custom_target(py_${targ_name} ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_files} ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} DEPENDS g.parser diff --git a/cmake/run_grass.sh.in b/cmake/run_grass.sh.in old mode 100644 new mode 100755 diff --git a/cmake/run_python.sh.in b/cmake/run_python.sh.in old mode 100644 new mode 100755 diff --git a/lib/python/pygrass/CMakeLists.txt b/lib/python/pygrass/CMakeLists.txt index b00b192958c..155ee2b8886 100644 --- a/lib/python/pygrass/CMakeLists.txt +++ b/lib/python/pygrass/CMakeLists.txt @@ -1,3 +1,4 @@ +execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory etc/python/grass/pygrass/) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/errors.py etc/python/grass/pygrass) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/utils.py etc/python/grass/pygrass) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/orderdict.py etc/python/grass/pygrass) From c07f406bfacbe3df22902cb28745dd9f7ddb1093 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:11:22 +0100 Subject: [PATCH 163/264] check for _WIN32 define to work with msvc --- lib/db/dbmi_base/dbmscap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/db/dbmi_base/dbmscap.c b/lib/db/dbmi_base/dbmscap.c index 421655ef665..20c94fba5a0 100644 --- a/lib/db/dbmi_base/dbmscap.c +++ b/lib/db/dbmi_base/dbmscap.c @@ -158,7 +158,7 @@ dbDbmscap *db_read_dbmscap(void) /* START OF NEW CODE FOR SEARCH IN $(GISBASE)/driver/db/ */ /* opend db drivers directory */ -#ifdef __MINGW32__ +#ifdef _WIN32 dirpath = G_malloc(strlen("\\driver\\db\\") + strlen(G_gisbase()) + 1); sprintf(dirpath, "%s\\driver\\db\\", G_gisbase()); G_convert_dirseps_to_host(dirpath); @@ -182,7 +182,7 @@ dbDbmscap *db_read_dbmscap(void) || (strcmp(ent->d_name, "..") == 0)) continue; -#ifdef __MINGW32__ +#ifdef _WIN32 /* skip manifest files on Windows */ if (strstr(ent->d_name, ".manifest")) continue; @@ -191,7 +191,7 @@ dbDbmscap *db_read_dbmscap(void) /* Remove '.exe' from name (windows extension) */ name = G_str_replace(ent->d_name, ".exe", ""); -#ifdef __MINGW32__ +#ifdef _WIN32 dirpath = G_malloc(strlen("\\driver\\db\\") + strlen(G_gisbase()) + strlen(ent->d_name) + 1); sprintf(dirpath, "%s\\driver\\db\\%s", G_gisbase(), ent->d_name); From 40d676d138698dc20d686dfeae4ac7f7853ef7d3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:13:23 +0100 Subject: [PATCH 164/264] fix newline at end of file --- vector/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/CMakeLists.txt b/vector/CMakeLists.txt index 37dceeed1a3..b439636d01c 100644 --- a/vector/CMakeLists.txt +++ b/vector/CMakeLists.txt @@ -372,4 +372,4 @@ build_program_in_subdir( # build_program_in_subdir( # v.out.postgis -# DEPENDS grass_gis grass_vector) \ No newline at end of file +# DEPENDS grass_gis grass_vector) From 72ad9a950f0fa75ea7704e736ab332162a75bc56 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:14:57 +0100 Subject: [PATCH 165/264] WIP: update helper cmake scripts --- cmake/modules/build_module.cmake | 147 ++++++++++++++----- cmake/modules/build_pymodule_in_subdir.cmake | 53 ++++--- cmake/modules/copy_python_file.cmake | 2 +- 3 files changed, 141 insertions(+), 61 deletions(-) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 7e4df9a0388..45c601a5af5 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,6 +1,6 @@ include(GenerateExportHeader) function(build_module) - cmake_parse_arguments(G "EXE;NO_HTML_DESCRIPTION" "NAME;SRCDIR;SRC_REGEX" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) + cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX;RUNTIME_OUTPUT_DIR;PACKAGE" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) if(NOT G_NAME) message(FATAL_ERROR "G_NAME empty") @@ -8,6 +8,7 @@ function(build_module) update_per_group_target( ${G_NAME} ) + if(NOT G_SRC_REGEX) set(G_SRC_REGEX "*.c") endif() @@ -37,6 +38,7 @@ function(build_module) set(${G_NAME}_SRCS ${G_SOURCES}) endif() + if(G_EXE) #set(MODULE_LIST "${MODULE_LIST} ${G_NAME}") #list(APPEND MODULE_LIST ${G_NAME}) @@ -46,17 +48,20 @@ function(build_module) #message(FATAL_ERROR "EXCLUDED_MODULE_LIST=${EXCLUDED_MODULE_LIST}") add_executable(${G_NAME} ${${G_NAME}_SRCS}) - set_target_properties (${G_NAME} PROPERTIES FOLDER bin) + + set_target_properties (${G_NAME} PROPERTIES FOLDER bin) else() add_library(${G_NAME} ${${G_NAME}_SRCS}) - set_target_properties (${G_NAME} PROPERTIES FOLDER lib) + set_target_properties (${G_NAME} PROPERTIES FOLDER lib) set_target_properties(${G_NAME} PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER}) - set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") - generate_export_header(${G_NAME} + set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") + generate_export_header(${G_NAME} STATIC_DEFINE "STATIC_BUILD" EXPORT_FILE_NAME ${export_file_name}) - endif() + endif() + + add_dependencies(${G_NAME} copy_header) foreach(G_OPTIONAL_DEPEND ${G_OPTIONAL_DEPENDS}) if(TARGET ${G_OPTIONAL_DEPEND}) @@ -89,6 +94,22 @@ function(build_module) target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") endforeach() + + set(package_define) + if(NOT G_PACKAGE) + if(G_EXE) + set(package_define "grassmods") + else() + set(package_define "grasslibs") + endif() + else() + if(NOT G_PACKAGE STREQUAL "NONE") + set(package_define ${G_PACKAGE}) + endif() + endif() + + target_compile_definitions(${G_NAME} PRIVATE "-DPACKAGE=\"${package_define}\"") + foreach(dep ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) if(TARGET ${dep}) get_target_property(interface_def ${dep} INTERFACE_COMPILE_DEFINITIONS) @@ -99,45 +120,95 @@ function(build_module) target_link_libraries(${G_NAME} ${dep}) endforeach() - if(G_EXE) - install(TARGETS ${G_NAME} DESTINATION bin) + set(RUN_HTML_DESCR TRUE) + #auto set if to run RUN_HTML_DESCR + if(G_EXE) + set(RUN_HTML_DESCR TRUE) + if (G_RUNTIME_OUTPUT_DIR) + set(RUN_HTML_DESCR FALSE) + endif() + # g.parser does not have --html-description. + if( ${G_NAME} IN_LIST NO_HTML_DESCR_TARGETS) + set(RUN_HTML_DESCR FALSE) + endif() + else() + set(RUN_HTML_DESCR FALSE) + endif() + +# message(" ${G_NAME} == ${RUN_HTML_DESCR}") + + + set(install_dest "") + if(NOT G_RUNTIME_OUTPUT_DIR) + if(G_EXE) + set(G_RUNTIME_OUTPUT_DIR "${GISBASE}/bin") + set(install_dest "bin") + else() + set(G_RUNTIME_OUTPUT_DIR "${GISBASE}/lib") + set(install_dest "lib") + endif() else() - install(TARGETS ${G_NAME} DESTINATION lib) + set(install_dest "${G_RUNTIME_OUTPUT_DIR}") + set(G_RUNTIME_OUTPUT_DIR "${GISBASE}/${install_dest}") endif() - + + if(WITH_DOCS) - #TODO glob for *.html - file(GLOB html_files "${G_SRCDIR}/*.html") + set(html_files) set(html_file "${G_SRCDIR}/${G_NAME}.html") - - file(GLOB img_files ${G_NAME}/*.png ${G_NAME}/*.jpg) - if(img_files) - set(img_cmd ${CMAKE_COMMAND} -E copy ${img_files} ${CMAKE_BINARY_DIR}/docs/html) - else() - set(img_cmd ${CMAKE_COMMAND} -E echo "") + set(create_html FALSE) + if(EXISTS "${html_file}") + set(create_html TRUE) + file(GLOB img_files ${G_NAME}/*.png ${G_NAME}/*.jpg) + else() + set(html_file "") + file(GLOB html_files "${G_SRCDIR}/*.html") + #message("html_files=${html_files}") + if(html_files) + # TODO; check if there is more than 1 .html for libs + list(GET html_files 0 html_file) + set(create_html TRUE) endif() + endif() -# if(EXISTS "${html_files}") - if(EXISTS "${html_file}") - if(${G_NO_HTML_DESCRIPTION}) - set(tmp_html_cmd ${CMAKE_COMMAND} -E echo "") - else() - set(tmp_html_cmd ${RUN_GRASS} ${G_NAME} --html-description) - endif() - set(mkhtml_cmd ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py) - - set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html") - set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html") - - ADD_CUSTOM_COMMAND(TARGET ${G_NAME} POST_BUILD - COMMAND ${tmp_html_cmd} > ${html_file_tmp} - COMMAND ${mkhtml_cmd} ${G_NAME} ${html_file} ${html_file_tmp} > ${html_file_out} - COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} - COMMAND ${img_cmd} - ) - install(FILES ${html_file_out} DESTINATION docs/html) - endif() # if(EXISTS "${html_file}") +# message("html_file=${html_file}") +# message(FATAL_ERROR "create_html=${create_html}") + if(create_html) + get_filename_component(html_name ${html_file} NAME) + string(REPLACE ".html" "" html_name ${html_name}) + file(GLOB img_files ${G_SRCDIR}/*.png ${G_SRCDIR}/*.jpg) + + set(html_file_tmp "${GISBASE}/docs/html/${html_name}.tmp.html") + set(html_file_out "${GISBASE}/docs/html/${html_name}.html") + add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR}) + if(RUN_HTML_DESCR) + add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${RUN_GRASS} ${G_NAME} --html-description > ${html_file_tmp} + COMMENT "Generating ${html_file_tmp}") + endif() + + if(img_files) + add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${img_files} ${GISBASE}/docs/html/ + #COMMENT "Copy ${G_SRCDIR}/{*.png,*.jpg} to ${GISBASE}/docs/html/" + ) + endif() + + set(mkhtml_cmd ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py) + add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${mkhtml_cmd} ${html_name} ${html_file} ${html_file_tmp} > ${html_file_out} + COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} + COMMENT "Generating ${html_file_out}" + ) + install(FILES ${html_file_out} DESTINATION docs/html) +# add_custom_target(${G_NAME}_docs ALL DEPENDS ${html_file_out}) + endif() # if(EXISTS "${html_file}") + endif() #WITH_DOCS + + install(TARGETS ${G_NAME} DESTINATION ${install_dest}) + endfunction() diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index fd9bb05b740..8ef98006d6b 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -13,37 +13,46 @@ function(build_pymodule_in_subdir module_name dest_dir) set(G_NAME g.gui.${module_name}) #Important as it is used in windows_launch.bat.in set(g_gui_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.py) - + ##message( "${GISBASE}/${dest_dir}") add_custom_target(py_${targ_name} ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_files} ${CMAKE_BINARY_DIR}/${dest_dir}/${module_name} + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${dest_dir}/${module_name} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_files} ${GISBASE}/${dest_dir}/${module_name} DEPENDS g.parser ) set_target_properties (py_${targ_name} PROPERTIES FOLDER ${dest_dir}) if(img_files) add_custom_target(docs_images_${targ_name} ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${img_files} ${CMAKE_BINARY_DIR}/docs/html + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${img_files} ${GISBASE}/docs/html DEPENDS py_${targ_name}) set_target_properties (docs_images_${targ_name} PROPERTIES FOLDER docs) endif() if(EXISTS ${g_gui_file}) if(WIN32) - configure_file(${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat) - install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin) - else() - configure_file(${g_gui_file} ${CMAKE_BINARY_DIR}/bin/${G_NAME} COPYONLY) - install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME} DESTINATION bin) + configure_file(${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${GISBASE}/bin/${G_NAME}.bat) + install(PROGRAMS ${GISBASE}/bin/${G_NAME}.bat DESTINATION bin) +else() + # file(INSTALL ${g_gui_file} ${GISBASE}/scripts/${G_NAME}) # COPYONLY) + + configure_file(${g_gui_file} ${GISBASE}/scripts/${G_NAME} COPYONLY) + + install(PROGRAMS ${GISBASE}/scripts/${G_NAME} DESTINATION scripts) + endif() + + if(WIN32) + set(python_script ${GISBASE}/scripts/${G_NAME}.bat) + else() + add_custom_target(py_g_gui_${targ_name} ) # ALL + # COMMAND ${CMAKE_COMMAND} -E copy_if_different ${g_gui_file} ${GISBASE}/scripts/${G_NAME} + # DEPENDS py_${targ_name}) + # set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) + set(python_script ${GISBASE}/scripts/${G_NAME}) + endif() - add_custom_target(py_g_gui_${targ_name} ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${g_gui_file} ${CMAKE_BINARY_DIR}/scripts/ - DEPENDS py_${targ_name}) - set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) install(FILES ${g_gui_file} DESTINATION scripts) - file(COPY ${g_gui_file} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) - set(python_script ${CMAKE_BINARY_DIR}/scripts/${G_NAME}.py) + if(WITH_DOCS) set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.html ) @@ -51,24 +60,24 @@ if(WITH_DOCS) set(tmp_html_cmd ) set(mkhtml_cmd ) - set(html_file_tmp "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.tmp.html") - set(html_file_out "${CMAKE_BINARY_DIR}/docs/html/${G_NAME}.html") - set(html_file_gui "${CMAKE_BINARY_DIR}/docs/html/wxGUI.${G_NAME}.html") - + set(html_file_tmp "${GISBASE}/docs/html/${G_NAME}.tmp.html") + set(html_file_out "${GISBASE}/docs/html/${G_NAME}.html") + set(html_file_gui "${GISBASE}/docs/html/wxGUI.${G_NAME}.html") +#message(FATAL_ERROR "py_g_gui_${targ_name}_html_descr") add_custom_target(py_g_gui_${targ_name}_html_descr COMMAND ${RUN_PYTHON} ${python_script} --html-description > ${html_file_tmp} DEPENDS py_g_gui_${targ_name} ) add_custom_target(py_g_gui_${targ_name}_mkhtml - COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} + COMMAND ${RUN_PYTHON} ${GISBASE}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} - COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} + COMMAND ${RUN_PYTHON} ${GISBASE}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} DEPENDS py_g_gui_${targ_name}_html_descr ) add_custom_target(py_g_gui_${targ_name}_mkhtml_wxgui ALL - COMMAND ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} + COMMAND ${RUN_PYTHON} ${GISBASE}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} DEPENDS py_g_gui_${targ_name}_mkhtml ) endif() #WITH_DOCS diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake index ea9e2bd0931..9c50671592f 100644 --- a/cmake/modules/copy_python_file.cmake +++ b/cmake/modules/copy_python_file.cmake @@ -1,6 +1,6 @@ function(copy_python_file py_file install_dest) get_filename_component(py_file_NAME ${py_file} NAME) - set(output_path ${CMAKE_BINARY_DIR}/${install_dest}) + set(output_path ${GISBASE}/${install_dest}) set(copied_file_path ${output_path}/${py_file_NAME}) add_custom_command(OUTPUT ${copied_file_path} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_file} ${output_path} From c317c1a22e865069f04ec9f6957d81235e1d0b84 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:15:48 +0100 Subject: [PATCH 166/264] update copy_header target --- include/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 2826874f874..224bff3b49b 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -221,15 +221,17 @@ foreach(srch ${SRCHS}) get_filename_component(srch_NAME ${srch} NAME) STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" dsth_PATH "${srch_PATH}") set(output_dir ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}) + add_custom_command( - OUTPUT ${output_dir}/${srch_NAME} - COMMAND ${CMAKE_COMMAND} -E copy ${srch} ${output_dir} - COMMENT "Copy ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}" - ) - list(APPEND include_depends ${output_dir}/${srch_NAME} ) + OUTPUT ${output_dir}/${srch_NAME} + COMMAND ${CMAKE_COMMAND} -E make_directory ${output_dir} + COMMAND ${CMAKE_COMMAND} -E copy ${srch} ${output_dir} + COMMENT "Copy ${srch} to ${CMAKE_BINARY_DIR}/include/grass${dsth_PATH}/${srch_NAME}" + ) + list(APPEND include_depends ${output_dir}/${srch_NAME} ) endforeach() -add_custom_target(copy_header DEPENDS ${include_depends} COMMENT "${CMAKE_BINARY_DIR}/include/grass") +add_custom_target(copy_header DEPENDS ${include_depends}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") From 94d2968d0ef494f9f9cff93fcf323f1631f4823e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:17:22 +0100 Subject: [PATCH 167/264] use gisbase as dist directory for build tree --- cmake/run_grass.bat.in | 2 +- cmake/run_grass.sh.in | 8 +- cmake/run_python.bat.in | 2 +- cmake/run_python.sh.in | 10 +- demolocation/grassrc.cmake.in | 4 + general/CMakeLists.txt | 2 +- general/manage/lister/CMakeLists.txt | 32 +---- lib/CMakeLists.txt | 8 +- lib/gis/CMakeLists.txt | 26 ++-- lib/init/CMakeLists.txt | 186 +++++++++++++-------------- lib/init/env.sh | 7 +- lib/init/grass.bat.in | 9 +- lib/init/grass.sh.in | 4 +- lib/python/CMakeLists.txt | 6 +- lib/python/ctypes/CMakeLists.txt | 18 +-- lib/vector/CMakeLists.txt | 28 +--- tools/CMakeLists.txt | 9 +- 17 files changed, 163 insertions(+), 198 deletions(-) create mode 100644 demolocation/grassrc.cmake.in diff --git a/cmake/run_grass.bat.in b/cmake/run_grass.bat.in index 5acfc92ec5d..623dd513497 100644 --- a/cmake/run_grass.bat.in +++ b/cmake/run_grass.bat.in @@ -7,6 +7,6 @@ set LC_ALL=C set LANG=C set LANGUAGE=C set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -set VERSION_DATE=@VERSION_DATE@ +set VERSION_DATE=@GRASS_VERSION_DATE@ %* diff --git a/cmake/run_grass.sh.in b/cmake/run_grass.sh.in index 0b72572e66f..a2d65dd311f 100755 --- a/cmake/run_grass.sh.in +++ b/cmake/run_grass.sh.in @@ -1,13 +1,13 @@ #!/bin/sh export MODULE_TOPDIR=@module_top_dir@ -export GISBASE=@bin_dir@ -export GISRC=@bin_dir@/etc/config/rc -export PATH=@bin_dir@/bin:@bin_dir@/scripts:$PATH +export GISBASE=@gis_base_dir@ +export GISRC=@gis_base_dir@/etc/config/rc +export PATH=@gis_base_dir@/bin:@gis_base_dir@/scripts:$PATH export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH export LC_ALL=C export LANG=C export LANGUAGE=C export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -export VERSION_DATE=@VERSION_DATE@ +export VERSION_DATE=@GRASS_VERSION_DATE@ "$@" diff --git a/cmake/run_python.bat.in b/cmake/run_python.bat.in index bdd473e3ed8..1d600c79411 100644 --- a/cmake/run_python.bat.in +++ b/cmake/run_python.bat.in @@ -9,5 +9,5 @@ set LC_ALL=C set LANG=C set LANGUAGE=C set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -set VERSION_DATE=@VERSION_DATE@ +set VERSION_DATE=@GRASS_VERSION_DATE@ "@GRASS_PYTHON@" %* diff --git a/cmake/run_python.sh.in b/cmake/run_python.sh.in index 36c7f93ea88..9f5e664385e 100755 --- a/cmake/run_python.sh.in +++ b/cmake/run_python.sh.in @@ -1,13 +1,13 @@ #!/bin/sh export MODULE_TOPDIR=@module_top_dir@ -export GISBASE=@bin_dir@ -export GISRC=@bin_dir@/etc/config/rc -export PATH=@bin_dir@/bin:@bin_dir@/scripts:$PATH +export GISBASE=@gis_base_dir@ +export GISRC=@gis_base_dir@/etc/config/rc +export PATH=@gis_base_dir@/bin:@gis_base_dir@/scripts:$PATH export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH -export PYTHONPATH=@bin_dir@/etc/python:@bin_dir@/gui/wxpython:$PYTHONPATH +export PYTHONPATH=@gis_base_dir@/etc/python:@gis_base_dir@/gui/wxpython:$PYTHONPATH export LC_ALL=C export LANG=C export LANGUAGE=C export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -export VERSION_DATE=@VERSION_DATE@ +export VERSION_DATE=@GRASS_VERSION_DATE@ "@GRASS_PYTHON@" "$@" diff --git a/demolocation/grassrc.cmake.in b/demolocation/grassrc.cmake.in new file mode 100644 index 00000000000..7b46331e401 --- /dev/null +++ b/demolocation/grassrc.cmake.in @@ -0,0 +1,4 @@ +GISDBASE: @gisbase_init_dir@ +LOCATION_NAME: demolocation +MAPSET: PERMANENT +GUI: text diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt index 2fd0500644f..5bc110a2e35 100644 --- a/general/CMakeLists.txt +++ b/general/CMakeLists.txt @@ -10,7 +10,7 @@ build_program_in_subdir(g.mapset DEPENDS grass_gis ) build_program_in_subdir(g.mapsets DEPENDS grass_gis ) build_program_in_subdir(g.message DEPENDS grass_gis ) build_program_in_subdir(g.mkfontcap DEPENDS grass_gis FREETYPE ) -build_program_in_subdir(g.parser NO_HTML_DESCRIPTION DEPENDS grass_gis FREETYPE) +build_program_in_subdir(g.parser DEPENDS grass_gis FREETYPE) build_program_in_subdir(g.pnmcomp DEPENDS grass_gis ) build_program_in_subdir(g.ppmtopng DEPENDS grass_gis LIBPNG) build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj GDAL ) diff --git a/general/manage/lister/CMakeLists.txt b/general/manage/lister/CMakeLists.txt index 7694cce2365..43c7ae1e71b 100644 --- a/general/manage/lister/CMakeLists.txt +++ b/general/manage/lister/CMakeLists.txt @@ -1,27 +1,9 @@ -# MODULE_TOPDIR = ../../.. - -# LIBES = $(VECTORLIB) $(DBMILIB) $(GISLIB) $(RASTERLIB) -# DEPENDENCIES = $(VECTORDEP) $(DBMIDEP) $(GISDEP) $(RASTERDEP) -# EXTRA_INC = $(VECT_INC) -# EXTRA_CFLAGS = $(VECT_CFLAGS) - -# include $(MODULE_TOPDIR)/include/Make/Module.make - -# default: $(ETC)/lister/cell $(ETC)/lister/vector - -# $(ETC)/lister/%: $(OBJDIR)/%.o | $(ETC)/lister -# $(call linker) - -# $(ETC)/lister: -# $(MKDIR) $@ - -build_module(NAME cell EXE +build_program(NAME cell SOURCES "cell.c" -DEPENDS grass_vector grass_dbmibase grass_gis grass_raster) -set_target_properties(cell - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc/lister") -build_module(NAME vector EXE +DEPENDS grass_vector grass_dbmibase grass_gis grass_raster +RUNTIME_OUTPUT_DIR etc/lister) + +build_program(NAME vector SOURCES "vector.c" -DEPENDS grass_vector grass_dbmibase grass_gis grass_raster ) -set_target_properties(vector - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc/lister") +DEPENDS grass_vector grass_dbmibase grass_gis grass_raster +RUNTIME_OUTPUT_DIR etc/lister) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e02daf9602d..6313db97c90 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -5,7 +5,6 @@ if(MSVC) endif() build_library_in_subdir(datetime) -add_dependencies(grass_datetime copy_header) add_subdirectory(gis) @@ -24,7 +23,8 @@ build_library_in_subdir(raster if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_library(DL_LIBRARY dl) - target_link_libraries(grass_raster ${DL_LIBRARY}) + mark_as_advanced(DL_LIBRARY) + target_link_libraries(grass_raster ${DL_LIBRARY}) endif() configure_file(external/ccmath/ccmath.h @@ -153,8 +153,8 @@ endif() build_library_in_subdir(iostream SRC_REGEX "*.cpp" DEPENDS grass_gis) build_library_in_subdir(manage DEPENDS grass_raster grass_vector grass_raster3d ) -file(COPY manage/element_list DESTINATION ${CMAKE_BINARY_DIR}/etc) -install(FILES ${CMAKE_BINARY_DIR}/etc/element_list DESTINATION etc) +file(COPY manage/element_list DESTINATION ${GISBASE}/etc) +install(FILES ${GISBASE}/etc/element_list DESTINATION etc) build_library_in_subdir(calc DEPENDS grass_raster) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 2a59a980804..1ca84004591 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -40,18 +40,18 @@ build_module(NAME grass_gis SOURCES "${gislib_SRCS}" ) add_custom_command(TARGET grass_gis POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/etc/proj - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/colors ${CMAKE_BINARY_DIR}/etc/colors/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ellipse.table ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/datum.table ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/datumtransform.table ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/FIPS.code ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/state27 ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/state83 ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/projections ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ellipse.table.solar.system ${CMAKE_BINARY_DIR}/etc/proj/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/colors.desc ${CMAKE_BINARY_DIR}/etc/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/renamed_options ${CMAKE_BINARY_DIR}/etc/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/proj + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/colors ${GISBASE}/etc/colors/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ellipse.table ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/datum.table ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/datumtransform.table ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/FIPS.code ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/state27 ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/state83 ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/projections ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ellipse.table.solar.system ${GISBASE}/etc/proj/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/colors.desc ${GISBASE}/etc/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/renamed_options ${GISBASE}/etc/ ) install(DIRECTORY colors DESTINATION etc/colors) install(FILES ellipse.table ellipse.table.solar.system @@ -65,4 +65,4 @@ endif() if(MSVC) target_link_libraries(grass_gis PCRE) -endif() \ No newline at end of file +endif() diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index d9decc6e004..2859dd306c9 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -1,6 +1,5 @@ # #for i18N support -set(PACKAGE "grasslibs") file(GLOB init_HTMLFILES "*.html") @@ -26,22 +25,25 @@ endif() file(TO_NATIVE_PATH "${PROJ_INSTALL_PREFIX}/share/proj" PROJ_LIB) file(TO_NATIVE_PATH ${CONFIG_PROJSHARE} GRASS_PROJSHARE) - find_path(gdal_share_dir "gdal" PATH_SUFFIXES share) if(NOT gdal_share_dir) - message(FATAL_ERROR "Cannot find share/gdal") + message(FATAL_ERROR "Cannot find share/gdal") endif() +mark_as_advanced(gdal_share_dir) + file(TO_NATIVE_PATH "${gdal_share_dir}/gdal" GDAL_DATA) if(MSVC) -find_path(geotiff_share_dir "epsg_csv" PATH_SUFFIXES share) -if(geotiff_share_dir) - file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) -else() - message(FATAL_ERROR "Cannot find share/epsg_csv.") -endif() + find_path(geotiff_share_dir "epsg_csv" PATH_SUFFIXES share) + mark_as_advanced(geotiff_share_dir) + if(geotiff_share_dir) + file(TO_NATIVE_PATH "${geotiff_share_dir}/epsg_csv" GEOTIFF_CSV) + else() + message(FATAL_ERROR "Cannot find share/epsg_csv.") + endif() endif() #MSVC -get_filename_component(GDAL_DIR ${GDAL_LIBRARY_${find_library_suffix}} PATH) + +get_filename_component(GDAL_DIR ${GDAL_LIBRARY} PATH) get_filename_component(GDAL_DIR ${GDAL_DIR} PATH) file(TO_NATIVE_PATH ${GDAL_DIR}/bin DEPS_DLL_PATH) @@ -49,117 +51,115 @@ list(APPEND DLL_PATH_LIST ${DEPS_DLL_PATH}) file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) +# For install tree (first do install tree) +if(UNIX OR MINGW) + if( DEFINED ENV{LD_LIBRARY_PATH}) + set(LD_LIBRARY_PATH_VAR "${CMAKE_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH}") + else() + set(LD_LIBRARY_PATH_VAR "${CMAKE_INSTALL_PREFIX}/lib") + endif() +endif() -# For build tree -file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${CMAKE_BINARY_DIR}/demolocation/) +if(WIN32) + set(app_data_dir $ENV{APPDATA}) + if(NOT EXISTS ${app_data_dir}) + # this can happen with some strange settings + message(FATAL_ERROR "The APPDATA variable is not set, ask your operating system support") + endif() + file(TO_NATIVE_PATH "${app_data_dir}/GRASS7" grass_config_dir) +else() + set(grass_config_dir "$ENV{HOME}/.grass7") +endif() + +file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" gisbase_init_dir) +message(STATUS "GISBASE (install) : ${gisbase_init_dir}") +message(STATUS "grass config directory (install): ${grass_config_dir}") +#configure and install env.sh +if(NOT MSVC) + configure_file(env.sh ${CMAKE_CURRENT_BINARY_DIR}/bashrc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bashrc + DESTINATION ${grass_config_dir}) +endif() -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISBASE) -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} GISDBASE) -configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.tmpl -"${CMAKE_BINARY_DIR}/etc/config/rc" @ONLY) +#configure and install grass.py +configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/etc/${START_UP} @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/etc/${START_UP} DESTINATION etc) -file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/etc/config" GRASS_CONFIG_DIR) +#configure and install grass wrapper script (grass.bat or grass.sh +configure_file(${script_file_name}.in ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/bin grass_dll_dir) + + + +# For build tree +file(TO_NATIVE_PATH ${GISBASE} gisbase_init_dir) +file(TO_NATIVE_PATH "${GISBASE}/etc/config" grass_config_dir) +configure_file(${script_file_name}.in ${GISBASE}/${script_file_name} @ONLY) +file(COPY ${CMAKE_SOURCE_DIR}/demolocation/PERMANENT DESTINATION ${GISBASE}/demolocation/) + +configure_file(${CMAKE_SOURCE_DIR}/demolocation/grassrc.cmake.in +"${grass_config_dir}/rc" @ONLY) + +file(TO_NATIVE_PATH ${GISBASE}/bin grass_dll_dir) set(DLL_PATH_LIST) list(APPEND DLL_PATH_LIST ${grass_dll_dir}) - separate_arguments(DLL_PATH_LIST) set(LD_LIBRARY_PATH_VAR) if(UNIX OR MINGW) if( DEFINED ENV{LD_LIBRARY_PATH}) - set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}:${CMAKE_BINARY_DIR}/lib") + set(LD_LIBRARY_PATH_VAR "${GISBASE}/lib:$ENV{LD_LIBRARY_PATH}") else() - set(LD_LIBRARY_PATH_VAR "${CMAKE_BINARY_DIR}/lib") + set(LD_LIBRARY_PATH_VAR "${GISBASE}/lib") endif() endif() -message(STATUS "GISBASE (build) : ${GISBASE}") -message(STATUS "grass config directory (build): ${GRASS_CONFIG_DIR}") +message(STATUS "GISBASE (build) : ${gisbase_init_dir}") +message(STATUS "grass config directory (build): ${grass_config_dir}") if(NOT MSVC) - configure_file(env.sh ${CMAKE_BINARY_DIR}/etc/config/bashrc @ONLY) - message(STATUS "env variables: ${CMAKE_BINARY_DIR}/etc/config/bashrc") + configure_file(env.sh ${grass_config_dir}/bashrc @ONLY) + message(STATUS "env variables: ${GISBASE}/etc/config/bashrc") endif() -configure_file(${script_file_name}.in - ${CMAKE_BINARY_DIR}/bin/${script_file_name} @ONLY) - -configure_file(grass.py ${CMAKE_BINARY_DIR}/etc/${START_UP} @ONLY) -message(STATUS "Startup script: ${CMAKE_BINARY_DIR}/${script_file_name}") - -message(STATUS "gisrc: ${CMAKE_BINARY_DIR}/etc/config/rc") -# For install tree -configure_file(${script_file_name}.in ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} @ONLY) -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) +configure_file(grass.py ${GISBASE}/etc/${START_UP} @ONLY) +message(STATUS "Startup (build): ${GISBASE}/${script_file_name}") +message(STATUS "gisrc (build): ${GISBASE}/etc/config/rc") -if(UNIX OR MINGW) - if( DEFINED ENV{LD_LIBRARY_PATH}) - set(LD_LIBRARY_PATH_VAR "$ENV{LD_LIBRARY_PATH}:${CMAKE_INSTALL_PREFIX}/lib") - else() - set(LD_LIBRARY_PATH_VAR "${CMAKE_INSTALL_PREFIX}/lib") - endif() -endif() +#finish installtree and buildtree configurations -if(WIN32) - set(app_data_dir $ENV{APPDATA}) - if(NOT EXISTS ${app_data_dir}) - # this can happen with some strange settings - message(FATAL_ERROR "The APPDATA variable is not set, ask your operating system support") - endif() - file(TO_NATIVE_PATH "${app_data_dir}/GRASS7" GRASS_CONFIG_DIR) -else() - set(GRASS_CONFIG_DIR "$ENV{HOME}/.grass7") -endif() -set(GISBASE "${CMAKE_INSTALL_PREFIX}") +build_program(NAME echo + SOURCES echo.c + PACKAGE "grasslibs" + RUNTIME_OUTPUT_DIR etc) -message(STATUS "GISBASE (install) : ${GISBASE}") -message(STATUS "grass config directory (install): ${GRASS_CONFIG_DIR}") +build_program(NAME run + SOURCES run.c + PACKAGE "grasslibs" + RUNTIME_OUTPUT_DIR etc) -if(NOT MSVC) - configure_file(env.sh ${CMAKE_CURRENT_BINARY_DIR}/bashrc @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bashrc - DESTINATION ${GRASS_CONFIG_DIR}) -endif() +build_program(NAME clean_temp + SOURCES clean_temp.c + DEPENDS grass_gis + PACKAGE "grasslibs" + RUNTIME_OUTPUT_DIR etc) -configure_file(grass.py ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} @ONLY) -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${START_UP} DESTINATION etc) - -add_executable(echo echo.c) -install(TARGETS echo DESTINATION etc) -set_target_properties(echo - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") - -add_executable(run run.c) -install(TARGETS run DESTINATION etc) -set_target_properties(run - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") - -add_executable(clean_temp clean_temp.c) -add_dependencies(clean_temp grass_gis) -target_link_libraries(clean_temp grass_gis) -install(TARGETS clean_temp DESTINATION etc) -set_target_properties(clean_temp - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") - -add_executable(lock lock.c) -add_dependencies(lock grass_gis grass_datetime) -target_link_libraries(lock grass_gis grass_datetime) -set_target_properties(lock - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") -install(TARGETS lock DESTINATION etc) +build_program(NAME lock + SOURCES lock.c + DEPENDS grass_gis grass_datetime + PACKAGE "grasslibs" + RUNTIME_OUTPUT_DIR etc) if(MINGW) - add_executable(winlocale winlocale.c) - install(TARGETS winlocale DESTINATION etc) - set_target_properties(winlocale - PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/etc") +build_program(NAME winlocale + SOURCES winlocale.c + RUNTIME_OUTPUT_DIR etc) endif() set(VERSIONNUMBER_CONTENTS "${GRASS_VERSION_NUMBER}") -if(GRASS_VERSION_SVN) - list(APPEND VERSIONNUMBER_CONTENTS "${VERSIONNUMBER_CONTENTS} ${GRASS_VERSION_SVN}") +if(GRASS_VERSION_GIT) + list(APPEND VERSIONNUMBER_CONTENTS "${VERSIONNUMBER_CONTENTS} ${GRASS_VERSION_GIT}") endif() file(WRITE ${CMAKE_BINARY_DIR}/VERSIONNUMBER "${VERSIONNUMBER_CONTENTS}") @@ -168,4 +168,4 @@ install(FILES ${CMAKE_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) configure_file(license.txt.in ${CMAKE_BINARY_DIR}/license) install(FILES ${CMAKE_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) -install(FILES ${CMAKE_BINARY_DIR}/license DESTINATION etc) \ No newline at end of file +install(FILES ${CMAKE_BINARY_DIR}/license DESTINATION etc) diff --git a/lib/init/env.sh b/lib/init/env.sh index 66729b414a9..95eff198af5 100644 --- a/lib/init/env.sh +++ b/lib/init/env.sh @@ -1,9 +1,10 @@ export GRASS_PROJSHARE=@GRASS_PROJSHARE@ export PROJ_LIB=@PROJ_LIB@ export GDAL_DATA=@GDAL_DATA@ +export GISBASE=@gisbase_init_dir@ export GRASS_PYTHON=@GRASS_PYTHON@ -export GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@ +export GRASS_CONFIG_DIR=@grass_config_dir@ -# export PYTHONHOME=$GISBASE\Python37 -# export FONTCONFIG_FILE=@GISBASE@\etc\fonts.conf +# export PYTHONHOME=$gisbase_init_dir\Python37 +# export FONTCONFIG_FILE=@gisbase_init_dir@\etc\fonts.conf # export LD_LIBRARY_PATH=@DLL_PATH_LIST@:PATH% diff --git a/lib/init/grass.bat.in b/lib/init/grass.bat.in index 47e1094d1e1..26aa141d2c6 100644 --- a/lib/init/grass.bat.in +++ b/lib/init/grass.bat.in @@ -13,16 +13,15 @@ set GEOTIFF_CSV=@GEOTIFF_CSV@ set PATH=@DLL_PATH_LIST@;%PATH% -GISBASE=@GISBASE@ - -set PYTHONPATH=@GISBASE@\etc\python;=@GISBASE@\gui\wxpython; +set GISBASE=@gisbase_init_dir@ +set PYTHONPATH=@gisbase_init_dir@\etc\python;=@GISBASE_INSTALL@\gui\wxpython; set GRASS_PYTHON=@GRASS_PYTHON@ -set GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@ +set GRASS_CONFIG_DIR=@grass_config_dir@ -"@GRASS_PYTHON@" "@GISBASE@\etc\@START_UP@" %* +"@GRASS_PYTHON@" "@gisbase_init_dir@\etc\@START_UP@" %* rem rem Pause on error diff --git a/lib/init/grass.sh.in b/lib/init/grass.sh.in index 8871d41da59..a37f5b2e624 100644 --- a/lib/init/grass.sh.in +++ b/lib/init/grass.sh.in @@ -1,6 +1,6 @@ #! /bin/sh trap "echo 'User break!' ; exit" 2 3 9 15 -. @GRASS_CONFIG_DIR@/bashrc +. @grass_config_dir@/bashrc -"$GRASS_PYTHON" "@GISBASE@/etc/@START_UP@" "$@" +"$GRASS_PYTHON" "@gisbase_init_dir@/etc/@START_UP@" "$@" diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 2fa048ed19e..ab80e761fc6 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -20,5 +20,7 @@ configure_file(script/setup.py build_pymodule_in_subdir(gunittest etc/python/grass) -file(INSTALL __init__.py DESTINATION ${CMAKE_BINARY_DIR}/etc/python) -install(FILES __init__.py DESTINATION etc/python) + +file(WRITE ${GISBASE}/etc/python/_init__.py "#coding=utf-8") +file(COPY __init__.py DESTINATION ${GISBASE}/etc/python/grass/) +install(FILES __init__.py DESTINATION etc/python/grass/) diff --git a/lib/python/ctypes/CMakeLists.txt b/lib/python/ctypes/CMakeLists.txt index c819a93f99c..b243f459da4 100644 --- a/lib/python/ctypes/CMakeLists.txt +++ b/lib/python/ctypes/CMakeLists.txt @@ -62,21 +62,21 @@ foreach(module ${MODULES}) message(FATAL_ERROR "${${module}_TARGET_NAME} is not set") endif() - set(output_file "${CMAKE_BINARY_DIR}/etc/python/grass/lib/${module}.py") + set(output_file "${GISBASE}/etc/python/grass/lib/${module}.py") add_custom_command(OUTPUT ${output_file} DEPENDS ${${module}_LIBS} COMMAND ${CMAKE_COMMAND} -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -DCOMPILER=${CMAKE_C_COMPILER} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -DHDRS=${${module}_HDRS} - -DLIBS=${${module}_LIBS} - -DOUT_FILE=${output_file} - -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake - COMMENT "Generating ${output_file}" - VERBATIM) + -DCOMPILER=${CMAKE_C_COMPILER} + -DBIN_DIR=${GISBASE} + -DHDRS=${${module}_HDRS} + -DLIBS=${${module}_LIBS} + -DOUT_FILE=${output_file} + -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake + COMMENT "Generating ${output_file}" + VERBATIM) add_custom_target(${${module}_TARGET_NAME} ALL DEPENDS ${output_file}) set_target_properties (${${module}_TARGET_NAME} PROPERTIES FOLDER lib/python) diff --git a/lib/vector/CMakeLists.txt b/lib/vector/CMakeLists.txt index 05708264824..9e17ce093b8 100644 --- a/lib/vector/CMakeLists.txt +++ b/lib/vector/CMakeLists.txt @@ -1,32 +1,6 @@ -# MODULE_TOPDIR = ../.. - +#TODO: docs vectorascii # PGM = vectorascii -# SUBDIRS = rtree \ -# dglib \ -# diglib \ -# Vlib \ -# vedit \ -# neta - -# include $(MODULE_TOPDIR)/include/Make/Dir.make -# include $(MODULE_TOPDIR)/include/Make/Doxygen.make - -# DOXNAME = vector - -# default: htmldir - -# htmldir: parsubdirs - -# diglib: rtree - -# Vlib: rtree dglib diglib - -# vedit: Vlib - -# neta: Vlib - -#add_executable(vectorascii ) build_library_in_subdir(rtree HEADERS "rtree.h" DEPENDS grass_gis) add_subdirectory(dglib) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index ba84800549d..1e7dbd5d958 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -11,8 +11,11 @@ endif() build_program_in_subdir(timer NAME current_time_s_ms DEPENDS grass_gis -SOURCES "${current_time_s_ms_SRCS}") +SOURCES "${current_time_s_ms_SRCS}" +RUNTIME_OUTPUT_DIR etc) -add_executable(g.echo g.echo.c) +build_program(NAME g.echo + SOURCES g.echo.c + RUNTIME_OUTPUT_DIR tools + PACKAGE "NONE") -install(TARGETS g.echo DESTINATION tools) From 60efded23b88477ea301dedef70beaf3c45d3472 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:20:30 +0100 Subject: [PATCH 168/264] cmake: fix build for db/drivers --- db/CMakeLists.txt | 61 ++++++++++++++------------------------- db/drivers/CMakeLists.txt | 37 +++++++++++++++++------- 2 files changed, 48 insertions(+), 50 deletions(-) diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index 470e5a8cee2..e4a42746eae 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -1,51 +1,32 @@ -build_program_in_subdir(db.columns DEPENDS grass_gis grass_dbmiclient ) -build_program_in_subdir(db.createdb DEPENDS grass_gis grass_dbmiclient ) +set(db_driver_targets) +add_subdirectory(drivers) -build_program_in_subdir(db.describe DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.columns DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.columns ${db_driver_targets}) -build_program_in_subdir(db.connect DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.createdb DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.createdb ${db_driver_targets}) -build_program_in_subdir(db.copy DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.describe DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.describe ${db_driver_targets}) -build_program_in_subdir(db.execute DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.connect DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.connect ${db_driver_targets}) -build_program_in_subdir(db.drivers DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.copy DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.copy ${db_driver_targets}) -build_program_in_subdir(db.databases DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.execute DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.execute ${db_driver_targets}) -build_program_in_subdir(db.dropdb DEPENDS grass_gis grass_dbmiclient ) +build_program_in_subdir(db.drivers DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.drivers ${db_driver_targets}) -# TODO: MODULES DISABLED -#add_subdirectory(dbf) -#add_subdirectory(drivers) +build_program_in_subdir(db.databases DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.databases ${db_driver_targets}) +build_program_in_subdir(db.dropdb DEPENDS grass_gis grass_dbmiclient) +add_dependencies(db.dropdb ${db_driver_targets}) -# MODULE_TOPDIR = .. - -# SUBDIRS = \ -# db.columns \ -# db.connect \ -# db.copy \ -# db.createdb \ -# db.databases \ -# db.describe \ -# db.drivers \ -# db.dropdb \ -# db.execute \ -# db.login \ -# db.select \ -# db.tables - -# CLEAN_SUBDIRS = drivers - -# PGM = databaseintro - -# include $(MODULE_TOPDIR)/include/Make/Dir.make - -# default: htmldir - -# htmldir: -# $(MAKE) -C drivers -# $(MAKE) parsubdirs - +#TODO: PGM = databaseintro diff --git a/db/drivers/CMakeLists.txt b/db/drivers/CMakeLists.txt index 4799d7b7564..85aaad9a3f6 100644 --- a/db/drivers/CMakeLists.txt +++ b/db/drivers/CMakeLists.txt @@ -7,25 +7,42 @@ build_program_in_subdir(dbf SOURCES ${dbf_SRCS} DEPENDS grass_gis grass_dbmidriver grass_shape grass_sqlp + RUNTIME_OUTPUT_DIR "db/driver/" ) - +set(db_drivers) +list(APPEND db_drivers dbf) +#TODO ; add targets if(ODBC_LIB) - add_subdirectory(drivers/odbc) + add_subdirectory(odbc) + list(APPEND db_drivers "odbc") endif() -if(PQ_LIB) - add_subdirectory(drivers/postgres) +if(MYSQL_LIB) + add_subdirectory(mysql) + list(APPEND db_drivers "mysql") endif() -if(MYSQL_LIB) - add_subdirectory(drivers/mysql) +if(TARGET POSTGRES) + add_subdirectory(postgres) + list(APPEND db_drivers "postrgresq") endif() -if(SQLITE_LIB) - add_subdirectory(drivers/sqlite) +if(TARGET SQLITE) + list(APPEND db_drivers "sqlite") + build_program_in_subdir(sqlite + DEPENDS grass_gis grass_dbmidriver + grass_sqlp SQLITE + RUNTIME_OUTPUT_DIR "db/driver/" + ) endif() -if(USE_OGR) - add_subdirectory(drivers/ogr) +if(TARGET GDAL) + list(APPEND db_drivers "ogr") + build_program_in_subdir(ogr + DEPENDS grass_gis grass_dbmidriver GDAL + grass_sqlp + RUNTIME_OUTPUT_DIR "db/driver/") endif() + +set(db_driver_targets ${db_drivers} PARENT_SCOPE) From 2126a6d65e347303f8e318629dffce995c5bd908 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:21:09 +0100 Subject: [PATCH 169/264] ignore __pycache__ directory when scanning for .py files --- lib/python/script/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/python/script/core.py b/lib/python/script/core.py index 1874f2fb90c..cc057dc708a 100644 --- a/lib/python/script/core.py +++ b/lib/python/script/core.py @@ -129,6 +129,8 @@ def scan(gisbase, directory): dir_path = os.path.join(gisbase, directory) if os.path.exists(dir_path): for fname in os.listdir(os.path.join(gisbase, directory)): + if fname == '__pycache__': + continue if scripts: # win32 name, ext = os.path.splitext(fname) if ext != '.manifest': From 6be413b7259118e2afcb69b1348b6ea6395a690e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:21:32 +0100 Subject: [PATCH 170/264] wip: use a gisbase as dist directory --- CMakeLists.txt | 72 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a2a5f414ab..c408b90c858 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,11 +17,16 @@ set(default_option_enabled ON) if(WIN32) set(default_option_enabled OFF) endif() + +if(CMAKE_BUILD_TYPE) set( grass_build_type "${CMAKE_BUILD_TYPE}" ) string( TOLOWER "${grass_build_type}" grass_build_type_lc ) -set(find_library_suffix "RELEASE") +set(find_library_suffix "_RELEASE") if( grass_build_type_lc STREQUAL "debug" ) -set(find_library_suffix "DEBUG") +set(find_library_suffix "_DEBUG") +endif() +else() +set(find_library_suffix "") endif() option(WITH_CAIRO "Build with cairo support ." ON) @@ -65,22 +70,6 @@ get_versions("include/VERSION" set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}) message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") set(GRASS_VERSION_UPDATE_PKG "0.2") -set(VERSION_DATE 2019) -file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) -file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) - -if(WIN32) -set(SCRIPT_EXT ".bat") -set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.bat) -set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.bat) -else() -set(SCRIPT_EXT ".sh") -set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.sh) -set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.sh) -endif() -configure_file(cmake/run_python${SCRIPT_EXT}.in ${RUN_PYTHON} @ONLY) -configure_file(cmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) include(set_compiler_flags) @@ -112,8 +101,38 @@ include(build_grass_script) include(build_script_in_subdir) include(check_target) +# function(set_runtime_output_dir target_name output_dir) +# set(runtime_output_dir "${CMAKE_BINARY_DIR}/driver/db/" +# ADD_CUSTOM_COMMAND(TARGET ${target_name} POST_BUILD +# COMMAND ${CMAKE_COMMAND} -E make_directory ${output_dir} +# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/${target_name} ${output_dir} +# DEPENDS ${target_name} +# ) +# endfunction() + add_subdirectory(thirdparty) +set(GISBASE ${CMAKE_BINARY_DIR}/gisbase) + +file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) +file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) + +file(TO_NATIVE_PATH ${GISBASE} gis_base_dir) + +if(WIN32) +set(SCRIPT_EXT ".bat") +set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.bat) +set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.bat) +else() +set(SCRIPT_EXT ".sh") +set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.sh) +set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.sh) +endif() +configure_file(cmake/run_python${SCRIPT_EXT}.in ${RUN_PYTHON} @ONLY) +configure_file(cmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) + +set(NO_HTML_DESCR_TARGETS "g.parser;ximgview") add_subdirectory(include) if(MSVC) @@ -122,7 +141,22 @@ endif() include_directories("${CMAKE_BINARY_DIR}/include") -execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/docs/html) +execute_process( + COMMAND ${CMAKE_COMMAND} -E echo "Creating directories in ${GISBASE}" + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/bin/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/demolocation/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/config/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/db/driver/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/tools/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/lib/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/lister/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/python/grass/lib + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/wxpython/xml/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/icons/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/images/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/docs/html/ + ) + add_subdirectory(lib) add_subdirectory(tools) From bd8ecd192b44a3e4b5900b65510a1aa1869a373a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:22:18 +0100 Subject: [PATCH 171/264] WIP: temporary fix for find_library output variable --- cmake/find_scripts/FindCairo.cmake | 12 +++++++++++- cmake/find_scripts/FindFFTW.cmake | 15 ++++++++++++--- cmake/find_scripts/FindGDAL.cmake | 14 ++++++++------ cmake/find_scripts/FindGEOS.cmake | 30 +++++++++++++++++------------ cmake/find_scripts/FindPCRE.cmake | 4 ++++ cmake/find_scripts/FindPROJ.cmake | 8 ++++++++ cmake/find_scripts/FindSQLite.cmake | 4 ++++ thirdparty/CMakeLists.txt | 20 +++++++++---------- 8 files changed, 75 insertions(+), 32 deletions(-) diff --git a/cmake/find_scripts/FindCairo.cmake b/cmake/find_scripts/FindCairo.cmake index 2212b220de8..92a22db9a25 100644 --- a/cmake/find_scripts/FindCairo.cmake +++ b/cmake/find_scripts/FindCairo.cmake @@ -31,6 +31,7 @@ FIND_PACKAGE(PkgConfig QUIET) PKG_CHECK_MODULES(PC_CAIRO cairo QUIET) # FIXME: After we require CMake 2.8.2 we can pass QUIET to this call. + FIND_PATH(CAIRO_INCLUDE_DIRS NAMES cairo.h HINTS ${PC_CAIRO_INCLUDEDIR} @@ -50,7 +51,7 @@ FIND_LIBRARY(CAIRO_LIBRARY_DEBUG ${PC_CAIRO_LIBRARY_DIRS} ) -set(GDAL_LIBRARY) +set(CAIRO_LIBRARY) if(CAIRO_LIBRARY_DEBUG) set( CAIRO_LIBRARY ${CAIRO_LIBRARY_DEBUG}) elseif(CAIRO_LIBRARY_RELEASE) @@ -108,5 +109,14 @@ else() unset(CAIRO_LIBRARIES CACHE) endif() +MARK_AS_ADVANCED( + CAIRO_INCLUDE_DIRS + CAIRO_LIBRARY + CAIRO_LIBRARY_RELEASE + CAIRO_LIBRARY_DEBUG + FONTCONFIG_LIBRARY + FONTCONFIG_INCLUDE_DIR + ) + INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo DEFAULT_MSG CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES VERSION_OK) diff --git a/cmake/find_scripts/FindFFTW.cmake b/cmake/find_scripts/FindFFTW.cmake index 27f0fdcbb19..3e0cb54928b 100644 --- a/cmake/find_scripts/FindFFTW.cmake +++ b/cmake/find_scripts/FindFFTW.cmake @@ -1,7 +1,5 @@ find_path(FFTW_INCLUDE_DIR fftw3.h) -set(HAVE_FFTW3_H 0) -set(HAVE_FFTW_H 0) -set(HAVE_DFFTW_H 0) + if(FFTW_INCLUDE_DIR) set(HAVE_FFTW3_H 1) message(STATUS "Found fftw3.h in ${FFTW_INCLUDE_DIR}") @@ -48,6 +46,17 @@ if(NOT FFTWD_FOUND AND NOT FFTWF_FOUND ) set(FFTW_FOUND FALSE) endif() +MARK_AS_ADVANCED( + FFTW_LIBRARIES + FFTW_INCLUDE_DIR + DFFTW_INCLUDE_DIR + FFTWF_LIB + FFTWF_THREADS_LIB + FFTWD_LIB + FFTWD_THREADS_LIB +) + + #copy HAVE_ to parent scope so that we can use in include/CMakeLists.txt and rest set(HAVE_FFTW3_H ${HAVE_FFTW3_H} PARENT_SCOPE) set(HAVE_FFTW_H ${HAVE_FFTW_H} PARENT_SCOPE) diff --git a/cmake/find_scripts/FindGDAL.cmake b/cmake/find_scripts/FindGDAL.cmake index bf80ac7f776..77af178bc3d 100644 --- a/cmake/find_scripts/FindGDAL.cmake +++ b/cmake/find_scripts/FindGDAL.cmake @@ -1,4 +1,4 @@ -find_path(GDAL_INCLUDE_DIR gdal.h) +find_path(GDAL_INCLUDE_DIR gdal.h PATH_SUFFIXES gdal) find_library(GDAL_LIBRARY_RELEASE NAMES gdal_i gdal) find_library(GDAL_LIBRARY_DEBUG NAMES gdald) @@ -6,14 +6,16 @@ set(GDAL_FOUND FALSE) set(GDAL_LIBRARY) if(GDAL_LIBRARY_DEBUG) - set( GDAL_LIBRARY ${GDAL_LIBRARY_DEBUG}) + set( GDAL_LIBRARY ${GDAL_LIBRARY_DEBUG} CACHE FILEPATH "doc" ) elseif(GDAL_LIBRARY_RELEASE) - set( GDAL_LIBRARY ${GDAL_LIBRARY_RELEASE}) + set( GDAL_LIBRARY ${GDAL_LIBRARY_RELEASE} CACHE FILEPATH "doc" ) endif() -#--- -# This function sets GEOS_FOUND if variables are valid. -#--- +mark_as_advanced(GDAL_LIBRARY_RELEASE) +mark_as_advanced(GDAL_LIBRARY_DEBUG) +mark_as_advanced(GDAL_LIBRARY) +mark_as_advanced(GDAL_INCLUDE_DIR) + include(FindPackageHandleStandardArgs) find_package_handle_standard_args( GDAL DEFAULT_MSG GDAL_LIBRARY diff --git a/cmake/find_scripts/FindGEOS.cmake b/cmake/find_scripts/FindGEOS.cmake index bf254963531..b1b03377f9e 100644 --- a/cmake/find_scripts/FindGEOS.cmake +++ b/cmake/find_scripts/FindGEOS.cmake @@ -9,13 +9,13 @@ # GEOS_LIBRARY, libraries to link against to use GEOS. Currently there are # two looked for, geos and geos_c libraries. # GEOS_FOUND, True if found, false if one of the above are not found. -# -# For ossim, typically geos will be system installed which should be found; -# or found in the ossim 3rd party dependencies directory from a geos build -# and install. If the latter it will rely on CMAKE_INCLUDE_PATH and +# +# For ossim, typically geos will be system installed which should be found; +# or found in the ossim 3rd party dependencies directory from a geos build +# and install. If the latter it will rely on CMAKE_INCLUDE_PATH and # CMAKE_LIBRARY_PATH having the path to the party dependencies directory. -# -# NOTE: +# +# NOTE: # This script is specialized for ossim, e.g. looking in /usr/local/ossim. # # $Id$ @@ -23,29 +23,35 @@ #--- # Find include path: -# Note: Ubuntu 14.04+ did not have geos.h (not included in any ossim src). +# Note: Ubuntu 14.04+ did not have geos.h (not included in any ossim src). # Instead looking for Geometry.h #--- -find_path( GEOS_INCLUDE_DIR geos/geom/Geometry.h) +find_path( GEOS_INCLUDE_DIR geos_c.h) # Find GEOS C library: find_library( GEOS_C_LIBRARY_RELEASE NAMES geos_c ) find_library( GEOS_C_LIBRARY_DEBUG NAMES geos_cd ) set(GEOS_FOUND FALSE) -set(GEOS_LIBRARY) +set(GEOS_C_LIBRARY) if(GEOS_C_LIBRARY_DEBUG) - set( GEOS_LIBRARY ${GEOS_C_LIBRARY_DEBUG}) + set(GEOS_C_LIBRARY ${GEOS_C_LIBRARY_DEBUG}) elseif(GEOS_C_LIBRARY_RELEASE) - set( GEOS_LIBRARY ${GEOS_C_LIBRARY_RELEASE}) + set(GEOS_C_LIBRARY ${GEOS_C_LIBRARY_RELEASE}) endif() +MARK_AS_ADVANCED( + GEOS_INCLUDE_DIR + GEOS_C_LIBRARY + GEOS_C_LIBRARY_RELEASE + GEOS_C_LIBRARY_DEBUG) + #--- # This function sets GEOS_FOUND if variables are valid. #--- include(FindPackageHandleStandardArgs) find_package_handle_standard_args( GEOS DEFAULT_MSG - GEOS_LIBRARY + GEOS_C_LIBRARY GEOS_INCLUDE_DIR ) diff --git a/cmake/find_scripts/FindPCRE.cmake b/cmake/find_scripts/FindPCRE.cmake index 0dcf0f33c10..fb329d930d0 100644 --- a/cmake/find_scripts/FindPCRE.cmake +++ b/cmake/find_scripts/FindPCRE.cmake @@ -19,6 +19,10 @@ if(PCRE_FOUND) set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) endif() +mark_as_advanced(PCRE_LIBRARY) +mark_as_advanced(PCRE_LIBRARY_DEBUG) +mark_as_advanced(PCRE_LIBRARY_RELEASE) +mark_as_advanced(PCRE_INCLUDE_DIR) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index f7eca3ea64e..6e37dbbf3c4 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -40,6 +40,14 @@ if(PROJ_INCLUDE_DIR AND PROJ_LIBRARY) set(PROJ_FOUND TRUE) endif() + +MARK_AS_ADVANCED( + PROJ_INCLUDE_DIR + PROJ_LIBRARY + PROJ_LIBRARY_DEBUG + PROJ_LIBRARY_RELEASE +) + # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE # if all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) diff --git a/cmake/find_scripts/FindSQLite.cmake b/cmake/find_scripts/FindSQLite.cmake index 60b9099e224..c49858c4ef7 100644 --- a/cmake/find_scripts/FindSQLite.cmake +++ b/cmake/find_scripts/FindSQLite.cmake @@ -1,4 +1,8 @@ find_path(SQLITE_INCLUDE_DIR sqlite3.h) find_library(SQLITE_LIBRARY NAMES sqlite3 ) + +mark_as_advanced(SQLITE_LIBRARY) +mark_as_advanced(SQLITE_INCLUDE_DIR) + include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE REQUIRED_VARS SQLITE_LIBRARY SQLITE_INCLUDE_DIR) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 8fc0a43f936..e6dc3d6c96f 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -9,36 +9,36 @@ set_property(TARGET GDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GDAL_INCLUDE_D find_package(PNG REQUIRED) add_library(LIBPNG INTERFACE IMPORTED GLOBAL) -set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY_${find_library_suffix}} ) +set_property(TARGET LIBPNG PROPERTY INTERFACE_LINK_LIBRARIES ${PNG_LIBRARY${find_library_suffix}} ) set_property(TARGET LIBPNG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PNG_INCLUDE_DIR} ) find_package(JPEG) if(JPEG_FOUND) add_library(LIBJPEG INTERFACE IMPORTED GLOBAL) - set_property(TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY_${find_library_suffix}} ) + set_property(TARGET LIBJPEG PROPERTY INTERFACE_LINK_LIBRARIES ${JPEG_LIBRARY${find_library_suffix}} ) set_property(TARGET LIBJPEG PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR} ) endif() - find_package(ZLIB REQUIRED) add_library(ZLIB INTERFACE IMPORTED GLOBAL) -set_property(TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY_${find_library_suffix}} ) +set_property(TARGET ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ${ZLIB_LIBRARY${find_library_suffix}} ) set_property(TARGET ZLIB PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR} ) if(UNIX) find_library(M_LIBRARY m) add_library(LIBM INTERFACE IMPORTED GLOBAL) set_property(TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) +mark_as_advanced(M_LIBRARY) endif() find_package(PROJ REQUIRED) add_library(PROJ INTERFACE IMPORTED GLOBAL) -set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY_${find_library_suffix}} ) +set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY${find_library_suffix}} ) set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) if(PROJ_VERSION_STRING GREATER 500) set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS "ACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) endif() find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) -set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY_${find_library_suffix}} ) +set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY${find_library_suffix}} ) set_property(TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS} ) find_package(FFTW REQUIRED) @@ -73,7 +73,7 @@ endif() find_package(TIFF REQUIRED) add_library(TIFF INTERFACE IMPORTED GLOBAL) -set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY_${find_library_suffix}} ) +set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY${find_library_suffix}} ) set_property(TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR}) find_package(Iconv) @@ -89,7 +89,7 @@ if(WITH_BZLIB) find_package(BZip2) if(BZIP2_FOUND) add_library(BZIP2 INTERFACE IMPORTED GLOBAL) - set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARY_${find_library_suffix}} ) + set_property(TARGET BZIP2 PROPERTY INTERFACE_LINK_LIBRARIES ${BZIP2_LIBRARY${find_library_suffix}} ) set_property(TARGET BZIP2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${BZIP2_INCLUDE_DIR}) endif() endif() @@ -133,7 +133,7 @@ endif() find_package(GEOS REQUIRED) add_library(GEOS INTERFACE IMPORTED GLOBAL) -set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_C_LIBRARY_${find_library_suffix}} ) +set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_C_LIBRARY${find_library_suffix}} ) set_property(TARGET GEOS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${GEOS_INCLUDE_DIR} ) set(THREADS_PREFER_PTHREAD_FLAG ON) @@ -151,7 +151,7 @@ endif() if(MSVC) find_package(PCRE REQUIRED) add_library(PCRE INTERFACE IMPORTED GLOBAL) - set_property(TARGET PCRE PROPERTY INTERFACE_LINK_LIBRARIES ${PCRE_LIBRARY_${find_library_suffix}} ) + set_property(TARGET PCRE PROPERTY INTERFACE_LINK_LIBRARIES ${PCRE_LIBRARY${find_library_suffix}} ) set_property(TARGET PCRE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PCRE_INCLUDE_DIR} ) endif() From 3894b0758c929a6dc1ce33e1ed01c17a9c6b49d4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:22:50 +0100 Subject: [PATCH 172/264] CMake: move wxpython cmake codes to gui/wxpython --- gui/CMakeLists.txt | 49 ------------------------------- gui/wxpython/CMakeLists.txt | 58 +++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 51 deletions(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 47b125b818b..d1cbeb1fefb 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -17,52 +17,3 @@ install(DIRECTORY gui/images DESTINATION gui) add_subdirectory(wxpython) install(FILES xml/grass-interface.dtd DESTINATION gui/xml) -get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) -separate_arguments(MODULE_LIST) -set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") -list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) -list(REMOVE_DUPLICATES MODULE_LIST ) - - add_custom_target(copy_build_module_xml - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/wxpython/tools/build_modules_xml.py ${CMAKE_CURRENT_BINARY_DIR}/wxpython/tools/build_modules_xml.py - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/scripts - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${CMAKE_BINARY_DIR}/gui/wxpython - DEPENDS copy_gui_images) - - add_custom_target(build_modulesitems_xml - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/tools/build_modules_xml.py ${MODULE_LIST} > ${CMAKE_BINARY_DIR}/gui/wxpython/xml/module_items.xml - DEPENDS copy_build_module_xml) - - add_custom_target(build_xml_menudata - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml - DEPENDS build_modulesitems_xml) - - add_custom_target(build_module_tree_menudata - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py "module_tree" > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml - DEPENDS build_xml_menudata) - - add_custom_target(build_menustrings ALL - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/menutree.py "manager" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_BINARY_DIR}/wxpython/core/menutree.py "psmap" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py - DEPENDS build_module_tree_menudata) - - - #install after validate ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml/module_tree_menudata.xml - #python3 core/menutree.py "" >> menustrings.py - #python3 core/menutree.py "module_tree" >> menustrings.py - #python3 core/menutree.py "" >> menustrings.py diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index cbda9eed0fb..64c979fbbc4 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -6,10 +6,64 @@ photo2image psmap rdigit rlisetup startup timeline tools tplot vdigit vnet web_services wxplot) foreach(gui_sub_dir ${gui_sub_dirs}) - build_pymodule_in_subdir(${gui_sub_dir} gui/wxpython) + build_pymodule_in_subdir(${gui_sub_dir} gui/wxpython/${gui_sub_dir}) endforeach() + +install(FILES README DESTINATION gui/wxpython) + copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py gui/wxpython) -install(FILES README DESTINATION gui/wxpython) +get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) +separate_arguments(MODULE_LIST) +set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") +list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) +list(REMOVE_DUPLICATES MODULE_LIST ) + +set(WXPYTHON_DIR ${GISBASE}/gui/wxpython) + +add_custom_target(copy_build_module_xml + #COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${WXPYTHON_DIR}/tools/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} + DEPENDS copy_gui_images + ) + + add_custom_target(build_modules_items_xml + COMMAND ${RUN_PYTHON} + ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py > ${WXPYTHON_DIR}/xml/module_items.xml + DEPENDS copy_build_module_xml + ) + + add_custom_target(build_xml_menudata + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${WXPYTHON_DIR}/xml + DEPENDS build_modules_items_xml) + + add_custom_target(build_module_tree_menudata + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/toolboxes.py "module_tree" > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml ${WXPYTHON_DIR}/xml + DEPENDS build_xml_menudata) + + add_custom_target(build_menustrings ALL + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/menutree.py "manager" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + COMMAND ${RUN_PYTHON} + ${WXPYTHON_DIR}/core/menutree.py "psmap" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + DEPENDS build_module_tree_menudata) + + + #install after validate ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml/module_tree_menudata.xml + #python3 core/menutree.py "" >> menustrings.py + #python3 core/menutree.py "module_tree" >> menustrings.py + #python3 core/menutree.py "" >> menustrings.py From 8b6ebda10dae24aef240a3a1373d10f1813636e3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 6 Jan 2020 21:45:50 +0100 Subject: [PATCH 173/264] raise ScriptError --- gui/wxpython/tools/build_modules_xml.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gui/wxpython/tools/build_modules_xml.py b/gui/wxpython/tools/build_modules_xml.py index aadb3718f3b..df7cf79fda4 100644 --- a/gui/wxpython/tools/build_modules_xml.py +++ b/gui/wxpython/tools/build_modules_xml.py @@ -19,6 +19,7 @@ import grass.script.core as gcore import grass.script.task as gtask +from grass.exceptions import ScriptError def escapeXML(text): @@ -48,11 +49,10 @@ def new_translator(string): __builtin__._ = new_translator -def parse_modules(fd, mlist=None): +def parse_modules(fd): """Writes metadata to xml file.""" # TODO: what about ms windows? does gtask handle this? - if mlist is None: - mlist = list(gcore.get_commands()[0]) + mlist = list(gcore.get_commands()[0]) indent = 4 for m in sorted(mlist): # TODO: get rid of g.mapsets_picker.py @@ -81,15 +81,16 @@ def get_module_metadata(name): """ try: task = gtask.parse_interface(name) - except: + except ScriptError as exc: sys.stderr.write("Cannot parse interface for module %s. Empty strings" - " will be placed instead of description and keywords." - "\n" % name) + " will be placed instead of description and keywords. Reason: %s" + "\n" % (name, str(exc))) return '', '' return task.get_description(full=True), \ task.get_keywords() + def header(fd): fd.write('\n') fd.write('\n') @@ -135,23 +136,22 @@ def module_test(): print(get_module_metadata('t.rast.univar')) -def main(module_list=None): +def main(): fh = sys.stdout header(fh) - parse_modules(fh, module_list) + parse_modules(fh) footer(fh) return 0 if __name__ == "__main__": - mlist = None if len(sys.argv) > 1: if sys.argv[1] == 'doctest': sys.exit(doc_test()) elif sys.argv[1] == 'test': sys.exit(module_test()) else: - mlist = sys.argv[1:] - sys.exit(main(mlist)) + gcore.fatal('Unrecognized parameter.') + sys.exit(main()) From 06901f1d1d6cd7c7b40192b5d8a43a624aa2868b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 7 Jan 2020 09:27:16 +0100 Subject: [PATCH 174/264] revert to pre cmake version --- tools/mkhtml.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/mkhtml.py b/tools/mkhtml.py index 4eb128d0379..d3c68edddcc 100644 --- a/tools/mkhtml.py +++ b/tools/mkhtml.py @@ -66,17 +66,12 @@ def decode(bytes_): return bytes_.decode(enc) return unicode(bytes_) -# check for a strange case where autoconf sends two arguments + pgm = sys.argv[1] -if len(sys.argv) > 2: - src_file = sys.argv[2] if os.path.isfile(sys.argv[2]) else "%s.html" % pgm - tmp_file = sys.argv[3] if os.path.isfile(sys.argv[2]) else "%s.tmp.html" % pgm -if src_file is None: - src_file = "%s.html" % pgm - tmp_file = "%s.tmp.html" % pgm +src_file = "%s.html" % pgm +tmp_file = "%s.tmp.html" % pgm -#print('src_file', src_file) trunk_url = "https://github.com/OSGeo/grass/tree/master/" addons_url = "https://github.com/OSGeo/grass-addons/tree/master/" @@ -392,4 +387,4 @@ def to_title(name): YEAR=year, GRASS_VERSION=grass_version)) else: sys.stdout.write(footer_noindex.substitute(YEAR=year, - GRASS_VERSION=grass_version)) + GRASS_VERSION=grass_version)) \ No newline at end of file From b36845a006b43e842a36564bc82c2e49754a8b22 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Tue, 7 Jan 2020 09:27:35 +0100 Subject: [PATCH 175/264] wip wip build docs --- CMakeLists.txt | 3 +- cmake/mkhtml.cmake.in | 103 +++++++++++++++++++++++++++++++ cmake/modules/build_module.cmake | 56 ++++++++++++++++- 3 files changed, 158 insertions(+), 4 deletions(-) create mode 100644 cmake/mkhtml.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index c408b90c858..a1efac4ca53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,6 +113,7 @@ include(check_target) add_subdirectory(thirdparty) set(GISBASE ${CMAKE_BINARY_DIR}/gisbase) +configure_file(cmake/mkhtml.cmake.in ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake @ONLY) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) @@ -180,7 +181,7 @@ foreach(d ${ALL_SUBDIRS}) endforeach() if(WITH_PYTHON) - add_subdirectory(gui) + # add_subdirectory(gui) endif() if(WITH_DOCS) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in new file mode 100644 index 00000000000..f73fe4f376b --- /dev/null +++ b/cmake/mkhtml.cmake.in @@ -0,0 +1,103 @@ +set(GISBASE "@GISBASE@") +set(TOP_DIR "@CMAKE_SOURCE_DIR@") +set(BINARY_DIR "@CMAKE_BINARY_DIR@") +set(PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@") +file(TO_NATIVE_PATH "${TOP_DIR}" MODULE_TOPDIR ) +file(TO_NATIVE_PATH "${GISBASE}" GIS_BASE_DIR ) +set(ENV{GISBASE} "${GIS_BASE_DIR}") +set(ENV{MODULE_TOPDIR} "${MODULE_TOPDIR}") +file(TO_NATIVE_PATH "${GIS_BASE_DIR}/etc/config/rc" GISRC) +set(ENV{GISRC} "${GISRC}") +set(ENV{LC_ALL} C) +set(ENV{LANG} C) +set(ENV{LANGUAGE} C) + +if (WIN32) + set(P_SEP ";") +else () + set(P_SEP ":") +endif() + +file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BIN_DIR) +file(TO_NATIVE_PATH "${BINARY_DIR}/scripts" SCRIPTS_DIR) + + +set(ENV{PATH} "${BIN_DIR}${P_SEP}${SCRIPTS_DIR}${P_SEP}$ENV{PATH}") + +if(UNIX) + if($ENV{LD_LIBRARY_PATH}) + set(ENV{LD_LIBRARY_PATH} "${BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}") + else() + set(ENV{LD_LIBRARY_PATH} "${BINARY_DIR}/lib") + endif() +endif() + +set(IS_PYTHON TRUE) +if(IS_PYTHON) + file(TO_NATIVE_PATH "${BINARY_DIR}/gui/wxpython" WXPYTHON_DIR) + file(TO_NATIVE_PATH "${BINARY_DIR}/etc/python" PYTHON_DIR) + if($ENV{PYTHONPATH}) + set(ENV{PYTHONPATH} "${WXPYTHON_DIR}/gui/wxpython${P_SEP}${PYTHON_DIR}/etc/python${P_SEP}$ENV{PYTHONPATH}") + else() + set(ENV{PYTHONPATH} "${WXPYTHON_DIR}/gui/wxpython${P_SEP}${PYTHON_DIR}/etc/python") + endif() +endif() + +get_filename_component(HTML_FILE_NAME ${INPUT_HTML_FILE} NAME) +get_filename_component(PGM_SOURCE_DIR ${INPUT_HTML_FILE} PATH) +get_filename_component(PGM_NAME ${GRASS_PGM} NAME) + +string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) +set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) +set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) +set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) + + +#message("ENV{PATH}=$ENV{PATH}") +#message("ENV{PYTHONPATH}=$ENV{PYTHONPATH}") +#message("ENV{GISRC}=$ENV{GISRC}") +#message("ENV{GISBASE}=$ENV{GISBASE}") +#message("ENV{VERSION_NUMBER}=@GRASS_VERSION_NUMBER@") +#message("ENV{VERSION_DATE}=@GRASS_VERSION_DATE@") + +#message("PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") +#message("PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") +#message("MKHTML_PY=${MKHTML_PY}") +#message("PGM_NAME=${PGM_NAME}") +#message("OUT_HTML_FILE=${OUT_HTML_FILE}") + + +message("Creating ${TMP_HTML_FILE}") +execute_process( + COMMAND ${PGM_NAME} "--html-description" + OUTPUT_FILE ${TMP_HTML_FILE} + RESULT_VARIABLE html_descr_rv) + +#message("html_descr_rv=${html_descr_rv}") +if(NOT html_descr_rv EQUAL 0) + execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${GRASS_PGM}) + message(SEND_ERROR "Failed to create ${TMP_HTML_FILE}") +endif() + +message("Creating ${OUT_HTML_FILE}") +execute_process( +COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} +OUTPUT_FILE ${OUT_HTML_FILE} +RESULT_VARIABLE mkhtml_rv) + +#message("mkhtml_rv=${mkhtml_rv}") +if(NOT mkhtml_rv EQUAL 0) + execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${GRASS_PGM}) + message(SEND_ERROR "Failed to create ${OUT_HTML_FILE}") +endif() +message("Copy ${GRASS_PGM} to ${OUTPUT_DIR}") +execute_process( +COMMAND ${CMAKE_COMMAND} -E copy ${GRASS_PGM} ${OUTPUT_DIR} +COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} +RESULT_VARIABLE copy_rv) + +#message("copy_rv=${copy_rv}") +if(NOT copy_rv EQUAL 0) + execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${GRASS_PGM}) + message(SEND_ERROR "Failed to copy ${GRASS_PGM} to ${OUTPUT_DIR}") +endif() diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 45c601a5af5..3afbad61282 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -151,9 +151,14 @@ function(build_module) set(install_dest "${G_RUNTIME_OUTPUT_DIR}") set(G_RUNTIME_OUTPUT_DIR "${GISBASE}/${install_dest}") endif() - - - if(WITH_DOCS) + #set_target_properties(${G_NAME} PROPERTIES prop1 "source_directory name") + set_target_properties(${G_NAME} PROPERTIES G_SRCDIR "${G_SRCDIR}") + + #add_custom_command(TARGET ${G_NAME} POST_BUILD + # COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR}) + build_docs(${G_NAME} ${G_RUNTIME_OUTPUT_DIR}) + + if(WITH_DOCSX) set(html_files) set(html_file "${G_SRCDIR}/${G_NAME}.html") set(create_html FALSE) @@ -212,3 +217,48 @@ function(build_module) install(TARGETS ${G_NAME} DESTINATION ${install_dest}) endfunction() + + function(build_docs target_name G_RUNTIME_OUTPUT_DIR) + + if(${target_name} STREQUAL "g.parser") + #message("Dont know to build docs for ${target_name}") + return() + endif() + + get_target_property(G_SRCDIR ${target_name} G_SRCDIR) + + # message("G_SRCDIR for ${G_NAME} is ${G_SRCDIR}") + + set(html_file ${G_SRCDIR}/${target_name}.html) + set(input_html_file) + if(EXISTS ${html_file}) + set(input_html_file ${html_file}) + set(input_html_tmp_file ${G_SRCDIR}/${target_name}.tmp.html) + #message("html_file for ${target_name} is ${html_file}") + else() + #message("${target_name} is a library?") + endif() + + if(NOT input_html_file) + #message("Dont know to build docs for ${target_name}") + return() + endif() + + add_custom_command(TARGET ${target_name} POST_BUILD + COMMAND ${CMAKE_COMMAND} + -DINPUT_HTML_FILE=${input_html_file} + -DIS_EXECUTABLE=TRUE + -Dexecutable_name=${target_name} + -DGRASS_PGM=$ + -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake + #COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR} + #COMMAND ${CMAKE_COMMAND} -E touch ${input_html_tmp_file} + #COMMENT "Generating html for ${target_name}" + ) + #VERBATIM) + + #add_custom_target(${target_name}_html ALL DEPENDS ${G_RUNTIME_OUTPUT_DIR}/${target_name}.exe) + + endfunction() \ No newline at end of file From da009ff9310d7d75aee32368543ec801d6b62c90 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:17:15 +0100 Subject: [PATCH 176/264] minor cleanup --- cmake/modules/build_grass_script.cmake | 83 ---------------------- cmake/modules/build_script_in_subdir.cmake | 7 -- db/CMakeLists.txt | 20 +++--- raster/r.colors.out/CMakeLists.txt | 4 +- raster/r.colors/CMakeLists.txt | 4 +- raster/r.mapcalc/CMakeLists.txt | 32 +-------- scripts/CMakeLists.txt | 31 +++----- temporal/CMakeLists.txt | 7 +- 8 files changed, 28 insertions(+), 160 deletions(-) delete mode 100644 cmake/modules/build_grass_script.cmake delete mode 100644 cmake/modules/build_script_in_subdir.cmake diff --git a/cmake/modules/build_grass_script.cmake b/cmake/modules/build_grass_script.cmake deleted file mode 100644 index 8c7af9ba1fe..00000000000 --- a/cmake/modules/build_grass_script.cmake +++ /dev/null @@ -1,83 +0,0 @@ - -function(build_grass_script) - cmake_parse_arguments(G "" "NAME;SRCDIR;SRC_REGEX" "SOURCES;DEPENDS" ${ARGN} ) - - update_per_group_target( ${G_NAME} ) - if(NOT G_SRCDIR) - set(SCRIPT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) - endif() - - - if(NOT G_SRC_REGEX) - set(G_SRC_REGEX "*.py") - endif() - - file(GLOB SRC_FILES "${SCRIPT_DIR}/${G_SRC_REGEX}") - if(NOT SRC_FILES) - message(FATAL_ERROR "[ ${G_NAME} ]: SRC_FILES empty ") - endif() - -if(WIN32) - - - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in - ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat - ) - install( PROGRAMS ${CMAKE_BINARY_DIR}/bin/${G_NAME}.bat DESTINATION bin ) -endif() - -foreach(pyfile ${SRC_FILES}) - get_filename_component(pyfile_NAME ${pyfile} NAME) - - string(REPLACE ".py" "" pyfile_NAME ${pyfile_NAME}) - - set(${pyfile_NAME}_OUTPUT_FILE ${CMAKE_BINARY_DIR}/locale/scriptstrings/${pyfile_NAME}_to_translate.c) - - add_custom_command( - OUTPUT ${${pyfile_NAME}_OUTPUT_FILE}.stamp - DEPENDS g.parser - COMMAND ${CMAKE_COMMAND} - -DINPUT_FILE=${pyfile} - -DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake - COMMAND ${CMAKE_COMMAND} -E touch ${${pyfile_NAME}_OUTPUT_FILE}.stamp - COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" - VERBATIM - ) - - add_custom_target(${pyfile_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${pyfile} ${CMAKE_BINARY_DIR}/scripts - DEPENDS ${${pyfile_NAME}_OUTPUT_FILE}.stamp) - - set_target_properties (${pyfile_NAME} PROPERTIES FOLDER scripts) - #add_custom_target(${pyfile_NAME} "${${pyfile_NAME}_OUTPUT_FILE}" - #COMMAND ${CMAKE_COMMAND} - #-DINPUT_FILE=${pyfile} - #-DOUTPUT_FILE=${${pyfile_NAME}_OUTPUT_FILE} - #-DBIN_DIR=${CMAKE_BINARY_DIR} - #-P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake - #DEPENDS g.parser - #COMMENT "Generating ${${pyfile_NAME}_OUTPUT_FILE}" - #) - - set_source_files_properties("${${pyfile_NAME}_OUTPUT_FILE}" GENERATED) - - foreach(G_DEPEND ${G_DEPENDS}) - add_dependencies(${G_DEPEND}) - endforeach() - - get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) -if(MSVC) - set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST} ${G_NAME}.bat") - else() - set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST} ${G_NAME}") - endif() - - install(FILES ${pyfile} - RENAME ${pyfile_NAME} - DESTINATION scripts) -endforeach() - -endfunction() diff --git a/cmake/modules/build_script_in_subdir.cmake b/cmake/modules/build_script_in_subdir.cmake deleted file mode 100644 index 2c69793a3e5..00000000000 --- a/cmake/modules/build_script_in_subdir.cmake +++ /dev/null @@ -1,7 +0,0 @@ -macro(build_script_in_subdir dir_name) - build_grass_script(NAME ${dir_name}) -endmacro() - - - - diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index e4a42746eae..ebdf743f8d6 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -1,32 +1,32 @@ -set(db_driver_targets) +set(db_drivers) add_subdirectory(drivers) build_program_in_subdir(db.columns DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.columns ${db_driver_targets}) +add_dependencies(db.columns ${db_drivers}) build_program_in_subdir(db.createdb DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.createdb ${db_driver_targets}) +add_dependencies(db.createdb ${db_drivers}) build_program_in_subdir(db.describe DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.describe ${db_driver_targets}) +add_dependencies(db.describe ${db_drivers}) build_program_in_subdir(db.connect DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.connect ${db_driver_targets}) +add_dependencies(db.connect ${db_drivers}) build_program_in_subdir(db.copy DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.copy ${db_driver_targets}) +add_dependencies(db.copy ${db_drivers}) build_program_in_subdir(db.execute DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.execute ${db_driver_targets}) +add_dependencies(db.execute ${db_drivers}) build_program_in_subdir(db.drivers DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.drivers ${db_driver_targets}) +add_dependencies(db.drivers ${db_drivers}) build_program_in_subdir(db.databases DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.databases ${db_driver_targets}) +add_dependencies(db.databases ${db_drivers}) build_program_in_subdir(db.dropdb DEPENDS grass_gis grass_dbmiclient) -add_dependencies(db.dropdb ${db_driver_targets}) +add_dependencies(db.dropdb ${db_drivers}) #TODO: PGM = databaseintro diff --git a/raster/r.colors.out/CMakeLists.txt b/raster/r.colors.out/CMakeLists.txt index c369cb48a8d..dd6ee9e6fc6 100644 --- a/raster/r.colors.out/CMakeLists.txt +++ b/raster/r.colors.out/CMakeLists.txt @@ -1,5 +1,5 @@ -set(r_colors_out_SRCS raster_main.c ) -set(r3_colors_out_SRCS raster3d_main.c ) +set(r_colors_out_SRCS raster_main.c) +set(r3_colors_out_SRCS raster3d_main.c) build_program( NAME r.colors.out diff --git a/raster/r.colors/CMakeLists.txt b/raster/r.colors/CMakeLists.txt index 09145071e55..84a6f8a4b41 100644 --- a/raster/r.colors/CMakeLists.txt +++ b/raster/r.colors/CMakeLists.txt @@ -1,7 +1,5 @@ -set(r_colors_SRCS - raster_main.c edit_colors.c rules.c stats.c - ) +set(r_colors_SRCS raster_main.c edit_colors.c rules.c stats.c) set(r3_colors_SRCS raster3d_main.c edit_colors.c rules.c stats.c) diff --git a/raster/r.mapcalc/CMakeLists.txt b/raster/r.mapcalc/CMakeLists.txt index 46374818fc9..b5cb74b91b0 100644 --- a/raster/r.mapcalc/CMakeLists.txt +++ b/raster/r.mapcalc/CMakeLists.txt @@ -1,32 +1,4 @@ -# MODULE_TOPDIR = ../.. - -# include $(MODULE_TOPDIR)/include/Make/Vars.make - -# PGM2 = r.mapcalc -# PGM3 = r3.mapcalc -# PROGRAMS = $(PGM2) $(PGM3) - -# r_mapcalc_OBJS := $(filter-out map3.o xcoor3.o xres3.o, $(AUTO_OBJS)) -# r3_mapcalc_OBJS := $(filter-out map.o xcoor.o xres.o, $(AUTO_OBJS)) - - -# include $(MODULE_TOPDIR)/include/Make/Multi.make - -# EXTRA_CFLAGS = $(READLINEINCPATH) $(PTHREADINCPATH) -# LIBES2 = $(CALCLIB) $(GISLIB) $(RASTERLIB) $(BTREELIB) $(READLINELIBPATH) $(READLINELIB) $(HISTORYLIB) $(PTHREADLIBPATH) $(PTHREADLIB) -# LIBES3 = $(CALCLIB) $(RASTER3DLIB) $(GISLIB) $(RASTERLIB) $(BTREELIB) $(READLINELIBPATH) $(READLINELIB) $(HISTORYLIB) $(PTHREADLIBPATH) $(PTHREADLIB) - -# default: multi - -# $(BIN)/$(PGM2)$(EXE): LIBES = $(LIBES2) -# $(BIN)/$(PGM3)$(EXE): LIBES = $(LIBES3) - -# $(OBJDIR)/mapcalc.yy.o: mapcalc.tab.h - -# .SECONDARY: mapcalc.tab.c mapcalc.tab.h mapcalc.output - - FLEX_TARGET(mapcalc.yy.c mapcalc.l ${CMAKE_CURRENT_BINARY_DIR}/mapcalc.yy.c ) BISON_TARGET(mapcalc.tab.c mapcalc.y ${CMAKE_CURRENT_BINARY_DIR}/mapcalc.tab.c ) ADD_FLEX_BISON_DEPENDENCY(mapcalc.yy.c mapcalc.tab.c) @@ -43,8 +15,8 @@ set(r3_mapcalc_SRCS ${r_mapcalc_common_SRCS} map3.c xarea.c xcoor3.c xres3.c) build_program(NAME r.mapcalc SOURCES "${r_mapcalc_SRCS}" - DEPENDS grass_gis grass_btree grass_calc grass_raster ) + DEPENDS grass_gis grass_btree grass_calc grass_raster) build_program(NAME r3.mapcalc SOURCES "${r3_mapcalc_SRCS}" - DEPENDS grass_gis grass_btree grass_calc grass_raster3d ) + DEPENDS grass_gis grass_btree grass_calc grass_raster3d) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index ac702f78d23..f6c98861bdd 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,14 +1,8 @@ - - -build_script_in_subdir(r.shade) - -build_script_in_subdir(d.correlate) - -build_script_in_subdir(d.frame) - -build_script_in_subdir(d.out.file ) - -set(scripts_SUBDIRS +set(script_DIRS + r.shade + d.correlate + d.frame + d.out.file d.to.rast d.polar d.rast.edit @@ -43,6 +37,7 @@ set(scripts_SUBDIRS r.import r.in.aster r.in.srtm + r.in.wms r.mask r.out.xyz r.pack @@ -78,16 +73,10 @@ set(scripts_SUBDIRS v.unpack v.what.strds v.what.vect - ) - #TODO - #r.in.wms - #wxpyimgview - build_script_in_subdir( r.in.wms ) - -foreach(d ${scripts_SUBDIRS}) -build_script_in_subdir(${d} ) +#TODO: MODULES DISABLED +#wxpyimgview +foreach(script_DIR ${script_DIRS}) + build_script_in_subdir(${script_DIR}) endforeach() - - diff --git a/temporal/CMakeLists.txt b/temporal/CMakeLists.txt index e43be22b524..22f03ce97c7 100644 --- a/temporal/CMakeLists.txt +++ b/temporal/CMakeLists.txt @@ -1,4 +1,4 @@ -set(temporal_SUBDIRS +set(temporal_DIRS t.create t.support t.topology @@ -51,7 +51,6 @@ set(temporal_SUBDIRS build_program_in_subdir(t.connect DEPENDS grass_gis grass_temporal) -foreach(d ${temporal_SUBDIRS}) - build_script_in_subdir(${d}) +foreach(temporal_DIR ${temporal_DIRS}) + build_script_in_subdir(${temporal_DIR}) endforeach() - From ebad9cfe8762655ab5798ddf46ffcef0d1b6c10c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:22:18 +0100 Subject: [PATCH 177/264] install html docs for driver db --- db/drivers/CMakeLists.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/db/drivers/CMakeLists.txt b/db/drivers/CMakeLists.txt index 85aaad9a3f6..405cf688afb 100644 --- a/db/drivers/CMakeLists.txt +++ b/db/drivers/CMakeLists.txt @@ -7,7 +7,8 @@ build_program_in_subdir(dbf SOURCES ${dbf_SRCS} DEPENDS grass_gis grass_dbmidriver grass_shape grass_sqlp - RUNTIME_OUTPUT_DIR "db/driver/" + HTML_FILE_NAME grass-dbf + RUNTIME_OUTPUT_DIR "driver/db/" ) set(db_drivers) @@ -15,34 +16,36 @@ list(APPEND db_drivers dbf) #TODO ; add targets if(ODBC_LIB) add_subdirectory(odbc) - list(APPEND db_drivers "odbc") + #list(APPEND db_drivers "odbc") endif() if(MYSQL_LIB) add_subdirectory(mysql) - list(APPEND db_drivers "mysql") + #list(APPEND db_drivers "mysql") endif() if(TARGET POSTGRES) add_subdirectory(postgres) - list(APPEND db_drivers "postrgresq") + #list(APPEND db_drivers "postrgresq") endif() if(TARGET SQLITE) - list(APPEND db_drivers "sqlite") + list(APPEND db_drivers sqlite) build_program_in_subdir(sqlite DEPENDS grass_gis grass_dbmidriver grass_sqlp SQLITE - RUNTIME_OUTPUT_DIR "db/driver/" + HTML_FILE_NAME grass-sqlite + RUNTIME_OUTPUT_DIR "driver/db/" ) endif() if(TARGET GDAL) - list(APPEND db_drivers "ogr") + list(APPEND db_drivers ogr) build_program_in_subdir(ogr DEPENDS grass_gis grass_dbmidriver GDAL grass_sqlp - RUNTIME_OUTPUT_DIR "db/driver/") + HTML_FILE_NAME grass-ogr + RUNTIME_OUTPUT_DIR "driver/db/") endif() -set(db_driver_targets ${db_drivers} PARENT_SCOPE) +set(db_drivers ${db_drivers} PARENT_SCOPE) From 304562fb49ef39492751345c8a46b793d9f9456f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:25:26 +0100 Subject: [PATCH 178/264] update building html docs (wip) --- CMakeLists.txt | 18 ++-- cmake/mkhtml.cmake.in | 164 +++++++++++++++++-------------- cmake/modules/build_docs.cmake | 37 +++++++ cmake/modules/build_module.cmake | 132 +++++++++---------------- 4 files changed, 186 insertions(+), 165 deletions(-) create mode 100644 cmake/modules/build_docs.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a1efac4ca53..76186b0fcb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.3) - +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) project(GRASSGIS) set(BUILD_SHARED_LIBS ON) @@ -38,7 +38,7 @@ option(WITH_NLS "enable nls support" ${default_option_enabled}) option(WITH_BZLIB "enable bzlib support" ON) option(WITH_BLAS "enable blas support" ON) option(WITH_LAPACK "enable lapack support" ON) -option(WITH_PYTHON "Build python bindings" OFF) +option(WITH_PYTHON "Build python bindings" ON) option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) option(WITH_DOCS "Build documentation" ON) if(APPLE) @@ -71,15 +71,12 @@ set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_V message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") set(GRASS_VERSION_UPDATE_PKG "0.2") - include(set_compiler_flags) set_compiler_flags() include(repo_status) repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) - - # Setup build locations. if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -93,12 +90,13 @@ endif() include(update_per_group_target) include(copy_python_file) +include(build_docs) include(build_module) include(build_program) include(build_program_in_subdir) include(build_library_in_subdir) -include(build_grass_script) -include(build_script_in_subdir) +include(build_py_module) + include(check_target) # function(set_runtime_output_dir target_name output_dir) @@ -173,7 +171,6 @@ set(ALL_SUBDIRS vector temporal # ps - # locale ) foreach(d ${ALL_SUBDIRS}) @@ -181,7 +178,7 @@ foreach(d ${ALL_SUBDIRS}) endforeach() if(WITH_PYTHON) - # add_subdirectory(gui) + add_subdirectory(gui) endif() if(WITH_DOCS) @@ -189,6 +186,9 @@ if(WITH_DOCS) add_subdirectory(man) endif() # WITH_DOCS + +####add_subdirectory(locale) + # TODO: To be discussed # add_subdirectory(testsuite) # add_subdirectory(macosx) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index f73fe4f376b..a617cc4beb4 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -1,103 +1,123 @@ +function(fatal_error file_name) + message("file_name=${file_name}") + message(STATUS "ENV{PATH}=$ENV{PATH}") + message(STATUS "ENV{PYTHONPATH}=$ENV{PYTHONPATH}") + message(STATUS "ENV{GISRC}=$ENV{GISRC}") + message(STATUS "ENV{GISBASE}=$ENV{GISBASE}") + if(UNIX) + message(STATUS "ENV{LD_LIBRARY_PATH}=$ENV{LD_LIBRARY_PATH}") + endif() + + message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") + message(STATUS "PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") + message(STATUS "MKHTML_PY=${MKHTML_PY}") + message(STATUS "PGM_NAME=${PGM_NAME}") + message(STATUS "OUT_HTML_FILE=${OUT_HTML_FILE}") + + execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_PGM}) + message(SEND_ERROR "Failed to create ${TMP_HTML_FILE}") + +endfunction() + +if(NOT HTML_FILE) + message(STATUS "Dont know to build docs for ${G_PGM}") + file(INSTALL ${G_PGM} DESTINATION ${OUTPUT_DIR}) + return() +endif() + +message("${G_PGM} output ${OUTPUT_DIR}") + set(GISBASE "@GISBASE@") set(TOP_DIR "@CMAKE_SOURCE_DIR@") set(BINARY_DIR "@CMAKE_BINARY_DIR@") set(PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@") file(TO_NATIVE_PATH "${TOP_DIR}" MODULE_TOPDIR ) file(TO_NATIVE_PATH "${GISBASE}" GIS_BASE_DIR ) +file(TO_NATIVE_PATH "${GIS_BASE_DIR}/etc/config/rc" GISRC) +file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BIN_DIR) +file(TO_NATIVE_PATH "${BINARY_DIR}/scripts" SCRIPTS_DIR) +file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" WXPYTHON_DIR) +file(TO_NATIVE_PATH "${GISBASE}/etc/python" PYTHON_DIR) + +if(WIN32) + set(P_SEP ";") +else() + set(P_SEP ":") +endif() + +set(ENV{PATH} "${BIN_DIR}${P_SEP}${SCRIPTS_DIR}${P_SEP}$ENV{PATH}") + +#message(STATUS "Setup grass environment with ${GISBASE}") set(ENV{GISBASE} "${GIS_BASE_DIR}") set(ENV{MODULE_TOPDIR} "${MODULE_TOPDIR}") -file(TO_NATIVE_PATH "${GIS_BASE_DIR}/etc/config/rc" GISRC) set(ENV{GISRC} "${GISRC}") set(ENV{LC_ALL} C) set(ENV{LANG} C) set(ENV{LANGUAGE} C) - -if (WIN32) - set(P_SEP ";") -else () - set(P_SEP ":") +if(UNIX) + set(GRASS_LD_LIBRARY_PATH "${BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}") + string(REGEX REPLACE "^(.*)\\${P_SEP}$" "\\1" GRASS_LD_LIBRARY_PATH "${GRASS_LD_LIBRARY_PATH}") + set(ENV{LD_LIBRARY_PATH} ${GRASS_LD_LIBRARY_PATH}) endif() -file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BIN_DIR) -file(TO_NATIVE_PATH "${BINARY_DIR}/scripts" SCRIPTS_DIR) +set(GRASS_PYTHONPATH "${WXPYTHON_DIR}${P_SEP}${PYTHON_DIR}${P_SEP}${GISBASE}/scripts${P_SEP}$ENV{PYTHONPATH}") +string(REGEX REPLACE "^(.*)\\${P_SEP}$" "\\1" GRASS_PYTHONPATH "${GRASS_PYTHONPATH}") +set(ENV{PYTHONPATH} "${GRASS_PYTHONPATH}") -set(ENV{PATH} "${BIN_DIR}${P_SEP}${SCRIPTS_DIR}${P_SEP}$ENV{PATH}") +get_filename_component(HTML_FILE_NAME ${HTML_FILE} NAME) +get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) -if(UNIX) - if($ENV{LD_LIBRARY_PATH}) - set(ENV{LD_LIBRARY_PATH} "${BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}") - else() - set(ENV{LD_LIBRARY_PATH} "${BINARY_DIR}/lib") - endif() +if(NOT PGM_NAME) + get_filename_component(PGM_NAME ${G_PGM} NAME) endif() -set(IS_PYTHON TRUE) -if(IS_PYTHON) - file(TO_NATIVE_PATH "${BINARY_DIR}/gui/wxpython" WXPYTHON_DIR) - file(TO_NATIVE_PATH "${BINARY_DIR}/etc/python" PYTHON_DIR) - if($ENV{PYTHONPATH}) - set(ENV{PYTHONPATH} "${WXPYTHON_DIR}/gui/wxpython${P_SEP}${PYTHON_DIR}/etc/python${P_SEP}$ENV{PYTHONPATH}") - else() - set(ENV{PYTHONPATH} "${WXPYTHON_DIR}/gui/wxpython${P_SEP}${PYTHON_DIR}/etc/python") - endif() -endif() - -get_filename_component(HTML_FILE_NAME ${INPUT_HTML_FILE} NAME) -get_filename_component(PGM_SOURCE_DIR ${INPUT_HTML_FILE} PATH) -get_filename_component(PGM_NAME ${GRASS_PGM} NAME) - string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) - -#message("ENV{PATH}=$ENV{PATH}") -#message("ENV{PYTHONPATH}=$ENV{PYTHONPATH}") -#message("ENV{GISRC}=$ENV{GISRC}") -#message("ENV{GISBASE}=$ENV{GISBASE}") -#message("ENV{VERSION_NUMBER}=@GRASS_VERSION_NUMBER@") -#message("ENV{VERSION_DATE}=@GRASS_VERSION_DATE@") - -#message("PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") -#message("PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") -#message("MKHTML_PY=${MKHTML_PY}") -#message("PGM_NAME=${PGM_NAME}") -#message("OUT_HTML_FILE=${OUT_HTML_FILE}") - - -message("Creating ${TMP_HTML_FILE}") -execute_process( - COMMAND ${PGM_NAME} "--html-description" - OUTPUT_FILE ${TMP_HTML_FILE} - RESULT_VARIABLE html_descr_rv) - -#message("html_descr_rv=${html_descr_rv}") -if(NOT html_descr_rv EQUAL 0) - execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${GRASS_PGM}) - message(SEND_ERROR "Failed to create ${TMP_HTML_FILE}") +file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) +foreach(IMG_FILE ${IMG_FILES}) + file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) +endforeach() +set(IS_PYTHON 1) +message("Creating ${TMP_HTML_FILE}:: ${PGM_NAME} --html-description") +if(RUN_HTML_DESCR) + if(IS_PYTHON) + execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${PGM_NAME} "--html-description" + OUTPUT_FILE ${TMP_HTML_FILE} + RESULT_VARIABLE html_descr_rv) +else() + execute_process( + COMMAND ${}${PGM_NAME} "--html-description" + OUTPUT_FILE ${TMP_HTML_FILE} + RESULT_VARIABLE html_descr_rv) +endif() + #TODO: print TMP_HTML_FILE contents in case of failure. + #message("html_descr_rv=${html_descr_rv}") + if(NOT html_descr_rv EQUAL 0) + fatal_error(${G_PGM} ${TMP_HTML_FILE}) + endif() + + if(NOT EXISTS ${TMP_HTML_FILE}) + fatal_error(${G_PGM} ${TMP_HTML_FILE}) + endif() +else() + message(FATAL_ERROR "No html-description run for ${G_PGM}") endif() -message("Creating ${OUT_HTML_FILE}") +message(STATUS "Creating ${OUT_HTML_FILE}") execute_process( -COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} -OUTPUT_FILE ${OUT_HTML_FILE} -RESULT_VARIABLE mkhtml_rv) + COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} + OUTPUT_FILE ${OUT_HTML_FILE} + RESULT_VARIABLE mkhtml_rv) #message("mkhtml_rv=${mkhtml_rv}") if(NOT mkhtml_rv EQUAL 0) - execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${GRASS_PGM}) - message(SEND_ERROR "Failed to create ${OUT_HTML_FILE}") -endif() -message("Copy ${GRASS_PGM} to ${OUTPUT_DIR}") -execute_process( -COMMAND ${CMAKE_COMMAND} -E copy ${GRASS_PGM} ${OUTPUT_DIR} -COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} -RESULT_VARIABLE copy_rv) - -#message("copy_rv=${copy_rv}") -if(NOT copy_rv EQUAL 0) - execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${GRASS_PGM}) - message(SEND_ERROR "Failed to copy ${GRASS_PGM} to ${OUTPUT_DIR}") + fatal_error(${G_PGM} ${OUT_HTML_FILE}) endif() + +file(INSTALL ${G_PGM} DESTINATION ${OUTPUT_DIR}) +file(REMOVE ${TMP_HTML_FILE}) diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake new file mode 100644 index 00000000000..b65bd51f9f0 --- /dev/null +++ b/cmake/modules/build_docs.cmake @@ -0,0 +1,37 @@ +function(build_docs target_name) + get_target_property(G_SRC_DIR ${target_name} G_SRC_DIR) + get_target_property(G_PGM ${target_name} G_PGM) + get_target_property(RUN_HTML_DESCR ${target_name} RUN_HTML_DESCR) + get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) + get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) + + set(html_file ${G_SRC_DIR}/${G_HTML_FILE_NAME}) + set(HTML_FILE) + set(no_docs_list "grass_sqlp;echo;clean_temp;lock;run") + + if(EXISTS ${html_file}) + set(HTML_FILE ${html_file}) + else() + file(GLOB html_files ${G_SRC_DIR}/*.html) + if(html_files) + if(NOT "${target_name}" IN_LIST no_docs_list) + message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${G_RUNTIME_OUTPUT_DIR} | ${target_name}") + endif() + endif() + endif() + + + add_custom_command(TARGET ${target_name} POST_BUILD + COMMAND ${CMAKE_COMMAND} + -DHTML_FILE=${HTML_FILE} + -DRUN_HTML_DESCR=${RUN_HTML_DESCR} + -DG_PGM=${G_PGM} + -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake + ) + + #add_custom_target(${target_name}_html ALL DEPENDS ${G_RUNTIME_OUTPUT_DIR}/${target_name}.exe) + + install(FILES ${GISBASE}/docs/html/${G_HTML_FILE_NAME} DESTINATION docs/html) + endfunction() diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 3afbad61282..1d4e32b43e6 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,14 +1,17 @@ include(GenerateExportHeader) function(build_module) - cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX;RUNTIME_OUTPUT_DIR;PACKAGE" "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" ${ARGN} ) + cmake_parse_arguments(G + "EXE" + "NAME;SRCDIR;SRC_REGEX;RUNTIME_OUTPUT_DIR;PACKAGE;HTML_FILE_NAME" + "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" + ${ARGN} ) if(NOT G_NAME) message(FATAL_ERROR "G_NAME empty") endif() - update_per_group_target( ${G_NAME} ) + ## update_per_group_target(${G_NAME}) - if(NOT G_SRC_REGEX) set(G_SRC_REGEX "*.c") endif() @@ -38,30 +41,34 @@ function(build_module) set(${G_NAME}_SRCS ${G_SOURCES}) endif() - if(G_EXE) - #set(MODULE_LIST "${MODULE_LIST} ${G_NAME}") - #list(APPEND MODULE_LIST ${G_NAME}) - #SET(MODULE_LIST "${MODULE_LIST} ${G_NAME}" CACHE INTERNAL "source_list") - get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) - set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST} ${G_NAME}") - -#message(FATAL_ERROR "EXCLUDED_MODULE_LIST=${EXCLUDED_MODULE_LIST}") add_executable(${G_NAME} ${${G_NAME}_SRCS}) - set_target_properties (${G_NAME} PROPERTIES FOLDER bin) + set(default_html_file_name ${G_NAME}) + else() add_library(${G_NAME} ${${G_NAME}_SRCS}) set_target_properties (${G_NAME} PROPERTIES FOLDER lib) set_target_properties(${G_NAME} PROPERTIES OUTPUT_NAME ${G_NAME}.${GRASS_VERSION_NUMBER}) - set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") + # Default is to use library target name without grass_ prefix + string(REPLACE "grass_" "" default_html_file_name ${G_NAME}) + generate_export_header(${G_NAME} - STATIC_DEFINE "STATIC_BUILD" - EXPORT_FILE_NAME ${export_file_name}) - endif() + STATIC_DEFINE "STATIC_BUILD" + EXPORT_FILE_NAME ${export_file_name}) + endif() + + if(G_HTML_FILE_NAME) + set(HTML_FILE_NAME ${G_HTML_FILE_NAME}) + else() + set(HTML_FILE_NAME ${default_html_file_name}) + endif() - add_dependencies(${G_NAME} copy_header) + get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) + set_property(GLOBAL PROPERTY MODULE_LIST "${MODULE_LIST};${G_NAME}") + + add_dependencies(${G_NAME} copy_header) foreach(G_OPTIONAL_DEPEND ${G_OPTIONAL_DEPENDS}) if(TARGET ${G_OPTIONAL_DEPEND}) @@ -69,7 +76,6 @@ function(build_module) endif() endforeach() foreach(G_DEPEND ${G_DEPENDS}) - if(NOT TARGET ${G_DEPEND}) message(FATAL_ERROR "${G_DEPEND} not a target") break() @@ -94,7 +100,6 @@ function(build_module) target_compile_definitions(${G_NAME} PUBLIC "${G_DEF}") endforeach() - set(package_define) if(NOT G_PACKAGE) if(G_EXE) @@ -109,36 +114,33 @@ function(build_module) endif() target_compile_definitions(${G_NAME} PRIVATE "-DPACKAGE=\"${package_define}\"") - + foreach(dep ${G_DEPENDS} ${G_OPTIONAL_DEPENDS}) if(TARGET ${dep}) get_target_property(interface_def ${dep} INTERFACE_COMPILE_DEFINITIONS) - if(interface_def) + if(interface_def) target_compile_definitions(${G_NAME} PRIVATE "${interface_def}") - endif() + endif() endif() - target_link_libraries(${G_NAME} ${dep}) + target_link_libraries(${G_NAME} ${dep}) endforeach() set(RUN_HTML_DESCR TRUE) - #auto set if to run RUN_HTML_DESCR - if(G_EXE) - set(RUN_HTML_DESCR TRUE) - if (G_RUNTIME_OUTPUT_DIR) - set(RUN_HTML_DESCR FALSE) - endif() - # g.parser does not have --html-description. + # Auto set if to run RUN_HTML_DESCR + if(G_EXE) + set(RUN_HTML_DESCR TRUE) + if (G_RUNTIME_OUTPUT_DIR) + set(RUN_HTML_DESCR FALSE) + endif() + # g.parser and some others does not have --html-description. if( ${G_NAME} IN_LIST NO_HTML_DESCR_TARGETS) set(RUN_HTML_DESCR FALSE) endif() - else() - set(RUN_HTML_DESCR FALSE) - endif() - -# message(" ${G_NAME} == ${RUN_HTML_DESCR}") - + else() + set(RUN_HTML_DESCR FALSE) + endif() - set(install_dest "") + set(install_dest "") if(NOT G_RUNTIME_OUTPUT_DIR) if(G_EXE) set(G_RUNTIME_OUTPUT_DIR "${GISBASE}/bin") @@ -151,12 +153,16 @@ function(build_module) set(install_dest "${G_RUNTIME_OUTPUT_DIR}") set(G_RUNTIME_OUTPUT_DIR "${GISBASE}/${install_dest}") endif() - #set_target_properties(${G_NAME} PROPERTIES prop1 "source_directory name") - set_target_properties(${G_NAME} PROPERTIES G_SRCDIR "${G_SRCDIR}") - #add_custom_command(TARGET ${G_NAME} POST_BUILD - # COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR}) - build_docs(${G_NAME} ${G_RUNTIME_OUTPUT_DIR}) + # To use this property later in build_docs + + set_target_properties(${G_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") + set_target_properties(${G_NAME} PROPERTIES G_PGM "$") + set_target_properties(${G_NAME} PROPERTIES G_SRC_DIR "${G_SRCDIR}") + set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") + set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") + + build_docs(${G_NAME}) if(WITH_DOCSX) set(html_files) @@ -218,47 +224,5 @@ function(build_module) endfunction() - function(build_docs target_name G_RUNTIME_OUTPUT_DIR) - if(${target_name} STREQUAL "g.parser") - #message("Dont know to build docs for ${target_name}") - return() - endif() - - get_target_property(G_SRCDIR ${target_name} G_SRCDIR) - - # message("G_SRCDIR for ${G_NAME} is ${G_SRCDIR}") - - set(html_file ${G_SRCDIR}/${target_name}.html) - set(input_html_file) - if(EXISTS ${html_file}) - set(input_html_file ${html_file}) - set(input_html_tmp_file ${G_SRCDIR}/${target_name}.tmp.html) - #message("html_file for ${target_name} is ${html_file}") - else() - #message("${target_name} is a library?") - endif() - - if(NOT input_html_file) - #message("Dont know to build docs for ${target_name}") - return() - endif() - - add_custom_command(TARGET ${target_name} POST_BUILD - COMMAND ${CMAKE_COMMAND} - -DINPUT_HTML_FILE=${input_html_file} - -DIS_EXECUTABLE=TRUE - -Dexecutable_name=${target_name} - -DGRASS_PGM=$ - -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} - -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake - #COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR} - #COMMAND ${CMAKE_COMMAND} -E touch ${input_html_tmp_file} - #COMMENT "Generating html for ${target_name}" - ) - #VERBATIM) - - #add_custom_target(${target_name}_html ALL DEPENDS ${G_RUNTIME_OUTPUT_DIR}/${target_name}.exe) - endfunction() \ No newline at end of file From 3a3e87c1f167b8a0f80d0e3c5a77930320e921b4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:25:45 +0100 Subject: [PATCH 179/264] add missing dependencies for v.lrs --- vector/v.lrs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/v.lrs/CMakeLists.txt b/vector/v.lrs/CMakeLists.txt index 7643588d21c..f38a7ff17f2 100644 --- a/vector/v.lrs/CMakeLists.txt +++ b/vector/v.lrs/CMakeLists.txt @@ -1,7 +1,7 @@ build_library_in_subdir(lib NAME grass_lrs DEPENDS grass_gis grass_vector HEADERS "lrs.h" ) - +add_dependencies(grass_lrs db.drivers) build_program_in_subdir( v.lrs.create DEPENDS grass_lrs) From 6b6e53558da7762b3c99cd2de9d01c38e0a7e74f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:26:30 +0100 Subject: [PATCH 180/264] update building python modules (wip) --- cmake/modules/build_py_module.cmake | 151 +++++++++++++++++++ cmake/modules/build_pymodule_in_subdir.cmake | 2 +- gui/wxpython/CMakeLists.txt | 30 ++-- lib/python/CMakeLists.txt | 18 +-- 4 files changed, 176 insertions(+), 25 deletions(-) create mode 100644 cmake/modules/build_py_module.cmake diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake new file mode 100644 index 00000000000..4d281859703 --- /dev/null +++ b/cmake/modules/build_py_module.cmake @@ -0,0 +1,151 @@ +macro(build_gui_in_subdir dir_name) + build_py_module(NAME ${dir_name} + DST_DIR gui/wxpython + TARGET_NAME_PREFIX "g.gui." + AS_GUI) +endmacro() + + +macro(build_script_in_subdir dir_name) + build_py_module(NAME ${dir_name} + DST_DIR etc + AS_SCRIPT) +endmacro() + +macro(build_py_lib_in_subdir dir_name) + build_py_module(NAME ${dir_name} + TARGET_NAME_PREFIX "pylib." + DST_DIR etc/python/grass) +endmacro() + + +function(build_py_module) + cmake_parse_arguments(G + "AS_SCRIPT;AS_GUI" + "NAME;SRC_DIR;SRC_REGEX;DST_DIR;TARGET_NAME_PREFIX;HTML_FILE_NAME" + "SOURCES;DEPENDS" ${ARGN} ) + + if(NOT G_SRC_DIR) + set(G_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) + endif() + + + if(NOT G_SRC_REGEX) + set(G_SRC_REGEX "*.py") + endif() + + # if(G_AS_GUI) + # set(G_TARGET_NAME g.gui.${G_NAME}) + # else() + # set(G_TARGET_NAME ${G_NAME}) + # endif() + + + set(G_TARGET_NAME ${G_TARGET_NAME_PREFIX}${G_NAME}) + + if(G_HTML_FILE_NAME) + set(HTML_FILE_NAME ${G_HTML_FILE_NAME}) + else() + set(HTML_FILE_NAME ${G_TARGET_NAME}) + endif() + + + file(GLOB PYTHON_FILES "${G_SRC_DIR}/${G_SRC_REGEX}") + if(NOT PYTHON_FILES) + message(FATAL_ERROR "[${G_TARGET_NAME}]: No PYTHON_FILES found.") + endif() + + + + # message("PYTHON_FILES=${PYTHON_FILES}") + ##################### TRANSLATE STRING FOR SCRIPTS AND GUI ##################### + if(NOT PY_MODULE_FILE) + set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_NAME}.py) + endif() + + if(EXISTS ${PY_MODULE_FILE}) + set(MAIN_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${G_NAME}") + if(WIN32) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in + ${MAIN_SCRIPT_FILE}.bat) + #From here .bat is our main script file + set(MAIN_SCRIPT_FILE ${MAIN_SCRIPT_FILE}.bat) + else() + if(G_TARGET_NAME STREQUAL "v.what.strds") + ##message(FATAL_ERROR "stop MAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") + endif() + + configure_file(${PY_MODULE_FILE} ${MAIN_SCRIPT_FILE} COPYONLY) + endif() + else() + set(PY_MODULE_FILE "") + endif() + + if(G_TARGET_NAME STREQUAL "v.what.strds") + ###message(FATAL_ERROR "stop PY_MODULE_FILE=${PY_MODULE_FILE} \nMAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") + endif() + ######################## TRANSLATE STRING FOR SCRIPTS ######################### + set(TRANSLATE_C_FILE "") + + if(G_AS_SCRIPT) + set(TRANSLATE_C_FILE + ${CMAKE_SOURCE_DIR}/locale/scriptstrings/${G_NAME}_to_translate.c) + + add_custom_command( + OUTPUT ${TRANSLATE_C_FILE} + DEPENDS g.parser ${MAIN_SCRIPT_FILE} + COMMAND ${CMAKE_COMMAND} + -DINPUT_FILE=${MAIN_SCRIPT_FILE} + -DOUTPUT_FILE=${TRANSLATE_C_FILE} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + COMMENT "Generating ${TRANSLATE_C_FILE}" + VERBATIM) + endif() + + #message("Adding python taret ${G_TARGET_NAME}") + + add_custom_target(${G_TARGET_NAME} ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME} + DEPENDS ${TRANSLATE_C_FILE}) + + #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) + #add_dependencies(${G_NAME} ${MODULE_LIST}) + + if(G_DEPENDS) + add_dependencies(${G_TARGET_NAME} ${G_DEPENDS}) + endif() + set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER scripts) + + install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) + + # To use this property later in build_docs + set(RUN_HTML_DESCR FALSE) + if(G_AS_SCRIPT OR G_AS_GUI) + set(RUN_HTML_DESCR TRUE) + endif() + + set_target_properties(${G_TARGET_NAME} PROPERTIES G_SRC_DIR "${G_SRC_DIR}") + set_target_properties(${G_TARGET_NAME} PROPERTIES G_PGM "${MAIN_SCRIPT_FILE}") + set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") + set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") + set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") + + if(WITH_DOCS) + build_docs(${G_TARGET_NAME}) +# add_dependencies(${G_TARGET_NAME} ${G_DEPENDS}) + endif() + + + # if(MAIN_SCRIPT_FILE) + # add_custom_command(TARGET ${G_TARGET_NAME} POST_BUILD + # COMMAND ${CMAKE_COMMAND} -E copy ${MAIN_SCRIPT_FILE} ${CMAKE_BINARY_DIR}/scripts + # ) + # endif() + + install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) + +endfunction() + diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake index 8ef98006d6b..5951b24b1a9 100644 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ b/cmake/modules/build_pymodule_in_subdir.cmake @@ -1,5 +1,5 @@ include(copy_python_file) -function(build_pymodule_in_subdir module_name dest_dir) +function(xbuild_pymodule_in_subdir module_name dest_dir) #set(pyc_depends) file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 64c979fbbc4..4005432ab55 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -1,34 +1,36 @@ -#missing docs -set(gui_sub_dirs animation core datacatalog dbmgr gcp gmodeler gui_core iclass +# missing docs +set(gui_DIRS animation core datacatalog dbmgr gcp gmodeler gui_core iclass icons image2target iscatt lmgr location_wizard mapdisp mapswipe mapwin modules nviz photo2image psmap rdigit rlisetup startup timeline tools tplot vdigit vnet web_services wxplot) -foreach(gui_sub_dir ${gui_sub_dirs}) - build_pymodule_in_subdir(${gui_sub_dir} gui/wxpython/${gui_sub_dir}) +foreach(gui_DIR ${gui_DIRS}) + build_gui_in_subdir(${gui_DIR}) endforeach() install(FILES README DESTINATION gui/wxpython) - copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py gui/wxpython) -get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) -separate_arguments(MODULE_LIST) -set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") -list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) -list(REMOVE_DUPLICATES MODULE_LIST ) +#get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) +#separate_arguments(MODULE_LIST) +#set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") +#list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) +#list(REMOVE_DUPLICATES MODULE_LIST) +if(XXX) + ### copy all python files gui/ lib/python + ### compile all python files + ### so below target depends on MODULD_LIST set(WXPYTHON_DIR ${GISBASE}/gui/wxpython) - add_custom_target(copy_build_module_xml #COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${WXPYTHON_DIR}/tools/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} - DEPENDS copy_gui_images +##### DEPENDS copy_gui_images ) add_custom_target(build_modules_items_xml @@ -64,6 +66,4 @@ add_custom_target(copy_build_module_xml #install after validate ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml/module_tree_menudata.xml - #python3 core/menutree.py "" >> menustrings.py - #python3 core/menutree.py "module_tree" >> menustrings.py - #python3 core/menutree.py "" >> menustrings.py +endif() diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index ab80e761fc6..588de0613eb 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -1,24 +1,24 @@ -include(build_pymodule_in_subdir) -build_pymodule_in_subdir(exceptions etc/python/grass) +#include(build_py_module_in_subdir) +build_py_lib_in_subdir(exceptions) -build_pymodule_in_subdir(script etc/python/grass) +build_py_lib_in_subdir(script) configure_file(script/setup.py ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py COPYONLY) - add_subdirectory(ctypes) +# add_subdirectory(ctypes) - build_pymodule_in_subdir(temporal etc/python/grass) +# build_py_lib_in_subdir(temporal etc/python/grass) - add_subdirectory(pygrass) +# add_subdirectory(pygrass) - build_pymodule_in_subdir(pydispatch etc/python/grass) +# build_py_lib_in_subdir(pydispatch etc/python/grass) - build_pymodule_in_subdir(imaging etc/python/grass) +# build_py_lib_in_subdir(imaging etc/python/grass) - build_pymodule_in_subdir(gunittest etc/python/grass) +# build_py_lib_in_subdir(gunittest etc/python/grass) file(WRITE ${GISBASE}/etc/python/_init__.py "#coding=utf-8") From af5f5ffc2f4d96680be828a787e87bbc93554d7d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:33:36 +0100 Subject: [PATCH 181/264] use target property to check if running python script (docs) --- cmake/modules/build_docs.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index b65bd51f9f0..13129614921 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -4,6 +4,7 @@ function(build_docs target_name) get_target_property(RUN_HTML_DESCR ${target_name} RUN_HTML_DESCR) get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) + get_target_property(IS_PYTHON_SCRIPT ${target_name} IS_PYTHON_SCRIPT) set(html_file ${G_SRC_DIR}/${G_HTML_FILE_NAME}) set(HTML_FILE) @@ -26,6 +27,7 @@ function(build_docs target_name) -DHTML_FILE=${HTML_FILE} -DRUN_HTML_DESCR=${RUN_HTML_DESCR} -DG_PGM=${G_PGM} + -DIS_PYTHON_SCRIPT=${IS_PYTHON_SCRIPT} -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake From e004cbcf54788ee71f4b546ba3dae09d700e458d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 01:34:33 +0100 Subject: [PATCH 182/264] cleanup cmake helper functions (exe, libs, python, docs) --- cmake/mkhtml.cmake.in | 3 +- cmake/modules/build_module.cmake | 61 ++--------------------------- cmake/modules/build_py_module.cmake | 26 +++--------- 3 files changed, 11 insertions(+), 79 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index a617cc4beb4..92a2e85ad95 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -81,10 +81,9 @@ file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) foreach(IMG_FILE ${IMG_FILES}) file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) endforeach() -set(IS_PYTHON 1) message("Creating ${TMP_HTML_FILE}:: ${PGM_NAME} --html-description") if(RUN_HTML_DESCR) - if(IS_PYTHON) + if(IS_PYTHON_SCRIPT) execute_process( COMMAND ${PYTHON_EXECUTABLE} ${PGM_NAME} "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 1d4e32b43e6..eccc283ed6d 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -161,64 +161,11 @@ function(build_module) set_target_properties(${G_NAME} PROPERTIES G_SRC_DIR "${G_SRCDIR}") set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") + set_target_properties(${G_TARGET_NAME} PROPERTIES IS_PYTHON_SCRIPT FALSE) - build_docs(${G_NAME}) - - if(WITH_DOCSX) - set(html_files) - set(html_file "${G_SRCDIR}/${G_NAME}.html") - set(create_html FALSE) - if(EXISTS "${html_file}") - set(create_html TRUE) - file(GLOB img_files ${G_NAME}/*.png ${G_NAME}/*.jpg) - else() - set(html_file "") - file(GLOB html_files "${G_SRCDIR}/*.html") - #message("html_files=${html_files}") - if(html_files) - # TODO; check if there is more than 1 .html for libs - list(GET html_files 0 html_file) - set(create_html TRUE) - endif() - endif() - - -# message("html_file=${html_file}") -# message(FATAL_ERROR "create_html=${create_html}") - if(create_html) - get_filename_component(html_name ${html_file} NAME) - string(REPLACE ".html" "" html_name ${html_name}) - file(GLOB img_files ${G_SRCDIR}/*.png ${G_SRCDIR}/*.jpg) - - set(html_file_tmp "${GISBASE}/docs/html/${html_name}.tmp.html") - set(html_file_out "${GISBASE}/docs/html/${html_name}.html") - add_custom_command(TARGET ${G_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR}) - if(RUN_HTML_DESCR) - add_custom_command(TARGET ${G_NAME} POST_BUILD - COMMAND ${RUN_GRASS} ${G_NAME} --html-description > ${html_file_tmp} - COMMENT "Generating ${html_file_tmp}") - endif() - - if(img_files) - add_custom_command(TARGET ${G_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${img_files} ${GISBASE}/docs/html/ - #COMMENT "Copy ${G_SRCDIR}/{*.png,*.jpg} to ${GISBASE}/docs/html/" - ) - endif() - - set(mkhtml_cmd ${RUN_PYTHON} ${CMAKE_BINARY_DIR}/tools/mkhtml.py) - add_custom_command(TARGET ${G_NAME} POST_BUILD - COMMAND ${mkhtml_cmd} ${html_name} ${html_file} ${html_file_tmp} > ${html_file_out} - COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} - COMMENT "Generating ${html_file_out}" - ) - install(FILES ${html_file_out} DESTINATION docs/html) -# add_custom_target(${G_NAME}_docs ALL DEPENDS ${html_file_out}) - endif() # if(EXISTS "${html_file}") - - endif() #WITH_DOCS - + if(WITH_DOCS) + build_docs(${G_NAME}) + endif() # WITH_DOCS install(TARGETS ${G_NAME} DESTINATION ${install_dest}) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 4d281859703..71f7cb5d5cc 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -29,18 +29,10 @@ function(build_py_module) set(G_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) endif() - if(NOT G_SRC_REGEX) set(G_SRC_REGEX "*.py") endif() - # if(G_AS_GUI) - # set(G_TARGET_NAME g.gui.${G_NAME}) - # else() - # set(G_TARGET_NAME ${G_NAME}) - # endif() - - set(G_TARGET_NAME ${G_TARGET_NAME_PREFIX}${G_NAME}) if(G_HTML_FILE_NAME) @@ -132,20 +124,14 @@ function(build_py_module) set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") + set_target_properties(${G_TARGET_NAME} PROPERTIES IS_PYTHON_SCRIPT TRUE) - if(WITH_DOCS) - build_docs(${G_TARGET_NAME}) -# add_dependencies(${G_TARGET_NAME} ${G_DEPENDS}) - endif() - - - # if(MAIN_SCRIPT_FILE) - # add_custom_command(TARGET ${G_TARGET_NAME} POST_BUILD - # COMMAND ${CMAKE_COMMAND} -E copy ${MAIN_SCRIPT_FILE} ${CMAKE_BINARY_DIR}/scripts - # ) - # endif() + if(WITH_DOCS) + build_docs(${G_TARGET_NAME}) + add_dependencies(${G_TARGET_NAME} pylib.grass) + endif() - install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) + install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) endfunction() From 3debd976f32e527ef196e4acfee035f071b903c2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 02:29:38 +0100 Subject: [PATCH 183/264] copy strings.h and unistd.h on msvc --- CMakeLists.txt | 4 ---- include/CMakeLists.txt | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76186b0fcb7..05483fadcb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,10 +134,6 @@ configure_file(cmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) set(NO_HTML_DESCR_TARGETS "g.parser;ximgview") add_subdirectory(include) -if(MSVC) - include_directories("${CMAKE_SOURCE_DIR}/msvc/") -endif() - include_directories("${CMAKE_BINARY_DIR}/include") execute_process( diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 224bff3b49b..9219620ef42 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -241,7 +241,10 @@ message(STATUS "Creating ${CMAKE_BINARY_DIR}/grass/config.h") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") - + if(MSVC) + file(COPY "${CMAKE_SOURCE_DIR}/msvc/strings.h" DESTINATION ${CMAKE_BINARY_DIR}/include/) + file(COPY "${CMAKE_SOURCE_DIR}/msvc/unistd.h" DESTINATION ${CMAKE_BINARY_DIR}/include/) +endif() file(WRITE ${CMAKE_BINARY_DIR}/include/grass/copying.h "") file(STRINGS ${CMAKE_SOURCE_DIR}/COPYING copying_lines) foreach(copying_line ${copying_lines}) From 7a21f7ca1efbad28cfad85656d73531295d062b9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 02:30:24 +0100 Subject: [PATCH 184/264] revert defined check to __MINGW32__ (one case) --- include/gis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gis.h b/include/gis.h index fea824cc434..db9a06a5953 100644 --- a/include/gis.h +++ b/include/gis.h @@ -600,7 +600,7 @@ typedef float FCELL; #if HAVE_INT64_T #include typedef int64_t grass_int64; -#elif defined(_WIN32) +#elif defined(__MINGW32__) typedef __int64 grass_int64; #elif HAVE_LONG_LONG_INT typedef long long int grass_int64; From c8cf8130c931b73612ec3463503bb3091ecc093d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 02:31:23 +0100 Subject: [PATCH 185/264] python files (target) depend only grass.script if building docs --- cmake/modules/build_py_module.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 71f7cb5d5cc..6da42540345 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -128,7 +128,7 @@ function(build_py_module) if(WITH_DOCS) build_docs(${G_TARGET_NAME}) - add_dependencies(${G_TARGET_NAME} pylib.grass) + add_dependencies(${G_TARGET_NAME} pylib.script) endif() install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) From b05216fece404b86f504eb0066a9a90e865149f7 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Wed, 8 Jan 2020 03:41:17 +0100 Subject: [PATCH 186/264] fix build docs for windows and linux (wip) --- cmake/mkhtml.cmake.in | 28 ++++++++++++---------------- cmake/modules/build_docs.cmake | 6 ++++-- cmake/modules/build_module.cmake | 10 ++++++++-- cmake/modules/build_py_module.cmake | 11 +++++------ 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 92a2e85ad95..10c456cf42e 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -12,21 +12,20 @@ function(fatal_error file_name) message(STATUS "PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") message(STATUS "MKHTML_PY=${MKHTML_PY}") message(STATUS "PGM_NAME=${PGM_NAME}") + message(STATUS "G_TARGET_FILE=${G_TARGET_FILE}") message(STATUS "OUT_HTML_FILE=${OUT_HTML_FILE}") - execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_PGM}) + execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_TARGET_FILE}) message(SEND_ERROR "Failed to create ${TMP_HTML_FILE}") endfunction() if(NOT HTML_FILE) - message(STATUS "Dont know to build docs for ${G_PGM}") - file(INSTALL ${G_PGM} DESTINATION ${OUTPUT_DIR}) + message(STATUS "Dont know to build docs for ${PGM_NAME}") + file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) return() endif() -message("${G_PGM} output ${OUTPUT_DIR}") - set(GISBASE "@GISBASE@") set(TOP_DIR "@CMAKE_SOURCE_DIR@") set(BINARY_DIR "@CMAKE_BINARY_DIR@") @@ -68,10 +67,6 @@ set(ENV{PYTHONPATH} "${GRASS_PYTHONPATH}") get_filename_component(HTML_FILE_NAME ${HTML_FILE} NAME) get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) -if(NOT PGM_NAME) - get_filename_component(PGM_NAME ${G_PGM} NAME) -endif() - string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) @@ -81,8 +76,9 @@ file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) foreach(IMG_FILE ${IMG_FILES}) file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) endforeach() -message("Creating ${TMP_HTML_FILE}:: ${PGM_NAME} --html-description") + if(RUN_HTML_DESCR) +message("Running ${PGM_NAME} --html-description") if(IS_PYTHON_SCRIPT) execute_process( COMMAND ${PYTHON_EXECUTABLE} ${PGM_NAME} "--html-description" @@ -90,21 +86,21 @@ if(RUN_HTML_DESCR) RESULT_VARIABLE html_descr_rv) else() execute_process( - COMMAND ${}${PGM_NAME} "--html-description" + COMMAND ${PGM_NAME} "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} RESULT_VARIABLE html_descr_rv) endif() #TODO: print TMP_HTML_FILE contents in case of failure. #message("html_descr_rv=${html_descr_rv}") if(NOT html_descr_rv EQUAL 0) - fatal_error(${G_PGM} ${TMP_HTML_FILE}) + fatal_error(${PGM_NAME} ${TMP_HTML_FILE}) endif() if(NOT EXISTS ${TMP_HTML_FILE}) - fatal_error(${G_PGM} ${TMP_HTML_FILE}) + fatal_error(${PGM_NAME} ${TMP_HTML_FILE}) endif() else() - message(FATAL_ERROR "No html-description run for ${G_PGM}") + message(STATUS "No html-description run for ${PGM_NAME}") endif() message(STATUS "Creating ${OUT_HTML_FILE}") @@ -115,8 +111,8 @@ execute_process( #message("mkhtml_rv=${mkhtml_rv}") if(NOT mkhtml_rv EQUAL 0) - fatal_error(${G_PGM} ${OUT_HTML_FILE}) + fatal_error(${PGM_NAME} ${OUT_HTML_FILE}) endif() -file(INSTALL ${G_PGM} DESTINATION ${OUTPUT_DIR}) +file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) file(REMOVE ${TMP_HTML_FILE}) diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index 13129614921..66a2c1dc448 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -1,6 +1,7 @@ function(build_docs target_name) get_target_property(G_SRC_DIR ${target_name} G_SRC_DIR) - get_target_property(G_PGM ${target_name} G_PGM) + get_target_property(G_TARGET_FILE ${target_name} G_TARGET_FILE) + get_target_property(PGM_NAME ${target_name} PGM_NAME) get_target_property(RUN_HTML_DESCR ${target_name} RUN_HTML_DESCR) get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) @@ -26,7 +27,8 @@ function(build_docs target_name) COMMAND ${CMAKE_COMMAND} -DHTML_FILE=${HTML_FILE} -DRUN_HTML_DESCR=${RUN_HTML_DESCR} - -DG_PGM=${G_PGM} + -DG_TARGET_FILE=${G_TARGET_FILE} + -DPGM_NAME=${PGM_NAME} -DIS_PYTHON_SCRIPT=${IS_PYTHON_SCRIPT} -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index eccc283ed6d..0694272ff0d 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -45,6 +45,10 @@ function(build_module) add_executable(${G_NAME} ${${G_NAME}_SRCS}) set_target_properties (${G_NAME} PROPERTIES FOLDER bin) set(default_html_file_name ${G_NAME}) + set(PGM_NAME ${G_NAME}) + if(WIN32) + set(PGM_NAME ${G_NAME}.exe) + endif() else() add_library(${G_NAME} ${${G_NAME}_SRCS}) @@ -53,6 +57,7 @@ function(build_module) set(export_file_name "${CMAKE_BINARY_DIR}/include/export/${G_NAME}_export.h") # Default is to use library target name without grass_ prefix string(REPLACE "grass_" "" default_html_file_name ${G_NAME}) + set(PGM_NAME ${default_html_file_name}) generate_export_header(${G_NAME} STATIC_DEFINE "STATIC_BUILD" @@ -155,9 +160,10 @@ function(build_module) endif() # To use this property later in build_docs - + set_target_properties(${G_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") - set_target_properties(${G_NAME} PROPERTIES G_PGM "$") + set_target_properties(${G_NAME} PROPERTIES G_TARGET_FILE "$") + set_target_properties(${G_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") set_target_properties(${G_NAME} PROPERTIES G_SRC_DIR "${G_SRCDIR}") set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 6da42540345..34f596ba174 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -57,17 +57,15 @@ function(build_py_module) if(EXISTS ${PY_MODULE_FILE}) set(MAIN_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${G_NAME}") + set(PGM_NAME ${G_NAME}) if(WIN32) configure_file( ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${MAIN_SCRIPT_FILE}.bat) #From here .bat is our main script file set(MAIN_SCRIPT_FILE ${MAIN_SCRIPT_FILE}.bat) + set(PGM_NAME ${G_NAME}.bat) else() - if(G_TARGET_NAME STREQUAL "v.what.strds") - ##message(FATAL_ERROR "stop MAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") - endif() - configure_file(${PY_MODULE_FILE} ${MAIN_SCRIPT_FILE} COPYONLY) endif() else() @@ -120,9 +118,10 @@ function(build_py_module) endif() set_target_properties(${G_TARGET_NAME} PROPERTIES G_SRC_DIR "${G_SRC_DIR}") - set_target_properties(${G_TARGET_NAME} PROPERTIES G_PGM "${MAIN_SCRIPT_FILE}") + set_target_properties(${G_TARGET_NAME} PROPERTIES G_TARGET_FILE "${MAIN_SCRIPT_FILE}") + set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") - set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") + set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") set_target_properties(${G_TARGET_NAME} PROPERTIES IS_PYTHON_SCRIPT TRUE) From 0e631ea3960d85d440ed12f36558111ce9db8400 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 00:27:05 +0100 Subject: [PATCH 187/264] seperate list of g.gui.* modules --- gui/wxpython/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 4005432ab55..093c5139a06 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -1,14 +1,19 @@ # missing docs -set(gui_DIRS animation core datacatalog dbmgr gcp gmodeler gui_core iclass -icons image2target iscatt lmgr location_wizard mapdisp mapswipe mapwin modules nviz -photo2image psmap rdigit rlisetup startup timeline tools tplot vdigit -vnet web_services wxplot) +set(gui_DIRS animation datacatalog dbmgr gcp gmodeler +iclass image2target mapswipe photo2image psmap rlisetup timeline tplot vdigit) foreach(gui_DIR ${gui_DIRS}) build_gui_in_subdir(${gui_DIR}) endforeach() +set(gui_lib_DIRS core gui_core icons iscatt lmgr location_wizard +mapdisp mapwin modules nviz rdigit startup tools vnet web_services wxplot) + +foreach(gui_lib_DIR ${gui_lib_DIRS}) + build_py_lib_in_subdir(${gui_lib_DIR}) +endforeach() + install(FILES README DESTINATION gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py gui/wxpython) copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py gui/wxpython) From 553c1b1dab91a57e30e0fae71c80d5b16f99bc58 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 00:29:31 +0100 Subject: [PATCH 188/264] try to make generic build docs (wip) --- cmake/mkhtml.cmake.in | 88 +++++++++++-------- cmake/modules/build_docs.cmake | 15 ++-- cmake/modules/build_module.cmake | 13 ++- cmake/modules/build_py_module.cmake | 131 +++++++++++++++++++--------- cmake/modules/check_target.cmake | 2 +- cmake/py_cli.bat.in | 2 + cmake/py_cli_install.bat.in | 2 + 7 files changed, 166 insertions(+), 87 deletions(-) create mode 100644 cmake/py_cli.bat.in create mode 100644 cmake/py_cli_install.bat.in diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 10c456cf42e..5fcf5f2d110 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -1,6 +1,5 @@ function(fatal_error file_name) - message("file_name=${file_name}") - message(STATUS "ENV{PATH}=$ENV{PATH}") + #message(STATUS "ENV{PATH}=$ENV{PATH}") message(STATUS "ENV{PYTHONPATH}=$ENV{PYTHONPATH}") message(STATUS "ENV{GISRC}=$ENV{GISRC}") message(STATUS "ENV{GISBASE}=$ENV{GISBASE}") @@ -8,20 +7,21 @@ function(fatal_error file_name) message(STATUS "ENV{LD_LIBRARY_PATH}=$ENV{LD_LIBRARY_PATH}") endif() - message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") - message(STATUS "PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") - message(STATUS "MKHTML_PY=${MKHTML_PY}") - message(STATUS "PGM_NAME=${PGM_NAME}") +# message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") + # message(STATUS "PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") + #message(STATUS "MKHTML_PY=${MKHTML_PY}") + #message(STATUS "PGM_NAME=${PGM_NAME}") message(STATUS "G_TARGET_FILE=${G_TARGET_FILE}") - message(STATUS "OUT_HTML_FILE=${OUT_HTML_FILE}") + #message(STATUS "OUT_HTML_FILE=${OUT_HTML_FILE}") + #message(STATUS "IS_PYTHON_SCRIPT=${IS_PYTHON_SCRIPT}") execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_TARGET_FILE}) - message(SEND_ERROR "Failed to create ${TMP_HTML_FILE}") + message(SEND_ERROR "Failed to create ${file_name}") endfunction() if(NOT HTML_FILE) - message(STATUS "Dont know to build docs for ${PGM_NAME}") + message( "Dont know to build docs for ${PGM_NAME}") file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) return() endif() @@ -34,9 +34,11 @@ file(TO_NATIVE_PATH "${TOP_DIR}" MODULE_TOPDIR ) file(TO_NATIVE_PATH "${GISBASE}" GIS_BASE_DIR ) file(TO_NATIVE_PATH "${GIS_BASE_DIR}/etc/config/rc" GISRC) file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BIN_DIR) -file(TO_NATIVE_PATH "${BINARY_DIR}/scripts" SCRIPTS_DIR) +file(TO_NATIVE_PATH "${GIS_BASE_DIR}/bin" GIS_BIN_DIR) +file(TO_NATIVE_PATH "${GIS_BASE_DIR}/scripts" SCRIPTS_DIR) file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" WXPYTHON_DIR) file(TO_NATIVE_PATH "${GISBASE}/etc/python" PYTHON_DIR) +file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" TEMP_DIR) if(WIN32) set(P_SEP ";") @@ -44,9 +46,11 @@ else() set(P_SEP ":") endif() -set(ENV{PATH} "${BIN_DIR}${P_SEP}${SCRIPTS_DIR}${P_SEP}$ENV{PATH}") -#message(STATUS "Setup grass environment with ${GISBASE}") + +set(ENV{PATH} "${TEMP_DIR}${P_SEP}${BIN_DIR}${P_SEP}$ENV{PATH}") + + set(ENV{GISBASE} "${GIS_BASE_DIR}") set(ENV{MODULE_TOPDIR} "${MODULE_TOPDIR}") set(ENV{GISRC} "${GISRC}") @@ -59,7 +63,7 @@ if(UNIX) set(ENV{LD_LIBRARY_PATH} ${GRASS_LD_LIBRARY_PATH}) endif() -set(GRASS_PYTHONPATH "${WXPYTHON_DIR}${P_SEP}${PYTHON_DIR}${P_SEP}${GISBASE}/scripts${P_SEP}$ENV{PYTHONPATH}") +set(GRASS_PYTHONPATH "${WXPYTHON_DIR}${P_SEP}${PYTHON_DIR}${P_SEP}$ENV{PYTHONPATH}") string(REGEX REPLACE "^(.*)\\${P_SEP}$" "\\1" GRASS_PYTHONPATH "${GRASS_PYTHONPATH}") set(ENV{PYTHONPATH} "${GRASS_PYTHONPATH}") @@ -67,52 +71,68 @@ set(ENV{PYTHONPATH} "${GRASS_PYTHONPATH}") get_filename_component(HTML_FILE_NAME ${HTML_FILE} NAME) get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) + +string(REPLACE ".html" "" PGM_NAME2 "${HTML_FILE_NAME}" ) +message("PGM_NAME2=${PGM_NAME2}") +message("G_TARGET_FILE2x=${G_TARGET_FILE}") + +if(PYTHON_SCRIPT) +if(WIN32) + file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) + file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) + + configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) +#message("Writing ${BINARY_DIR}/TEMP/${PGM_NAME2} ") +endif() #WIN32 +endif() #PYTHON_SCRIPT + string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) -file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) -foreach(IMG_FILE ${IMG_FILES}) - file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) -endforeach() - if(RUN_HTML_DESCR) -message("Running ${PGM_NAME} --html-description") - if(IS_PYTHON_SCRIPT) +message("Running ${PGM_NAME2}${PGM_EXT} --html-description") execute_process( - COMMAND ${PYTHON_EXECUTABLE} ${PGM_NAME} "--html-description" + COMMAND ${PGM_NAME2}${PGM_EXT} "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} RESULT_VARIABLE html_descr_rv) -else() - execute_process( - COMMAND ${PGM_NAME} "--html-description" - OUTPUT_FILE ${TMP_HTML_FILE} - RESULT_VARIABLE html_descr_rv) -endif() + #TODO: print TMP_HTML_FILE contents in case of failure. - #message("html_descr_rv=${html_descr_rv}") + message("html_descr_rv=${html_descr_rv}") if(NOT html_descr_rv EQUAL 0) - fatal_error(${PGM_NAME} ${TMP_HTML_FILE}) + fatal_error(${TMP_HTML_FILE}) endif() if(NOT EXISTS ${TMP_HTML_FILE}) - fatal_error(${PGM_NAME} ${TMP_HTML_FILE}) + fatal_error(${TMP_HTML_FILE}) endif() else() - message(STATUS "No html-description run for ${PGM_NAME}") + message(STATUS "No html-description run for ${PGM_NAME2}") endif() message(STATUS "Creating ${OUT_HTML_FILE}") execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} + COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME2} OUTPUT_FILE ${OUT_HTML_FILE} RESULT_VARIABLE mkhtml_rv) -#message("mkhtml_rv=${mkhtml_rv}") +message("mkhtml_rv=${mkhtml_rv}") if(NOT mkhtml_rv EQUAL 0) - fatal_error(${PGM_NAME} ${OUT_HTML_FILE}) + fatal_error(${OUT_HTML_FILE}) endif() +file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) +foreach(IMG_FILE ${IMG_FILES}) + file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) +endforeach() file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) file(REMOVE ${TMP_HTML_FILE}) +#if( NOT PGM_NAME2 STREQUAL "g.parser") + #fatal_error(${PGM_NAME2} ${OUT_HTML_FILE}) +# endif() +if(PYTHON_SCRIPT) +if(WIN32) + configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${GISBASE}/scripts/${PGM_NAME2}.bat @ONLY) + endif() + endif() \ No newline at end of file diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index 66a2c1dc448..69c1bbdd395 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -1,12 +1,13 @@ function(build_docs target_name) get_target_property(G_SRC_DIR ${target_name} G_SRC_DIR) get_target_property(G_TARGET_FILE ${target_name} G_TARGET_FILE) - get_target_property(PGM_NAME ${target_name} PGM_NAME) + #get_target_property(PGM_NAME ${target_name} PGM_NAME) get_target_property(RUN_HTML_DESCR ${target_name} RUN_HTML_DESCR) get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) - get_target_property(IS_PYTHON_SCRIPT ${target_name} IS_PYTHON_SCRIPT) - + get_target_property(PYTHON_SCRIPT ${target_name} PYTHON_SCRIPT) + get_target_property(PGM_EXT ${target_name} PGM_EXT) + set(html_file ${G_SRC_DIR}/${G_HTML_FILE_NAME}) set(HTML_FILE) set(no_docs_list "grass_sqlp;echo;clean_temp;lock;run") @@ -16,22 +17,22 @@ function(build_docs target_name) else() file(GLOB html_files ${G_SRC_DIR}/*.html) if(html_files) - if(NOT "${target_name}" IN_LIST no_docs_list) + if(NOT ${target_name} IN_LIST no_docs_list) message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${G_RUNTIME_OUTPUT_DIR} | ${target_name}") endif() endif() endif() - +##message("G_TARGET_FILE=${G_TARGET_FILE}") add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -DHTML_FILE=${HTML_FILE} -DRUN_HTML_DESCR=${RUN_HTML_DESCR} -DG_TARGET_FILE=${G_TARGET_FILE} - -DPGM_NAME=${PGM_NAME} - -DIS_PYTHON_SCRIPT=${IS_PYTHON_SCRIPT} -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DPYTHON_SCRIPT=${PYTHON_SCRIPT} + -DPGM_EXT=${PGM_EXT} -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake ) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 0694272ff0d..cd4a8a200c0 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -160,15 +160,22 @@ function(build_module) endif() # To use this property later in build_docs - + set(PGM_EXT "") + if(WIN32) + if(G_EXE) + set(PGM_EXT ".exe") + endif() + endif() set_target_properties(${G_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") set_target_properties(${G_NAME} PROPERTIES G_TARGET_FILE "$") set_target_properties(${G_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") set_target_properties(${G_NAME} PROPERTIES G_SRC_DIR "${G_SRCDIR}") set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - set_target_properties(${G_TARGET_NAME} PROPERTIES IS_PYTHON_SCRIPT FALSE) - + set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT FALSE) + set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") + + if(WITH_DOCS) build_docs(${G_NAME}) endif() # WITH_DOCS diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 34f596ba174..258bef58539 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -1,28 +1,27 @@ macro(build_gui_in_subdir dir_name) build_py_module(NAME ${dir_name} DST_DIR gui/wxpython - TARGET_NAME_PREFIX "g.gui." - AS_GUI) + TYPE "GUI") endmacro() macro(build_script_in_subdir dir_name) build_py_module(NAME ${dir_name} DST_DIR etc - AS_SCRIPT) + TYPE "SCRIPT") endmacro() macro(build_py_lib_in_subdir dir_name) build_py_module(NAME ${dir_name} - TARGET_NAME_PREFIX "pylib." + TYPE "LIB" DST_DIR etc/python/grass) endmacro() function(build_py_module) cmake_parse_arguments(G - "AS_SCRIPT;AS_GUI" - "NAME;SRC_DIR;SRC_REGEX;DST_DIR;TARGET_NAME_PREFIX;HTML_FILE_NAME" + "" + "NAME;SRC_DIR;SRC_REGEX;DST_DIR;TYPE;HTML_FILE_NAME" "SOURCES;DEPENDS" ${ARGN} ) if(NOT G_SRC_DIR) @@ -33,6 +32,25 @@ function(build_py_module) set(G_SRC_REGEX "*.py") endif() + if(NOT G_TYPE) + message(FATAL_ERROR "TYPE argument is required") + endif() + + set(types "GUI;LIB;SCRIPT") + if(NOT "${G_TYPE}" IN_LIST types) + message(FATAL_ERROR "TYPE is '${G_TYPE}'. Supported values are ${types}") + endif() + + set(G_TARGET_NAME_PREFIX "") + if(G_TYPE STREQUAL "GUI") + set(G_TARGET_NAME_PREFIX "g.gui.") + elseif(G_TYPE STREQUAL "LIB") + set(G_TARGET_NAME_PREFIX "pylib.") + endif() + + + + set(G_TARGET_NAME ${G_TARGET_NAME_PREFIX}${G_NAME}) if(G_HTML_FILE_NAME) @@ -49,42 +67,51 @@ function(build_py_module) - # message("PYTHON_FILES=${PYTHON_FILES}") +# message("PYTHON_FILES=${PYTHON_FILES}") ##################### TRANSLATE STRING FOR SCRIPTS AND GUI ##################### if(NOT PY_MODULE_FILE) - set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_NAME}.py) + set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) endif() - if(EXISTS ${PY_MODULE_FILE}) - set(MAIN_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${G_NAME}") - set(PGM_NAME ${G_NAME}) - if(WIN32) - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in - ${MAIN_SCRIPT_FILE}.bat) - #From here .bat is our main script file - set(MAIN_SCRIPT_FILE ${MAIN_SCRIPT_FILE}.bat) - set(PGM_NAME ${G_NAME}.bat) - else() - configure_file(${PY_MODULE_FILE} ${MAIN_SCRIPT_FILE} COPYONLY) + if(NOT G_TYPE STREQUAL "LIB") + if (NOT EXISTS ${PY_MODULE_FILE}) + message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") endif() + + + + set(PGM_NAME ${G_TARGET_NAME}) + if(WIN32) + set(PGM_NAME ${G_TARGET_NAME}.bat) + #file(TO_NATIVE_PATH "${GISBASE}/scripts" scripts_dir) + #file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) + #file(WRITE ${GISBASE}/scripts/${PGM_NAME} + #"@echo off +#\"${python_exe}\" \"${scripts_dir}\\${G_TARGET_NAME}.py\" \%* ") +#message("Writing ${GISBASE}/scripts/${PGM_NAME} ") + #configure_file( + #${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in + #${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) + ###file(COPY ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME} DESTINATION ${CMAKE_BINARY_DIR}/scripts) else() - set(PY_MODULE_FILE "") + #configure_file(${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) + file(COPY ${PY_MODULE_FILE} DESTINATION ${GISBASE}/scripts/ + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) endif() - - if(G_TARGET_NAME STREQUAL "v.what.strds") - ###message(FATAL_ERROR "stop PY_MODULE_FILE=${PY_MODULE_FILE} \nMAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") - endif() + + set(MAIN_SCRIPT_FILE "${GISBASE}/scripts/${PGM_NAME}") + #message( "MAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") + endif() ######################## TRANSLATE STRING FOR SCRIPTS ######################### set(TRANSLATE_C_FILE "") - if(G_AS_SCRIPT) + if(G_TYPE STREQUAL "SCRIPT") set(TRANSLATE_C_FILE ${CMAKE_SOURCE_DIR}/locale/scriptstrings/${G_NAME}_to_translate.c) add_custom_command( OUTPUT ${TRANSLATE_C_FILE} - DEPENDS g.parser ${MAIN_SCRIPT_FILE} + DEPENDS g.parser ${PY_MODULE_FILE} COMMAND ${CMAKE_COMMAND} -DINPUT_FILE=${MAIN_SCRIPT_FILE} -DOUTPUT_FILE=${TRANSLATE_C_FILE} @@ -94,40 +121,60 @@ function(build_py_module) VERBATIM) endif() - #message("Adding python taret ${G_TARGET_NAME}") - + ## message("Adding python taret ${G_TARGET_NAME}") + + set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/TEMP/${G_TARGET_NAME}.py) + add_custom_target(${G_TARGET_NAME} ALL + COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/TEMP/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME} - DEPENDS ${TRANSLATE_C_FILE}) + DEPENDS ${TRANSLATE_C_FILE} ${PY_MODULE_FILE}) #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) #add_dependencies(${G_NAME} ${MODULE_LIST}) if(G_DEPENDS) - add_dependencies(${G_TARGET_NAME} ${G_DEPENDS}) + #add_dependencies(${G_TARGET_NAME} ${G_DEPENDS}) endif() + + if(G_TYPE STREQUAL "GUI") + set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) + endif() + + if(G_TYPE STREQUAL "SCRIPT") set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER scripts) + endif() + + if(G_TYPE STREQUAL "LIB") + set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER python) + endif() install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) - # To use this property later in build_docs - set(RUN_HTML_DESCR FALSE) - if(G_AS_SCRIPT OR G_AS_GUI) - set(RUN_HTML_DESCR TRUE) - endif() + + if(WITH_DOCS) + if(NOT G_TYPE STREQUAL "LIB") + set(PGM_EXT "") + if(WIN32) + set(PGM_EXT ".bat") + endif() set_target_properties(${G_TARGET_NAME} PROPERTIES G_SRC_DIR "${G_SRC_DIR}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_TARGET_FILE "${MAIN_SCRIPT_FILE}") - set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") - set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") + #set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") + set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR TRUE) + set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT TRUE) + set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - set_target_properties(${G_TARGET_NAME} PROPERTIES IS_PYTHON_SCRIPT TRUE) - if(WITH_DOCS) - build_docs(${G_TARGET_NAME}) - add_dependencies(${G_TARGET_NAME} pylib.script) + build_docs(${G_TARGET_NAME}) + endif() + + if(${G_TYPE} IN_LIST "GUI;SCRIPT") + #add_dependencies(${G_TARGET_NAME} pylib.script) + endif() endif() install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) diff --git a/cmake/modules/check_target.cmake b/cmake/modules/check_target.cmake index 4c1502d268a..ca6d3f855ef 100644 --- a/cmake/modules/check_target.cmake +++ b/cmake/modules/check_target.cmake @@ -1,7 +1,7 @@ macro(check_target target_name have_define_var) set(${have_define_var} 0) if(TARGET ${target_name}) - message(STATUS "${target_name} package found. Setting ${have_define_var} to 1") + #message(STATUS "${target_name} package found. Setting ${have_define_var} to 1") set(${have_define_var} 1) endif() endmacro() diff --git a/cmake/py_cli.bat.in b/cmake/py_cli.bat.in new file mode 100644 index 00000000000..70b208554ba --- /dev/null +++ b/cmake/py_cli.bat.in @@ -0,0 +1,2 @@ +@echo off +"@python_exe@" "@scripts_dir@\@PGM_NAME2@.py" %* \ No newline at end of file diff --git a/cmake/py_cli_install.bat.in b/cmake/py_cli_install.bat.in new file mode 100644 index 00000000000..18cdcbf4989 --- /dev/null +++ b/cmake/py_cli_install.bat.in @@ -0,0 +1,2 @@ +@echo off +"%GRASS_PYTHON%" "%GISBASE%\script\@PGM_NAME2@.py" %* From ff70f951b8af86064d4fec6946b38f9f7f3e16aa Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 00:42:35 +0100 Subject: [PATCH 189/264] build docs html for not win32 (wip) --- cmake/mkhtml.cmake.in | 15 ++++++++++++--- cmake/modules/build_py_module.cmake | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 5fcf5f2d110..3c10609777a 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -80,9 +80,14 @@ if(PYTHON_SCRIPT) if(WIN32) file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) - configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) #message("Writing ${BINARY_DIR}/TEMP/${PGM_NAME2} ") +else() +file(COPY ${G_TARGET_FILE} DESTINATION ${BINARY_DIR}/TEMP/) + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) + +file(RENAME ${BINARY_DIR}/TEMP/${PGM_NAME2}.py ${BINARY_DIR}/TEMP/${PGM_NAME2}) + endif() #WIN32 endif() #PYTHON_SCRIPT @@ -133,6 +138,10 @@ file(REMOVE ${TMP_HTML_FILE}) # endif() if(PYTHON_SCRIPT) if(WIN32) - configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${GISBASE}/scripts/${PGM_NAME2}.bat @ONLY) + configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${OUTPUT_DIR}/${PGM_NAME2}.bat @ONLY) + else() + file(INSTALL ${BINARY_DIR}/TEMP/${PGM_NAME2} DESTINATION ${OUTPUT_DIR}) endif() - endif() \ No newline at end of file + + endif() + diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 258bef58539..f7aab894f0a 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -129,7 +129,7 @@ function(build_py_module) COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/TEMP/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME} - DEPENDS ${TRANSLATE_C_FILE} ${PY_MODULE_FILE}) + DEPENDS ${TRANSLATE_C_FILE} ) #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) #add_dependencies(${G_NAME} ${MODULE_LIST}) From af442995fe56e224327d0ada09c16699c7b08ef6 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 00:46:57 +0100 Subject: [PATCH 190/264] fix cmake syntax error --- cmake/mkhtml.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 3c10609777a..96701f661cb 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -83,9 +83,9 @@ if(WIN32) configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) #message("Writing ${BINARY_DIR}/TEMP/${PGM_NAME2} ") else() -file(COPY ${G_TARGET_FILE} DESTINATION ${BINARY_DIR}/TEMP/) +file(COPY ${G_TARGET_FILE} DESTINATION ${BINARY_DIR}/TEMP/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) - + file(RENAME ${BINARY_DIR}/TEMP/${PGM_NAME2}.py ${BINARY_DIR}/TEMP/${PGM_NAME2}) endif() #WIN32 From 3b82042838046be21c7a538cc79c3e12b92b6501 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 01:38:45 +0100 Subject: [PATCH 191/264] update pgm extension for running html description --- cmake/mkhtml.cmake.in | 10 +++++++++- cmake/modules/build_docs.cmake | 5 ++--- cmake/modules/build_module.cmake | 11 ++++++----- cmake/modules/build_py_module.cmake | 24 ++++++++++++++++-------- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 96701f661cb..bfcd08a7dea 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -77,7 +77,9 @@ message("PGM_NAME2=${PGM_NAME2}") message("G_TARGET_FILE2x=${G_TARGET_FILE}") if(PYTHON_SCRIPT) +set(PGM_EXT "") if(WIN32) +set(PGM_EXT ".bat") file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) @@ -87,8 +89,14 @@ file(COPY ${G_TARGET_FILE} DESTINATION ${BINARY_DIR}/TEMP/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) file(RENAME ${BINARY_DIR}/TEMP/${PGM_NAME2}.py ${BINARY_DIR}/TEMP/${PGM_NAME2}) - +else() endif() #WIN32 +else() +set(PGM_EXT "") +if(WIN32) +message("OUTPUT_DIR=${OUTPUT_DIR}") +set(PGM_EXT ".exe") +endif() endif() #PYTHON_SCRIPT string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index 69c1bbdd395..c0ec3b6218a 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -6,7 +6,7 @@ function(build_docs target_name) get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) get_target_property(PYTHON_SCRIPT ${target_name} PYTHON_SCRIPT) - get_target_property(PGM_EXT ${target_name} PGM_EXT) + set(html_file ${G_SRC_DIR}/${G_HTML_FILE_NAME}) set(HTML_FILE) @@ -23,7 +23,7 @@ function(build_docs target_name) endif() endif() -##message("G_TARGET_FILE=${G_TARGET_FILE}") + add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -DHTML_FILE=${HTML_FILE} @@ -32,7 +32,6 @@ function(build_docs target_name) -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DPYTHON_SCRIPT=${PYTHON_SCRIPT} - -DPGM_EXT=${PGM_EXT} -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake ) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index cd4a8a200c0..8c1f589d666 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -160,12 +160,14 @@ function(build_module) endif() # To use this property later in build_docs - set(PGM_EXT "") + set(PGM_EXT "NONE") if(WIN32) - if(G_EXE) - set(PGM_EXT ".exe") - endif() + if(G_EXE) + set(PGM_EXT ".exe") + endif() endif() + + set_target_properties(${G_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") set_target_properties(${G_NAME} PROPERTIES G_TARGET_FILE "$") set_target_properties(${G_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") @@ -173,7 +175,6 @@ function(build_module) set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT FALSE) - set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") if(WITH_DOCS) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index f7aab894f0a..6004c6338ce 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -94,9 +94,13 @@ function(build_py_module) #${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) ###file(COPY ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME} DESTINATION ${CMAKE_BINARY_DIR}/scripts) else() + if(${G_TYPE} IN_LIST "GUI;SCRIPT") #configure_file(${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) - file(COPY ${PY_MODULE_FILE} DESTINATION ${GISBASE}/scripts/ + file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) + + #COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}// + endif() endif() set(MAIN_SCRIPT_FILE "${GISBASE}/scripts/${PGM_NAME}") @@ -126,7 +130,7 @@ function(build_py_module) set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/TEMP/${G_TARGET_NAME}.py) add_custom_target(${G_TARGET_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/TEMP/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME} DEPENDS ${TRANSLATE_C_FILE} ) @@ -154,22 +158,26 @@ function(build_py_module) if(WITH_DOCS) + set(PGM_EXT "") if(NOT G_TYPE STREQUAL "LIB") - set(PGM_EXT "") - if(WIN32) - set(PGM_EXT ".bat") - endif() + if(WIN32) + set(PGM_EXT ".bat") + endif() + + + set_target_properties(${G_TARGET_NAME} PROPERTIES G_SRC_DIR "${G_SRC_DIR}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_TARGET_FILE "${MAIN_SCRIPT_FILE}") #set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR TRUE) set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT TRUE) - set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") + #set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - + if(${G_TYPE} IN_LIST "GUI;SCRIPT") build_docs(${G_TARGET_NAME}) + endif() endif() if(${G_TYPE} IN_LIST "GUI;SCRIPT") From 75a3fa271ce4d09fb607a00678236b1f82bd9f7a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 01:45:52 +0100 Subject: [PATCH 192/264] remove temp files after docs are finished --- CMakeLists.txt | 1 + cmake/mkhtml.cmake.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05483fadcb7..8620aa5ff11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,7 @@ add_subdirectory(include) include_directories("${CMAKE_BINARY_DIR}/include") execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/TEMP COMMAND ${CMAKE_COMMAND} -E echo "Creating directories in ${GISBASE}" COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/bin/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/demolocation/ diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index bfcd08a7dea..70e11eed6b2 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -152,4 +152,5 @@ if(WIN32) endif() endif() - + file(REMOVE ${TMP_HTML_FILE}) + file(REMOVE ${BINARY_DIR}/TEMP/${PGM_NAME2}) From f1b0f54354dbb85eaf3c84368d2e808d6d4eb2ef Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 01:57:49 +0100 Subject: [PATCH 193/264] CMake: fix IN_LIST syntax --- cmake/modules/build_py_module.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 6004c6338ce..b83404345c1 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -94,7 +94,7 @@ function(build_py_module) #${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) ###file(COPY ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME} DESTINATION ${CMAKE_BINARY_DIR}/scripts) else() - if(${G_TYPE} IN_LIST "GUI;SCRIPT") + if(${G_TYPE} IN_LIST types) #configure_file(${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) @@ -175,13 +175,13 @@ function(build_py_module) #set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - if(${G_TYPE} IN_LIST "GUI;SCRIPT") + if(${G_TYPE} IN_LIST types) build_docs(${G_TARGET_NAME}) endif() endif() - if(${G_TYPE} IN_LIST "GUI;SCRIPT") - #add_dependencies(${G_TARGET_NAME} pylib.script) + if(${G_TYPE} IN_LIST types) + add_dependencies(${G_TARGET_NAME} pylib.script) endif() endif() From 7d5d94a313d8cfd2ecc4e2e167630150c52e358f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 02:01:00 +0100 Subject: [PATCH 194/264] ficx cmake syntax error --- cmake/mkhtml.cmake.in | 4 ++-- cmake/modules/build_docs.cmake | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 70e11eed6b2..208c35be12c 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -89,9 +89,9 @@ file(COPY ${G_TARGET_FILE} DESTINATION ${BINARY_DIR}/TEMP/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) file(RENAME ${BINARY_DIR}/TEMP/${PGM_NAME2}.py ${BINARY_DIR}/TEMP/${PGM_NAME2}) -else() + endif() #WIN32 -else() + set(PGM_EXT "") if(WIN32) message("OUTPUT_DIR=${OUTPUT_DIR}") diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index c0ec3b6218a..ef828594845 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -1,7 +1,6 @@ function(build_docs target_name) get_target_property(G_SRC_DIR ${target_name} G_SRC_DIR) get_target_property(G_TARGET_FILE ${target_name} G_TARGET_FILE) - #get_target_property(PGM_NAME ${target_name} PGM_NAME) get_target_property(RUN_HTML_DESCR ${target_name} RUN_HTML_DESCR) get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) From c46ceeba005d5d0b4959580c3447b3123cbe568f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 03:03:11 +0100 Subject: [PATCH 195/264] fix again linux html description for python with a main script --- cmake/mkhtml.cmake.in | 4 ++-- cmake/modules/build_py_module.cmake | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 208c35be12c..99c026a6220 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -85,10 +85,10 @@ set(PGM_EXT ".bat") configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) #message("Writing ${BINARY_DIR}/TEMP/${PGM_NAME2} ") else() -file(COPY ${G_TARGET_FILE} DESTINATION ${BINARY_DIR}/TEMP/ +configure_file(${G_TARGET_FILE} ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} COPYONLY) +file(COPY ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) -file(RENAME ${BINARY_DIR}/TEMP/${PGM_NAME2}.py ${BINARY_DIR}/TEMP/${PGM_NAME2}) endif() #WIN32 diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index b83404345c1..6e3d93b61d8 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -128,9 +128,10 @@ function(build_py_module) ## message("Adding python taret ${G_TARGET_NAME}") set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/TEMP/${G_TARGET_NAME}.py) - + if(EXISTS ${PY_MODULE_FILE}) + file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/) + endif() add_custom_target(${G_TARGET_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME} DEPENDS ${TRANSLATE_C_FILE} ) From eb0adf9831206480e46647aab43799bd9d981baf Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 20:29:09 +0100 Subject: [PATCH 196/264] wip: include from config build is breaking msvc --- CMakeLists.txt | 3 +++ cmake/mkhtml.cmake.in | 18 ++++++++++++++++++ cmake/modules/build_py_module.cmake | 2 +- include/CMakeLists.txt | 7 ++----- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8620aa5ff11..e822a9d8544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,9 @@ set(NO_HTML_DESCR_TARGETS "g.parser;ximgview") add_subdirectory(include) include_directories("${CMAKE_BINARY_DIR}/include") +if(MSVC) + include_directories("${CMAKE_SOURCE_DIR}/msvc") +endif() execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/TEMP diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 99c026a6220..24012cde0fd 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -105,8 +105,26 @@ set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) if(RUN_HTML_DESCR) +if(PYTHON_SCRIPT) +message("Running pythonn ${PGM_NAME2}${PGM_EXT} --html-description") + execute_process( + COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/TEMP/ ${PYTHON_EXECUTABLE} ${PGM_NAME2}.py "--html-description" + OUTPUT_FILE ${TMP_HTML_FILE} + RESULT_VARIABLE html_descr_rv) + + #TODO: print TMP_HTML_FILE contents in case of failure. + message("html_descr_rv=${html_descr_rv}") + if(NOT html_descr_rv EQUAL 0) + fatal_error(${TMP_HTML_FILE}) + endif() + + if(NOT EXISTS ${TMP_HTML_FILE}) + fatal_error(${TMP_HTML_FILE}) + endif() +else() message("Running ${PGM_NAME2}${PGM_EXT} --html-description") execute_process( + COMMAND ${PGM_NAME2}${PGM_EXT} "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} RESULT_VARIABLE html_descr_rv) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 6e3d93b61d8..15c093db4d1 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -128,7 +128,7 @@ function(build_py_module) ## message("Adding python taret ${G_TARGET_NAME}") set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/TEMP/${G_TARGET_NAME}.py) - if(EXISTS ${PY_MODULE_FILE}) + if(EXISTS "${PY_MODULE_FILE}") file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/) endif() add_custom_target(${G_TARGET_NAME} ALL diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 9219620ef42..2c47d0817cb 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -236,15 +236,12 @@ add_custom_target(copy_header DEPENDS ${include_depends}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") -message(STATUS "Creating ${CMAKE_BINARY_DIR}/grass/config.h") +message(STATUS "Creating ${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") - if(MSVC) - file(COPY "${CMAKE_SOURCE_DIR}/msvc/strings.h" DESTINATION ${CMAKE_BINARY_DIR}/include/) - file(COPY "${CMAKE_SOURCE_DIR}/msvc/unistd.h" DESTINATION ${CMAKE_BINARY_DIR}/include/) -endif() + file(WRITE ${CMAKE_BINARY_DIR}/include/grass/copying.h "") file(STRINGS ${CMAKE_SOURCE_DIR}/COPYING copying_lines) foreach(copying_line ${copying_lines}) From e175ba3a110f776ce5dffed8c7fb21ad02ba4c9e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 20:30:27 +0100 Subject: [PATCH 197/264] msvc: disable db drivers (wip) --- db/CMakeLists.txt | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index ebdf743f8d6..0646fb29acf 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -1,32 +1,35 @@ -set(db_drivers) +set(db_drivers grass_gis) +if(NOT MSVC) add_subdirectory(drivers) +endif() -build_program_in_subdir(db.columns DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.columns DEPENDS grass_dbmiclient) add_dependencies(db.columns ${db_drivers}) -build_program_in_subdir(db.createdb DEPENDS grass_gis grass_dbmiclient) + +build_program_in_subdir(db.createdb DEPENDS grass_dbmiclient) add_dependencies(db.createdb ${db_drivers}) -build_program_in_subdir(db.describe DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.describe DEPENDS grass_dbmiclient) add_dependencies(db.describe ${db_drivers}) -build_program_in_subdir(db.connect DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.connect DEPENDS grass_dbmiclient) add_dependencies(db.connect ${db_drivers}) -build_program_in_subdir(db.copy DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.copy DEPENDS grass_dbmiclient) add_dependencies(db.copy ${db_drivers}) -build_program_in_subdir(db.execute DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.execute DEPENDS grass_dbmiclient) add_dependencies(db.execute ${db_drivers}) -build_program_in_subdir(db.drivers DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.drivers DEPENDS grass_dbmiclient) add_dependencies(db.drivers ${db_drivers}) -build_program_in_subdir(db.databases DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.databases DEPENDS grass_dbmiclient) add_dependencies(db.databases ${db_drivers}) -build_program_in_subdir(db.dropdb DEPENDS grass_gis grass_dbmiclient) +build_program_in_subdir(db.dropdb DEPENDS grass_dbmiclient) add_dependencies(db.dropdb ${db_drivers}) #TODO: PGM = databaseintro From a6f81c52645c0678f4039984197e90d7e33d52f1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 21:16:27 +0100 Subject: [PATCH 198/264] keep _WIN32. issue on windows was from autconf build --- include/gis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gis.h b/include/gis.h index db9a06a5953..fea824cc434 100644 --- a/include/gis.h +++ b/include/gis.h @@ -600,7 +600,7 @@ typedef float FCELL; #if HAVE_INT64_T #include typedef int64_t grass_int64; -#elif defined(__MINGW32__) +#elif defined(_WIN32) typedef __int64 grass_int64; #elif HAVE_LONG_LONG_INT typedef long long int grass_int64; From e6fd74fccf2b2445903515fdb91550deae781fc8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 21:17:18 +0100 Subject: [PATCH 199/264] add test.raster3d.lib into NO_HTML_DESCR_TARGETS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e822a9d8544..8dc95153967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,7 +131,7 @@ endif() configure_file(cmake/run_python${SCRIPT_EXT}.in ${RUN_PYTHON} @ONLY) configure_file(cmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) -set(NO_HTML_DESCR_TARGETS "g.parser;ximgview") +set(NO_HTML_DESCR_TARGETS "g.parser;ximgview;test.raster3d.lib") add_subdirectory(include) include_directories("${CMAKE_BINARY_DIR}/include") From efe74ca73cee57ef70e9927f7f84b8c35f58c482 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 21:17:38 +0100 Subject: [PATCH 200/264] CMake: missing endif() --- cmake/mkhtml.cmake.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 24012cde0fd..c2f0d43ee09 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -121,7 +121,7 @@ message("Running pythonn ${PGM_NAME2}${PGM_EXT} --html-description") if(NOT EXISTS ${TMP_HTML_FILE}) fatal_error(${TMP_HTML_FILE}) endif() -else() +else(PYTHON_SCRIPT) message("Running ${PGM_NAME2}${PGM_EXT} --html-description") execute_process( @@ -138,9 +138,10 @@ message("Running ${PGM_NAME2}${PGM_EXT} --html-description") if(NOT EXISTS ${TMP_HTML_FILE}) fatal_error(${TMP_HTML_FILE}) endif() -else() +endif(PYTHON_SCRIPT) +else(RUN_HTML_DESCR) message(STATUS "No html-description run for ${PGM_NAME2}") -endif() +endif(RUN_HTML_DESCR) message(STATUS "Creating ${OUT_HTML_FILE}") execute_process( From f3f0fa45fed3980fd0a1df65b07441e57d453d71 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 22:13:19 +0100 Subject: [PATCH 201/264] x extension on running html descr --- cmake/mkhtml.cmake.in | 18 ++++++++---------- cmake/modules/build_module.cmake | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index c2f0d43ee09..9da1af4ce8a 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -77,9 +77,7 @@ message("PGM_NAME2=${PGM_NAME2}") message("G_TARGET_FILE2x=${G_TARGET_FILE}") if(PYTHON_SCRIPT) -set(PGM_EXT "") -if(WIN32) -set(PGM_EXT ".bat") + file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) @@ -92,11 +90,7 @@ file(COPY ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ endif() #WIN32 -set(PGM_EXT "") -if(WIN32) -message("OUTPUT_DIR=${OUTPUT_DIR}") -set(PGM_EXT ".exe") -endif() + endif() #PYTHON_SCRIPT string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) @@ -106,9 +100,9 @@ set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) if(RUN_HTML_DESCR) if(PYTHON_SCRIPT) -message("Running pythonn ${PGM_NAME2}${PGM_EXT} --html-description") +message("Running pythonn ${PGM_NAME2}.py --html-description") execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/TEMP/ ${PYTHON_EXECUTABLE} ${PGM_NAME2}.py "--html-description" + COMMAND ${CMAKE_COMMAND} -E chdir ${BINARY_DIR}/TEMP/ ${PYTHON_EXECUTABLE} ${PGM_NAME2}.py "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} RESULT_VARIABLE html_descr_rv) @@ -122,6 +116,10 @@ message("Running pythonn ${PGM_NAME2}${PGM_EXT} --html-description") fatal_error(${TMP_HTML_FILE}) endif() else(PYTHON_SCRIPT) +set(PGM_EXT "") +if(WIN32) +set(PGM_EXT ".exe") +endif() message("Running ${PGM_NAME2}${PGM_EXT} --html-description") execute_process( diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 8c1f589d666..29ed2bbe144 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -174,7 +174,7 @@ function(build_module) set_target_properties(${G_NAME} PROPERTIES G_SRC_DIR "${G_SRCDIR}") set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT FALSE) + set_target_properties(${G_NAME} PROPERTIES PYTHON_SCRIPT FALSE) if(WITH_DOCS) From 8e057ea13088de0869a5d6f6d6d8e42f31434242 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 23:56:38 +0100 Subject: [PATCH 202/264] copy r.in.wms directory to etc/ --- scripts/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index f6c98861bdd..c9748affe28 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -80,3 +80,7 @@ set(script_DIRS foreach(script_DIR ${script_DIRS}) build_script_in_subdir(${script_DIR}) endforeach() + + +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms +DESTINATION ${CMAKE_BINARY_DIR}/etc/) \ No newline at end of file From 1c4313b721f8c84c2b852209d8ebedd97eb867c9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 23:57:32 +0100 Subject: [PATCH 203/264] fix building py modules --- cmake/mkhtml.cmake.in | 23 +++++++++++++---------- cmake/modules/build_py_module.cmake | 15 ++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 9da1af4ce8a..1e1ddc6c92d 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -73,19 +73,20 @@ get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) string(REPLACE ".html" "" PGM_NAME2 "${HTML_FILE_NAME}" ) -message("PGM_NAME2=${PGM_NAME2}") -message("G_TARGET_FILE2x=${G_TARGET_FILE}") +#message("PGM_NAME2=${PGM_NAME2}") +#message("G_TARGET_FILE2x=${G_TARGET_FILE}") if(PYTHON_SCRIPT) - file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) - file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) - configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) + #file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) +# file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) +# configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) #message("Writing ${BINARY_DIR}/TEMP/${PGM_NAME2} ") else() configure_file(${G_TARGET_FILE} ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} COPYONLY) -file(COPY ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ - FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) +#file(COPY ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ +#file(COPY ${G_TARGET_FILE}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ +# FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) endif() #WIN32 @@ -147,7 +148,7 @@ execute_process( OUTPUT_FILE ${OUT_HTML_FILE} RESULT_VARIABLE mkhtml_rv) -message("mkhtml_rv=${mkhtml_rv}") +#message("mkhtml_rv=${mkhtml_rv}") if(NOT mkhtml_rv EQUAL 0) fatal_error(${OUT_HTML_FILE}) endif() @@ -156,16 +157,18 @@ file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) foreach(IMG_FILE ${IMG_FILES}) file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) endforeach() -file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) + file(REMOVE ${TMP_HTML_FILE}) #if( NOT PGM_NAME2 STREQUAL "g.parser") #fatal_error(${PGM_NAME2} ${OUT_HTML_FILE}) # endif() if(PYTHON_SCRIPT) if(WIN32) +file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${OUTPUT_DIR}/${PGM_NAME2}.bat @ONLY) else() - file(INSTALL ${BINARY_DIR}/TEMP/${PGM_NAME2} DESTINATION ${OUTPUT_DIR}) + file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} + RENAME ${PGM_NAME}) endif() endif() diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 15c093db4d1..bef5aa39f85 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -94,16 +94,16 @@ function(build_py_module) #${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) ###file(COPY ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME} DESTINATION ${CMAKE_BINARY_DIR}/scripts) else() - if(${G_TYPE} IN_LIST types) + #if(${G_TYPE} IN_LIST types) #configure_file(${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) - file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/ - FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) + #file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/ + # FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) #COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}// - endif() + # endif() endif() - set(MAIN_SCRIPT_FILE "${GISBASE}/scripts/${PGM_NAME}") + #set(MAIN_SCRIPT_FILE "${GISBASE}/scripts/${PGM_NAME}") #message( "MAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") endif() ######################## TRANSLATE STRING FOR SCRIPTS ######################### @@ -132,8 +132,9 @@ function(build_py_module) file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/) endif() add_custom_target(${G_TARGET_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME} + #COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ + #COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/TEMP/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/ DEPENDS ${TRANSLATE_C_FILE} ) #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) From 822cee921fd98da147ebcf3aee0cad2b921875ec Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 23:58:05 +0100 Subject: [PATCH 204/264] add grass dll directory to path windows grass.bat --- lib/init/CMakeLists.txt | 2 ++ lib/init/grass.bat.in | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index 2859dd306c9..c10086b7457 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -11,6 +11,8 @@ else() set(script_file_name "grass.sh") endif() +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/bin BINARY_DIR) + set(CONFIG_PROJSHARE) get_filename_component(PROJ_INSTALL_PREFIX ${PROJ_INCLUDE_DIR} PATH) if(DEFINED ENV{PROJSHARE}) diff --git a/lib/init/grass.bat.in b/lib/init/grass.bat.in index 26aa141d2c6..656e6355709 100644 --- a/lib/init/grass.bat.in +++ b/lib/init/grass.bat.in @@ -11,11 +11,11 @@ set GEOTIFF_CSV=@GEOTIFF_CSV@ ::set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf -set PATH=@DLL_PATH_LIST@;%PATH% +set PATH=@gisbase_init_dir@\bin;@BINARY_DIR@\bin;@DLL_PATH_LIST@;%PATH% set GISBASE=@gisbase_init_dir@ -set PYTHONPATH=@gisbase_init_dir@\etc\python;=@GISBASE_INSTALL@\gui\wxpython; +set PYTHONPATH=@gisbase_init_dir@\etc\python;@gisbase_init_dir@\gui\wxpython;@gisbase_init_dir@\etc set GRASS_PYTHON=@GRASS_PYTHON@ From 655a5054033523a3a2eb25e9bf54d47f577952a9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Thu, 9 Jan 2020 23:58:45 +0100 Subject: [PATCH 205/264] alpine linux uses ash --- lib/init/grass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init/grass.py b/lib/init/grass.py index 711b3354664..784d2f89e8d 100644 --- a/lib/init/grass.py +++ b/lib/init/grass.py @@ -1536,7 +1536,7 @@ def get_grass_env_file(sh, grass_config_dir): """Get name of the shell-specific GRASS environment (rc) file""" if sh in ['csh', 'tcsh']: grass_env_file = os.path.join(grass_config_dir, 'cshrc') - elif sh in ['bash', 'msh', 'cygwin', 'sh']: + elif sh in ['bash', 'ash', 'msh', 'cygwin', 'sh']: grass_env_file = os.path.join(grass_config_dir, 'bashrc') elif sh == 'zsh': grass_env_file = os.path.join(grass_config_dir, 'zshrc') From 0944c9526f898caf20d604a57d23af9b5b545341 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 10 Jan 2020 01:18:47 +0100 Subject: [PATCH 206/264] debug linux build failures --- cmake/mkhtml.cmake.in | 47 ++++------------------ cmake/modules/build_py_module.cmake | 62 ++++++----------------------- 2 files changed, 20 insertions(+), 89 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 1e1ddc6c92d..ca5e00c347d 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -6,15 +6,7 @@ function(fatal_error file_name) if(UNIX) message(STATUS "ENV{LD_LIBRARY_PATH}=$ENV{LD_LIBRARY_PATH}") endif() - -# message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") - # message(STATUS "PGM_SOURCE_DIR=${PGM_SOURCE_DIR}") - #message(STATUS "MKHTML_PY=${MKHTML_PY}") - #message(STATUS "PGM_NAME=${PGM_NAME}") message(STATUS "G_TARGET_FILE=${G_TARGET_FILE}") - #message(STATUS "OUT_HTML_FILE=${OUT_HTML_FILE}") - #message(STATUS "IS_PYTHON_SCRIPT=${IS_PYTHON_SCRIPT}") - execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_TARGET_FILE}) message(SEND_ERROR "Failed to create ${file_name}") @@ -22,7 +14,7 @@ endfunction() if(NOT HTML_FILE) message( "Dont know to build docs for ${PGM_NAME}") - file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) + file(COPY ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) return() endif() @@ -38,7 +30,6 @@ file(TO_NATIVE_PATH "${GIS_BASE_DIR}/bin" GIS_BIN_DIR) file(TO_NATIVE_PATH "${GIS_BASE_DIR}/scripts" SCRIPTS_DIR) file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" WXPYTHON_DIR) file(TO_NATIVE_PATH "${GISBASE}/etc/python" PYTHON_DIR) -file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" TEMP_DIR) if(WIN32) set(P_SEP ";") @@ -46,10 +37,7 @@ else() set(P_SEP ":") endif() - - -set(ENV{PATH} "${TEMP_DIR}${P_SEP}${BIN_DIR}${P_SEP}$ENV{PATH}") - +set(ENV{PATH} "${BIN_DIR}${P_SEP}$ENV{PATH}") set(ENV{GISBASE} "${GIS_BASE_DIR}") set(ENV{MODULE_TOPDIR} "${MODULE_TOPDIR}") @@ -74,26 +62,9 @@ get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) string(REPLACE ".html" "" PGM_NAME2 "${HTML_FILE_NAME}" ) #message("PGM_NAME2=${PGM_NAME2}") -#message("G_TARGET_FILE2x=${G_TARGET_FILE}") - -if(PYTHON_SCRIPT) - - #file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) -# file(TO_NATIVE_PATH "${BINARY_DIR}/TEMP" scripts_dir) -# configure_file(${TOP_DIR}/cmake/py_cli.bat.in ${BINARY_DIR}/TEMP/${PGM_NAME2}.bat @ONLY) -#message("Writing ${BINARY_DIR}/TEMP/${PGM_NAME2} ") -else() -configure_file(${G_TARGET_FILE} ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} COPYONLY) -#file(COPY ${BINARY_DIR}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ -#file(COPY ${G_TARGET_FILE}/CMakeFiles/${PGM_NAME2} DESTINATION ${BINARY_DIR}/TEMP/ -# FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) - -endif() #WIN32 -endif() #PYTHON_SCRIPT - string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) @@ -103,7 +74,7 @@ if(RUN_HTML_DESCR) if(PYTHON_SCRIPT) message("Running pythonn ${PGM_NAME2}.py --html-description") execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${BINARY_DIR}/TEMP/ ${PYTHON_EXECUTABLE} ${PGM_NAME2}.py "--html-description" + COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${PGM_NAME2}.py "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} RESULT_VARIABLE html_descr_rv) @@ -138,6 +109,7 @@ message("Running ${PGM_NAME2}${PGM_EXT} --html-description") fatal_error(${TMP_HTML_FILE}) endif() endif(PYTHON_SCRIPT) + else(RUN_HTML_DESCR) message(STATUS "No html-description run for ${PGM_NAME2}") endif(RUN_HTML_DESCR) @@ -158,19 +130,14 @@ foreach(IMG_FILE ${IMG_FILES}) file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) endforeach() -file(REMOVE ${TMP_HTML_FILE}) -#if( NOT PGM_NAME2 STREQUAL "g.parser") - #fatal_error(${PGM_NAME2} ${OUT_HTML_FILE}) -# endif() -if(PYTHON_SCRIPT) if(WIN32) file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${OUTPUT_DIR}/${PGM_NAME2}.bat @ONLY) else() file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} - RENAME ${PGM_NAME}) + RENAME ${PGM_NAME2}) endif() - endif() + file(REMOVE ${TMP_HTML_FILE}) - file(REMOVE ${BINARY_DIR}/TEMP/${PGM_NAME2}) + diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index bef5aa39f85..e294c5cadad 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -69,43 +69,20 @@ function(build_py_module) # message("PYTHON_FILES=${PYTHON_FILES}") ##################### TRANSLATE STRING FOR SCRIPTS AND GUI ##################### - if(NOT PY_MODULE_FILE) - set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) - endif() +if(NOT PY_MODULE_FILE) + set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) + if(EXISTS "${PY_MODULE_FILE}") + file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) + endif() + set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) +endif() - if(NOT G_TYPE STREQUAL "LIB") +if(NOT G_TYPE STREQUAL "LIB") if (NOT EXISTS ${PY_MODULE_FILE}) message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") endif() +endif()# if(NOT G_TYPE STREQUAL "LIB") - - - set(PGM_NAME ${G_TARGET_NAME}) - if(WIN32) - set(PGM_NAME ${G_TARGET_NAME}.bat) - #file(TO_NATIVE_PATH "${GISBASE}/scripts" scripts_dir) - #file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" python_exe) - #file(WRITE ${GISBASE}/scripts/${PGM_NAME} - #"@echo off -#\"${python_exe}\" \"${scripts_dir}\\${G_TARGET_NAME}.py\" \%* ") -#message("Writing ${GISBASE}/scripts/${PGM_NAME} ") - #configure_file( - #${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in - #${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) - ###file(COPY ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME} DESTINATION ${CMAKE_BINARY_DIR}/scripts) - else() - #if(${G_TYPE} IN_LIST types) - #configure_file(${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/CMakeFiles/scripts/${PGM_NAME}) - #file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/ - # FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) - - #COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}// - # endif() - endif() - - #set(MAIN_SCRIPT_FILE "${GISBASE}/scripts/${PGM_NAME}") - #message( "MAIN_SCRIPT_FILE=${MAIN_SCRIPT_FILE}") - endif() ######################## TRANSLATE STRING FOR SCRIPTS ######################### set(TRANSLATE_C_FILE "") @@ -127,14 +104,11 @@ function(build_py_module) ## message("Adding python taret ${G_TARGET_NAME}") - set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/TEMP/${G_TARGET_NAME}.py) - if(EXISTS "${PY_MODULE_FILE}") - file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/TEMP/) - endif() + add_custom_target(${G_TARGET_NAME} ALL - #COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - #COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PY_MODULE_FILE} ${CMAKE_BINARY_DIR}/TEMP/ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ + + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ DEPENDS ${TRANSLATE_C_FILE} ) #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) @@ -160,21 +134,11 @@ function(build_py_module) if(WITH_DOCS) - set(PGM_EXT "") - if(NOT G_TYPE STREQUAL "LIB") - if(WIN32) - set(PGM_EXT ".bat") - endif() - - - set_target_properties(${G_TARGET_NAME} PROPERTIES G_SRC_DIR "${G_SRC_DIR}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_TARGET_FILE "${MAIN_SCRIPT_FILE}") - #set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR TRUE) set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT TRUE) - #set_target_properties(${G_TARGET_NAME} PROPERTIES PGM_EXT "${PGM_EXT}") set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") if(${G_TYPE} IN_LIST types) From 2361d6733aa4a480f6222981d9ed7dcac23b673d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 10 Jan 2020 01:21:26 +0100 Subject: [PATCH 207/264] cmake missing endif --- cmake/modules/build_py_module.cmake | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index e294c5cadad..49af038d058 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -66,7 +66,6 @@ function(build_py_module) endif() - # message("PYTHON_FILES=${PYTHON_FILES}") ##################### TRANSLATE STRING FOR SCRIPTS AND GUI ##################### if(NOT PY_MODULE_FILE) @@ -107,17 +106,12 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") add_custom_target(${G_TARGET_NAME} ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ DEPENDS ${TRANSLATE_C_FILE} ) #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) #add_dependencies(${G_NAME} ${MODULE_LIST}) - if(G_DEPENDS) - #add_dependencies(${G_TARGET_NAME} ${G_DEPENDS}) - endif() - if(G_TYPE STREQUAL "GUI") set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) endif() @@ -141,17 +135,15 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT TRUE) set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - if(${G_TYPE} IN_LIST types) - build_docs(${G_TARGET_NAME}) - endif() - endif() + if(${G_TYPE} IN_LIST types) + build_docs(${G_TARGET_NAME}) + endif() - if(${G_TYPE} IN_LIST types) - add_dependencies(${G_TARGET_NAME} pylib.script) - endif() - endif() + if(${G_TYPE} IN_LIST types) + add_dependencies(${G_TARGET_NAME} pylib.script) + endif() + endif(WITH_DOCS) install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) -endfunction() - +endfunction() \ No newline at end of file From 94fa3193f987cc8664f1f6fcbfc47fb9df846c61 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 10 Jan 2020 01:34:03 +0100 Subject: [PATCH 208/264] set main script file only for those selected modules --- cmake/modules/build_py_module.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 49af038d058..c7c5b91c5b0 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -72,8 +72,8 @@ if(NOT PY_MODULE_FILE) set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) if(EXISTS "${PY_MODULE_FILE}") file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) + set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) endif() - set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) endif() if(NOT G_TYPE STREQUAL "LIB") From 4a0213dd1942bceb1b08c97f3108676a50ca15a2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 10 Jan 2020 02:26:47 +0100 Subject: [PATCH 209/264] cmake: fix python docs for linux and windows --- cmake/mkhtml.cmake.in | 7 ++++--- cmake/modules/build_py_module.cmake | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index ca5e00c347d..53bc375968e 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -13,8 +13,9 @@ function(fatal_error file_name) endfunction() if(NOT HTML_FILE) - message( "Dont know to build docs for ${PGM_NAME}") - file(COPY ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) + if(G_TARGET_FILE) + file(COPY ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) + endif() return() endif() @@ -100,7 +101,7 @@ message("Running ${PGM_NAME2}${PGM_EXT} --html-description") RESULT_VARIABLE html_descr_rv) #TODO: print TMP_HTML_FILE contents in case of failure. - message("html_descr_rv=${html_descr_rv}") + #message("html_descr_rv=${html_descr_rv}") if(NOT html_descr_rv EQUAL 0) fatal_error(${TMP_HTML_FILE}) endif() diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index c7c5b91c5b0..cf49e1d7e74 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -73,6 +73,9 @@ if(NOT PY_MODULE_FILE) if(EXISTS "${PY_MODULE_FILE}") file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) + else() + set(PY_MODULE_FILE "") + set(MAIN_SCRIPT_FILE "") endif() endif() @@ -104,11 +107,16 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") ## message("Adding python taret ${G_TARGET_NAME}") + if(G_TYPE STREQUAL "SCRIPT") + add_custom_target(${G_TARGET_NAME} ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/scripts/ + DEPENDS ${TRANSLATE_C_FILE} ) + else() add_custom_target(${G_TARGET_NAME} ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - DEPENDS ${TRANSLATE_C_FILE} ) - + DEPENDS ${PY_MODULE_FILE} ) + endif() #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) #add_dependencies(${G_NAME} ${MODULE_LIST}) @@ -139,8 +147,9 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") build_docs(${G_TARGET_NAME}) endif() - if(${G_TYPE} IN_LIST types) - add_dependencies(${G_TARGET_NAME} pylib.script) + if(NOT G_TYPE STREQUAL "LIB") + add_dependencies(${G_TARGET_NAME} pylib.script pylib.exceptions) + add_dependencies(${G_TARGET_NAME} g.parser) endif() endif(WITH_DOCS) From 96614a64f66867ece0993ad6a7e6349ab9d1f1c7 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 10 Jan 2020 03:03:11 +0100 Subject: [PATCH 210/264] create scripts directory in gisbase --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dc95153967..20273689007 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,9 +140,9 @@ if(MSVC) endif() execute_process( - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/TEMP COMMAND ${CMAKE_COMMAND} -E echo "Creating directories in ${GISBASE}" COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/bin/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/scripts/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/demolocation/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/config/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/db/driver/ From 6e15712a71c745cb5ec8fa5c6a6914949e516a9d Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 10 Jan 2020 03:05:26 +0100 Subject: [PATCH 211/264] cmake debug message --- cmake/mkhtml.cmake.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index 53bc375968e..e276a82fd58 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -13,6 +13,7 @@ function(fatal_error file_name) endfunction() if(NOT HTML_FILE) + if(G_TARGET_FILE) file(COPY ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) endif() @@ -80,7 +81,7 @@ message("Running pythonn ${PGM_NAME2}.py --html-description") RESULT_VARIABLE html_descr_rv) #TODO: print TMP_HTML_FILE contents in case of failure. - message("html_descr_rv=${html_descr_rv}") + #message("html_descr_rv=${html_descr_rv}") if(NOT html_descr_rv EQUAL 0) fatal_error(${TMP_HTML_FILE}) endif() From 22476947ca135eb5081626d0090b376950453fd4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:23:26 +0100 Subject: [PATCH 212/264] add missing include --- vector/v.in.pdal/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/v.in.pdal/main.cpp b/vector/v.in.pdal/main.cpp index 88d381c59a0..ef56576a821 100644 --- a/vector/v.in.pdal/main.cpp +++ b/vector/v.in.pdal/main.cpp @@ -29,6 +29,7 @@ extern "C" #include #include #include +#include } extern "C" From 12bc38e3ebfdd25938ba61701fbe4052c8cb948e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:24:27 +0100 Subject: [PATCH 213/264] add cmake find scripts for liblas, netcdf, postgresql --- cmake/find_scripts/FindLibLAS.cmake | 38 +++++++ cmake/find_scripts/FindNetCDF.cmake | 14 +++ cmake/find_scripts/FindPostgreSQL.cmake | 125 ++++++++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 cmake/find_scripts/FindLibLAS.cmake create mode 100644 cmake/find_scripts/FindNetCDF.cmake create mode 100644 cmake/find_scripts/FindPostgreSQL.cmake diff --git a/cmake/find_scripts/FindLibLAS.cmake b/cmake/find_scripts/FindLibLAS.cmake new file mode 100644 index 00000000000..f2617df978e --- /dev/null +++ b/cmake/find_scripts/FindLibLAS.cmake @@ -0,0 +1,38 @@ +find_path(LibLAS_INCLUDE_DIR + NAMES liblas.h + PATH_SUFFIXES capi + PATH_SUFFIXES liblas/capi + DOC "path to liblas.h" +) + + +find_library(LibLAS_C_LIBRARY + NAMES liblas_c + # Help the user find it if we cannot. + DOC "path liblas_c library") + + +if (LibLAS_INCLUDE_DIR) +unset(las_version_CONTENTS) + file(READ "${LibLAS_INCLUDE_DIR}/las_version.h" las_version_CONTENTS) + + STRING(REGEX MATCH "#define +LIBLAS_VERSION_MAJOR +([0-9]+)" _dummy "${las_version_CONTENTS}") + SET(LibLAS_VERSION_MAJOR "${CMAKE_MATCH_1}") + string(REGEX MATCH "#define +LIBLAS_VERSION_MINOR +([0-9])" _dummy "${las_version_CONTENTS}") + set(LibLAS_VERSION_MINOR "${CMAKE_MATCH_1}") + string(REGEX MATCH "#define +LIBLAS_VERSION_REV +([0-9])" _dummy "${las_version_CONTENTS}") + set(LIBLAS_VERSION_REV "${CMAKE_MATCH_1}") + + set(LibLAS_VERSION_STRING + "${LibLAS_VERSION_MAJOR}.${LibLAS_VERSION_MINOR}.${LIBLAS_VERSION_REV}") +endif() + #message(FATAL_ERROR "LibLAS_LIBRARY=${LibLAS_LIBRARY}") +if(LibLAS_INCLUDE_DIR AND LibLAS_C_LIBRARY) + set(LibLAS_FOUND TRUE) +endif() + + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibLAS + REQUIRED_VARS LibLAS_C_LIBRARY LibLAS_INCLUDE_DIR + VERSION_VAR LibLAS_VERSION_STRING) diff --git a/cmake/find_scripts/FindNetCDF.cmake b/cmake/find_scripts/FindNetCDF.cmake new file mode 100644 index 00000000000..d25e9ffab8a --- /dev/null +++ b/cmake/find_scripts/FindNetCDF.cmake @@ -0,0 +1,14 @@ +find_path(NetCDF_INCLUDE_DIR + NAMES netcdf.h + DOC "path to netcdf.h") + +find_library(NetCDF_LIBRARY + NAMES netcdf + DOC "path netcdf library") + +if(NetCDF_INCLUDE_DIR AND NetCDF_LIBRARY) + set(NetCDF_FOUND TRUE) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(NetCDF REQUIRED_VARS NetCDF_LIBRARY NetCDF_INCLUDE_DIR) diff --git a/cmake/find_scripts/FindPostgreSQL.cmake b/cmake/find_scripts/FindPostgreSQL.cmake new file mode 100644 index 00000000000..0683d82e2d3 --- /dev/null +++ b/cmake/find_scripts/FindPostgreSQL.cmake @@ -0,0 +1,125 @@ +#]=======================================================================] + +# ---------------------------------------------------------------------------- +# History: +# This module is derived from the module originally found in the VTK source tree. +# +# ---------------------------------------------------------------------------- +# Note: +# PostgreSQL_ADDITIONAL_VERSIONS is a variable that can be used to set the +# version number of the implementation of PostgreSQL. +# In Windows the default installation of PostgreSQL uses that as part of the path. +# E.g C:\Program Files\PostgreSQL\8.4. +# Currently, the following version numbers are known to this module: +# "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0" +# +# To use this variable just do something like this: +# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4") +# before calling find_package(PostgreSQL) in your CMakeLists.txt file. +# This will mean that the versions you set here will be found first in the order +# specified before the default ones are searched. +# +# ---------------------------------------------------------------------------- +# You may need to manually set: +# PostgreSQL_INCLUDE_DIR - the path to where the PostgreSQL include files are. +# PostgreSQL_LIBRARY_DIR - The path to where the PostgreSQL library files are. +# If FindPostgreSQL.cmake cannot find the include files or the library files. +# +# ---------------------------------------------------------------------------- +# The following variables are set if PostgreSQL is found: +# PostgreSQL_FOUND - Set to true when PostgreSQL is found. +# PostgreSQL_INCLUDE_DIRS - Include directories for PostgreSQL +# PostgreSQL_LIBRARY_DIRS - Link directories for PostgreSQL libraries +# PostgreSQL_LIBRARIES - The PostgreSQL libraries. +# +# The ``PostgreSQL::PostgreSQL`` imported target is also created. +# +# ---------------------------------------------------------------------------- +# If you have installed PostgreSQL in a non-standard location. +# (Please note that in the following comments, it is assumed that +# points to the root directory of the include directory of PostgreSQL.) +# Then you have three options. +# 1) After CMake runs, set PostgreSQL_INCLUDE_DIR to /include and +# PostgreSQL_LIBRARY_DIR to wherever the library pq (or libpq in windows) is +# 2) Use CMAKE_INCLUDE_PATH to set a path to /PostgreSQL<-version>. This will allow find_path() +# to locate PostgreSQL_INCLUDE_DIR by utilizing the PATH_SUFFIXES option. e.g. In your CMakeLists.txt file +# set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/include") +# 3) Set an environment variable called ${PostgreSQL_ROOT} that points to the root of where you have +# installed PostgreSQL, e.g. . +# +# ---------------------------------------------------------------------------- +find_path(PostgreSQL_INCLUDE_DIR + NAMES libpq-fe.h + PATH_SUFFIXES + pgsql + postgresql + include + + # Help the user find it if we cannot. + DOC "path to libpq-fe.h" +) + +find_path(PostgreSQL_TYPE_INCLUDE_DIR + NAMES catalog/pg_type.h + PATH_SUFFIXES + postgresql + pgsql/server + postgresql/server + include/server + + # Help the user find it if we cannot. + DOC "path to postgresql header catalog/pg_type.h" +) + +find_library(PostgreSQL_LIBRARY + NAMES libpqd pqd libpq pq + # Help the user find it if we cannot. + DOC "The ${PostgreSQL_LIBRARY_DIR_MESSAGE}") + +get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH) + +if (PostgreSQL_INCLUDE_DIR) + # Some platforms include multiple pg_config.hs for multi-lib configurations + # This is a temporary workaround. A better solution would be to compile + # a dummy c file and extract the value of the symbol. + file(GLOB _PG_CONFIG_HEADERS "${PostgreSQL_INCLUDE_DIR}/pg_config*.h") + foreach(_PG_CONFIG_HEADER ${_PG_CONFIG_HEADERS}) + if(EXISTS "${_PG_CONFIG_HEADER}") + file(STRINGS "${_PG_CONFIG_HEADER}" pgsql_version_str + REGEX "^#define[\t ]+PG_VERSION_NUM[\t ]+.*") + if(pgsql_version_str) + string(REGEX REPLACE "^#define[\t ]+PG_VERSION_NUM[\t ]+([0-9]*).*" + "\\1" _PostgreSQL_VERSION_NUM "${pgsql_version_str}") + break() + endif() + endif() + endforeach() + if (_PostgreSQL_VERSION_NUM) + math(EXPR _PostgreSQL_major_version "${_PostgreSQL_VERSION_NUM} / 10000") + math(EXPR _PostgreSQL_minor_version "${_PostgreSQL_VERSION_NUM} % 10000") + set(PostgreSQL_VERSION_STRING "${_PostgreSQL_major_version}.${_PostgreSQL_minor_version}") + unset(_PostgreSQL_major_version) + unset(_PostgreSQL_minor_version) + else () + foreach(_PG_CONFIG_HEADER ${_PG_CONFIG_HEADERS}) + if(EXISTS "${_PG_CONFIG_HEADER}") + file(STRINGS "${_PG_CONFIG_HEADER}" pgsql_version_str + REGEX "^#define[\t ]+PG_VERSION[\t ]+\".*\"") + if(pgsql_version_str) + string(REGEX REPLACE "^#define[\t ]+PG_VERSION[\t ]+\"([^\"]*)\".*" + "\\1" PostgreSQL_VERSION_STRING "${pgsql_version_str}") + break() + endif() + endif() + endforeach() + endif () + unset(_PostgreSQL_VERSION_NUM) + unset(pgsql_version_str) +endif() + +# Did we find anything? +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PostgreSQL + REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR + VERSION_VAR PostgreSQL_VERSION_STRING) +set(PostgreSQL_FOUND ${POSTGRESQL_FOUND}) From 51f349115dcd44ced461f3aae65d5d3d889d59d9 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:25:12 +0100 Subject: [PATCH 214/264] update proj4 detection to support 4.x, 5.x , 6.x versions --- cmake/find_scripts/FindPROJ.cmake | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index 6e37dbbf3c4..bda9581e95e 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -15,11 +15,25 @@ # ############################################################################### -FIND_PATH(PROJ_INCLUDE_DIR proj_api.h - DOC "Path to PROJ.4 include directory") - - file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_api_h_CONTENTS) - string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_api_h_CONTENTS}") +FIND_PATH(PROJ_INCLUDE_DIR proj.h + DOC "Path to PROJ.4 include directory 5.x +") + +if(NOT PROJ_INCLUDE_DIR) + FIND_PATH(PROJ_INCLUDE_DIR proj_api.h DOC "Path to PROJ.4 include directory 4.x") + #file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_h_CONTENTS) +endif() + +if(EXISTS "${PROJ_INCLUDE_DIR}/proj.h") + file(READ "${PROJ_INCLUDE_DIR}/proj.h" _proj_h_CONTENTS) + string(REGEX REPLACE ".*# *define PROJ_VERSION_MAJOR.([0-9])" "\\1" PROJ_VERSION_MAJOR "${_proj_h_CONTENTS}") + string(REGEX REPLACE ".*# *define PROJ_VERSION_MINOR.([0-9])" "\\1" PROJ_VERSION_MINOR "${_proj_h_CONTENTS}") + string(REGEX REPLACE ".*# *define PROJ_VERSION_PATCH.([0-9])" "\\1" PROJ_VERSION_PATCH "${_proj_h_CONTENTS}") + + string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_h_CONTENTS}") +elseif(EXISTS "${PROJ_INCLUDE_DIR}/proj_api.h") +file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_h_CONTENTS) +string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_h_CONTENTS}") +endif() FIND_LIBRARY(PROJ_LIBRARY_RELEASE NAMES proj proj_i From 26e98a23a53aa874c21109952d5180a0c4cd39a1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:26:24 +0100 Subject: [PATCH 215/264] update cmake functions to build grass modules --- cmake/mkhtml.cmake.in | 84 ++++++++----------- cmake/modules/build_docs.cmake | 2 +- cmake/modules/build_module.cmake | 16 +++- cmake/modules/build_py_module.cmake | 32 ++----- cmake/modules/copy_python_file.cmake | 2 + .../modules/copy_python_files_in_subdir.cmake | 9 ++ 6 files changed, 69 insertions(+), 76 deletions(-) create mode 100644 cmake/modules/copy_python_files_in_subdir.cmake diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index e276a82fd58..cec8348ba7d 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -1,5 +1,5 @@ function(fatal_error file_name) - #message(STATUS "ENV{PATH}=$ENV{PATH}") + message(STATUS "ENV{PATH}=$ENV{PATH}") message(STATUS "ENV{PYTHONPATH}=$ENV{PYTHONPATH}") message(STATUS "ENV{GISRC}=$ENV{GISRC}") message(STATUS "ENV{GISBASE}=$ENV{GISBASE}") @@ -9,13 +9,13 @@ function(fatal_error file_name) message(STATUS "G_TARGET_FILE=${G_TARGET_FILE}") execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_TARGET_FILE}) message(SEND_ERROR "Failed to create ${file_name}") - + endfunction() if(NOT HTML_FILE) - + if(G_TARGET_FILE) - file(COPY ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) + file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) endif() return() endif() @@ -28,7 +28,7 @@ file(TO_NATIVE_PATH "${TOP_DIR}" MODULE_TOPDIR ) file(TO_NATIVE_PATH "${GISBASE}" GIS_BASE_DIR ) file(TO_NATIVE_PATH "${GIS_BASE_DIR}/etc/config/rc" GISRC) file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BIN_DIR) -file(TO_NATIVE_PATH "${GIS_BASE_DIR}/bin" GIS_BIN_DIR) +file(TO_NATIVE_PATH "${GIS_BASE_DIR}/bin" GISBASE_BIN_DIR) file(TO_NATIVE_PATH "${GIS_BASE_DIR}/scripts" SCRIPTS_DIR) file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" WXPYTHON_DIR) file(TO_NATIVE_PATH "${GISBASE}/etc/python" PYTHON_DIR) @@ -39,8 +39,7 @@ else() set(P_SEP ":") endif() -set(ENV{PATH} "${BIN_DIR}${P_SEP}$ENV{PATH}") - +set(ENV{PATH} "${GISBASE_BIN_DIR}${P_SEP}${BIN_DIR}${P_SEP}$ENV{PATH}") set(ENV{GISBASE} "${GIS_BASE_DIR}") set(ENV{MODULE_TOPDIR} "${MODULE_TOPDIR}") set(ENV{GISRC} "${GISRC}") @@ -54,18 +53,13 @@ if(UNIX) endif() set(GRASS_PYTHONPATH "${WXPYTHON_DIR}${P_SEP}${PYTHON_DIR}${P_SEP}$ENV{PYTHONPATH}") - string(REGEX REPLACE "^(.*)\\${P_SEP}$" "\\1" GRASS_PYTHONPATH "${GRASS_PYTHONPATH}") set(ENV{PYTHONPATH} "${GRASS_PYTHONPATH}") get_filename_component(HTML_FILE_NAME ${HTML_FILE} NAME) get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) - -string(REPLACE ".html" "" PGM_NAME2 "${HTML_FILE_NAME}" ) -#message("PGM_NAME2=${PGM_NAME2}") - - +string(REPLACE ".html" "" PGM_NAME "${HTML_FILE_NAME}" ) string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) @@ -73,52 +67,37 @@ set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) if(RUN_HTML_DESCR) -if(PYTHON_SCRIPT) -message("Running pythonn ${PGM_NAME2}.py --html-description") - execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${PGM_NAME2}.py "--html-description" - OUTPUT_FILE ${TMP_HTML_FILE} - RESULT_VARIABLE html_descr_rv) - - #TODO: print TMP_HTML_FILE contents in case of failure. - #message("html_descr_rv=${html_descr_rv}") - if(NOT html_descr_rv EQUAL 0) - fatal_error(${TMP_HTML_FILE}) + set(PGM_EXT "") + if(WIN32) + set(PGM_EXT ".exe") endif() - - if(NOT EXISTS ${TMP_HTML_FILE}) - fatal_error(${TMP_HTML_FILE}) + + if(PYTHON_SCRIPT) + set(PGM_EXT ".py") + set(launcher "${PYTHON_EXECUTABLE}") + else() + set(launcher "") endif() -else(PYTHON_SCRIPT) -set(PGM_EXT "") -if(WIN32) -set(PGM_EXT ".exe") -endif() -message("Running ${PGM_NAME2}${PGM_EXT} --html-description") + #message("Running ${PGM_SOURCE_DIR} ${launcher} ${PGM_NAME}${PGM_EXT} --html-description" ) execute_process( - - COMMAND ${PGM_NAME2}${PGM_EXT} "--html-description" + COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${launcher} ${PGM_NAME}${PGM_EXT} "--html-description" OUTPUT_FILE ${TMP_HTML_FILE} RESULT_VARIABLE html_descr_rv) #TODO: print TMP_HTML_FILE contents in case of failure. - #message("html_descr_rv=${html_descr_rv}") if(NOT html_descr_rv EQUAL 0) + message("Running html-description says ${html_descr_rv}") fatal_error(${TMP_HTML_FILE}) endif() if(NOT EXISTS ${TMP_HTML_FILE}) fatal_error(${TMP_HTML_FILE}) endif() -endif(PYTHON_SCRIPT) - -else(RUN_HTML_DESCR) - message(STATUS "No html-description run for ${PGM_NAME2}") endif(RUN_HTML_DESCR) message(STATUS "Creating ${OUT_HTML_FILE}") execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME2} + COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} OUTPUT_FILE ${OUT_HTML_FILE} RESULT_VARIABLE mkhtml_rv) @@ -129,17 +108,22 @@ endif() file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) foreach(IMG_FILE ${IMG_FILES}) - file(INSTALL ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) + file(COPY ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) endforeach() -if(WIN32) -file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR}) - configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${OUTPUT_DIR}/${PGM_NAME2}.bat @ONLY) - else() - file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} - RENAME ${PGM_NAME2}) - endif() +if(PYTHON_SCRIPT) + if(WIN32) + file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) + configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${OUTPUT_DIR}/${PGM_NAME}.bat @ONLY) + else(WIN32) + file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} + RENAME ${PGM_NAME} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) + endif(WIN32) +else(PYTHON_SCRIPT) + file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) +endif(PYTHON_SCRIPT) - file(REMOVE ${TMP_HTML_FILE}) +file(REMOVE ${TMP_HTML_FILE}) diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index ef828594845..4fb9dda900e 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -17,7 +17,7 @@ function(build_docs target_name) file(GLOB html_files ${G_SRC_DIR}/*.html) if(html_files) if(NOT ${target_name} IN_LIST no_docs_list) - message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${G_RUNTIME_OUTPUT_DIR} | ${target_name}") + message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${G_RUNTIME_OUTPUT_DIR} | ${target_name}") endif() endif() endif() diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 29ed2bbe144..852aaa36584 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -3,7 +3,7 @@ function(build_module) cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX;RUNTIME_OUTPUT_DIR;PACKAGE;HTML_FILE_NAME" - "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;DEFS;HEADERS" + "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;PRIMARY_DEPENDS;DEFS;HEADERS" ${ARGN} ) if(NOT G_NAME) @@ -11,6 +11,14 @@ function(build_module) endif() ## update_per_group_target(${G_NAME}) + foreach(PRIMARY_DEPEND ${G_PRIMARY_DEPENDS}) + if (NOT TARGET ${PRIMARY_DEPEND}) + message(STATUS "${G_NAME} disabled because ${PRIMARY_DEPEND} is not available") + return() + else() + list(APPEND G_DEPENDS ${PRIMARY_DEPEND}) + endif() + endforeach() if(NOT G_SRC_REGEX) set(G_SRC_REGEX "*.c") @@ -43,7 +51,13 @@ function(build_module) if(G_EXE) add_executable(${G_NAME} ${${G_NAME}_SRCS}) + if("${G_NAME}" MATCHES "^v.*") + set_target_properties (${G_NAME} PROPERTIES FOLDER vector) + elseif("${G_NAME}" MATCHES "^r.*") + set_target_properties (${G_NAME} PROPERTIES FOLDER raster) + else() set_target_properties (${G_NAME} PROPERTIES FOLDER bin) + endif() set(default_html_file_name ${G_NAME}) set(PGM_NAME ${G_NAME}) if(WIN32) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index cf49e1d7e74..1c37cc248eb 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -11,12 +11,6 @@ macro(build_script_in_subdir dir_name) TYPE "SCRIPT") endmacro() -macro(build_py_lib_in_subdir dir_name) - build_py_module(NAME ${dir_name} - TYPE "LIB" - DST_DIR etc/python/grass) -endmacro() - function(build_py_module) cmake_parse_arguments(G @@ -36,7 +30,7 @@ function(build_py_module) message(FATAL_ERROR "TYPE argument is required") endif() - set(types "GUI;LIB;SCRIPT") + set(types "GUI;SCRIPT") if(NOT "${G_TYPE}" IN_LIST types) message(FATAL_ERROR "TYPE is '${G_TYPE}'. Supported values are ${types}") endif() @@ -44,15 +38,10 @@ function(build_py_module) set(G_TARGET_NAME_PREFIX "") if(G_TYPE STREQUAL "GUI") set(G_TARGET_NAME_PREFIX "g.gui.") - elseif(G_TYPE STREQUAL "LIB") - set(G_TARGET_NAME_PREFIX "pylib.") endif() - - - set(G_TARGET_NAME ${G_TARGET_NAME_PREFIX}${G_NAME}) - + if(G_HTML_FILE_NAME) set(HTML_FILE_NAME ${G_HTML_FILE_NAME}) else() @@ -109,7 +98,7 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") if(G_TYPE STREQUAL "SCRIPT") add_custom_target(${G_TARGET_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/scripts/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PY_MODULE_FILE} ${GISBASE}/scripts/ DEPENDS ${TRANSLATE_C_FILE} ) else() add_custom_target(${G_TARGET_NAME} ALL @@ -128,9 +117,6 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER scripts) endif() - if(G_TYPE STREQUAL "LIB") - set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER python) - endif() install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) @@ -143,16 +129,14 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT TRUE) set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - if(${G_TYPE} IN_LIST types) - build_docs(${G_TARGET_NAME}) - endif() - if(NOT G_TYPE STREQUAL "LIB") - add_dependencies(${G_TARGET_NAME} pylib.script pylib.exceptions) + build_docs(${G_TARGET_NAME}) + + #add_dependencies(${G_TARGET_NAME} pylib.script pylib.exceptions) add_dependencies(${G_TARGET_NAME} g.parser) - endif() + endif(WITH_DOCS) install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) -endfunction() \ No newline at end of file +endfunction() diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake index 9c50671592f..813107ec894 100644 --- a/cmake/modules/copy_python_file.cmake +++ b/cmake/modules/copy_python_file.cmake @@ -1,3 +1,5 @@ + + function(copy_python_file py_file install_dest) get_filename_component(py_file_NAME ${py_file} NAME) set(output_path ${GISBASE}/${install_dest}) diff --git a/cmake/modules/copy_python_files_in_subdir.cmake b/cmake/modules/copy_python_files_in_subdir.cmake new file mode 100644 index 00000000000..254425d86b5 --- /dev/null +++ b/cmake/modules/copy_python_files_in_subdir.cmake @@ -0,0 +1,9 @@ +function(copy_python_files_in_subdir dir_name dst_prefix) +file(GLOB PY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${dir_name}/*.py") + string(REPLACE "/" "_" targ_name ${dir_name}) +add_custom_target(python_${targ_name} + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${dst_prefix}/${dir_name}/ + COMMAND ${CMAKE_COMMAND} -E copy ${PY_FILES} ${GISBASE}/${dst_prefix}/${dir_name}/ + ) + set_target_properties (python_${targ_name} PROPERTIES FOLDER lib/python) +endfunction() From 94c8b1386296513839853f655f4b904ae32bb978 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:27:00 +0100 Subject: [PATCH 216/264] add proj4 version defines (support 5.x+) --- include/config.h.cmake.in | 1 + 1 file changed, 1 insertion(+) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 3350a165e85..37dca61cb44 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -159,6 +159,7 @@ #cmakedefine HAVE_JPEGLIB_H ${HAVE_JPEGLIB_H} /* define if proj.h exists */ +#cmakedefine PROJMAJOR ${PROJMAJOR} #cmakedefine HAVE_PROJ_H ${HAVE_PROJ_H} /* define if fftw3.h exists */ From 570b66956b03af7bd49de6219083991e09e995cc Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:27:44 +0100 Subject: [PATCH 217/264] add options for v.in.dwg and liblas modules --- CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20273689007..dc91630d63c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,14 @@ cmake_minimum_required(VERSION 3.3) set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +#if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) +# set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "") +#endif() + project(GRASSGIS) set(BUILD_SHARED_LIBS ON) +#message(FATAL_ERROR "VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}") if(MSVC) if(BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) @@ -33,11 +39,14 @@ option(WITH_CAIRO "Build with cairo support ." ON) option(WITH_X11 "Build with X11 support ." ${default_option_enabled}) option(WITH_OPENGL "Build with opengl support ." ON) option(WITH_SQLITE "enable sqlite support" ON) -option(WITH_POSTGRES "enable postgres support" OFF) +option(WITH_POSTGRES "enable postgres support" ON) option(WITH_NLS "enable nls support" ${default_option_enabled}) option(WITH_BZLIB "enable bzlib support" ON) option(WITH_BLAS "enable blas support" ON) option(WITH_LAPACK "enable lapack support" ON) +option(WITH_LIBLAS "enable libLAS support" ON) +option(WITH_OPENDWG "enable v.in.dwg" OFF) + option(WITH_PYTHON "Build python bindings" ON) option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) option(WITH_DOCS "Build documentation" ON) @@ -95,8 +104,10 @@ include(build_module) include(build_program) include(build_program_in_subdir) include(build_library_in_subdir) +include(copy_python_files_in_subdir) include(build_py_module) + include(check_target) # function(set_runtime_output_dir target_name output_dir) From 8704aa476099b20d532bc1e9914ad554ff11a9ad Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:30:19 +0100 Subject: [PATCH 218/264] activate build of modules deactivated --- imagery/CMakeLists.txt | 41 ++++++++++----------- imagery/i.ortho.photo/CMakeLists.txt | 17 +++++++++ misc/CMakeLists.txt | 16 +++++---- raster/CMakeLists.txt | 26 ++++++-------- raster/r.li/CMakeLists.txt | 27 ++++++++++++++ raster/r.mapcalc/CMakeLists.txt | 6 ++-- raster/r.watershed/CMakeLists.txt | 11 ++++++ raster3d/CMakeLists.txt | 30 ++++++++-------- scripts/CMakeLists.txt | 3 +- vector/CMakeLists.txt | 54 +++++++++++++++++++--------- 10 files changed, 152 insertions(+), 79 deletions(-) create mode 100644 imagery/i.ortho.photo/CMakeLists.txt create mode 100644 raster/r.li/CMakeLists.txt create mode 100644 raster/r.watershed/CMakeLists.txt diff --git a/imagery/CMakeLists.txt b/imagery/CMakeLists.txt index 0fbeb7a9dbf..442c4823699 100644 --- a/imagery/CMakeLists.txt +++ b/imagery/CMakeLists.txt @@ -1,6 +1,9 @@ build_program_in_subdir(i.albedo DEPENDS grass_imagery grass_raster grass_vector grass_gis ) build_program_in_subdir(i.aster.toar DEPENDS grass_imagery grass_raster grass_vector grass_gis ) +build_program_in_subdir(i.atcorr + DEPENDS grass_imagery grass_raster grass_vector grass_gis SRC_REGEX "*.cpp") + build_program_in_subdir(i.biomass DEPENDS grass_imagery grass_raster grass_vector grass_gis ) build_program_in_subdir(i.cca DEPENDS grass_imagery grass_raster grass_vector grass_gis ) build_program_in_subdir(i.cluster DEPENDS grass_imagery grass_raster grass_vector grass_gis grass_cluster) @@ -16,7 +19,11 @@ build_program_in_subdir(i.evapo.pm DEPENDS grass_imagery grass_raster grass_vect build_program_in_subdir(i.evapo.pt DEPENDS grass_imagery grass_raster grass_vector grass_gis) build_program_in_subdir(i.evapo.time DEPENDS grass_imagery grass_raster grass_vector grass_gis) build_program_in_subdir(i.emissivity DEPENDS grass_imagery grass_raster grass_vector grass_gis) -build_program_in_subdir(i.find DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir(i.find + DEPENDS grass_imagery grass_raster grass_vector grass_gis + PACKAGE "grassmods" + RUNTIME_OUTPUT_DIR etc) + build_program_in_subdir(i.gensig DEPENDS grass_imagery grass_raster grass_vector grass_gis) build_program_in_subdir( @@ -35,11 +42,6 @@ build_program_in_subdir( i.landsat.toar DEPENDS grass_imagery grass_raster grass_vector grass_gis) -if(NOT MSVC) -build_program_in_subdir( - i.landsat.acca - DEPENDS grass_imagery grass_raster grass_vector grass_gis) -endif() build_program_in_subdir( i.maxlik DEPENDS grass_imagery grass_raster grass_vector grass_gis) @@ -48,7 +50,6 @@ build_program_in_subdir( i.modis.qc DEPENDS grass_imagery grass_raster grass_vector grass_gis) - build_program_in_subdir( i.rectify DEPENDS grass_imagery grass_raster grass_vector grass_gis) @@ -81,22 +82,22 @@ build_program_in_subdir( i.vi DEPENDS grass_imagery grass_raster grass_vector grass_gis) -build_program_in_subdir( - i.fft - DEPENDS grass_imagery grass_raster - grass_vector grass_gis FFTW) - build_program_in_subdir( i.zc DEPENDS grass_imagery grass_raster grass_vector grass_gis) -build_program_in_subdir(i.atcorr DEPENDS grass_imagery grass_raster grass_vector grass_gis SRC_REGEX "*.cpp") +build_program_in_subdir( + i.fft + DEPENDS grass_imagery grass_raster grass_gmath grass_gis + PRIMARY_DEPENDS FFTW) + +build_program_in_subdir( + i.ifft + DEPENDS grass_gis grass_raster grass_gmath grass_btree2 + PRIMARY_DEPENDS FFTW) -# TODO: MODULES DISABLED -# build_program_in_subdir( -# i.ortho.photo -# DEPENDS grass_imagery grass_raster grass_vector grass_gis) +build_program_in_subdir( + i.landsat.acca + DEPENDS grass_raster grass_gis) -# build_program_in_subdir( -# i.superpixels.slic -# DEPENDS grass_imagery grass_raster grass_vector grass_gis) \ No newline at end of file +add_subdirectory(i.ortho.photo) diff --git a/imagery/i.ortho.photo/CMakeLists.txt b/imagery/i.ortho.photo/CMakeLists.txt new file mode 100644 index 00000000000..c442548d498 --- /dev/null +++ b/imagery/i.ortho.photo/CMakeLists.txt @@ -0,0 +1,17 @@ +build_library_in_subdir(lib + NAME grass_iortho + DEPENDS grass_gis grass_imagery grass_gmath) + +build_program_in_subdir(i.ortho.camera DEPENDS grass_iortho) + +build_program_in_subdir(i.ortho.elev DEPENDS grass_iortho) + +build_program_in_subdir(i.ortho.init DEPENDS grass_iortho) + +build_program_in_subdir(i.ortho.photo DEPENDS grass_iortho) + +build_program_in_subdir(i.ortho.rectify DEPENDS grass_iortho) + +build_program_in_subdir(i.ortho.target DEPENDS grass_iortho) + +build_program_in_subdir(i.ortho.transform DEPENDS grass_iortho) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index d1991a63e72..9298252633e 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -11,11 +11,13 @@ build_program_in_subdir( m.transform DEPENDS grass_gis grass_imagery grass_raster grass_vector) -# TODO: MODULES DISABLED -# build_program_in_subdir( -# m.nviz.image -# DEPENDS grass_gis) +if(WITH_OPENGL) +build_program_in_subdir( + m.nviz.image + DEPENDS grass_gis grass_ogsf grass_nviz) + +build_program_in_subdir( + m.nviz.script + DEPENDS grass_gis grass_ogsf grass_nviz) +endif(WITH_OPENGL) -# build_program_in_subdir( -# m.nviz.script -# DEPENDS grass_gis) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index e102e7e4945..b7a519e64ad 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -481,20 +481,15 @@ build_program_in_subdir( r.what.color DEPENDS grass_gis grass_raster) -# TODO: MODULES DISABLED -# build_program_in_subdir( -# r.in.lidar -# DEPENDS grass_gis grass_raster grass_lidar) - -# build_program_in_subdir( -# r.watershed -# DEPENDS grass_gis grass_raster -# SRC_REGEX "*.cpp") - -# build_program_in_subdir( -# r.li -# DEPENDS grass_gis grass_raster) -if(NOT MSVC) +if(TARGET LIBLAS) +build_program_in_subdir( + r.in.lidar + DEPENDS grass_gis grass_raster grass_lidar LIBLAS) +else() +message(STATUS "r.in.lidar is disable because libLAS is not found") +endif() +add_subdirectory(r.li) + add_subdirectory(r.mapcalc) build_program_in_subdir( @@ -508,4 +503,5 @@ build_program_in_subdir( DEPENDS grass_gis grass_raster grass_iostream SRC_REGEX "*.cpp" DEFS "-DUSER=${USER_NAME};-DNODATA_FIX;-DELEV_FLOAT") -endif() \ No newline at end of file + + add_subdirectory(r.watershed) diff --git a/raster/r.li/CMakeLists.txt b/raster/r.li/CMakeLists.txt new file mode 100644 index 00000000000..aca14286828 --- /dev/null +++ b/raster/r.li/CMakeLists.txt @@ -0,0 +1,27 @@ +set(SUBDIRS1 + r.li.cwed + r.li.dominance + r.li.edgedensity + r.li.mpa + r.li.mps + r.li.padcv + r.li.padrange + r.li.padsd + r.li.patchdensity + r.li.patchnum + r.li.pielou + r.li.renyi + r.li.richness + r.li.shannon + r.li.shape + r.li.simpson) +# r.li.setup + +build_library_in_subdir(r.li.daemon + NAME grass_rli + DEPENDS grass_gis grass_raster + HTML_FILE_NAME "r.li.daemon") + +foreach(SUBDIR ${SUBDIRS1}) + build_program_in_subdir(${SUBDIR} DEPENDS grass_rli) +endforeach() diff --git a/raster/r.mapcalc/CMakeLists.txt b/raster/r.mapcalc/CMakeLists.txt index b5cb74b91b0..f360fa3abe4 100644 --- a/raster/r.mapcalc/CMakeLists.txt +++ b/raster/r.mapcalc/CMakeLists.txt @@ -17,6 +17,6 @@ build_program(NAME r.mapcalc SOURCES "${r_mapcalc_SRCS}" DEPENDS grass_gis grass_btree grass_calc grass_raster) -build_program(NAME r3.mapcalc - SOURCES "${r3_mapcalc_SRCS}" - DEPENDS grass_gis grass_btree grass_calc grass_raster3d) +#build_program(NAME r3.mapcalc +# SOURCES "${r3_mapcalc_SRCS}" +# DEPENDS grass_gis grass_btree grass_calc grass_raster3d) diff --git a/raster/r.watershed/CMakeLists.txt b/raster/r.watershed/CMakeLists.txt new file mode 100644 index 00000000000..215183613b2 --- /dev/null +++ b/raster/r.watershed/CMakeLists.txt @@ -0,0 +1,11 @@ +build_program_in_subdir(ram +DEPENDS grass_gis grass_raster grass_btree2 grass_gmath +RUNTIME_OUTPUT_DIR etc/r.watershed) + +build_program_in_subdir(seg +DEPENDS grass_gis grass_raster grass_gmath grass_segment +RUNTIME_OUTPUT_DIR etc/r.watershed) + +build_program_in_subdir(front +NAME r.watershed +DEPENDS grass_gis grass_raster) \ No newline at end of file diff --git a/raster3d/CMakeLists.txt b/raster3d/CMakeLists.txt index c628a49be7a..25734cf71dd 100644 --- a/raster3d/CMakeLists.txt +++ b/raster3d/CMakeLists.txt @@ -21,8 +21,6 @@ build_program_in_subdir( r3.in.bin DEPENDS grass_gis grass_raster3d ) - - build_program_in_subdir( r3.info DEPENDS grass_gis grass_raster3d ) @@ -77,21 +75,23 @@ build_program_in_subdir( r3.out.vtk DEPENDS grass_gis grass_raster3d ) -# TODO: MODULES DISABLED -# build_program_in_subdir( -# r3.out.netcdf -# DEPENDS grass_gis grass_raster3d ) +build_program_in_subdir( + r3.mkdspf + DEPENDS grass_gis grass_raster3d grass_gpde grass_dspf) -# build_program_in_subdir( -# r3.mkdspf -# DEPENDS grass_gis grass_raster3d grass_gpde ) +build_program_in_subdir( + r3.in.lidar + DEPENDS grass_gis grass_raster3d grass_segment + PRIMARY_DEPENDS LIBLAS) -# build_program_in_subdir( -# r3.in.lidar -# DEPENDS grass_gis grass_raster3d ) +build_program_in_subdir( + r3.out.netcdf + DEPENDS grass_gis grass_raster3d + PRIMARY_DEPENDS NETCDF) +# mode_t is not available on msvc. Discuss if(NOT MSVC) -build_program_in_subdir( - r3.in.v5d - DEPENDS grass_gis grass_raster3d ) + build_program_in_subdir( + r3.in.v5d + DEPENDS grass_gis grass_raster3d) endif() \ No newline at end of file diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index c9748affe28..f121029e9eb 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -37,7 +37,6 @@ set(script_DIRS r.import r.in.aster r.in.srtm - r.in.wms r.mask r.out.xyz r.pack @@ -83,4 +82,4 @@ endforeach() file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms -DESTINATION ${CMAKE_BINARY_DIR}/etc/) \ No newline at end of file +DESTINATION ${CMAKE_BINARY_DIR}/etc/) diff --git a/vector/CMakeLists.txt b/vector/CMakeLists.txt index b439636d01c..9bb4b44c4ad 100644 --- a/vector/CMakeLists.txt +++ b/vector/CMakeLists.txt @@ -86,9 +86,15 @@ build_program_in_subdir( v.in.dxf DEPENDS grass_gis grass_vector ) +if(TARGET PDAL) +file(GLOB v_in_pdal_SOURCES "v.in.pdal/*.c" "v.in.pdal/main.cpp") build_program_in_subdir( v.in.pdal - DEPENDS grass_gis grass_vector ) + SOURCES "${v_in_pdal_SOURCES}" + DEPENDS grass_gis grass_vector PDAL) +else() +message("v.in.pdal is disabled because PDAL library found") +endif() build_program_in_subdir( v.in.region @@ -352,24 +358,38 @@ build_program_in_subdir( v.external.out DEPENDS grass_gis grass_vector ) +build_program_in_subdir( + v.in.lidar + DEPENDS grass_gis grass_vector + PRIMARY_DEPENDS LIBLAS ) + +build_program_in_subdir( + v.lidar.correction + DEPENDS grass_gis grass_vector grass_lidar + PRIMARY_DEPENDS LIBLAS) +build_program_in_subdir( + v.lidar.edgedetection + DEPENDS grass_gis grass_vector grass_lidar grass_dbmibase grass_gmath + PRIMARY_DEPENDS LIBLAS) -#TODO: MODULES DISABLED -# build_program_in_subdir( -# v.in.dwg -# DEPENDS grass_gis grass_vector ) +build_program_in_subdir( + v.lidar.growing + DEPENDS grass_gis grass_vector + PRIMARY_DEPENDS LIBLAS) -# build_program_in_subdir( -# v.in.lidar -# DEPENDS grass_gis grass_vector ) +build_program_in_subdir( + v.out.lidar + DEPENDS grass_gis grass_vector + PRIMARY_DEPENDS LIBLAS) -# v.lidar.correction \ -# v.lidar.edgedetection \ -# v.lidar.growing \ -# build_program_in_subdir( -# v.out.lidar -# DEPENDS grass_gis grass_vector) +build_program_in_subdir( + v.out.postgis + DEPENDS grass_gis grass_vector + PRIMARY_DEPENDS POSTGRES) -# build_program_in_subdir( -# v.out.postgis -# DEPENDS grass_gis grass_vector) +if(WITH_OPENDWG) + build_program_in_subdir( + v.in.dwg + DEPENDS grass_gis grass_vector) +endif() \ No newline at end of file From fae4ca861358eed27ce4c6dcf71abe5c61901af2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:31:25 +0100 Subject: [PATCH 219/264] detecting of new 3rdd party libraries --- thirdparty/CMakeLists.txt | 40 ++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index e6dc3d6c96f..87b88c0154d 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -2,6 +2,14 @@ find_package(FLEX REQUIRED) find_package(BISON REQUIRED) +find_package(PROJ REQUIRED) +add_library(PROJ INTERFACE IMPORTED GLOBAL) +set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY${find_library_suffix}} ) +set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) +if(PROJ_VERSION_STRING GREATER 500) + set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS "ACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) +endif() + find_package(GDAL REQUIRED) add_library(GDAL INTERFACE IMPORTED GLOBAL) set_property(TARGET GDAL PROPERTY INTERFACE_LINK_LIBRARIES ${GDAL_LIBRARY} ) @@ -29,13 +37,6 @@ set_property(TARGET LIBM PROPERTY INTERFACE_LINK_LIBRARIES ${M_LIBRARY} ) mark_as_advanced(M_LIBRARY) endif() -find_package(PROJ REQUIRED) -add_library(PROJ INTERFACE IMPORTED GLOBAL) -set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY${find_library_suffix}} ) -set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) -if(PROJ_VERSION_STRING GREATER 500) - set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS "ACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) -endif() find_package(Freetype REQUIRED) add_library(FREETYPE INTERFACE IMPORTED GLOBAL) set_property(TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES ${FREETYPE_LIBRARY${find_library_suffix}} ) @@ -120,8 +121,8 @@ endif() if(WITH_POSTGRES) find_package(PostgreSQL REQUIRED) add_library(POSTGRES INTERFACE IMPORTED GLOBAL) - set_property(TARGET POSTGRES PROPERTY INTERFACE_LINK_LIBRARIES ${PostgreSQL_LIBRARIES} ) - set_property(TARGET POSTGRES PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PostgreSQL_INCLUDE_DIRS} ) + set_property(TARGET POSTGRES PROPERTY INTERFACE_LINK_LIBRARIES ${PostgreSQL_LIBRARY} ) + set_property(TARGET POSTGRES PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PostgreSQL_INCLUDE_DIR} ) endif() if(WITH_SQLITE) @@ -131,6 +132,27 @@ if(WITH_SQLITE) set_property(TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIRS} ) endif() +find_package(PDAL) +if(PDAL_FOUND) +add_library(PDAL INTERFACE IMPORTED GLOBAL) +set_property(TARGET PDAL PROPERTY INTERFACE_LINK_LIBRARIES ${PDAL_LIBRARIES} ) +set_property(TARGET PDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PDAL_INCLUDE_DIRS} ) +endif() + +find_package(libLAS) +if(LIBLAS_FOUND) +add_library(LIBLAS INTERFACE IMPORTED GLOBAL) +set_property(TARGET LIBLAS PROPERTY INTERFACE_LINK_LIBRARIES ${LibLAS_C_LIBRARY} ) +set_property(TARGET LIBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LibLAS_INCLUDE_DIR} ) +endif() + +find_package(NetCDF) +if(NETCDF_FOUND) + add_library(NETCDF INTERFACE IMPORTED GLOBAL) + set_property(TARGET NETCDF PROPERTY INTERFACE_LINK_LIBRARIES ${NetCDF_LIBRARY} ) + set_property(TARGET NETCDF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${NetCDF_INCLUDE_DIR} ) +endif() + find_package(GEOS REQUIRED) add_library(GEOS INTERFACE IMPORTED GLOBAL) set_property(TARGET GEOS PROPERTY INTERFACE_LINK_LIBRARIES ${GEOS_C_LIBRARY${find_library_suffix}} ) From 793226f9b841878622bc4c620f32c4d51ed4363e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:33:35 +0100 Subject: [PATCH 220/264] fix i.landsat.acca on msvc --- imagery/i.landsat.acca/algorithm.c | 17 ++++++++--------- imagery/i.landsat.acca/local_proto.h | 2 +- imagery/i.landsat.acca/main.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/imagery/i.landsat.acca/algorithm.c b/imagery/i.landsat.acca/algorithm.c index 57c76b1800b..937e1d5fd84 100644 --- a/imagery/i.landsat.acca/algorithm.c +++ b/imagery/i.landsat.acca/algorithm.c @@ -71,22 +71,21 @@ double th_6 = 2.16248; /* Band 4/2 Ratio */ double th_7 = 1.0; /* Band 4/5 Ratio */ ; double th_8 = 210.; /* Band 5/6 Composite */ -extern int hist_n; - void acca_algorithm(Gfile * out, Gfile band[], - int single_pass, int with_shadow, int cloud_signature) + int single_pass, int with_shadow, int cloud_signature, int hist_n) { - int i, count[5], hist_cold[hist_n], hist_warm[hist_n]; - double max, value[5], signa[5], idesert, review_warm, shift; + int i, count[5]; + double max, value[5], signa[5], idesert, shift; + int review_warm; + int* hist_cold, *hist_warm; + hist_cold = (int*)G_calloc(hist_n, sizeof(int)); + hist_warm = (int*)G_calloc(hist_n, sizeof(int)); /* Reset variables ... */ for (i = 0; i < 5; i++) { count[i] = 0; value[i] = 0.; } - for (i = 0; i < hist_n; i++) { - hist_cold[i] = hist_warm[i] = 0; - } /* FIRST FILTER ... */ acca_first(out, band, with_shadow, @@ -207,7 +206,7 @@ void acca_algorithm(Gfile * out, Gfile band[], /* SECOND FILTER ... */ /* By-pass two processing but it retains warm and cold clouds */ if (single_pass == TRUE) { - review_warm = -1.; + review_warm = -1; value[KUPPER] = 0.; value[KLOWER] = 0.; } diff --git a/imagery/i.landsat.acca/local_proto.h b/imagery/i.landsat.acca/local_proto.h index 90394af8b86..eaad933a743 100644 --- a/imagery/i.landsat.acca/local_proto.h +++ b/imagery/i.landsat.acca/local_proto.h @@ -28,7 +28,7 @@ typedef struct } Gfile; -void acca_algorithm(Gfile *, Gfile[], int, int, int); +void acca_algorithm(Gfile *, Gfile[], int, int, int, int); void acca_first(Gfile *, Gfile[], int, int[], int[], int[], double[]); void acca_second(Gfile *, Gfile, int, double, double); diff --git a/imagery/i.landsat.acca/main.c b/imagery/i.landsat.acca/main.c index 7432b00014a..710eb20bce8 100644 --- a/imagery/i.landsat.acca/main.c +++ b/imagery/i.landsat.acca/main.c @@ -191,7 +191,7 @@ int main(int argc, char *argv[]) th_4 = atof(b56c->answer); th_7 = atof(b45r->answer); acca_algorithm(&out, band, pass2->answer, shadow->answer, - csig->answer); + csig->answer, hist_n); if (filter->answer) filter_holes(&out); From 664a6f09b14cb56a2d0c8f40babb9c90f9ff3bf0 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:34:15 +0100 Subject: [PATCH 221/264] add dll export macro for iostream, dspf, calc --- include/calc.h | 8 +++++--- include/iostream/mm.h | 6 +++--- lib/dspf/viz.h | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/calc.h b/include/calc.h index e0ba60c695f..1da37da4d30 100644 --- a/include/calc.h +++ b/include/calc.h @@ -33,12 +33,14 @@ typedef struct func_desc #define SET_NULL_F(x) (Rast_set_f_null_value((x),1)) #define SET_NULL_D(x) (Rast_set_d_null_value((x),1)) -extern volatile int floating_point_exception; -extern volatile int floating_point_exception_occurred; +#include + +extern GRASS_CALC_EXPORT volatile int floating_point_exception; +extern GRASS_CALC_EXPORT volatile int floating_point_exception_occurred; extern int columns; -extern func_desc calc_func_descs[]; +extern GRASS_CALC_EXPORT func_desc calc_func_descs[]; #include diff --git a/include/iostream/mm.h b/include/iostream/mm.h index c85c3ddc651..051e16a4a03 100644 --- a/include/iostream/mm.h +++ b/include/iostream/mm.h @@ -85,10 +85,10 @@ enum MM_stream_usage { - +#include // Declarations of a very simple memory manager designed to work with // BTEs that rely on the underlying OS to manage physical memory. -class MM_register { +class GRASS_IOSTREAM_EXPORT MM_register { private: // The number of instances of this class and descendents that exist. static int instances; @@ -170,7 +170,7 @@ static mm_register_init source_file_mm_register_init; // Here is the single memory management object (defined in mm.C). -extern MM_register MM_manager; +extern GRASS_IOSTREAM_EXPORT MM_register MM_manager; diff --git a/lib/dspf/viz.h b/lib/dspf/viz.h index 8628e710ac1..f89ed975dca 100644 --- a/lib/dspf/viz.h +++ b/lib/dspf/viz.h @@ -98,4 +98,5 @@ int print_head_info(file_info *); /* struct_copy.c */ int struct_copy(char *, char *, int); -extern CELL_ENTRY cell_table[]; +#include +extern GRASS_DSPF_EXPORT CELL_ENTRY cell_table[]; From effacbb16fd7c7eba1478316df08cb6bdd8d4cd5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:36:21 +0100 Subject: [PATCH 222/264] fix r.mapcalc on msvc --- raster/r.mapcalc/map.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/raster/r.mapcalc/map.c b/raster/r.mapcalc/map.c index eedf19c6c5a..fe9d574916c 100644 --- a/raster/r.mapcalc/map.c +++ b/raster/r.mapcalc/map.c @@ -742,7 +742,8 @@ void create_history(const char *dst, expression * e) Rast_short_history(dst, "raster", &hist); for (i = 0; ; i++) { - char buf[RECORD_LEN]; + char *buf; + buf = (char*)G_calloc(RECORD_LEN, sizeof(char)); int n; if (!len) @@ -768,7 +769,8 @@ void create_history(const char *dst, expression * e) } if (seeded) { - char buf[RECORD_LEN]; + char* buf; + buf = (char*)G_calloc(RECORD_LEN, sizeof(char)); sprintf(buf, "random seed = %ld", seed_value); Rast_append_history(&hist, buf); } From 1b5d77565ca87431f24b5c8d56ce6509916f218b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:37:19 +0100 Subject: [PATCH 223/264] fix r.terraflow on msvc --- raster/r.terraflow/common.cpp | 2 +- raster/r.terraflow/direction.h | 2 +- raster/r.terraflow/filldepr.cpp | 4 ++++ raster/r.terraflow/stats.cpp | 10 ++++++---- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/raster/r.terraflow/common.cpp b/raster/r.terraflow/common.cpp index fe7da9e530c..03011d854d6 100644 --- a/raster/r.terraflow/common.cpp +++ b/raster/r.terraflow/common.cpp @@ -23,7 +23,7 @@ #endif #include -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined (_MSC_VER) #include #else #include diff --git a/raster/r.terraflow/direction.h b/raster/r.terraflow/direction.h index 7a2f53b2555..5b293896168 100644 --- a/raster/r.terraflow/direction.h +++ b/raster/r.terraflow/direction.h @@ -22,7 +22,7 @@ #include -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined(_MSC_VER) #include #else #include diff --git a/raster/r.terraflow/filldepr.cpp b/raster/r.terraflow/filldepr.cpp index 15767c2b2d4..003de3ac498 100644 --- a/raster/r.terraflow/filldepr.cpp +++ b/raster/r.terraflow/filldepr.cpp @@ -22,6 +22,9 @@ #include "unionFind.h" #include "common.h" +#ifdef _MSC_VER +#pragma warning(default:4716) +#endif #define FLOOD_DEBUG if(0) /************************************************************/ @@ -77,6 +80,7 @@ elevation_type* ext_fill_depression(AMI_STREAM *boundaryStr, cclabel_type maxWatersheds) { G_fatal_error(_("Fill_depressions do not fit in memory. Not implemented yet")); + } diff --git a/raster/r.terraflow/stats.cpp b/raster/r.terraflow/stats.cpp index 1d83771605c..3e14a707bc2 100644 --- a/raster/r.terraflow/stats.cpp +++ b/raster/r.terraflow/stats.cpp @@ -20,8 +20,10 @@ #include #include #include +#ifndef _MSC_VER #include -#ifndef __MINGW32__ +#endif +#ifndef _WIN32 #include #endif #include @@ -126,7 +128,7 @@ statsRecorder::statsRecorder(char *fname) : ofstream(noclobberFileName(fname)){ //ofstream that takes an fd; wrote another noclobber() function that //closes fd and returns the name; rt_start(tm); -#ifndef __MINGW32__ +#ifndef _WIN32 bss = sbrk(0); #endif char buf[BUFSIZ]; @@ -137,7 +139,7 @@ statsRecorder::statsRecorder(char *fname) : ofstream(noclobberFileName(fname)){ long statsRecorder::freeMem() { -#ifdef __MINGW32__ +#ifdef _WIN32 return -1; #else struct rlimit rlim; @@ -153,7 +155,7 @@ statsRecorder::freeMem() { } long freeMem = rlim.rlim_cur - ((char*)sbrk(0)-(char*)bss); return freeMem; -#endif /* __MINGW32__ */ +#endif /* _WIN32 */ } char * From 38d64592cd6d697961c2839f2b06c458ab8cabe6 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:37:59 +0100 Subject: [PATCH 224/264] use _WIN32 rather than __MINGW32__ for msvc --- raster/r.li/r.li.daemon/daemon.c | 2 +- raster/r.li/r.li.daemon/worker.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/raster/r.li/r.li.daemon/daemon.c b/raster/r.li/r.li.daemon/daemon.c index c0c9b34385c..cbe43ab3347 100644 --- a/raster/r.li/r.li.daemon/daemon.c +++ b/raster/r.li/r.li.daemon/daemon.c @@ -24,7 +24,7 @@ #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #else #include diff --git a/raster/r.li/r.li.daemon/worker.c b/raster/r.li/r.li.daemon/worker.c index eec45494452..1768b2fcfbd 100644 --- a/raster/r.li/r.li.daemon/worker.c +++ b/raster/r.li/r.li.daemon/worker.c @@ -23,7 +23,7 @@ #include #include -#ifdef __MINGW32__ +#ifdef _WIN32 #include #else #include From b28b17f14ac0be90bc58755264ff72a505dcafeb Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:38:26 +0100 Subject: [PATCH 225/264] use infinity macro to build on msvc --- raster3d/r3.in.lidar/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raster3d/r3.in.lidar/info.c b/raster3d/r3.in.lidar/info.c index 1698c7cb0cc..434dc838d96 100644 --- a/raster3d/r3.in.lidar/info.c +++ b/raster3d/r3.in.lidar/info.c @@ -104,7 +104,7 @@ int scan_bounds(LASReaderH LAS_reader, int shell_style, int extents, int update, first = TRUE; /* init to nan in case no points are found */ - min_x = max_x = min_y = max_y = min_z = max_z = 0.0 / 0.0; + min_x = max_x = min_y = max_y = min_z = max_z = INFINITY; G_verbose_message(_("Scanning data ...")); From 223e8583e1e5e296f46c88e9245c1b44c1260020 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:38:50 +0100 Subject: [PATCH 226/264] missing include on msvc --- raster/r.viewshed/statusstructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raster/r.viewshed/statusstructure.cpp b/raster/r.viewshed/statusstructure.cpp index 88415a5c8a8..668ed291495 100644 --- a/raster/r.viewshed/statusstructure.cpp +++ b/raster/r.viewshed/statusstructure.cpp @@ -40,7 +40,7 @@ #include #include #include - +#include extern "C" { #include From 601eab3a4743c3d4ec2cf26f46afe2e76cb1a261 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:39:28 +0100 Subject: [PATCH 227/264] copy VERSIONUMBER and license to gisbase/etc --- lib/init/CMakeLists.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/init/CMakeLists.txt b/lib/init/CMakeLists.txt index c10086b7457..7ac2d40a3ac 100644 --- a/lib/init/CMakeLists.txt +++ b/lib/init/CMakeLists.txt @@ -93,8 +93,6 @@ configure_file(${script_file_name}.in ${CMAKE_CURRENT_BINARY_DIR}/${script_file_ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script_file_name} DESTINATION bin) - - # For build tree file(TO_NATIVE_PATH ${GISBASE} gisbase_init_dir) file(TO_NATIVE_PATH "${GISBASE}/etc/config" grass_config_dir) @@ -164,10 +162,10 @@ if(GRASS_VERSION_GIT) list(APPEND VERSIONNUMBER_CONTENTS "${VERSIONNUMBER_CONTENTS} ${GRASS_VERSION_GIT}") endif() -file(WRITE ${CMAKE_BINARY_DIR}/VERSIONNUMBER "${VERSIONNUMBER_CONTENTS}") -install(FILES ${CMAKE_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) +file(WRITE ${CMAKE_BINARY_DIR}/gisbase/etc/VERSIONNUMBER "${VERSIONNUMBER_CONTENTS}") +install(FILES ${CMAKE_BINARY_DIR}/gisbase/etc/VERSIONNUMBER DESTINATION etc) -configure_file(license.txt.in ${CMAKE_BINARY_DIR}/license) +configure_file(license.txt.in ${CMAKE_BINARY_DIR}/gisbase/etc/license) -install(FILES ${CMAKE_BINARY_DIR}/VERSIONNUMBER DESTINATION etc) -install(FILES ${CMAKE_BINARY_DIR}/license DESTINATION etc) +install(FILES ${CMAKE_BINARY_DIR}/gisbase/etc/VERSIONNUMBER DESTINATION etc) +install(FILES ${CMAKE_BINARY_DIR}/gisbase/etc/license DESTINATION etc) From c510ec5be6025b31a4c9ba63da7b5abce086487b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:40:15 +0100 Subject: [PATCH 228/264] support for multiple proj4 version --- include/CMakeLists.txt | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 2c47d0817cb..4a44e1f9038 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -48,8 +48,19 @@ check_target(GDAL HAVE_OGR) check_target(SQLITE HAVE_SQLITE) #TODO: check with more version of proj -if(PROJ_VERSION_STRING LESS 500) - check_target(PROJ HAVE_PROJ_H) + +if(PROJ_VERSION_STRING GREATER 599 AND PROJ_VERSION_STRING LESS 700) + message("Using PROJ.4 API version 6.x") + set(PROJMAJOR 6) +elseif(PROJ_VERSION_STRING GREATER 499 AND PROJ_VERSION_STRING LESS 600) + check_target(PROJ HAVE_PROJ_H) + message("Using PROJ.4 API version 5.x") + set(PROJMAJOR 5) +elseif(PROJ_VERSION_STRING GREATER 399 AND PROJ_VERSION_STRING LESS 500) + check_target(PROJ HAVE_PROJ_H) + set(USE_PROJ4API 1) + message("Using PROJ.4 API version 4.x") + set(PROJMAJOR 4) endif() check_target(BLAS HAVE_LIBBLAS) @@ -231,7 +242,9 @@ foreach(srch ${SRCHS}) list(APPEND include_depends ${output_dir}/${srch_NAME} ) endforeach() -add_custom_target(copy_header DEPENDS ${include_depends}) + +add_custom_target(copy_header DEPENDS ${include_depends} python gui_wxpython) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") From fbf2ec7bd7b7f00d1536f1c46c4cf2cc1ef354d8 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:40:37 +0100 Subject: [PATCH 229/264] update building lib/python (except ctypes) --- lib/python/CMakeLists.txt | 46 +++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 588de0613eb..0f97d3108a8 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -1,26 +1,40 @@ -#include(build_py_module_in_subdir) -build_py_lib_in_subdir(exceptions) +copy_python_files_in_subdir(bandref etc/python/grass) +copy_python_files_in_subdir(exceptions etc/python/grass) +copy_python_files_in_subdir(imaging etc/python/grass) +copy_python_files_in_subdir(pydispatch etc/python/grass) +copy_python_files_in_subdir(script etc/python/grass) +copy_python_files_in_subdir(temporal etc/python/grass) +copy_python_files_in_subdir(pygrass etc/python/grass) +copy_python_files_in_subdir(pygrass/messages etc/python/grass) +copy_python_files_in_subdir(pygrass/modules etc/python/grass) +copy_python_files_in_subdir(pygrass/raster etc/python/grass) +copy_python_files_in_subdir(pygrass/vector etc/python/grass) +copy_python_files_in_subdir(pygrass/gis etc/python/grass) +copy_python_files_in_subdir(pygrass/shell etc/python/grass) +copy_python_files_in_subdir(pygrass/tests etc/python/grass) +copy_python_files_in_subdir(pygrass/rpc etc/python/grass) +copy_python_files_in_subdir(pygrass/modules/interface etc/python/grass) +copy_python_files_in_subdir(pygrass/modules/grid etc/python/grass) -build_py_lib_in_subdir(script) configure_file(script/setup.py ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py COPYONLY) -# add_subdirectory(ctypes) - -# build_py_lib_in_subdir(temporal etc/python/grass) +add_custom_target(python + COMMAND ${CMAKE_COMMAND} -E echo "#coding=utf-8" > ${GISBASE}/etc/python/__init__.py + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py ${GISBASE}/etc/python/grass/script/ + DEPENDS python_bandref python_exceptions python_imaging python_pydispatch python_script python_temporal + python_pygrass python_pygrass_messages python_pygrass_modules python_pygrass_modules + python_pygrass_raster python_pygrass_vector python_pygrass_gis python_pygrass_shell + python_pygrass_tests python_pygrass_rpc + python_pygrass_modules_interface + python_pygrass_modules_grid) -# add_subdirectory(pygrass) +#TODO: MODULES DISABLED +# add_subdirectory(ctypes) -# build_py_lib_in_subdir(pydispatch etc/python/grass) - -# build_py_lib_in_subdir(imaging etc/python/grass) - -# build_py_lib_in_subdir(gunittest etc/python/grass) +set_target_properties (python PROPERTIES FOLDER lib) - -file(WRITE ${GISBASE}/etc/python/_init__.py "#coding=utf-8") -file(COPY __init__.py DESTINATION ${GISBASE}/etc/python/grass/) -install(FILES __init__.py DESTINATION etc/python/grass/) +install(DIRECTORY ${GISBASE}/etc/python/grass DESTINATION etc/python/grass/) \ No newline at end of file From f21ca4c7749d77504f0782e32c612733c80b33cc Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:40:56 +0100 Subject: [PATCH 230/264] use INFINITY macro to work with msvc --- raster/r.in.lidar/info.c | 2 +- raster/r.li/r.li.padrange/padrange.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/raster/r.in.lidar/info.c b/raster/r.in.lidar/info.c index cb9ee5bdeae..97b3ca5504d 100644 --- a/raster/r.in.lidar/info.c +++ b/raster/r.in.lidar/info.c @@ -103,7 +103,7 @@ int scan_bounds(LASReaderH LAS_reader, int shell_style, int extents, int update, first = TRUE; /* init to nan in case no points are found */ - min_x = max_x = min_y = max_y = min_z = max_z = 0.0 / 0.0; + min_x = max_x = min_y = max_y = min_z = max_z = INFINITY; G_verbose_message(_("Scanning data ...")); diff --git a/raster/r.li/r.li.padrange/padrange.c b/raster/r.li/r.li.padrange/padrange.c index 9c38c3eaa17..7002b839815 100644 --- a/raster/r.li/r.li.padrange/padrange.c +++ b/raster/r.li/r.li.padrange/padrange.c @@ -315,8 +315,8 @@ int calculate(int fd, struct area_entry *ad, double *result) (((NS_DIST1 + NS_DIST2) / 2) / hd.rows); /* get min and max patch size */ - min = 1.0 / 0.0; /* inf */ - max = -1.0 / 0.0; /* -inf */ + min = INFINITY; /* inf */ + max = -INFINITY; /* -inf */ for (old_pid = 1; old_pid <= pid; old_pid++) { if (pst[old_pid].count > 0) { area_p = cell_size_m * pst[old_pid].count / 10000; @@ -551,8 +551,8 @@ int calculateD(int fd, struct area_entry *ad, double *result) (((NS_DIST1 + NS_DIST2) / 2) / hd.rows); /* get min and max patch size */ - min = 1.0 / 0.0; /* inf */ - max = -1.0 / 0.0; /* -inf */ + min = INFINITY; /* inf */ + max = -INFINITY; /* -inf */ for (old_pid = 1; old_pid <= pid; old_pid++) { if (pst[old_pid].count > 0) { area_p = cell_size_m * pst[old_pid].count / 10000; @@ -787,8 +787,8 @@ int calculateF(int fd, struct area_entry *ad, double *result) (((NS_DIST1 + NS_DIST2) / 2) / hd.rows); /* get min and max patch size */ - min = 1.0 / 0.0; /* inf */ - max = -1.0 / 0.0; /* -inf */ + min = INFINITY; /* inf */ + max = -INFINITY; /* -inf */ for (old_pid = 1; old_pid <= pid; old_pid++) { if (pst[old_pid].count > 0) { area_p = cell_size_m * pst[old_pid].count / 10000; From 19a5e52ce1424024d6db6e29c79a6e15f2a91236 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:42:16 +0100 Subject: [PATCH 231/264] fix building gui/wxpython/xml use approach with cmake env command for cross platform build --- gui/wxpython/CMakeLists.txt | 97 +++++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 093c5139a06..4b4bd230d8e 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -7,17 +7,25 @@ foreach(gui_DIR ${gui_DIRS}) build_gui_in_subdir(${gui_DIR}) endforeach() +set(WXPYTHON_DIR ${GISBASE}/gui/wxpython) set(gui_lib_DIRS core gui_core icons iscatt lmgr location_wizard mapdisp mapwin modules nviz rdigit startup tools vnet web_services wxplot) +add_custom_target(gui_wxpython + #COMMAND ${CMAKE_COMMAND} -E echo "#coding=utf-8" > ${WXPYTHON_DIR}/__initx__.py + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py ${WXPYTHON_DIR}/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py ${WXPYTHON_DIR}/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/ + DEPENDS python_core python_gui_core python_icons python_iscatt python_lmgr python_location_wizard + python_mapdisp python_mapwin python_modules python_nviz python_rdigit python_startup python_vnet + python_web_services python_wxplot) + foreach(gui_lib_DIR ${gui_lib_DIRS}) - build_py_lib_in_subdir(${gui_lib_DIR}) + copy_python_files_in_subdir(${gui_lib_DIR} gui/wxpython) endforeach() install(FILES README DESTINATION gui/wxpython) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py gui/wxpython) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py gui/wxpython) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py gui/wxpython) + #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) #separate_arguments(MODULE_LIST) @@ -25,50 +33,79 @@ copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py gui/wxpython) #list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) #list(REMOVE_DUPLICATES MODULE_LIST) +set(XXX 1) if(XXX) ### copy all python files gui/ lib/python ### compile all python files ### so below target depends on MODULD_LIST -set(WXPYTHON_DIR ${GISBASE}/gui/wxpython) -add_custom_target(copy_build_module_xml - #COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py ${WXPYTHON_DIR}/tools/ + +add_custom_target(copy_wxpython_xml + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xml ${WXPYTHON_DIR}/xml/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} ##### DEPENDS copy_gui_images ) +add_custom_target(compile_python_files + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} + DEPENDS copy_wxpython_xml) +file(TO_NATIVE_PATH "${GISBASE}" GISBASE_NATIVE) +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/bin" BINARY_DIR) +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/lib" LIB_DIR) +file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}" MODULE_TOPDIR) +file(TO_NATIVE_PATH "${GISBASE}/scripts" SCRIPTS_DIR) +file(TO_NATIVE_PATH "${GISBASE}/etc/config/rc" GISRC) +file(TO_NATIVE_PATH "${GISBASE}/etc/python" ETC_PYTHON_DIR) +file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" ETC_WXPYTHON_DIR) +if(WIN32) +set(sep "\;") +else() +set(sep "\:") +endif() + +set(env_command ${CMAKE_COMMAND} -E env + "PATH=${BINARY_DIR}${sep}${SCRIPTS_DIR}" + "PYTHONPATH=${ETC_PYTHON_DIR}${sep}${ETC_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}" + "LD_LIBRARY_PATH=${LIB_DIR}${sep}$ENV{LD_LIBRARY_PATH}" + "GISBASE=${GISBASE_NATIVE}" + "GISRC=${GISRC}" + "LC_ALL=C" + "LANG=C" + "LANGUAGE=C" + "MODULE_TOPDIR=${MODULE_TOPDIR}" + "GRASS_PYTHON=${PYTHON_EXECUTABLE}" + "VERSION_NUMBER=\"7.9.dev\"" + "VERSION_DATE=\"2019\"") add_custom_target(build_modules_items_xml - COMMAND ${RUN_PYTHON} - ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py > ${WXPYTHON_DIR}/xml/module_items.xml - DEPENDS copy_build_module_xml - ) + COMMAND ${env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py > ${WXPYTHON_DIR}/xml/module_items.xml + DEPENDS compile_python_files + COMMENT "Generating interface description for all modules..." + VERBATIM) add_custom_target(build_xml_menudata - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${WXPYTHON_DIR}/xml + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${c}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${WXPYTHON_DIR}/xml/ DEPENDS build_modules_items_xml) add_custom_target(build_module_tree_menudata - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/toolboxes.py "module_tree" > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml ${WXPYTHON_DIR}/xml + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py "module_tree" > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml ${WXPYTHON_DIR}/xml/ DEPENDS build_xml_menudata) add_custom_target(build_menustrings ALL - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/menutree.py "manager" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py - COMMAND ${RUN_PYTHON} - ${WXPYTHON_DIR}/core/menutree.py "psmap" >> ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menustrings.py + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "manager" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py + COMMAND ${env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "psmap" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py DEPENDS build_module_tree_menudata) - #install after validate ${CMAKE_CURRENT_BINARY_DIR}/wxpython/xml/module_tree_menudata.xml endif() From ba30799ada41c703d6eaa5edd2071f4e7d5e2846 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:43:11 +0100 Subject: [PATCH 232/264] void* arithmetic is not allowed in msvc To be discussed --- raster/r.in.lidar/main.c | 2 +- raster/r.in.lidar/point_binning.c | 48 +++++++++++++++---------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/raster/r.in.lidar/main.c b/raster/r.in.lidar/main.c index 583abb6c9bf..d3797e2cc4a 100644 --- a/raster/r.in.lidar/main.c +++ b/raster/r.in.lidar/main.c @@ -629,7 +629,7 @@ int main(int argc, char *argv[]) if (base_array) { G_debug(2, "filling base raster array"); for (row = 0; row < rows; row++) { - Rast_get_row(base_raster, base_array + ((size_t) row * cols * Rast_cell_size(base_raster_data_type)), row, base_raster_data_type); + Rast_get_row(base_raster, (double*)base_array + ((size_t) row * cols * Rast_cell_size(base_raster_data_type)), row, base_raster_data_type); } } diff --git a/raster/r.in.lidar/point_binning.c b/raster/r.in.lidar/point_binning.c index be111bc97e0..1151e2b12bb 100644 --- a/raster/r.in.lidar/point_binning.c +++ b/raster/r.in.lidar/point_binning.c @@ -383,9 +383,9 @@ void write_variance(void *raster_row, void *n_array, void *sum_array, for (col = 0; col < cols; col++) { offset = ((size_t) row * cols + col) * Rast_cell_size(rtype); n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - n = Rast_get_c_value(n_array + n_offset, CELL_TYPE); - sum = Rast_get_d_value(sum_array + offset, rtype); - sumsq = Rast_get_d_value(sumsq_array + offset, rtype); + n = Rast_get_c_value((CELL*) n_array + n_offset, CELL_TYPE); + sum = Rast_get_d_value((DCELL*) sum_array + offset, rtype); + sumsq = Rast_get_d_value((DCELL*)sumsq_array + offset, rtype); if (n == 0) Rast_set_null_value(ptr, 1, rtype); @@ -432,11 +432,11 @@ void write_median(struct BinIndex *bin_index, void *raster_row, for (col = 0; col < cols; col++) { n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - if (Rast_is_null_value(index_array + n_offset, CELL_TYPE)) /* no points in cell */ + if (Rast_is_null_value((CELL*)index_array + n_offset, CELL_TYPE)) /* no points in cell */ Rast_set_null_value(ptr, 1, rtype); else { /* one or more points in cell */ - head_id = Rast_get_c_value(index_array + n_offset, CELL_TYPE); + head_id = Rast_get_c_value((CELL*)index_array + n_offset, CELL_TYPE); node_id = head_id; n = 0; @@ -488,10 +488,10 @@ void write_percentile(struct BinIndex *bin_index, void *raster_row, for (col = 0; col < cols; col++) { n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - if (Rast_is_null_value(index_array + n_offset, CELL_TYPE)) /* no points in cell */ + if (Rast_is_null_value((CELL*)index_array + n_offset, CELL_TYPE)) /* no points in cell */ Rast_set_null_value(ptr, 1, rtype); else { - head_id = Rast_get_c_value(index_array + n_offset, CELL_TYPE); + head_id = Rast_get_c_value((CELL*)index_array + n_offset, CELL_TYPE); node_id = head_id; n = 0; @@ -543,10 +543,10 @@ void write_skewness(struct BinIndex *bin_index, void *raster_row, for (col = 0; col < cols; col++) { n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - if (Rast_is_null_value(index_array + n_offset, CELL_TYPE)) /* no points in cell */ + if (Rast_is_null_value((CELL*)index_array + n_offset, CELL_TYPE)) /* no points in cell */ Rast_set_null_value(ptr, 1, rtype); else { - head_id = Rast_get_c_value(index_array + n_offset, CELL_TYPE); + head_id = Rast_get_c_value((CELL*)index_array + n_offset, CELL_TYPE); node_id = head_id; n = 0; /* count */ @@ -599,10 +599,10 @@ void write_trimmean(struct BinIndex *bin_index, void *raster_row, for (col = 0; col < cols; col++) { n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - if (Rast_is_null_value(index_array + n_offset, CELL_TYPE)) /* no points in cell */ + if (Rast_is_null_value((CELL*)index_array + n_offset, CELL_TYPE)) /* no points in cell */ Rast_set_null_value(ptr, 1, rtype); else { - head_id = Rast_get_c_value(index_array + n_offset, CELL_TYPE); + head_id = Rast_get_c_value((CELL*)index_array + n_offset, CELL_TYPE); node_id = head_id; n = 0; @@ -662,26 +662,26 @@ void write_values(struct PointBinning *point_binning, switch (point_binning->method) { case METHOD_N: /* n is a straight copy */ Rast_raster_cpy(raster_row, - point_binning->n_array + + (CELL*)point_binning->n_array + ((size_t) row * cols * Rast_cell_size(CELL_TYPE)), cols, CELL_TYPE); break; case METHOD_MIN: Rast_raster_cpy(raster_row, - point_binning->min_array + + (CELL*)point_binning->min_array + ((size_t) row * cols * Rast_cell_size(rtype)), cols, rtype); break; case METHOD_MAX: Rast_raster_cpy(raster_row, - point_binning->max_array + + (CELL*)point_binning->max_array + ((size_t) row * cols * Rast_cell_size(rtype)), cols, rtype); break; case METHOD_SUM: Rast_raster_cpy(raster_row, - point_binning->sum_array + + (CELL*)point_binning->sum_array + ((size_t) row * cols * Rast_cell_size(rtype)), cols, rtype); break; @@ -690,9 +690,9 @@ void write_values(struct PointBinning *point_binning, for (col = 0; col < cols; col++) { size_t offset = ((size_t) row * cols + col) * Rast_cell_size(rtype); double min = - Rast_get_d_value(point_binning->min_array + offset, rtype); + Rast_get_d_value((DCELL*)point_binning->min_array + offset, rtype); double max = - Rast_get_d_value(point_binning->max_array + offset, rtype); + Rast_get_d_value((DCELL*)point_binning->max_array + offset, rtype); Rast_set_d_value(ptr, max - min, rtype); ptr = G_incr_void_ptr(ptr, Rast_cell_size(rtype)); } @@ -703,10 +703,10 @@ void write_values(struct PointBinning *point_binning, for (col = 0; col < cols; col++) { size_t offset = ((size_t) row * cols + col) * Rast_cell_size(rtype); size_t n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - int n = Rast_get_c_value(point_binning->n_array + n_offset, + int n = Rast_get_c_value((CELL*)point_binning->n_array + n_offset, CELL_TYPE); double sum = - Rast_get_d_value(point_binning->sum_array + offset, rtype); + Rast_get_d_value((DCELL*)point_binning->sum_array + offset, rtype); if (n == 0) Rast_set_null_value(ptr, 1, rtype); @@ -750,21 +750,21 @@ void write_values(struct PointBinning *point_binning, for (col = 0; col < cols; col++) { size_t offset = ((size_t) row * cols + col) * Rast_cell_size(rtype); size_t n_offset = ((size_t) row * cols + col) * Rast_cell_size(CELL_TYPE); - int n = Rast_get_c_value(point_binning->n_array + n_offset, + int n = Rast_get_c_value((CELL*)point_binning->n_array + n_offset, CELL_TYPE); if (n == 0) continue; double sum_x = - Rast_get_d_value(point_binning->x_array + offset, rtype); + Rast_get_d_value((DCELL*)point_binning->x_array + offset, rtype); double sum_y = - Rast_get_d_value(point_binning->y_array + offset, rtype); + Rast_get_d_value((DCELL*)point_binning->y_array + offset, rtype); /* TODO: we do this also in mean writing */ double sum_z = - Rast_get_d_value(point_binning->sum_array + offset, rtype); + Rast_get_d_value((DCELL*)point_binning->sum_array + offset, rtype); - /* We are not writing any categories. They are not needed + /* We are not writing any categories. They are not neededsb * and potentially it is too much trouble to do it and it is * unclear what to write. Not writing them is also a little * bit faster. */ From c5659de88f78fb6955802a3681249d79cc2adef5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:46:39 +0100 Subject: [PATCH 233/264] copy __init__.py for python/grass/ --- lib/python/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 0f97d3108a8..58461d45924 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -24,6 +24,7 @@ configure_file(script/setup.py add_custom_target(python COMMAND ${CMAKE_COMMAND} -E echo "#coding=utf-8" > ${GISBASE}/etc/python/__init__.py + COMMAND ${CMAKE_COMMAND} -E echo ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${GISBASE}/etc/python/grass/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py ${GISBASE}/etc/python/grass/script/ DEPENDS python_bandref python_exceptions python_imaging python_pydispatch python_script python_temporal python_pygrass python_pygrass_messages python_pygrass_modules python_pygrass_modules From 0c8eb17c2b73b2733a6badc66fa2c34848b097f2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 02:49:48 +0100 Subject: [PATCH 234/264] fix wrong cmake varible used --- gui/wxpython/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 4b4bd230d8e..e858d8ec262 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -86,7 +86,7 @@ set(env_command ${CMAKE_COMMAND} -E env COMMAND ${env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml COMMAND ${env_command} ${PYTHON_EXECUTABLE} - ${c}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml + ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${WXPYTHON_DIR}/xml/ DEPENDS build_modules_items_xml) From 3114d3c6259b71cd7184eaee7191db1fd490bf35 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 03:32:05 +0100 Subject: [PATCH 235/264] copy init py to etc/python/grass/ --- lib/python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 58461d45924..f3c76c3afbd 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -24,7 +24,7 @@ configure_file(script/setup.py add_custom_target(python COMMAND ${CMAKE_COMMAND} -E echo "#coding=utf-8" > ${GISBASE}/etc/python/__init__.py - COMMAND ${CMAKE_COMMAND} -E echo ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${GISBASE}/etc/python/grass/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${GISBASE}/etc/python/grass/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py ${GISBASE}/etc/python/grass/script/ DEPENDS python_bandref python_exceptions python_imaging python_pydispatch python_script python_temporal python_pygrass python_pygrass_messages python_pygrass_modules python_pygrass_modules From 06857c801f112e226d214cbd5bcb36f1ba74ced1 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 14:20:16 +0100 Subject: [PATCH 236/264] db/drviers: odbc, sqlite, dbf, ogr, postgresql --- db/CMakeLists.txt | 3 -- db/drivers/CMakeLists.txt | 74 ++++++++++++++++++++++++--------------- db/drivers/odbc/odbc.h | 2 +- 3 files changed, 46 insertions(+), 33 deletions(-) diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index 0646fb29acf..9af85ac49eb 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -1,13 +1,10 @@ set(db_drivers grass_gis) -if(NOT MSVC) add_subdirectory(drivers) -endif() build_program_in_subdir(db.columns DEPENDS grass_dbmiclient) add_dependencies(db.columns ${db_drivers}) - build_program_in_subdir(db.createdb DEPENDS grass_dbmiclient) add_dependencies(db.createdb ${db_drivers}) diff --git a/db/drivers/CMakeLists.txt b/db/drivers/CMakeLists.txt index 405cf688afb..22ddb1dfa52 100644 --- a/db/drivers/CMakeLists.txt +++ b/db/drivers/CMakeLists.txt @@ -3,49 +3,65 @@ set(dbf_SRCS dbf/column.c dbf/create_table.c dbf/driver.c dbf/error.c dbf/execute.c dbf/fetch.c dbf/listtab.c dbf/main.c dbf/select.c dbf/str.c dbf/table.c) +set(db_drivers) +set(grass_dbstubs_DEFS) +if(MSVC) +set(grass_dbstubs_DEFS "-DDB_DRIVER_C=1") +endif() build_program_in_subdir(dbf SOURCES ${dbf_SRCS} - DEPENDS grass_gis grass_dbmidriver - grass_shape grass_sqlp + DEPENDS grass_gis grass_dbmidriver grass_shape grass_sqlp + DEFS "${grass_dbstubs_DEFS}" HTML_FILE_NAME grass-dbf - RUNTIME_OUTPUT_DIR "driver/db/" - ) + RUNTIME_OUTPUT_DIR "driver/db/") -set(db_drivers) list(APPEND db_drivers dbf) -#TODO ; add targets -if(ODBC_LIB) - add_subdirectory(odbc) - #list(APPEND db_drivers "odbc") -endif() -if(MYSQL_LIB) - add_subdirectory(mysql) - #list(APPEND db_drivers "mysql") -endif() +build_program_in_subdir(ogr + DEPENDS grass_gis grass_dbmidriver grass_sqlp GDAL + DEFS "${grass_dbstubs_DEFS}" + HTML_FILE_NAME grass-ogr + RUNTIME_OUTPUT_DIR "driver/db/") -if(TARGET POSTGRES) - add_subdirectory(postgres) - #list(APPEND db_drivers "postrgresq") +list(APPEND db_drivers ogr) + +build_program_in_subdir(odbc + DEPENDS grass_gis grass_dbmidriver grass_sqlp + DEFS "${grass_dbstubs_DEFS}" + PRIMARY_DEPENDS ODBC + HTML_FILE_NAME grass-odbc + RUNTIME_OUTPUT_DIR "driver/db/") +if(TARGET ODBC) + list(APPEND db_drivers odbc) endif() +build_program_in_subdir(sqlite + DEPENDS grass_gis grass_dbmidriver grass_sqlp + DEFS "${grass_dbstubs_DEFS}" + PRIMARY_DEPENDS SQLITE + HTML_FILE_NAME grass-sqlite + RUNTIME_OUTPUT_DIR "driver/db/") + if(TARGET SQLITE) list(APPEND db_drivers sqlite) - build_program_in_subdir(sqlite - DEPENDS grass_gis grass_dbmidriver - grass_sqlp SQLITE - HTML_FILE_NAME grass-sqlite - RUNTIME_OUTPUT_DIR "driver/db/" - ) endif() -if(TARGET GDAL) - list(APPEND db_drivers ogr) - build_program_in_subdir(ogr - DEPENDS grass_gis grass_dbmidriver GDAL - grass_sqlp - HTML_FILE_NAME grass-ogr +build_program_in_subdir(postgres + DEPENDS grass_gis grass_dbmidriver grass_sqlp + DEFS "${grass_dbstubs_DEFS}" + PRIMARY_DEPENDS POSTGRES + HTML_FILE_NAME grass-pg RUNTIME_OUTPUT_DIR "driver/db/") + +if(TARGET POSTGRES) + list(APPEND db_drivers postgres) endif() + +if(MYSQL_LIB) + ##add_subdirectory(mysql) + #list(APPEND db_drivers "mysql") +endif() + + set(db_drivers ${db_drivers} PARENT_SCOPE) diff --git a/db/drivers/odbc/odbc.h b/db/drivers/odbc/odbc.h index 29294bd87cc..4a63287db82 100644 --- a/db/drivers/odbc/odbc.h +++ b/db/drivers/odbc/odbc.h @@ -1,7 +1,7 @@ #ifndef _ODBC_H_ #define _ODBC_H_ -#ifdef __MINGW32__ +#ifdef _WIN32 #include #endif From 68a867939efb396920abbdf058cd4b6449e3ce2c Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 14:22:21 +0100 Subject: [PATCH 237/264] check for PQCmdTuples in postgresql --- cmake/tests/have_pqcmdtuples.c | 8 ++++++++ include/CMakeLists.txt | 30 +++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 cmake/tests/have_pqcmdtuples.c diff --git a/cmake/tests/have_pqcmdtuples.c b/cmake/tests/have_pqcmdtuples.c new file mode 100644 index 00000000000..fcd05fe8d22 --- /dev/null +++ b/cmake/tests/have_pqcmdtuples.c @@ -0,0 +1,8 @@ +#include +int main() { + PGresult* res = NULL; + PGconn* conn = PQconnectdb(NULL); + res = PQexec(conn, NULL); + PQcmdTuples(res); + return 0; +} diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 4a44e1f9038..019e3a2bda5 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -72,16 +72,36 @@ check_target(LAPACK HAVE_CLAPACK_H) check_target(FREETYPE HAVE_FT2BUILD_H) check_target(POSTGRES HAVE_POSTGRES) check_target(ODBC HAVE_SQL_H) + +if(TARGET POSTGRES) + try_compile(HAVE_PQCMDTUPLES + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/cmake/tests/have_pqcmdtuples.c + CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${PostgreSQL_INCLUDE_DIR}" + "-w" + "-DLINK_LIBRARIES:STRING=${PostgreSQL_LIBRARY}" + OUTPUT_VARIABLE COMPILE_HAVE_PQCMDTUPLES) + if(NOT COMPILE_HAVE_PQCMDTUPLES) + message("Performing Test HAVE_PQCMDTUPLES - Failed\n COMPILE_OUTPUT:${COMPILE_HAVE_PQCMDTUPLES}\n") + else() + message(STATUS "Performing Test HAVE_PQCMDTUPLES - Success") + set(HAVE_PQCMDTUPLES 1) + endif() +endif() + if(MSVC) check_target(PCRE HAVE_PCRE_H) endif() +check_target(POSTGRES HAVE_LIBPQ_FE_H) + # Whether or not we are using G_socks for display communications set(USE_G_SOCKS 0) -set(HAVE_LARGEFILES 0) if(WITH_LARGEFILES) set(HAVE_LARGEFILES 1) +else() + set(HAVE_LARGEFILES 0) endif() if(MSVC) @@ -96,8 +116,6 @@ endif() ########################TODO######################## #no target ATLAS in thirdpary/CMakeLists.txt check_target(ATLAS HAVE_LIBATLAS) -set(HAVE_LIBPQ_FE_H 0) -set(HAVE_PQCMDTUPLES 0) set(USE_NLS 0) if(WITH_NLS) @@ -105,7 +123,6 @@ if(WITH_NLS) endif() set(HAVE_READLINE_READLINE_H 0) - if(MSVC) set(PID_TYPE int) endif() @@ -115,7 +132,6 @@ set(USE_DELTA_FOR_TZ 0) set(_REENTRANT 0) ########################TODO######################## - set(X_DISPLAY_MISSING 1) if(TARGET X11) set(X_DISPLAY_MISSING 0) @@ -242,10 +258,8 @@ foreach(srch ${SRCHS}) list(APPEND include_depends ${output_dir}/${srch_NAME} ) endforeach() - add_custom_target(copy_header DEPENDS ${include_depends} python gui_wxpython) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") @@ -254,7 +268,6 @@ message(STATUS "Creating ${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/grass/config.h") - file(WRITE ${CMAKE_BINARY_DIR}/include/grass/copying.h "") file(STRINGS ${CMAKE_SOURCE_DIR}/COPYING copying_lines) foreach(copying_line ${copying_lines}) @@ -267,7 +280,6 @@ foreach(citing_line ${citing_lines}) file(APPEND ${CMAKE_BINARY_DIR}/include/grass/citing.h "\"${citing_line}\\n\"\n" ) endforeach() - #TODO #file(READ ${CMAKE_SOURCE_DIR}/config.status config_status_header) file(WRITE ${CMAKE_BINARY_DIR}/include/grass/confparms.h "\"/* */\\n\"" ) From 96c9f1139578fc18890f17cf36fd4de21b704c64 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 14:32:16 +0100 Subject: [PATCH 238/264] add defines to be posix conformat on msvc --- include/config.h.cmake.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/config.h.cmake.in b/include/config.h.cmake.in index 37dca61cb44..b695dfd6389 100644 --- a/include/config.h.cmake.in +++ b/include/config.h.cmake.in @@ -281,6 +281,14 @@ #ifdef _MSC_VER #define strncasecmp _strnicmp #define strcasecmp _stricmp +#define fdopen _fdopen +#define open _open +#define read _read +#define write _write +#define close _close +#define unlink _unlink +#define getpid _getpid +#define creat _creat /* define gid_t type */ typedef @GID_TYPE@ gid_t; From 954c94af0d037c0d8b6a28d1c89b83126524c2ff Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 22:31:46 +0100 Subject: [PATCH 239/264] bring in testing using ctest (wip) --- CMakeLists.txt | 31 ++++++- cmake/modules/build_module.cmake | 14 +-- cmake/modules/build_pymodule_in_subdir.cmake | 91 -------------------- lib/python/CMakeLists.txt | 1 + raster/CMakeLists.txt | 1 + 5 files changed, 40 insertions(+), 98 deletions(-) delete mode 100644 cmake/modules/build_pymodule_in_subdir.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index dc91630d63c..ea0e7d1bbda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,8 @@ set_compiler_flags() include(repo_status) repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) +enable_testing() + # Setup build locations. if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -122,8 +124,35 @@ include(check_target) add_subdirectory(thirdparty) set(GISBASE ${CMAKE_BINARY_DIR}/gisbase) -configure_file(cmake/mkhtml.cmake.in ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake @ONLY) +file(TO_NATIVE_PATH "${GISBASE}" GISBASE_NATIVE) +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/bin" BINARY_DIR) +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/lib" LIB_DIR) +file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}" MODULE_TOPDIR) +file(TO_NATIVE_PATH "${GISBASE}/scripts" SCRIPTS_DIR) +file(TO_NATIVE_PATH "${GISBASE}/etc/config/rc" GISRC) +file(TO_NATIVE_PATH "${GISBASE}/etc/python" ETC_PYTHON_DIR) +file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" ETC_WXPYTHON_DIR) +if(WIN32) +set(sep "\;") +else() +set(sep "\:") +endif() + +set(grass_env_command ${CMAKE_COMMAND} -E env + "PATH=${BINARY_DIR}${sep}${SCRIPTS_DIR}" + "PYTHONPATH=${ETC_PYTHON_DIR}${sep}${ETC_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}" + "LD_LIBRARY_PATH=${LIB_DIR}${sep}$ENV{LD_LIBRARY_PATH}" + "GISBASE=${GISBASE_NATIVE}" + "GISRC=${GISRC}" + "LC_ALL=C" + "LANG=C" + "LANGUAGE=C" + "MODULE_TOPDIR=${MODULE_TOPDIR}" + "GRASS_PYTHON=${PYTHON_EXECUTABLE}" + "VERSION_NUMBER=\"7.9.dev\"" + "VERSION_DATE=\"2019\"") +configure_file(cmake/mkhtml.cmake.in ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake @ONLY) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 852aaa36584..584dd9a2bb1 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -3,7 +3,7 @@ function(build_module) cmake_parse_arguments(G "EXE" "NAME;SRCDIR;SRC_REGEX;RUNTIME_OUTPUT_DIR;PACKAGE;HTML_FILE_NAME" - "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;PRIMARY_DEPENDS;DEFS;HEADERS" + "SOURCES;INCLUDES;DEPENDS;OPTIONAL_DEPENDS;PRIMARY_DEPENDS;DEFS;HEADERS;TEST_SOURCES" ${ARGN} ) if(NOT G_NAME) @@ -181,7 +181,6 @@ function(build_module) endif() endif() - set_target_properties(${G_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") set_target_properties(${G_NAME} PROPERTIES G_TARGET_FILE "$") set_target_properties(${G_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") @@ -190,14 +189,17 @@ function(build_module) set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") set_target_properties(${G_NAME} PROPERTIES PYTHON_SCRIPT FALSE) - if(WITH_DOCS) build_docs(${G_NAME}) endif() # WITH_DOCS +foreach(test_SOURCE ${G_TEST_SOURCES}) + add_test(NAME ${G_NAME}-test + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} + ${G_SRCDIR}/testsuite/${test_SOURCE}) + message("[build_module] ADDING TEST ${G_NAME}-test") +endforeach() + install(TARGETS ${G_NAME} DESTINATION ${install_dest}) endfunction() - - - diff --git a/cmake/modules/build_pymodule_in_subdir.cmake b/cmake/modules/build_pymodule_in_subdir.cmake deleted file mode 100644 index 5951b24b1a9..00000000000 --- a/cmake/modules/build_pymodule_in_subdir.cmake +++ /dev/null @@ -1,91 +0,0 @@ -include(copy_python_file) -function(xbuild_pymodule_in_subdir module_name dest_dir) - #set(pyc_depends) - - file(GLOB img_files ${module_name}/*.png ${module_name}/*.jpg) - file(GLOB py_files ${module_name}/*.py) - - string(REPLACE "/" "_" target_name ${module_name}) - string(REPLACE "/" "_" targ_prefix ${dest_dir}) - set(targ_name ${targ_prefix}_${target_name} ) - - set(g_gui_found FALSE) - set(G_NAME g.gui.${module_name}) #Important as it is used in windows_launch.bat.in - - set(g_gui_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.py) - ##message( "${GISBASE}/${dest_dir}") - add_custom_target(py_${targ_name} ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${dest_dir}/${module_name} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_files} ${GISBASE}/${dest_dir}/${module_name} - DEPENDS g.parser - ) - set_target_properties (py_${targ_name} PROPERTIES FOLDER ${dest_dir}) - if(img_files) - add_custom_target(docs_images_${targ_name} ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${img_files} ${GISBASE}/docs/html - DEPENDS py_${targ_name}) - set_target_properties (docs_images_${targ_name} PROPERTIES FOLDER docs) - endif() - - if(EXISTS ${g_gui_file}) - if(WIN32) - configure_file(${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in ${GISBASE}/bin/${G_NAME}.bat) - install(PROGRAMS ${GISBASE}/bin/${G_NAME}.bat DESTINATION bin) -else() - # file(INSTALL ${g_gui_file} ${GISBASE}/scripts/${G_NAME}) # COPYONLY) - - configure_file(${g_gui_file} ${GISBASE}/scripts/${G_NAME} COPYONLY) - - install(PROGRAMS ${GISBASE}/scripts/${G_NAME} DESTINATION scripts) - endif() - - if(WIN32) - set(python_script ${GISBASE}/scripts/${G_NAME}.bat) - else() - add_custom_target(py_g_gui_${targ_name} ) # ALL - # COMMAND ${CMAKE_COMMAND} -E copy_if_different ${g_gui_file} ${GISBASE}/scripts/${G_NAME} - # DEPENDS py_${targ_name}) - # set_target_properties (py_g_gui_${targ_name} PROPERTIES FOLDER gui) - set(python_script ${GISBASE}/scripts/${G_NAME}) - - endif() - - install(FILES ${g_gui_file} DESTINATION scripts) - - - -if(WITH_DOCS) - set(html_file ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/${G_NAME}.html ) - - set(tmp_html_cmd ) - set(mkhtml_cmd ) - - set(html_file_tmp "${GISBASE}/docs/html/${G_NAME}.tmp.html") - set(html_file_out "${GISBASE}/docs/html/${G_NAME}.html") - set(html_file_gui "${GISBASE}/docs/html/wxGUI.${G_NAME}.html") -#message(FATAL_ERROR "py_g_gui_${targ_name}_html_descr") - add_custom_target(py_g_gui_${targ_name}_html_descr - COMMAND ${RUN_PYTHON} ${python_script} --html-description > ${html_file_tmp} - DEPENDS py_g_gui_${targ_name} - ) - - add_custom_target(py_g_gui_${targ_name}_mkhtml - COMMAND ${RUN_PYTHON} ${GISBASE}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_out} - COMMAND ${CMAKE_COMMAND} -E remove ${html_file_tmp} - COMMAND ${RUN_PYTHON} ${GISBASE}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} - DEPENDS py_g_gui_${targ_name}_html_descr - ) - - add_custom_target(py_g_gui_${targ_name}_mkhtml_wxgui ALL - COMMAND ${RUN_PYTHON} ${GISBASE}/tools/mkhtml.py ${python_script} ${html_file} ${html_file_tmp} > ${html_file_gui} - DEPENDS py_g_gui_${targ_name}_mkhtml - ) -endif() #WITH_DOCS - endif() - - install(FILES ${py_files} DESTINATION ${dest_dir}) - if(WITH_DOCS) - install(FILES ${img_files} DESTINATION docs/html) - endif() - -endfunction() diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index f3c76c3afbd..9becf9a6ada 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -1,6 +1,7 @@ copy_python_files_in_subdir(bandref etc/python/grass) copy_python_files_in_subdir(exceptions etc/python/grass) +copy_python_files_in_subdir(gunittest etc/python/grass) copy_python_files_in_subdir(imaging etc/python/grass) copy_python_files_in_subdir(pydispatch etc/python/grass) copy_python_files_in_subdir(script etc/python/grass) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index b7a519e64ad..80579e42ac9 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -129,6 +129,7 @@ build_program_in_subdir( endif() build_program_in_subdir( r.info + TEST_SOURCES "test_r_info.py" DEPENDS grass_gis grass_raster) build_program_in_subdir( From 2283e79873fbea17eafffa28cac3e68cca2df977 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 22:32:11 +0100 Subject: [PATCH 240/264] improve proj4 detection Signed-off-by: Rashad Kanavath --- cmake/find_scripts/FindPROJ.cmake | 24 +++++------------------- include/CMakeLists.txt | 2 +- thirdparty/CMakeLists.txt | 3 --- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index bda9581e95e..5fd9ca54932 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -15,26 +15,13 @@ # ############################################################################### -FIND_PATH(PROJ_INCLUDE_DIR proj.h - DOC "Path to PROJ.4 include directory 5.x +") +FIND_PATH(PROJ_INCLUDE_DIR proj_api.h DOC "Path to PROJ.4 include directory") -if(NOT PROJ_INCLUDE_DIR) - FIND_PATH(PROJ_INCLUDE_DIR proj_api.h DOC "Path to PROJ.4 include directory 4.x") - #file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_h_CONTENTS) +if(EXISTS "${PROJ_INCLUDE_DIR}/proj_api.h") + file(READ "${PROJ_INCLUDE_DIR}/xproj_api.h" proj_h_header) + string(REGEX MATCH "#define +PJ_VERSION +([0-9]+)" _dummy "${proj_h_header}") + set(PROJ_VERSION_STRING "${CMAKE_MATCH_1}") endif() - -if(EXISTS "${PROJ_INCLUDE_DIR}/proj.h") - file(READ "${PROJ_INCLUDE_DIR}/proj.h" _proj_h_CONTENTS) - string(REGEX REPLACE ".*# *define PROJ_VERSION_MAJOR.([0-9])" "\\1" PROJ_VERSION_MAJOR "${_proj_h_CONTENTS}") - string(REGEX REPLACE ".*# *define PROJ_VERSION_MINOR.([0-9])" "\\1" PROJ_VERSION_MINOR "${_proj_h_CONTENTS}") - string(REGEX REPLACE ".*# *define PROJ_VERSION_PATCH.([0-9])" "\\1" PROJ_VERSION_PATCH "${_proj_h_CONTENTS}") - - string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_h_CONTENTS}") -elseif(EXISTS "${PROJ_INCLUDE_DIR}/proj_api.h") -file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" _proj_h_CONTENTS) -string(REGEX REPLACE ".*# *define PJ_VERSION.([0-9]+).*" "\\1" PROJ_VERSION_STRING "${_proj_h_CONTENTS}") -endif() - FIND_LIBRARY(PROJ_LIBRARY_RELEASE NAMES proj proj_i DOC "Path to PROJ library file") @@ -54,7 +41,6 @@ if(PROJ_INCLUDE_DIR AND PROJ_LIBRARY) set(PROJ_FOUND TRUE) endif() - MARK_AS_ADVANCED( PROJ_INCLUDE_DIR PROJ_LIBRARY diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 019e3a2bda5..c9bc32e450f 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -52,12 +52,12 @@ check_target(SQLITE HAVE_SQLITE) if(PROJ_VERSION_STRING GREATER 599 AND PROJ_VERSION_STRING LESS 700) message("Using PROJ.4 API version 6.x") set(PROJMAJOR 6) + check_target(PROJ HAVE_PROJ_H) elseif(PROJ_VERSION_STRING GREATER 499 AND PROJ_VERSION_STRING LESS 600) check_target(PROJ HAVE_PROJ_H) message("Using PROJ.4 API version 5.x") set(PROJMAJOR 5) elseif(PROJ_VERSION_STRING GREATER 399 AND PROJ_VERSION_STRING LESS 500) - check_target(PROJ HAVE_PROJ_H) set(USE_PROJ4API 1) message("Using PROJ.4 API version 4.x") set(PROJMAJOR 4) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 87b88c0154d..0bedf59f917 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -6,9 +6,6 @@ find_package(PROJ REQUIRED) add_library(PROJ INTERFACE IMPORTED GLOBAL) set_property(TARGET PROJ PROPERTY INTERFACE_LINK_LIBRARIES ${PROJ_LIBRARY${find_library_suffix}} ) set_property(TARGET PROJ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PROJ_INCLUDE_DIR} ) -if(PROJ_VERSION_STRING GREATER 500) - set_property(TARGET PROJ PROPERTY INTERFACE_COMPILE_DEFINITIONS "ACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ) -endif() find_package(GDAL REQUIRED) add_library(GDAL INTERFACE IMPORTED GLOBAL) From c691c99e92361d3352a84d58a8c10858577fad2f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 22:56:19 +0100 Subject: [PATCH 241/264] keep proj4 version string in cache (very useful later) --- cmake/find_scripts/FindPROJ.cmake | 4 ++-- include/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index 5fd9ca54932..cc579ed5116 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -18,9 +18,9 @@ FIND_PATH(PROJ_INCLUDE_DIR proj_api.h DOC "Path to PROJ.4 include directory") if(EXISTS "${PROJ_INCLUDE_DIR}/proj_api.h") - file(READ "${PROJ_INCLUDE_DIR}/xproj_api.h" proj_h_header) + file(READ "${PROJ_INCLUDE_DIR}/proj_api.h" proj_h_header) string(REGEX MATCH "#define +PJ_VERSION +([0-9]+)" _dummy "${proj_h_header}") - set(PROJ_VERSION_STRING "${CMAKE_MATCH_1}") + set(PROJ_VERSION_STRING "${CMAKE_MATCH_1}" CACHE INTERNAL "PROJ.4 version string") endif() FIND_LIBRARY(PROJ_LIBRARY_RELEASE NAMES proj proj_i diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index c9bc32e450f..910a97d7120 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -50,16 +50,16 @@ check_target(SQLITE HAVE_SQLITE) #TODO: check with more version of proj if(PROJ_VERSION_STRING GREATER 599 AND PROJ_VERSION_STRING LESS 700) - message("Using PROJ.4 API version 6.x") + message(STATUS "Using PROJ.4 API version 6.x") set(PROJMAJOR 6) check_target(PROJ HAVE_PROJ_H) elseif(PROJ_VERSION_STRING GREATER 499 AND PROJ_VERSION_STRING LESS 600) check_target(PROJ HAVE_PROJ_H) - message("Using PROJ.4 API version 5.x") + message(STATUS "Using PROJ.4 API version 5.x") set(PROJMAJOR 5) elseif(PROJ_VERSION_STRING GREATER 399 AND PROJ_VERSION_STRING LESS 500) set(USE_PROJ4API 1) - message("Using PROJ.4 API version 4.x") + message(STATUS "Using PROJ.4 API version 4.x") set(PROJMAJOR 4) endif() From a33052b009692925762cad880347880e9bc69dac Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 22:56:47 +0100 Subject: [PATCH 242/264] find optional packages quietly --- thirdparty/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 0bedf59f917..9f90faaa1ac 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -61,7 +61,7 @@ if(WITH_X11) endif() if(WIN32) - find_package(ODBC) + find_package(ODBC QUIET) if(ODBC_FOUND) add_library(ODBC INTERFACE IMPORTED GLOBAL) set_property(TARGET ODBC PROPERTY INTERFACE_LINK_LIBRARIES ${ODBC_LIBRARIES} ) @@ -74,7 +74,7 @@ add_library(TIFF INTERFACE IMPORTED GLOBAL) set_property(TARGET TIFF PROPERTY INTERFACE_LINK_LIBRARIES ${TIFF_LIBRARY${find_library_suffix}} ) set_property(TARGET TIFF PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TIFF_INCLUDE_DIR}) -find_package(Iconv) +find_package(Iconv QUIET) if(ICONV_FOUND) add_library(ICONV INTERFACE IMPORTED GLOBAL) set_property(TARGET ICONV PROPERTY INTERFACE_LINK_LIBRARIES ${ICONV_LIBRARIES} ) @@ -129,21 +129,21 @@ if(WITH_SQLITE) set_property(TARGET SQLITE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SQLITE_INCLUDE_DIRS} ) endif() -find_package(PDAL) +find_package(PDAL QUIET) if(PDAL_FOUND) add_library(PDAL INTERFACE IMPORTED GLOBAL) set_property(TARGET PDAL PROPERTY INTERFACE_LINK_LIBRARIES ${PDAL_LIBRARIES} ) set_property(TARGET PDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PDAL_INCLUDE_DIRS} ) endif() -find_package(libLAS) +find_package(libLAS QUIET) if(LIBLAS_FOUND) add_library(LIBLAS INTERFACE IMPORTED GLOBAL) set_property(TARGET LIBLAS PROPERTY INTERFACE_LINK_LIBRARIES ${LibLAS_C_LIBRARY} ) set_property(TARGET LIBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LibLAS_INCLUDE_DIR} ) endif() -find_package(NetCDF) +find_package(NetCDF QUIET) if(NETCDF_FOUND) add_library(NETCDF INTERFACE IMPORTED GLOBAL) set_property(TARGET NETCDF PROPERTY INTERFACE_LINK_LIBRARIES ${NetCDF_LIBRARY} ) From 48620b6bc9421b7d512ade13ea376b82ec13c3fa Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 22:57:13 +0100 Subject: [PATCH 243/264] use PRIMARY_DEPENDS option in build_module --- raster/CMakeLists.txt | 8 +++----- vector/CMakeLists.txt | 11 ++++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index 80579e42ac9..ed761df7759 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -482,13 +482,11 @@ build_program_in_subdir( r.what.color DEPENDS grass_gis grass_raster) -if(TARGET LIBLAS) build_program_in_subdir( r.in.lidar - DEPENDS grass_gis grass_raster grass_lidar LIBLAS) -else() -message(STATUS "r.in.lidar is disable because libLAS is not found") -endif() + DEPENDS grass_gis grass_raster grass_lidar + PRIMARY_DEPENDS LIBLAS) + add_subdirectory(r.li) add_subdirectory(r.mapcalc) diff --git a/vector/CMakeLists.txt b/vector/CMakeLists.txt index 9bb4b44c4ad..03d3b141578 100644 --- a/vector/CMakeLists.txt +++ b/vector/CMakeLists.txt @@ -84,21 +84,18 @@ build_program_in_subdir( build_program_in_subdir( v.in.dxf - DEPENDS grass_gis grass_vector ) + DEPENDS grass_gis grass_vector) -if(TARGET PDAL) file(GLOB v_in_pdal_SOURCES "v.in.pdal/*.c" "v.in.pdal/main.cpp") build_program_in_subdir( v.in.pdal SOURCES "${v_in_pdal_SOURCES}" - DEPENDS grass_gis grass_vector PDAL) -else() -message("v.in.pdal is disabled because PDAL library found") -endif() + DEPENDS grass_gis grass_vector + PRIMARY_DEPENDS PDAL) build_program_in_subdir( v.in.region - DEPENDS grass_gis grass_vector ) + DEPENDS grass_gis grass_vector) build_program_in_subdir( v.kcv From 527fea6b6fbb157cf5fe3661ee6bcb47a54f7bed Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sun, 12 Jan 2020 23:50:06 +0100 Subject: [PATCH 244/264] generate wxpython menu xml stuff after building all executables --- CMakeLists.txt | 7 +++++++ cmake/modules/build_module.cmake | 3 +++ gui/wxpython/CMakeLists.txt | 1 + 3 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0e7d1bbda..3dfa1e57915 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,6 +198,8 @@ execute_process( add_subdirectory(lib) add_subdirectory(tools) +set(modules_list) + set(ALL_SUBDIRS general @@ -216,6 +218,11 @@ set(ALL_SUBDIRS foreach(d ${ALL_SUBDIRS}) add_subdirectory(${d}) endforeach() +add_custom_target(ALL_MODULES + COMMAND ${CMAKE_COMMAND} -E echo "Building all modules" + DEPENDS ${modules_list}) + +###message(FATAL_ERROR "modules_list=${modules_list}") if(WITH_PYTHON) add_subdirectory(gui) diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 584dd9a2bb1..3b042f242c2 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -64,6 +64,9 @@ function(build_module) set(PGM_NAME ${G_NAME}.exe) endif() + set(modules_list "${G_NAME};${modules_list}" CACHE INTERNAL "list of modules") + + else() add_library(${G_NAME} ${${G_NAME}_SRCS}) set_target_properties (${G_NAME} PROPERTIES FOLDER lib) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index e858d8ec262..b75fe8a377b 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -43,6 +43,7 @@ add_custom_target(copy_wxpython_xml COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xml ${WXPYTHON_DIR}/xml/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ ##### DEPENDS copy_gui_images +DEPENDS ALL_MODULES ) add_custom_target(compile_python_files COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts From f5cf997eedb68c65e3549b77e51fb9cddbde465b Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 00:53:26 +0100 Subject: [PATCH 245/264] ogsf and nviz depends on grass_raster --- lib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 6313db97c90..a4b179ae40e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -140,8 +140,8 @@ build_library_in_subdir(stats DEPENDS grass_raster) build_library_in_subdir(arraystats DEPENDS grass_gis) if(WITH_OPENGL) - build_library_in_subdir(ogsf DEPENDS OPENGL GDAL TIFF) - build_library_in_subdir(nviz DEPENDS OPENGL GDAL TIFF) + build_library_in_subdir(ogsf DEPENDS grass_raster OPENGL TIFF) + build_library_in_subdir(nviz DEPENDS grass_raster OPENGL TIFF) endif() add_subdirectory(temporal) From fc724af4b908495d9c9754252d6e9ada627019c3 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 00:54:00 +0100 Subject: [PATCH 246/264] update gui/wxpython build --- cmake/modules/build_py_module.cmake | 24 ++++---- gui/wxpython/CMakeLists.txt | 95 +++++++++-------------------- 2 files changed, 40 insertions(+), 79 deletions(-) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 1c37cc248eb..614a51745fd 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -96,18 +96,18 @@ endif()# if(NOT G_TYPE STREQUAL "LIB") ## message("Adding python taret ${G_TARGET_NAME}") - if(G_TYPE STREQUAL "SCRIPT") - add_custom_target(${G_TARGET_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PY_MODULE_FILE} ${GISBASE}/scripts/ - DEPENDS ${TRANSLATE_C_FILE} ) - else() - add_custom_target(${G_TARGET_NAME} ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - DEPENDS ${PY_MODULE_FILE} ) - endif() - #get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) - #add_dependencies(${G_NAME} ${MODULE_LIST}) +if(G_TYPE STREQUAL "SCRIPT") + add_custom_target(${G_TARGET_NAME} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PY_MODULE_FILE} ${GISBASE}/scripts/ + DEPENDS ${TRANSLATE_C_FILE}) +else() + add_custom_target(${G_TARGET_NAME} + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ + DEPENDS ${PY_MODULE_FILE}) +endif() + + set(modules_list "${G_TARGET_NAME};${modules_list}" CACHE INTERNAL "list of modules") if(G_TYPE STREQUAL "GUI") set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index b75fe8a377b..8cf13532bc8 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -12,7 +12,6 @@ set(gui_lib_DIRS core gui_core icons iscatt lmgr location_wizard mapdisp mapwin modules nviz rdigit startup tools vnet web_services wxplot) add_custom_target(gui_wxpython - #COMMAND ${CMAKE_COMMAND} -E echo "#coding=utf-8" > ${WXPYTHON_DIR}/__initx__.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py ${WXPYTHON_DIR}/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py ${WXPYTHON_DIR}/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/ @@ -26,87 +25,49 @@ endforeach() install(FILES README DESTINATION gui/wxpython) - -#get_property(MODULE_LIST GLOBAL PROPERTY MODULE_LIST) -#separate_arguments(MODULE_LIST) -#set(EXCLUDED_MODULE_LIST "current_time_s_ms;g.parser;cell;vector;v.in.pdal;i.find") -#list(REMOVE_ITEM MODULE_LIST ${EXCLUDED_MODULE_LIST}) -#list(REMOVE_DUPLICATES MODULE_LIST) - -set(XXX 1) -if(XXX) ### copy all python files gui/ lib/python ### compile all python files ### so below target depends on MODULD_LIST -add_custom_target(copy_wxpython_xml - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xml ${WXPYTHON_DIR}/xml/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ -##### DEPENDS copy_gui_images -DEPENDS ALL_MODULES - ) -add_custom_target(compile_python_files - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts - COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} - DEPENDS copy_wxpython_xml) - -file(TO_NATIVE_PATH "${GISBASE}" GISBASE_NATIVE) -file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/bin" BINARY_DIR) -file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/lib" LIB_DIR) -file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}" MODULE_TOPDIR) -file(TO_NATIVE_PATH "${GISBASE}/scripts" SCRIPTS_DIR) -file(TO_NATIVE_PATH "${GISBASE}/etc/config/rc" GISRC) -file(TO_NATIVE_PATH "${GISBASE}/etc/python" ETC_PYTHON_DIR) -file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" ETC_WXPYTHON_DIR) -if(WIN32) -set(sep "\;") -else() -set(sep "\:") -endif() - -set(env_command ${CMAKE_COMMAND} -E env - "PATH=${BINARY_DIR}${sep}${SCRIPTS_DIR}" - "PYTHONPATH=${ETC_PYTHON_DIR}${sep}${ETC_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}" - "LD_LIBRARY_PATH=${LIB_DIR}${sep}$ENV{LD_LIBRARY_PATH}" - "GISBASE=${GISBASE_NATIVE}" - "GISRC=${GISRC}" - "LC_ALL=C" - "LANG=C" - "LANGUAGE=C" - "MODULE_TOPDIR=${MODULE_TOPDIR}" - "GRASS_PYTHON=${PYTHON_EXECUTABLE}" - "VERSION_NUMBER=\"7.9.dev\"" - "VERSION_DATE=\"2019\"") - add_custom_target(build_modules_items_xml - COMMAND ${env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py > ${WXPYTHON_DIR}/xml/module_items.xml - DEPENDS compile_python_files - COMMENT "Generating interface description for all modules..." - VERBATIM) - - add_custom_target(build_xml_menudata - COMMAND ${env_command} ${PYTHON_EXECUTABLE} +add_custom_target(copy_wxpython_xml + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xml ${WXPYTHON_DIR}/xml/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ + ##### DEPENDS copy_gui_images + DEPENDS ALL_MODULES) + +add_custom_target(compile_python_files + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts + COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} + DEPENDS copy_wxpython_xml) + +add_custom_target(build_modules_items_xml + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py > ${WXPYTHON_DIR}/xml/module_items.xml + DEPENDS compile_python_files + COMMENT "Generating interface description for all modules..." + VERBATIM) + +add_custom_target(build_xml_menudata + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml - COMMAND ${env_command} ${PYTHON_EXECUTABLE} + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/menudata.xml ${WXPYTHON_DIR}/xml/ DEPENDS build_modules_items_xml) - add_custom_target(build_module_tree_menudata - COMMAND ${env_command} ${PYTHON_EXECUTABLE} +add_custom_target(build_module_tree_menudata + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py "module_tree" > ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml - COMMAND ${env_command} ${PYTHON_EXECUTABLE} + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/toolboxes.py "validate" ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/module_tree_menudata.xml ${WXPYTHON_DIR}/xml/ DEPENDS build_xml_menudata) - add_custom_target(build_menustrings ALL - COMMAND ${env_command} ${PYTHON_EXECUTABLE} +add_custom_target(build_menustrings ALL + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "manager" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py - COMMAND ${env_command} ${PYTHON_EXECUTABLE} + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py - COMMAND ${env_command} ${PYTHON_EXECUTABLE} + COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "psmap" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py DEPENDS build_module_tree_menudata) - - -endif() From b48e3288bf8256b544226ecc67013c17a9970ac5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 01:47:16 +0100 Subject: [PATCH 247/264] add missing modules to build --- db/CMakeLists.txt | 9 + lib/CMakeLists.txt | 7 +- raster/CMakeLists.txt | 8 + vector/CMakeLists.txt | 390 ++++++++++------------------------- vector/v.distance/distance.c | 2 +- 5 files changed, 128 insertions(+), 288 deletions(-) diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index 9af85ac49eb..999a28566fb 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -29,4 +29,13 @@ add_dependencies(db.databases ${db_drivers}) build_program_in_subdir(db.dropdb DEPENDS grass_dbmiclient) add_dependencies(db.dropdb ${db_drivers}) +build_program_in_subdir(db.login DEPENDS grass_dbmiclient) +add_dependencies(db.login ${db_drivers}) + +build_program_in_subdir(db.select DEPENDS grass_dbmiclient) +add_dependencies(db.select ${db_drivers}) + +build_program_in_subdir(db.tables DEPENDS grass_dbmiclient) +add_dependencies(db.tables ${db_drivers}) + #TODO: PGM = databaseintro diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a4b179ae40e..7aea8391226 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -140,8 +140,11 @@ build_library_in_subdir(stats DEPENDS grass_raster) build_library_in_subdir(arraystats DEPENDS grass_gis) if(WITH_OPENGL) - build_library_in_subdir(ogsf DEPENDS grass_raster OPENGL TIFF) - build_library_in_subdir(nviz DEPENDS grass_raster OPENGL TIFF) + build_library_in_subdir(ogsf + DEPENDS grass_raster grass_raster3d OPENGL TIFF) + + build_library_in_subdir(nviz + DEPENDS grass_display grass_raster grass_vector grass_bitmap OPENGL TIFF) endif() add_subdirectory(temporal) diff --git a/raster/CMakeLists.txt b/raster/CMakeLists.txt index ed761df7759..82e321c567d 100644 --- a/raster/CMakeLists.txt +++ b/raster/CMakeLists.txt @@ -82,6 +82,8 @@ build_program_in_subdir( r.flow DEPENDS grass_gis grass_raster grass_segment grass_vector grass_bitmap) +build_program_in_subdir(r.geomorphon DEPENDS grass_gis grass_raster grass_gmath) + build_program_in_subdir( r.grow.distance DEPENDS grass_gis grass_raster ) @@ -90,6 +92,10 @@ build_program_in_subdir( r.gwflow DEPENDS grass_gis grass_raster grass_gpde) +build_program_in_subdir( + r.his + DEPENDS grass_gis grass_raster grass_gproj) + build_program_in_subdir( r.horizon DEPENDS grass_gis grass_raster grass_gproj) @@ -222,6 +228,8 @@ build_program_in_subdir( r.patch DEPENDS grass_gis grass_raster) +build_program_in_subdir(r.path DEPENDS grass_gis grass_raster grass_vector) + build_program_in_subdir( r.profile DEPENDS grass_gis grass_raster) diff --git a/vector/CMakeLists.txt b/vector/CMakeLists.txt index 03d3b141578..bfa2dbd53ef 100644 --- a/vector/CMakeLists.txt +++ b/vector/CMakeLists.txt @@ -1,90 +1,51 @@ -build_program_in_subdir( - v.buffer - DEPENDS grass_gis grass_vector ) -build_program_in_subdir( - v.build - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.buffer DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.category - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.build DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.class - DEPENDS grass_gis grass_vector grass_arraystats ) +build_program_in_subdir(v.build.polylines DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.clean - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.category DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.cluster - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.class DEPENDS grass_gis grass_vector grass_arraystats) -build_program_in_subdir( - v.colors - DEPENDS grass_gis grass_vector grass_raster3d) +build_program_in_subdir(v.clean DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.colors.out - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.cluster DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.db.connect - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.colors DEPENDS grass_gis grass_vector grass_raster3d) -build_program_in_subdir( - v.db.select - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.colors.out DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.decimate - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.db.connect DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.delaunay - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.db.select DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.drape - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.decimate DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.edit - DEPENDS grass_gis grass_vector grass_vedit ) +build_program_in_subdir(v.delaunay DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.extract - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.distance DEPENDS grass_gis grass_vector grass_gmath) -build_program_in_subdir( - v.extrude - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.drape DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.generalize - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.edit DEPENDS grass_gis grass_vector grass_vedit) -build_program_in_subdir( - v.hull - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.extract DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.info - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.extrude DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.in.ascii - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.generalize DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.in.db - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.hull DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.in.dxf - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.info DEPENDS grass_gis grass_vector) + +build_program_in_subdir(v.in.ascii DEPENDS grass_gis grass_vector) + +build_program_in_subdir(v.in.db DEPENDS grass_gis grass_vector) + +build_program_in_subdir(v.in.dxf DEPENDS grass_gis grass_vector) file(GLOB v_in_pdal_SOURCES "v.in.pdal/*.c" "v.in.pdal/main.cpp") build_program_in_subdir( @@ -93,300 +54,159 @@ build_program_in_subdir( DEPENDS grass_gis grass_vector PRIMARY_DEPENDS PDAL) -build_program_in_subdir( - v.in.region - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.in.region DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.kcv - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.kcv DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.kernel - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.kernel DEPENDS grass_gis grass_vector ) -build_program_in_subdir( - v.label - DEPENDS grass_gis grass_vector grass_display) +build_program_in_subdir(v.label DEPENDS grass_gis grass_vector grass_display) -build_program_in_subdir( - v.proj - DEPENDS grass_gis grass_vector grass_gproj) +build_program_in_subdir(v.label.sa DEPENDS grass_gis grass_vector grass_display) + +build_program_in_subdir(v.proj DEPENDS grass_gis grass_vector grass_gproj) + +build_program_in_subdir(v.profile DEPENDS grass_gis grass_vector) add_subdirectory(v.lrs) -build_program_in_subdir( - v.mkgrid - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.mkgrid DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.neighbors - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.neighbors DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.net - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.net DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.net.alloc - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.net.alloc DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.net.allpairs - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.allpairs DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.bridge - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.bridge DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.centrality - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.centrality DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.components - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.components DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.connectivity - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.connectivity DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.distance - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.distance DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.flow - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.flow DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.iso - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.iso DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.path - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.path DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.salesman - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.salesman DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.spanningtree - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.spanningtree DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.steiner - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.steiner DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.timetable - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.timetable DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.net.visibility - DEPENDS grass_gis grass_vector grass_neta) +build_program_in_subdir(v.net.visibility DEPENDS grass_gis grass_vector grass_neta) -build_program_in_subdir( - v.normal - DEPENDS grass_gis grass_vector grass_cdhc) +build_program_in_subdir(v.normal DEPENDS grass_gis grass_vector grass_cdhc) -build_program_in_subdir( - v.out.ascii - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.out.ascii DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.out.dxf - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.out.dxf DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.out.pov - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.out.pov DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.out.svg - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.out.svg DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.out.vtk - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.out.vtk DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.outlier - DEPENDS grass_gis grass_vector grass_lidar) +build_program_in_subdir(v.outlier DEPENDS grass_gis grass_vector grass_lidar) -build_program_in_subdir( - v.overlay - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.overlay DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.parallel - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.parallel DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.patch - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.patch DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.perturb - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.perturb DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.split - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.split DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.qcount - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.qcount DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.random - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.random DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.reclass - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.reclass DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.rectify - DEPENDS grass_gis grass_vector grass_imagery) +build_program_in_subdir(v.rectify DEPENDS grass_gis grass_vector grass_imagery) -build_program_in_subdir( - v.sample - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.sample DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.segment - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.segment DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.select - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.select DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.support - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.support DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.surf.bspline - DEPENDS grass_gis grass_vector grass_lidar grass_gpde) +build_program_in_subdir(v.surf.bspline DEPENDS grass_gis grass_vector grass_lidar grass_gpde) -build_program_in_subdir( - v.surf.idw - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.surf.idw DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.surf.rst - DEPENDS grass_gis grass_vector grass_interpdata grass_interpfl grass_qtree ) +build_program_in_subdir(v.surf.rst + DEPENDS grass_gis grass_vector grass_interpdata grass_interpfl grass_qtree) -build_program_in_subdir( - v.transform - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.transform DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.timestamp - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.timestamp DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.to.3d - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.to.3d DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.to.db - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.to.db DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.to.points - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.to.points DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.to.rast - DEPENDS grass_gis grass_vector grass_raster) +build_program_in_subdir(v.to.rast DEPENDS grass_gis grass_vector grass_raster) -build_program_in_subdir( - v.to.rast3 - DEPENDS grass_gis grass_vector grass_raster3d) +build_program_in_subdir(v.to.rast3 DEPENDS grass_gis grass_vector grass_raster3d) -build_program_in_subdir( - v.type - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.type DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.univar - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.univar DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.voronoi - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.voronoi DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.what - DEPENDS grass_gis grass_vector) +build_program_in_subdir(v.what DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.what.rast - DEPENDS grass_gis grass_vector grass_raster) +build_program_in_subdir(v.what.rast DEPENDS grass_gis grass_vector grass_raster) -build_program_in_subdir( - v.what.rast3 - DEPENDS grass_gis grass_vector grass_raster3d) +build_program_in_subdir(v.what.rast3 DEPENDS grass_gis grass_vector grass_raster3d) -build_program_in_subdir( - v.vect.stats - DEPENDS grass_gis grass_vector grass_stats) +build_program_in_subdir(v.vect.stats DEPENDS grass_gis grass_vector grass_stats) -build_program_in_subdir( - v.vol.rst - DEPENDS grass_gis grass_vector grass_raster3d grass_bitmap) +build_program_in_subdir(v.vol.rst + DEPENDS grass_gis grass_vector grass_raster3d grass_bitmap) -build_program_in_subdir( - v.out.ogr - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.out.ogr DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.in.ogr - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.in.ogr DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.external - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.external DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.external.out - DEPENDS grass_gis grass_vector ) +build_program_in_subdir(v.external.out DEPENDS grass_gis grass_vector) -build_program_in_subdir( - v.in.lidar - DEPENDS grass_gis grass_vector - PRIMARY_DEPENDS LIBLAS ) +build_program_in_subdir(v.in.lidar DEPENDS grass_gis grass_vector PRIMARY_DEPENDS LIBLAS) -build_program_in_subdir( - v.lidar.correction - DEPENDS grass_gis grass_vector grass_lidar +build_program_in_subdir(v.lidar.correction DEPENDS grass_gis grass_vector grass_lidar PRIMARY_DEPENDS LIBLAS) -build_program_in_subdir( - v.lidar.edgedetection +build_program_in_subdir(v.lidar.edgedetection DEPENDS grass_gis grass_vector grass_lidar grass_dbmibase grass_gmath PRIMARY_DEPENDS LIBLAS) -build_program_in_subdir( - v.lidar.growing - DEPENDS grass_gis grass_vector - PRIMARY_DEPENDS LIBLAS) +build_program_in_subdir(v.lidar.growing DEPENDS grass_gis grass_vector PRIMARY_DEPENDS LIBLAS) -build_program_in_subdir( - v.out.lidar - DEPENDS grass_gis grass_vector - PRIMARY_DEPENDS LIBLAS) +build_program_in_subdir(v.out.lidar DEPENDS grass_gis grass_vector PRIMARY_DEPENDS LIBLAS) -build_program_in_subdir( - v.out.postgis - DEPENDS grass_gis grass_vector - PRIMARY_DEPENDS POSTGRES) +build_program_in_subdir(v.out.postgis DEPENDS grass_gis grass_vector PRIMARY_DEPENDS POSTGRES) if(WITH_OPENDWG) - build_program_in_subdir( - v.in.dwg - DEPENDS grass_gis grass_vector) + build_program_in_subdir(v.in.dwg DEPENDS grass_gis grass_vector) endif() \ No newline at end of file diff --git a/vector/v.distance/distance.c b/vector/v.distance/distance.c index 73edfa8e5a2..64f1ac50644 100644 --- a/vector/v.distance/distance.c +++ b/vector/v.distance/distance.c @@ -12,7 +12,7 @@ int get_line_box(const struct line_pnts *Points, int i; if (Points->n_points == 0) { - box->E = box->W = box->N = box->S = box->T = box->B = 0.0 / 0.0; + box->E = box->W = box->N = box->S = box->T = box->B = INFINITY; return 0; } From 82e9a2017a10efa8a9aa3f5156f3aa77507d85c4 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 11:19:23 +0100 Subject: [PATCH 248/264] missing v.clip --- scripts/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index f121029e9eb..dd5a4c9d4c9 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -48,6 +48,7 @@ set(script_DIRS r3.in.xyz v.build.all v.centroids + v.clip v.db.addcolumn v.db.addtable v.db.join From 9e83f6f4a9ae4e164ceaf8b23cfb207081c14763 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 11:19:52 +0100 Subject: [PATCH 249/264] install html file is exists --- cmake/modules/build_docs.cmake | 3 +- gui/wxpython/menustrings.py | 6099 ++++++++++++++++++++++++++++++++ 2 files changed, 6101 insertions(+), 1 deletion(-) create mode 100644 gui/wxpython/menustrings.py diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index 4fb9dda900e..daaa3aefd35 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -13,6 +13,7 @@ function(build_docs target_name) if(EXISTS ${html_file}) set(HTML_FILE ${html_file}) + install(FILES ${GISBASE}/docs/html/${G_HTML_FILE_NAME} DESTINATION docs/html) else() file(GLOB html_files ${G_SRC_DIR}/*.html) if(html_files) @@ -36,5 +37,5 @@ function(build_docs target_name) #add_custom_target(${target_name}_html ALL DEPENDS ${G_RUNTIME_OUTPUT_DIR}/${target_name}.exe) - install(FILES ${GISBASE}/docs/html/${G_HTML_FILE_NAME} DESTINATION docs/html) + endfunction() diff --git a/gui/wxpython/menustrings.py b/gui/wxpython/menustrings.py new file mode 100644 index 00000000000..daccb6470b0 --- /dev/null +++ b/gui/wxpython/menustrings.py @@ -0,0 +1,6099 @@ +menustrings_menudata.LayerManagerMenuData'> = [ + _('&File'), + _('Workspace'), + _('New'), + _('Create new workspace'), + _('Open'), + _('Load workspace from file'), + _('Save'), + _('Save workspace'), + _('Save as'), + _('Save workspace to file'), + _('Close'), + _('Close workspace file'), + _('Load GRC file (Tcl/Tk GUI)'), + _('Load map layers from GRC file to layer tree'), + _('Map display'), + _('Add raster'), + _('Add raster map layer to current display'), + _('Add vector'), + _('Add vector map layer to current display'), + _('Add multiple rasters or vectors'), + _('Add multiple raster or vector map layers to current display'), + _('Add RGB raster layer'), + _('Add RGB raster map layer to current display'), + _('Add web service layer'), + _('Add web service layer'), + _('New map display window'), + _('Open new map display window'), + _('Render all map displays'), + _('Re-render maps in all open map display windows'), + _('Close current map display window'), + _('Close current map display window'), + _('Close all open map display windows'), + _('Close all open map display windows'), + _('Import raster data'), + _('Simplified raster import with reprojection'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('Import of common raster formats'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('ASCII x,y,z point import and gridding'), + _('ASCII grid import'), + _('Converts a GRASS ASCII raster file to binary raster map.'), + _('ASCII polygons, lines, and point import'), + _('Creates raster maps from ASCII polygon/line/point data files.'), + _('Raw binary array import'), + _('Import a binary raster file into a GRASS raster map layer.'), + _('GRIDATB.FOR import'), + _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), + _('Matlab 2D array import'), + _('Imports a binary MAT-File(v4) to a GRASS raster.'), + _('PNG import'), + _('Imports non-georeferenced PNG format image.'), + _('SPOT NDVI import'), + _('Imports SPOT VGT NDVI data into a raster map.'), + _('SRTM HGT import'), + _('Imports SRTM HGT files into raster map.'), + _('Terra ASTER HDF import'), + _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), + _('LAS LiDAR points import'), + _('Creates a raster map from LAS LiDAR points using univariate statistics.'), + _('Unpack raster map'), + _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Import vector data'), + _('Simplified vector import with reprojection'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('Import of common vector formats'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('ASCII points or GRASS ASCII format'), + _('Creates a vector map from an ASCII points file or ASCII vector file.'), + _('ASCII points as a vector lines'), + _('Imports ASCII x,y[,z] coordinates as a series of lines.'), + _('DXF import'), + _('Converts files in DXF format to GRASS vector map format.'), + _('WFS'), + _('Imports GetFeature from a WFS server.'), + _('ESRI e00 import'), + _('Imports E00 file into a vector map.'), + _('Geonames import'), + _('Imports geonames.org country files into a vector points map.'), + _('Matlab array or Mapgen format import'), + _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), + _('LAS LiDAR points import'), + _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), + _('Unpack vector map'), + _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Import 3D raster data'), + _('ASCII 3D import'), + _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), + _('Raw binary array 3D import'), + _('Imports a binary raster file into a GRASS 3D raster map.'), + _('Vis5D import'), + _('Import database table'), + _('Common import formats'), + _('Imports attribute tables in various formats.'), + _('Export raster map'), + _('Common export formats'), + _('Exports GRASS raster maps into GDAL supported formats.'), + _('ASCII grid export'), + _('Converts a raster map layer into a GRASS ASCII text file.'), + _('ASCII x,y,z points export'), + _('Exports a raster map to a text file as x,y,z values based on cell centers.'), + _('GRIDATB.FOR export'), + _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), + _('Matlab 2D array export'), + _('Exports a GRASS raster to a binary MAT-File.'), + _('Raw binary array export'), + _('Exports a GRASS raster to a binary array.'), + _('MPEG-1 export'), + _('Converts raster map series to MPEG movie.'), + _('PNG export'), + _('Export a GRASS raster map as a non-georeferenced PNG image.'), + _('PPM export'), + _('Converts a GRASS raster map to a PPM image file.'), + _('PPM from RGB export'), + _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), + _('POV-Ray export'), + _('Converts a raster map layer into a height-field file for POV-Ray.'), + _('VRML export'), + _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), + _('VTK export'), + _('Converts raster maps into the VTK-ASCII format.'), + _('Pack raster map'), + _('Exports a raster map as GRASS GIS specific archive file'), + _('Export vector map'), + _('Common export formats'), + _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), + _('ASCII points or GRASS ASCII vector export'), + _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), + _('DXF export'), + _('Exports vector map to DXF file format.'), + _('PostGIS export'), + _('Exports a vector map layer to PostGIS feature table.'), + _('POV-Ray export'), + _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), + _('SVG export'), + _('Exports a vector map to SVG file.'), + _('VTK export'), + _('Converts a vector map to VTK ASCII output.'), + _('Pack vector map'), + _('Exports a vector map as GRASS GIS specific archive file'), + _('Export 3D raster maps'), + _('ASCII 3D export'), + _('Converts a 3D raster map layer into a ASCII text file.'), + _('Raw binary array 3D export'), + _('Exports a GRASS 3D raster map to a binary array.'), + _('Vis5D export'), + _('VTK export'), + _('Converts 3D raster maps into the VTK-ASCII format.'), + _('Export database table'), + _('Common export formats'), + _('Exports attribute tables into various formats.'), + _('Link external data'), + _('Link external raster data'), + _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), + _('Link external vector data'), + _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), + _('Output format for raster data'), + _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), + _('Output format for vector data'), + _('Defines vector output format utilizing OGR library.'), + _('Manage maps'), + _('Copy'), + _("Copies available data files in the current mapset search path to the user's current mapset."), + _('List'), + _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), + _('Rename'), + _("Renames data base element files in the user's current mapset."), + _('Delete'), + _("Removes data base element files from the user's current mapset using the search pattern."), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('3D raster to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('Georectify'), + _('Manage Ground Control Points for Georectification'), + _('Graphical modeler'), + _('Launch Graphical modeler'), + _('Run model'), + _('Run model prepared by Graphical modeler'), + _('3D image rendering'), + _('Animation tool'), + _('Launch animation tool.'), + _('Bearing/distance to coordinates'), + _('A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system'), + _('Cartographic Composer'), + _('Launch Cartographic Composer'), + _('Map Swipe'), + _('Launch Map Swipe'), + _('Launch script'), + _('Launches script file.'), + _('Simple Python Editor'), + _('Launches Simple Python Editor.'), + _('Close GUI'), + _('Close graphical user interface.'), + _('Quit GRASS GIS'), + _('Close GUI and exit GRASS GIS shell.'), + _('&Settings'), + _('Computational region'), + _('Show current region'), + _('Shows the extent and resolution of the computational region.'), + _('Show region using latitude and longitude'), + _('Shows the extent and resolution of the computational region.'), + _('Show current region extent in Map Display'), + _('Shows the extent of the computational region in Map Display.'), + _('Set region'), + _('Manages the boundary definitions for the geographic region.'), + _('GRASS working environment'), + _('Mapset access'), + _('Set/unset access to other mapsets in current location'), + _('User access'), + _('Controls access to the current mapset for other users on the system. If no option given, prints current status.'), + _('Change working environment'), + _('Changes/reports current mapset. Optionally create new mapset or list available mapsets in given location.'), + _('Change location and mapset'), + _('Change current location and mapset.'), + _('Change mapset'), + _('Change current mapset.'), + _('Change working directory'), + _('Change working directory'), + _('Show settings'), + _("Outputs and modifies the user's current GRASS variable settings."), + _('Change settings'), + _("Outputs and modifies the user's current GRASS variable settings. Prints all defined GRASS variables if no option is given."), + _('Create new location'), + _('Launches location wizard to create new GRASS location.'), + _('Create new mapset'), + _('Creates new mapset in the current location, changes current mapset.'), + _('Version and copyright'), + _('Displays version and copyright information.'), + _('Map projections'), + _('Display map projection'), + _('Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).'), + _('Manage projections'), + _('Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.'), + _('Convert coordinates'), + _('Converts coordinates from one projection to another (cs2cs frontend).'), + _('Addons extensions'), + _('Install extension from addons'), + _('Installs new extension from GRASS AddOns repository.'), + _('Manage installed extension'), + _('Updates or removes installed GRASS AddOns extension(s).'), + _('Preferences'), + _('User GUI preferences (display font, commands, digitizer, etc.)'), + _('&Raster'), + _('Develop raster map'), + _('Compress/decompress'), + _('Compresses and decompresses raster maps.'), + _('Region boundaries'), + _('Sets the boundary definitions for a raster map.'), + _('Manage NULL values'), + _('Manages NULL-values of given raster map.'), + _('Quantization'), + _('Produces the quantization file for a floating-point map.'), + _('Timestamp'), + _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), + _('Resample using aggregate statistics'), + _('Resamples raster map layers to a coarser grid using aggregation.'), + _('Resample using multiple methods'), + _('Resamples raster map to a finer grid using interpolation.'), + _('Resample using nearest neighbor'), + _('GRASS raster map layer data resampling capability.'), + _('Resample using spline tension'), + _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), + _('Resample using bspline'), + _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), + _('Resample using analytic kernel'), + _('Resamples raster map layers using an analytic kernel.'), + _('Support file maintenance'), + _('Allows creation and/or modification of raster map layer support files.'), + _('Update map statistics'), + _('Update raster map statistics'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Tiling'), + _('Produces tilings of the source projection for use in the destination region and projection.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a raster map.'), + _('Color tables (stddev)'), + _("Sets color rules based on stddev from a raster map's mean value."), + _('Manage color rules interactively'), + _('Interactive management of raster color tables.'), + _('Export color table'), + _('Exports the color table associated with a raster map.'), + _('Blend 2 color rasters'), + _('Blends color components of two raster maps by a given ratio.'), + _('Create RGB'), + _('Combines red, green and blue raster maps into a single composite raster map.'), + _('RGB to HIS'), + _('Query raster maps'), + _('Query values by coordinates'), + _('Queries raster maps on their category values and category labels.'), + _('Query colors by value'), + _('Queries colors for a raster map layer.'), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Raster buffers and distance'), + _('Buffer rasters'), + _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), + _('Concentric circles'), + _('Creates a raster map containing concentric rings around a given point.'), + _('Closest points'), + _('Locates the closest points between objects in two raster maps.'), + _('Grow by one cell'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Mask'), + _('Creates a MASK for limiting raster operation.'), + _('Raster map calculator'), + _('Simplified raster map calculator'), + _('Raster map calculator'), + _('Raster map calculator.'), + _('Neighborhood analysis'), + _('Moving window'), + _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), + _('Neighborhood points'), + _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), + _('Overlay rasters'), + _('Cross product'), + _('Creates a cross product of the category values from multiple raster map layers.'), + _('Patch raster maps'), + _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), + _('Raster series aggregation'), + _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), + _('Raster series accumulation'), + _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), + _('Statistical overlay'), + _('Calculates category or object oriented statistics (accumulator-based statistics).'), + _('Quantiles overlay'), + _('Compute category quantiles using two passes.'), + _('Solar radiance and shadows'), + _('LatLong map'), + _('Creates a latitude/longitude raster map.'), + _('Solar irradiance and irradiation'), + _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), + _('Shadows map'), + _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), + _('Sunshine hours and solar angles'), + _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), + _('Terrain analysis'), + _('Generate contour lines'), + _('Produces a vector map of specified contours from a raster map.'), + _('Cost surface'), + _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Cumulative movement costs'), + _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Least cost route or flow'), + _('Traces a flow through an elevation model or cost surface on a raster map.'), + _('Compute shaded relief'), + _('Creates shaded relief map from an elevation map (DEM). '), + _('Apply shade to raster'), + _('Drapes a color raster over an shaded relief or aspect map.'), + _('Slope and aspect'), + _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), + _('Landforms'), + _('Terrain parameters'), + _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), + _('Textural features'), + _('Generate images with textural features from a raster map.'), + _('Visibility'), + _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Horizon angle'), + _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), + _('Transform features'), + _('Clump'), + _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), + _('Grow'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Thin'), + _('Thins non-null cells that denote linear features in a raster map layer.'), + _('Hydrologic modeling'), + _('Carve stream channels'), + _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), + _('Fill lake'), + _('Fills lake at given point to given level.'), + _('Depressionless map and flowlines'), + _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), + _('Flow accumulation'), + _('Performs flow computation for massive grids.'), + _('Flow lines'), + _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), + _('Watershed analysis'), + _('Calculates hydrological parameters and RUSLE factors.'), + _('Watershed subbasins'), + _('Generates watershed subbasins raster map.'), + _('Watershed basin creation'), + _('Creates watershed basins from a drainage direction map.'), + _('Extraction of stream networks'), + _('Performs stream network extraction.'), + _('SIMWE Overland flow modeling'), + _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), + _('SIMWE Sediment flux modeling'), + _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), + _('Topographic index map'), + _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), + _('TOPMODEL simulation'), + _('Simulates TOPMODEL which is a physically based hydrologic model.'), + _('USLE K-factor'), + _('Computes USLE Soil Erodibility Factor (K).'), + _('USLE R-factor'), + _('Computes USLE R factor, Rainfall erosivity index.'), + _('Groundwater modeling'), + _('Groundwater flow'), + _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), + _('Groundwater solute transport'), + _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), + _('Landscape patch analysis'), + _('Set up sampling and analysis framework'), + _("Configuration editor for r.li.'index'"), + _('Edge density'), + _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), + _('Contrast weighted edge density'), + _('Calculates contrast weighted edge density index on a raster map'), + _('Patch area mean'), + _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), + _('Patch area range'), + _('Calculates range of patch area size on a raster map'), + _('Patch area Std Dev'), + _('Calculates standard deviation of patch area a raster map'), + _('Patch area Coeff Var'), + _('Calculates coefficient of variation of patch area on a raster map'), + _('Patch density'), + _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), + _('Patch number'), + _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), + _("Dominance's diversity"), + _("Calculates dominance's diversity index on a raster map"), + _("Shannon's diversity"), + _("Calculates Shannon's diversity index on a raster map"), + _("Simpson's diversity"), + _("Calculates Simpson's diversity index on a raster map"), + _('Richness'), + _('Calculates richness index on a raster map'), + _('Shape index'), + _('Calculates shape index on a raster map'), + _('Wildfire modeling'), + _('Rate of spread'), + _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), + _('Least-cost spread paths'), + _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), + _('Anisotropic spread simulation'), + _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), + _('Change category values and labels'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('Interactively edit category values'), + _('Edits cell values in a raster map.'), + _('Reclassify by size'), + _('Reclasses a raster map greater or less than user specified area size (in hectares).'), + _('Reclassify'), + _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), + _('Recode'), + _('Recodes categorical raster maps.'), + _('Rescale'), + _('Rescales the range of category values in a raster map layer.'), + _('Rescale with histogram'), + _('Rescales histogram equalized the range of category values in a raster map layer.'), + _('Generate random cells'), + _('Random cells'), + _('Generates random cell values with spatial dependence.'), + _('Random cells and vector points'), + _('Creates a raster map layer and vector point map containing randomly located points.'), + _('Generate surfaces'), + _('Fractal surface'), + _('Creates a fractal surface of a given fractal dimension.'), + _('Gaussian kernel density surface'), + _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), + _('Gaussian deviates surface'), + _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), + _('Plane'), + _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), + _('Random deviates surface'), + _('Produces a raster surface map of uniform random deviates with defined range.'), + _('Random surface with spatial dependence'), + _('Generates random surface(s) with spatial dependence.'), + _('Interpolate surfaces'), + _('Bilinear and bicubic from vector points'), + _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), + _('IDW from raster points'), + _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), + _('IDW from vector points'), + _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), + _('Raster contours'), + _('Generates surface raster map from rasterized contours.'), + _('Regularized spline tension'), + _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), + _('Raster series interpolation'), + _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), + _('Fill NULL cells'), + _('Fills no-data areas in raster maps using spline interpolation.'), + _('Reports and statistics'), + _('Basic raster metadata'), + _('Outputs basic information about a raster map.'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('General statistics'), + _('Generates area statistics for raster map.'), + _('Quantiles for large data sets'), + _('Compute quantiles using two passes.'), + _('Range of category values'), + _('Prints terse list of category values found in a raster map layer.'), + _('Sum area by raster map and category'), + _('Reports statistics for raster maps.'), + _('Statistics for clumped cells'), + _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), + _('Total corrected area'), + _('Prints estimation of surface area for raster map.'), + _('Univariate raster statistics'), + _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('Sample transects'), + _('Outputs the raster map layer values lying on user-defined line(s).'), + _('Sample transects (bearing/distance)'), + _('Outputs raster map layer values lying along user defined transect line(s).'), + _('Covariance/correlation'), + _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), + _('Linear regression'), + _('Calculates linear regression from two raster maps: y = a + b*x.'), + _('Multiple regression'), + _('Calculates multiple linear regression from raster maps.'), + _('Mutual category occurrences'), + _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), + _('&Vector'), + _('Develop vector map'), + _('Create new vector map'), + _('Create new empty vector map'), + _('Edit vector map (non-interactively)'), + _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), + _('Convert object types'), + _('Changes type of vector features.'), + _('Parallel lines'), + _('Creates parallel line to input vector lines.'), + _('Dissolve boundaries'), + _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), + _('Create 3D vector over raster'), + _('Converts 2D vector features to 3D by sampling of elevation raster map.'), + _('Extrude 3D vector map'), + _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), + _('Create labels'), + _('Creates paint labels for a vector map from attached attributes.'), + _('Reposition vector map'), + _('Performs an affine transformation (shift, scale and rotate) on vector map.'), + _('Rectify vector map'), + _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Support file maintenance'), + _('Updates vector map metadata.'), + _('Topology maintenance'), + _('Create or rebuild topology'), + _('Creates topology for vector map. Optionally also checks for topological errors.'), + _('Rebuild topology on all vector maps'), + _('Rebuilds topology on all vector maps in the current mapset.'), + _('Build polylines'), + _('Split lines'), + _('Splits vector lines to shorter segments.'), + _('Split polylines'), + _('Creates points/segments from input vector lines and positions.'), + _('Clean vector map'), + _('Toolset for cleaning topology of vector map.'), + _('Smooth or simplify'), + _('Performs vector based generalization.'), + _('Add centroids'), + _('Adds missing centroids to closed boundaries.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a vector map.'), + _('Manage color rules interactively'), + _('Interactive management of vector color tables.'), + _('Export color table'), + _('Exports the color table associated with a vector map.'), + _('Query vector map'), + _('Query with coordinate(s)'), + _('Queries a vector map at given locations.'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('Feature selection'), + _('Select by attributes'), + _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), + _('Select by another map'), + _('Selects features from vector map (A) by features from other vector map (B).'), + _('Map type conversions'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('Buffer vectors'), + _('Creates a buffer around vector features of given type.'), + _('Point analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Identify point clusters'), + _('Performs cluster identification.'), + _('Indices for quadrat counts of vector point lists'), + _('Indices for quadrat counts of vector point lists.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Tests for normality for vector points'), + _('Tests for normality for vector points.'), + _('Lidar analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Detect edges'), + _("Detects the object's edges from a LIDAR data set."), + _('Detect interiors'), + _('Building contour determination and Region Growing algorithm for determining the building inside'), + _('Correct and reclassify objects'), + _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), + _('Linear referencing'), + _('Create LRS'), + _('Creates a linear reference system.'), + _('Create stationing'), + _('Creates stationing from input lines, and linear reference system.'), + _('Create points/segments'), + _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), + _('Find line id and offset'), + _('Finds line id and real km+offset for given points in vector map using linear reference system.'), + _('Nearest features'), + _('Network analysis'), + _('Vector network analysis tool'), + _('Tool for interactive vector network analysis.'), + _('Network preparation'), + _('Performs network maintenance.'), + _('Allocate subnets'), + _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Split net'), + _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Shortest path'), + _('Finds shortest path on vector network.'), + _('Shortest path for sets of features'), + _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), + _('Shortest path using timetables'), + _('Finds shortest path using timetables.'), + _('Shortest path for all pairs'), + _('Computes the shortest path between all pairs of nodes in the network.'), + _('Visibility network'), + _('Performs visibility graph construction.'), + _('Bridges and articulation points'), + _('Computes bridges and articulation points in the network.'), + _('Maximum flow'), + _('Computes the maximum flow between two sets of nodes in the network.'), + _('Vertex connectivity'), + _('Computes vertex connectivity between two sets of nodes in the network.'), + _('Components'), + _('Computes strongly and weakly connected components in the network.'), + _('Centrality'), + _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), + _('Steiner tree'), + _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), + _('Minimum spanning tree'), + _('Computes minimum spanning tree for the network.'), + _('Traveling salesman analysis'), + _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), + _('Overlay vector maps'), + _('Clip vector maps'), + _('Overlay vector maps'), + _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), + _('Patch vector maps'), + _('Creates a new vector map by combining other vector maps.'), + _('Manage categories'), + _('Change or report categories'), + _('Attaches, deletes or reports vector categories to map geometry.'), + _('Reclassify'), + _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), + _('Update attributes'), + _('Update area attributes from raster'), + _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), + _('Update area attributes from vector'), + _('Count points in areas, calculate statistics from point attributes.'), + _('Update point attributes from areas'), + _('Uploads vector values at positions of vector points to the table.'), + _('Update database values from vector'), + _('Populates attribute values from vector features.'), + _('Sample raster maps at point locations'), + _('Uploads raster values at positions of vector points to the table.'), + _('Sample raster neighborhood around points'), + _('Samples a raster map at vector point locations.'), + _('Generate area for current region'), + _('Creates a vector polygon from the current region extent.'), + _('Generate areas from points'), + _('Convex hull'), + _('Produces a 2D/3D convex hull for a given vector map.'), + _('Delaunay triangles'), + _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), + _('Voronoi diagram/Thiessen polygons'), + _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), + _('Generate grid'), + _('Creates a vector map of a user-defined grid.'), + _('Generate points'), + _('Generate from database'), + _('Creates new vector (points) map from database table containing coordinates.'), + _('Generate points along lines'), + _('Creates points along input lines in new vector map with 2 layers.'), + _('Generate random points'), + _('Generates random 2D/3D vector points.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Remove outliers in point sets'), + _('Removes outliers from vector point data.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Reports and statistics'), + _('Basic vector metadata'), + _('Outputs basic information about a vector map.'), + _('Classify attribute data'), + _('Classifies attribute data, e.g. for thematic mapping'), + _('Report topology by category'), + _('Reports geometry statistics for vector maps.'), + _('Univariate attribute statistics for points'), + _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), + _('Univariate statistics for attribute columns'), + _('Calculates univariate statistics on selected table column for a GRASS vector map.'), + _('Sample transects'), + _('Quadrat indices'), + _('Indices for quadrat counts of vector point lists.'), + _('Test normality'), + _('Tests for normality for vector points.'), + _('&Imagery'), + _('Develop images and groups'), + _('Create/edit group'), + _('Creates, edits, and lists groups of imagery files.'), + _('Target group'), + _('Targets an imagery group to a GRASS location and mapset.'), + _('Mosaic images'), + _('Mosaics several images and extends colormap.'), + _('Manage image colors'), + _('Color balance for RGB'), + _('Performs auto-balancing of colors for RGB images.'), + _('HIS to RGB'), + _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), + _('RGB to HIS'), + _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), + _('Rectify image or raster'), + _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), + _('Histogram'), + _('Generate histogram of image'), + _('Spectral response'), + _('Displays spectral response at user specified locations in group or images.'), + _('Pan sharpening'), + _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), + _('Classify image'), + _('Clustering input for unsupervised classification'), + _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), + _('Input for supervised MLC'), + _('Generates statistics for i.maxlik from raster map.'), + _('Maximum likelihood classification (MLC)'), + _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Input for supervised SMAP'), + _('Generates statistics for i.smap from raster map.'), + _('Sequential maximum a posteriori classification (SMAP)'), + _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), + _('Object segmentation'), + _('Identifies segments (objects) from imagery data.'), + _('Filter image'), + _('Edge detection'), + _('Zero-crossing "edge detection" raster function for image processing.'), + _('Matrix/convolving filter'), + _('Performs raster map matrix filter.'), + _('Transform image'), + _('Canonical correlation'), + _('Canonical components analysis (CCA) program for image processing.'), + _('Principal components'), + _('Principal components analysis (PCA) for image processing.'), + _('Fast Fourier'), + _('Fast Fourier Transform (FFT) for image processing.'), + _('Inverse Fast Fourier'), + _('Inverse Fast Fourier Transform (IFFT) for image processing.'), + _('Satellite images tools'), + _('Aster DN to radiance/reflectance'), + _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), + _('Landsat DN to radiance/reflectance'), + _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), + _('Landsat cloud cover assessment'), + _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), + _('Modis quality control'), + _('Extracts quality control parameters from MODIS QC layers.'), + _('Atmospheric correction'), + _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), + _('Topographic correction'), + _('Computes topographic correction of reflectance.'), + _('Orthophoto tools'), + _('Manage GCPs for 3D correction'), + _('Georectifies a map and allows managing GCP for 3D correction.'), + _('Corrects scanning distortions'), + _('Corrects scanning distortions of a scanned aerial photo.'), + _('Satellite images products'), + _('Vegetation indices'), + _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), + _('Tasseled cap vegetation index'), + _('Performs Tasseled Cap (Kauth Thomas) transformation.'), + _('Albedo'), + _('Computes broad band albedo from surface reflectance.'), + _('Emissivity'), + _('Computes emissivity from NDVI, generic method for sparse land.'), + _('Biomass growth'), + _('Computes biomass growth, precursor of crop yield calculation.'), + _('Evapotranspiration calculation'), + _('Instantaneaous Net Radiation'), + _('Net radiation approximation (Bastiaanssen, 1995).'), + _('Soil heat flux'), + _('Soil heat flux approximation (Bastiaanssen, 1995).'), + _('Sensible heat flux'), + _('Computes sensible heat flux iteration SEBAL 01.'), + _('Evaporative fraction'), + _('Computes evaporative fraction and root zone soil moisture.'), + _('Actual Evapotranspiration'), + _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), + _('Temporal integration of ETa'), + _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), + _('Hargreaves methods Evapotranspiration'), + _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), + _('Penman-Monteith Evapotranspiration'), + _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), + _('Priestley-Taylor Evapotranspiration'), + _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), + _('Reports and statistics'), + _('Kappa analysis'), + _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), + _('OIF for LandSat TM'), + _('Calculates Optimum-Index-Factor table for spectral bands'), + _('3D r&aster'), + _('Develop 3D raster map'), + _('Manage 3D NULL values'), + _('Explicitly create the 3D NULL-value bitmap file.'), + _('Manage timestamp'), + _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), + _('Map type conversions'), + _('3D rasters to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('3D color tables'), + _('Creates/modifies the color table associated with a 3D raster map.'), + _('Export 3D color table'), + _('Exports the color table associated with a 3D raster map.'), + _('3D mask'), + _('Establishes the current working 3D raster mask.'), + _('3D raster map calculator'), + _('3D raster map calculator'), + _('Cross section'), + _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), + _('Groundwater modeling'), + _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), + _('Interpolate 3D raster from points'), + _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), + _('Reports and statistics'), + _('Basic 3D raster metadata'), + _('Outputs basic information about a user-specified 3D raster map layer.'), + _('3D raster statistics'), + _('Generates volume statistics for 3D raster maps.'), + _('Univariate statistics for 3D rasters'), + _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('&Database'), + _('Database information'), + _('List databases'), + _('Lists all databases for a given driver and location.'), + _('List drivers'), + _('Lists all database drivers.'), + _('List tables'), + _('Describe table'), + _('Describes a table in detail.'), + _('List columns'), + _('List all columns for a given table.'), + _('Manage databases'), + _('Connect'), + _('Prints/sets general DB connection for current mapset.'), + _('Login'), + _('Create database'), + _('Creates an empty database.'), + _('Drop database'), + _('Removes an existing database.'), + _('Drop table'), + _('Drops an attribute table.'), + _('Copy table'), + _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), + _('Drop column'), + _('Drops a column from selected attribute table.'), + _('Test'), + _('Test database driver, database must exist and set by db.connect.'), + _('Query'), + _('Query any table'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('SQL statement'), + _("Executes any SQL statement. For SELECT statements use 'db.select'."), + _('Vector database connections'), + _('New table'), + _('Creates and connects a new attribute table to a given layer of an existing vector map.'), + _('Remove table'), + _('Removes existing attribute table of a vector map.'), + _('Join table'), + _('Joins a database table to a vector map table.'), + _('Add columns'), + _('Adds one or more columns to the attribute table connected to a given vector map.'), + _('Drop column'), + _('Drops a column from the attribute table connected to a given vector map.'), + _('Rename column'), + _('Renames a column in the attribute table connected to a given vector map.'), + _('Change values'), + _('Updates a column in the attribute table connected to a vector map.'), + _('Drop row'), + _('Removes a vector feature from a vector map through attribute selection.'), + _('Reconnect vectors to database'), + _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), + _('Set vector map - database connection'), + _('Prints/sets DB connection for a vector map to attribute table.'), + _('&Temporal'), + _('Manage datasets'), + _('Connect temporal database'), + _('Prints/sets general temporal GIS database connection for current mapset.'), + _('Create'), + _('Creates a space time dataset.'), + _('Rename'), + _('Renames a space time dataset'), + _('Remove'), + _('Removes space time datasets from temporal database.'), + _('Update metadata'), + _('Modifies the metadata of a space time dataset.'), + _('Merge'), + _('Merges several space time datasets into a single space time dataset.'), + _('Temporally shift'), + _('Shifts temporally the maps of a space time dataset.'), + _('Snap maps of dataset'), + _('Snaps temporally the maps of a space time dataset.'), + _('List'), + _('Lists space time datasets and maps registered in the temporal database.'), + _('Manage maps in datasets'), + _('Register maps in datasets'), + _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), + _('Unregister maps from datasets'), + _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), + _('List raster dataset maps'), + _('Lists registered maps of a space time raster dataset.'), + _('List vector dataset maps'), + _('Lists registered maps of a space time vector dataset.'), + _('List 3D raster dataset maps'), + _('Lists registered maps of a space time raster3d dataset.'), + _('Import'), + _('Import raster dataset'), + _('Imports space time raster dataset.'), + _('Import vector dataset'), + _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), + _('Export'), + _('Export raster dataset'), + _('Exports space time raster dataset.'), + _('Export raster dataset as VTK time series'), + _('Exports space time raster dataset as VTK time series.'), + _('Export vector dataset'), + _('Exports a space time vector dataset as GRASS GIS specific archive file.'), + _('Convert raster dataset to 3D raster'), + _('Converts a space time raster dataset into a 3D raster map.'), + _('Extraction'), + _('Extract subset of raster dataset'), + _('Extracts a subset of a space time raster datasets.'), + _('Extract subset of vector dataset'), + _('Extracts a subset of a space time vector dataset.'), + _('Extract subset of 3D raster dataset'), + _('Extracts a subset of a space time 3D raster dataset.'), + _('Query vector dataset attribute data'), + _('Prints attributes of vector maps registered in a space time vector dataset.'), + _('Raster dataset color table'), + _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), + _('Raster calculations'), + _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), + _('3D raster calculations'), + _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), + _('Interpolate gaps in raster datasets'), + _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), + _('Aggregation'), + _('Neighborhood analysis in raster dataset'), + _('Performs a neighborhood analysis for each map in a space time raster dataset.'), + _('Aggregation in raster datasets'), + _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), + _('Temporal aggregation'), + _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), + _('Temporal aggregation by dataset'), + _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), + _('Sampling'), + _('Sample a space time raster dataset at point coordinates'), + _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), + _('Query raster dataset by vector points dataset'), + _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), + _('Observe specific locations in raster dataset'), + _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), + _('Temporal sampling'), + _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), + _('Reports and statistics'), + _('Space time datasets metadata'), + _('Lists information about space time datasets and maps.'), + _('Univariate raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), + _('Univariate vector dataset statistics'), + _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), + _('Univariate 3D raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), + _('Report temporal topology'), + _('Lists temporal topology of a space time dataset.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Timeline tool'), + _('Plot temporal extents.'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('&Help'), + _('GRASS help'), + _('Display the HTML man pages of GRASS GIS'), + _('GUI help'), + _('Display the HTML man pages of GRASS GIS'), + _('About system'), + _('Prints system information'), + _('About GRASS GIS'), + _('About GRASS GIS'), + ''] +menustrings_menudata.LayerManagerModuleTree'> = [ + _('Import, export and link data'), + _('Import raster data'), + _('Simplified raster import with reprojection'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('Import of common raster formats'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('ASCII x,y,z point import and gridding'), + _('ASCII grid import'), + _('Converts a GRASS ASCII raster file to binary raster map.'), + _('ASCII polygons, lines, and point import'), + _('Creates raster maps from ASCII polygon/line/point data files.'), + _('Raw binary array import'), + _('Import a binary raster file into a GRASS raster map layer.'), + _('GRIDATB.FOR import'), + _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), + _('Matlab 2D array import'), + _('Imports a binary MAT-File(v4) to a GRASS raster.'), + _('PNG import'), + _('Imports non-georeferenced PNG format image.'), + _('SPOT NDVI import'), + _('Imports SPOT VGT NDVI data into a raster map.'), + _('SRTM HGT import'), + _('Imports SRTM HGT files into raster map.'), + _('Terra ASTER HDF import'), + _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), + _('LAS LiDAR points import'), + _('Creates a raster map from LAS LiDAR points using univariate statistics.'), + _('Unpack raster map'), + _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Import vector data'), + _('Simplified vector import with reprojection'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('Import of common vector formats'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('ASCII points or GRASS ASCII format'), + _('Creates a vector map from an ASCII points file or ASCII vector file.'), + _('ASCII points as a vector lines'), + _('Imports ASCII x,y[,z] coordinates as a series of lines.'), + _('DXF import'), + _('Converts files in DXF format to GRASS vector map format.'), + _('WFS'), + _('Imports GetFeature from a WFS server.'), + _('ESRI e00 import'), + _('Imports E00 file into a vector map.'), + _('Geonames import'), + _('Imports geonames.org country files into a vector points map.'), + _('Matlab array or Mapgen format import'), + _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), + _('LAS LiDAR points import'), + _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), + _('Unpack vector map'), + _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Import 3D raster data'), + _('ASCII 3D import'), + _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), + _('Raw binary array 3D import'), + _('Imports a binary raster file into a GRASS 3D raster map.'), + _('Vis5D import'), + _('Import database table'), + _('Common import formats'), + _('Imports attribute tables in various formats.'), + _('Export raster map'), + _('Common export formats'), + _('Exports GRASS raster maps into GDAL supported formats.'), + _('ASCII grid export'), + _('Converts a raster map layer into a GRASS ASCII text file.'), + _('ASCII x,y,z points export'), + _('Exports a raster map to a text file as x,y,z values based on cell centers.'), + _('GRIDATB.FOR export'), + _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), + _('Matlab 2D array export'), + _('Exports a GRASS raster to a binary MAT-File.'), + _('Raw binary array export'), + _('Exports a GRASS raster to a binary array.'), + _('MPEG-1 export'), + _('Converts raster map series to MPEG movie.'), + _('PNG export'), + _('Export a GRASS raster map as a non-georeferenced PNG image.'), + _('PPM export'), + _('Converts a GRASS raster map to a PPM image file.'), + _('PPM from RGB export'), + _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), + _('POV-Ray export'), + _('Converts a raster map layer into a height-field file for POV-Ray.'), + _('VRML export'), + _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), + _('VTK export'), + _('Converts raster maps into the VTK-ASCII format.'), + _('Pack raster map'), + _('Exports a raster map as GRASS GIS specific archive file'), + _('Export vector map'), + _('Common export formats'), + _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), + _('ASCII points or GRASS ASCII vector export'), + _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), + _('DXF export'), + _('Exports vector map to DXF file format.'), + _('PostGIS export'), + _('Exports a vector map layer to PostGIS feature table.'), + _('POV-Ray export'), + _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), + _('SVG export'), + _('Exports a vector map to SVG file.'), + _('VTK export'), + _('Converts a vector map to VTK ASCII output.'), + _('Pack vector map'), + _('Exports a vector map as GRASS GIS specific archive file'), + _('Export 3D raster maps'), + _('ASCII 3D export'), + _('Converts a 3D raster map layer into a ASCII text file.'), + _('Raw binary array 3D export'), + _('Exports a GRASS 3D raster map to a binary array.'), + _('Vis5D export'), + _('VTK export'), + _('Converts 3D raster maps into the VTK-ASCII format.'), + _('Export database table'), + _('Common export formats'), + _('Exports attribute tables into various formats.'), + _('Link external data'), + _('Link external raster data'), + _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), + _('Link external vector data'), + _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), + _('Output format for raster data'), + _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), + _('Output format for vector data'), + _('Defines vector output format utilizing OGR library.'), + _('Manage maps'), + _('Copy'), + _("Copies available data files in the current mapset search path to the user's current mapset."), + _('List'), + _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), + _('Rename'), + _("Renames data base element files in the user's current mapset."), + _('Delete'), + _("Removes data base element files from the user's current mapset using the search pattern."), + _('Computational region'), + _('Show current region'), + _('Shows the extent and resolution of the computational region.'), + _('Show region using latitude and longitude'), + _('Shows the extent and resolution of the computational region.'), + _('Show current region extent in Map Display'), + _('Shows the extent of the computational region in Map Display.'), + _('Set region'), + _('Manages the boundary definitions for the geographic region.'), + _('&Raster'), + _('Develop raster map'), + _('Compress/decompress'), + _('Compresses and decompresses raster maps.'), + _('Region boundaries'), + _('Sets the boundary definitions for a raster map.'), + _('Manage NULL values'), + _('Manages NULL-values of given raster map.'), + _('Quantization'), + _('Produces the quantization file for a floating-point map.'), + _('Timestamp'), + _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), + _('Resample using aggregate statistics'), + _('Resamples raster map layers to a coarser grid using aggregation.'), + _('Resample using multiple methods'), + _('Resamples raster map to a finer grid using interpolation.'), + _('Resample using nearest neighbor'), + _('GRASS raster map layer data resampling capability.'), + _('Resample using spline tension'), + _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), + _('Resample using bspline'), + _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), + _('Resample using analytic kernel'), + _('Resamples raster map layers using an analytic kernel.'), + _('Support file maintenance'), + _('Allows creation and/or modification of raster map layer support files.'), + _('Update map statistics'), + _('Update raster map statistics'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Tiling'), + _('Produces tilings of the source projection for use in the destination region and projection.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a raster map.'), + _('Color tables (stddev)'), + _("Sets color rules based on stddev from a raster map's mean value."), + _('Manage color rules interactively'), + _('Interactive management of raster color tables.'), + _('Export color table'), + _('Exports the color table associated with a raster map.'), + _('Blend 2 color rasters'), + _('Blends color components of two raster maps by a given ratio.'), + _('Create RGB'), + _('Combines red, green and blue raster maps into a single composite raster map.'), + _('RGB to HIS'), + _('Query raster maps'), + _('Query values by coordinates'), + _('Queries raster maps on their category values and category labels.'), + _('Query colors by value'), + _('Queries colors for a raster map layer.'), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Raster buffers and distance'), + _('Buffer rasters'), + _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), + _('Concentric circles'), + _('Creates a raster map containing concentric rings around a given point.'), + _('Closest points'), + _('Locates the closest points between objects in two raster maps.'), + _('Grow by one cell'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Mask'), + _('Creates a MASK for limiting raster operation.'), + _('Raster map calculator'), + _('Simplified raster map calculator'), + _('Raster map calculator'), + _('Raster map calculator.'), + _('Neighborhood analysis'), + _('Moving window'), + _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), + _('Neighborhood points'), + _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), + _('Overlay rasters'), + _('Cross product'), + _('Creates a cross product of the category values from multiple raster map layers.'), + _('Patch raster maps'), + _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), + _('Raster series aggregation'), + _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), + _('Raster series accumulation'), + _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), + _('Statistical overlay'), + _('Calculates category or object oriented statistics (accumulator-based statistics).'), + _('Quantiles overlay'), + _('Compute category quantiles using two passes.'), + _('Solar radiance and shadows'), + _('LatLong map'), + _('Creates a latitude/longitude raster map.'), + _('Solar irradiance and irradiation'), + _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), + _('Shadows map'), + _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), + _('Sunshine hours and solar angles'), + _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), + _('Terrain analysis'), + _('Generate contour lines'), + _('Produces a vector map of specified contours from a raster map.'), + _('Cost surface'), + _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Cumulative movement costs'), + _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Least cost route or flow'), + _('Traces a flow through an elevation model or cost surface on a raster map.'), + _('Compute shaded relief'), + _('Creates shaded relief map from an elevation map (DEM). '), + _('Apply shade to raster'), + _('Drapes a color raster over an shaded relief or aspect map.'), + _('Slope and aspect'), + _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), + _('Landforms'), + _('Terrain parameters'), + _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), + _('Textural features'), + _('Generate images with textural features from a raster map.'), + _('Visibility'), + _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Horizon angle'), + _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), + _('Transform features'), + _('Clump'), + _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), + _('Grow'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Thin'), + _('Thins non-null cells that denote linear features in a raster map layer.'), + _('Hydrologic modeling'), + _('Carve stream channels'), + _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), + _('Fill lake'), + _('Fills lake at given point to given level.'), + _('Depressionless map and flowlines'), + _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), + _('Flow accumulation'), + _('Performs flow computation for massive grids.'), + _('Flow lines'), + _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), + _('Watershed analysis'), + _('Calculates hydrological parameters and RUSLE factors.'), + _('Watershed subbasins'), + _('Generates watershed subbasins raster map.'), + _('Watershed basin creation'), + _('Creates watershed basins from a drainage direction map.'), + _('Extraction of stream networks'), + _('Performs stream network extraction.'), + _('SIMWE Overland flow modeling'), + _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), + _('SIMWE Sediment flux modeling'), + _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), + _('Topographic index map'), + _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), + _('TOPMODEL simulation'), + _('Simulates TOPMODEL which is a physically based hydrologic model.'), + _('USLE K-factor'), + _('Computes USLE Soil Erodibility Factor (K).'), + _('USLE R-factor'), + _('Computes USLE R factor, Rainfall erosivity index.'), + _('Groundwater modeling'), + _('Groundwater flow'), + _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), + _('Groundwater solute transport'), + _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), + _('Landscape patch analysis'), + _('Set up sampling and analysis framework'), + _("Configuration editor for r.li.'index'"), + _('Edge density'), + _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), + _('Contrast weighted edge density'), + _('Calculates contrast weighted edge density index on a raster map'), + _('Patch area mean'), + _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), + _('Patch area range'), + _('Calculates range of patch area size on a raster map'), + _('Patch area Std Dev'), + _('Calculates standard deviation of patch area a raster map'), + _('Patch area Coeff Var'), + _('Calculates coefficient of variation of patch area on a raster map'), + _('Patch density'), + _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), + _('Patch number'), + _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), + _("Dominance's diversity"), + _("Calculates dominance's diversity index on a raster map"), + _("Shannon's diversity"), + _("Calculates Shannon's diversity index on a raster map"), + _("Simpson's diversity"), + _("Calculates Simpson's diversity index on a raster map"), + _('Richness'), + _('Calculates richness index on a raster map'), + _('Shape index'), + _('Calculates shape index on a raster map'), + _('Wildfire modeling'), + _('Rate of spread'), + _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), + _('Least-cost spread paths'), + _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), + _('Anisotropic spread simulation'), + _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), + _('Change category values and labels'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('Interactively edit category values'), + _('Edits cell values in a raster map.'), + _('Reclassify by size'), + _('Reclasses a raster map greater or less than user specified area size (in hectares).'), + _('Reclassify'), + _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), + _('Recode'), + _('Recodes categorical raster maps.'), + _('Rescale'), + _('Rescales the range of category values in a raster map layer.'), + _('Rescale with histogram'), + _('Rescales histogram equalized the range of category values in a raster map layer.'), + _('Generate random cells'), + _('Random cells'), + _('Generates random cell values with spatial dependence.'), + _('Random cells and vector points'), + _('Creates a raster map layer and vector point map containing randomly located points.'), + _('Generate surfaces'), + _('Fractal surface'), + _('Creates a fractal surface of a given fractal dimension.'), + _('Gaussian kernel density surface'), + _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), + _('Gaussian deviates surface'), + _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), + _('Plane'), + _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), + _('Random deviates surface'), + _('Produces a raster surface map of uniform random deviates with defined range.'), + _('Random surface with spatial dependence'), + _('Generates random surface(s) with spatial dependence.'), + _('Interpolate surfaces'), + _('Bilinear and bicubic from vector points'), + _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), + _('IDW from raster points'), + _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), + _('IDW from vector points'), + _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), + _('Raster contours'), + _('Generates surface raster map from rasterized contours.'), + _('Regularized spline tension'), + _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), + _('Raster series interpolation'), + _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), + _('Fill NULL cells'), + _('Fills no-data areas in raster maps using spline interpolation.'), + _('Reports and statistics'), + _('Basic raster metadata'), + _('Outputs basic information about a raster map.'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('General statistics'), + _('Generates area statistics for raster map.'), + _('Quantiles for large data sets'), + _('Compute quantiles using two passes.'), + _('Range of category values'), + _('Prints terse list of category values found in a raster map layer.'), + _('Sum area by raster map and category'), + _('Reports statistics for raster maps.'), + _('Statistics for clumped cells'), + _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), + _('Total corrected area'), + _('Prints estimation of surface area for raster map.'), + _('Univariate raster statistics'), + _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('Sample transects'), + _('Outputs the raster map layer values lying on user-defined line(s).'), + _('Sample transects (bearing/distance)'), + _('Outputs raster map layer values lying along user defined transect line(s).'), + _('Covariance/correlation'), + _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), + _('Linear regression'), + _('Calculates linear regression from two raster maps: y = a + b*x.'), + _('Multiple regression'), + _('Calculates multiple linear regression from raster maps.'), + _('Mutual category occurrences'), + _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), + _('&Vector'), + _('Develop vector map'), + _('Create new vector map'), + _('Create new empty vector map'), + _('Edit vector map (non-interactively)'), + _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), + _('Convert object types'), + _('Changes type of vector features.'), + _('Parallel lines'), + _('Creates parallel line to input vector lines.'), + _('Dissolve boundaries'), + _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), + _('Create 3D vector over raster'), + _('Converts 2D vector features to 3D by sampling of elevation raster map.'), + _('Extrude 3D vector map'), + _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), + _('Create labels'), + _('Creates paint labels for a vector map from attached attributes.'), + _('Reposition vector map'), + _('Performs an affine transformation (shift, scale and rotate) on vector map.'), + _('Rectify vector map'), + _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Support file maintenance'), + _('Updates vector map metadata.'), + _('Topology maintenance'), + _('Create or rebuild topology'), + _('Creates topology for vector map. Optionally also checks for topological errors.'), + _('Rebuild topology on all vector maps'), + _('Rebuilds topology on all vector maps in the current mapset.'), + _('Build polylines'), + _('Split lines'), + _('Splits vector lines to shorter segments.'), + _('Split polylines'), + _('Creates points/segments from input vector lines and positions.'), + _('Clean vector map'), + _('Toolset for cleaning topology of vector map.'), + _('Smooth or simplify'), + _('Performs vector based generalization.'), + _('Add centroids'), + _('Adds missing centroids to closed boundaries.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a vector map.'), + _('Manage color rules interactively'), + _('Interactive management of vector color tables.'), + _('Export color table'), + _('Exports the color table associated with a vector map.'), + _('Query vector map'), + _('Query with coordinate(s)'), + _('Queries a vector map at given locations.'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('Feature selection'), + _('Select by attributes'), + _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), + _('Select by another map'), + _('Selects features from vector map (A) by features from other vector map (B).'), + _('Map type conversions'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('Buffer vectors'), + _('Creates a buffer around vector features of given type.'), + _('Point analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Identify point clusters'), + _('Performs cluster identification.'), + _('Indices for quadrat counts of vector point lists'), + _('Indices for quadrat counts of vector point lists.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Tests for normality for vector points'), + _('Tests for normality for vector points.'), + _('Lidar analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Detect edges'), + _("Detects the object's edges from a LIDAR data set."), + _('Detect interiors'), + _('Building contour determination and Region Growing algorithm for determining the building inside'), + _('Correct and reclassify objects'), + _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), + _('Linear referencing'), + _('Create LRS'), + _('Creates a linear reference system.'), + _('Create stationing'), + _('Creates stationing from input lines, and linear reference system.'), + _('Create points/segments'), + _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), + _('Find line id and offset'), + _('Finds line id and real km+offset for given points in vector map using linear reference system.'), + _('Nearest features'), + _('Network analysis'), + _('Vector network analysis tool'), + _('Tool for interactive vector network analysis.'), + _('Network preparation'), + _('Performs network maintenance.'), + _('Allocate subnets'), + _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Split net'), + _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Shortest path'), + _('Finds shortest path on vector network.'), + _('Shortest path for sets of features'), + _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), + _('Shortest path using timetables'), + _('Finds shortest path using timetables.'), + _('Shortest path for all pairs'), + _('Computes the shortest path between all pairs of nodes in the network.'), + _('Visibility network'), + _('Performs visibility graph construction.'), + _('Bridges and articulation points'), + _('Computes bridges and articulation points in the network.'), + _('Maximum flow'), + _('Computes the maximum flow between two sets of nodes in the network.'), + _('Vertex connectivity'), + _('Computes vertex connectivity between two sets of nodes in the network.'), + _('Components'), + _('Computes strongly and weakly connected components in the network.'), + _('Centrality'), + _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), + _('Steiner tree'), + _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), + _('Minimum spanning tree'), + _('Computes minimum spanning tree for the network.'), + _('Traveling salesman analysis'), + _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), + _('Overlay vector maps'), + _('Clip vector maps'), + _('Overlay vector maps'), + _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), + _('Patch vector maps'), + _('Creates a new vector map by combining other vector maps.'), + _('Manage categories'), + _('Change or report categories'), + _('Attaches, deletes or reports vector categories to map geometry.'), + _('Reclassify'), + _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), + _('Update attributes'), + _('Update area attributes from raster'), + _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), + _('Update area attributes from vector'), + _('Count points in areas, calculate statistics from point attributes.'), + _('Update point attributes from areas'), + _('Uploads vector values at positions of vector points to the table.'), + _('Update database values from vector'), + _('Populates attribute values from vector features.'), + _('Sample raster maps at point locations'), + _('Uploads raster values at positions of vector points to the table.'), + _('Sample raster neighborhood around points'), + _('Samples a raster map at vector point locations.'), + _('Generate area for current region'), + _('Creates a vector polygon from the current region extent.'), + _('Generate areas from points'), + _('Convex hull'), + _('Produces a 2D/3D convex hull for a given vector map.'), + _('Delaunay triangles'), + _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), + _('Voronoi diagram/Thiessen polygons'), + _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), + _('Generate grid'), + _('Creates a vector map of a user-defined grid.'), + _('Generate points'), + _('Generate from database'), + _('Creates new vector (points) map from database table containing coordinates.'), + _('Generate points along lines'), + _('Creates points along input lines in new vector map with 2 layers.'), + _('Generate random points'), + _('Generates random 2D/3D vector points.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Remove outliers in point sets'), + _('Removes outliers from vector point data.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Reports and statistics'), + _('Basic vector metadata'), + _('Outputs basic information about a vector map.'), + _('Classify attribute data'), + _('Classifies attribute data, e.g. for thematic mapping'), + _('Report topology by category'), + _('Reports geometry statistics for vector maps.'), + _('Univariate attribute statistics for points'), + _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), + _('Univariate statistics for attribute columns'), + _('Calculates univariate statistics on selected table column for a GRASS vector map.'), + _('Sample transects'), + _('Quadrat indices'), + _('Indices for quadrat counts of vector point lists.'), + _('Test normality'), + _('Tests for normality for vector points.'), + _('&Imagery'), + _('Develop images and groups'), + _('Create/edit group'), + _('Creates, edits, and lists groups of imagery files.'), + _('Target group'), + _('Targets an imagery group to a GRASS location and mapset.'), + _('Mosaic images'), + _('Mosaics several images and extends colormap.'), + _('Manage image colors'), + _('Color balance for RGB'), + _('Performs auto-balancing of colors for RGB images.'), + _('HIS to RGB'), + _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), + _('RGB to HIS'), + _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), + _('Rectify image or raster'), + _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), + _('Histogram'), + _('Generate histogram of image'), + _('Spectral response'), + _('Displays spectral response at user specified locations in group or images.'), + _('Pan sharpening'), + _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), + _('Classify image'), + _('Clustering input for unsupervised classification'), + _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), + _('Input for supervised MLC'), + _('Generates statistics for i.maxlik from raster map.'), + _('Maximum likelihood classification (MLC)'), + _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Input for supervised SMAP'), + _('Generates statistics for i.smap from raster map.'), + _('Sequential maximum a posteriori classification (SMAP)'), + _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), + _('Object segmentation'), + _('Identifies segments (objects) from imagery data.'), + _('Filter image'), + _('Edge detection'), + _('Zero-crossing "edge detection" raster function for image processing.'), + _('Matrix/convolving filter'), + _('Performs raster map matrix filter.'), + _('Transform image'), + _('Canonical correlation'), + _('Canonical components analysis (CCA) program for image processing.'), + _('Principal components'), + _('Principal components analysis (PCA) for image processing.'), + _('Fast Fourier'), + _('Fast Fourier Transform (FFT) for image processing.'), + _('Inverse Fast Fourier'), + _('Inverse Fast Fourier Transform (IFFT) for image processing.'), + _('Satellite images tools'), + _('Aster DN to radiance/reflectance'), + _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), + _('Landsat DN to radiance/reflectance'), + _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), + _('Landsat cloud cover assessment'), + _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), + _('Modis quality control'), + _('Extracts quality control parameters from MODIS QC layers.'), + _('Atmospheric correction'), + _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), + _('Topographic correction'), + _('Computes topographic correction of reflectance.'), + _('Orthophoto tools'), + _('Manage GCPs for 3D correction'), + _('Georectifies a map and allows managing GCP for 3D correction.'), + _('Corrects scanning distortions'), + _('Corrects scanning distortions of a scanned aerial photo.'), + _('Satellite images products'), + _('Vegetation indices'), + _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), + _('Tasseled cap vegetation index'), + _('Performs Tasseled Cap (Kauth Thomas) transformation.'), + _('Albedo'), + _('Computes broad band albedo from surface reflectance.'), + _('Emissivity'), + _('Computes emissivity from NDVI, generic method for sparse land.'), + _('Biomass growth'), + _('Computes biomass growth, precursor of crop yield calculation.'), + _('Evapotranspiration calculation'), + _('Instantaneaous Net Radiation'), + _('Net radiation approximation (Bastiaanssen, 1995).'), + _('Soil heat flux'), + _('Soil heat flux approximation (Bastiaanssen, 1995).'), + _('Sensible heat flux'), + _('Computes sensible heat flux iteration SEBAL 01.'), + _('Evaporative fraction'), + _('Computes evaporative fraction and root zone soil moisture.'), + _('Actual Evapotranspiration'), + _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), + _('Temporal integration of ETa'), + _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), + _('Hargreaves methods Evapotranspiration'), + _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), + _('Penman-Monteith Evapotranspiration'), + _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), + _('Priestley-Taylor Evapotranspiration'), + _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), + _('Reports and statistics'), + _('Kappa analysis'), + _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), + _('OIF for LandSat TM'), + _('Calculates Optimum-Index-Factor table for spectral bands'), + _('3D r&aster'), + _('Develop 3D raster map'), + _('Manage 3D NULL values'), + _('Explicitly create the 3D NULL-value bitmap file.'), + _('Manage timestamp'), + _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), + _('Map type conversions'), + _('3D rasters to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('3D color tables'), + _('Creates/modifies the color table associated with a 3D raster map.'), + _('Export 3D color table'), + _('Exports the color table associated with a 3D raster map.'), + _('3D mask'), + _('Establishes the current working 3D raster mask.'), + _('3D raster map calculator'), + _('3D raster map calculator'), + _('Cross section'), + _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), + _('Groundwater modeling'), + _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), + _('Interpolate 3D raster from points'), + _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), + _('Reports and statistics'), + _('Basic 3D raster metadata'), + _('Outputs basic information about a user-specified 3D raster map layer.'), + _('3D raster statistics'), + _('Generates volume statistics for 3D raster maps.'), + _('Univariate statistics for 3D rasters'), + _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('&Database'), + _('Database information'), + _('List databases'), + _('Lists all databases for a given driver and location.'), + _('List drivers'), + _('Lists all database drivers.'), + _('List tables'), + _('Describe table'), + _('Describes a table in detail.'), + _('List columns'), + _('List all columns for a given table.'), + _('Manage databases'), + _('Connect'), + _('Prints/sets general DB connection for current mapset.'), + _('Login'), + _('Create database'), + _('Creates an empty database.'), + _('Drop database'), + _('Removes an existing database.'), + _('Drop table'), + _('Drops an attribute table.'), + _('Copy table'), + _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), + _('Drop column'), + _('Drops a column from selected attribute table.'), + _('Test'), + _('Test database driver, database must exist and set by db.connect.'), + _('Query'), + _('Query any table'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('SQL statement'), + _("Executes any SQL statement. For SELECT statements use 'db.select'."), + _('Vector database connections'), + _('New table'), + _('Creates and connects a new attribute table to a given layer of an existing vector map.'), + _('Remove table'), + _('Removes existing attribute table of a vector map.'), + _('Join table'), + _('Joins a database table to a vector map table.'), + _('Add columns'), + _('Adds one or more columns to the attribute table connected to a given vector map.'), + _('Drop column'), + _('Drops a column from the attribute table connected to a given vector map.'), + _('Rename column'), + _('Renames a column in the attribute table connected to a given vector map.'), + _('Change values'), + _('Updates a column in the attribute table connected to a vector map.'), + _('Drop row'), + _('Removes a vector feature from a vector map through attribute selection.'), + _('Reconnect vectors to database'), + _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), + _('Set vector map - database connection'), + _('Prints/sets DB connection for a vector map to attribute table.'), + _('&Temporal'), + _('Manage datasets'), + _('Connect temporal database'), + _('Prints/sets general temporal GIS database connection for current mapset.'), + _('Create'), + _('Creates a space time dataset.'), + _('Rename'), + _('Renames a space time dataset'), + _('Remove'), + _('Removes space time datasets from temporal database.'), + _('Update metadata'), + _('Modifies the metadata of a space time dataset.'), + _('Merge'), + _('Merges several space time datasets into a single space time dataset.'), + _('Temporally shift'), + _('Shifts temporally the maps of a space time dataset.'), + _('Snap maps of dataset'), + _('Snaps temporally the maps of a space time dataset.'), + _('List'), + _('Lists space time datasets and maps registered in the temporal database.'), + _('Manage maps in datasets'), + _('Register maps in datasets'), + _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), + _('Unregister maps from datasets'), + _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), + _('List raster dataset maps'), + _('Lists registered maps of a space time raster dataset.'), + _('List vector dataset maps'), + _('Lists registered maps of a space time vector dataset.'), + _('List 3D raster dataset maps'), + _('Lists registered maps of a space time raster3d dataset.'), + _('Import'), + _('Import raster dataset'), + _('Imports space time raster dataset.'), + _('Import vector dataset'), + _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), + _('Export'), + _('Export raster dataset'), + _('Exports space time raster dataset.'), + _('Export raster dataset as VTK time series'), + _('Exports space time raster dataset as VTK time series.'), + _('Export vector dataset'), + _('Exports a space time vector dataset as GRASS GIS specific archive file.'), + _('Convert raster dataset to 3D raster'), + _('Converts a space time raster dataset into a 3D raster map.'), + _('Extraction'), + _('Extract subset of raster dataset'), + _('Extracts a subset of a space time raster datasets.'), + _('Extract subset of vector dataset'), + _('Extracts a subset of a space time vector dataset.'), + _('Extract subset of 3D raster dataset'), + _('Extracts a subset of a space time 3D raster dataset.'), + _('Query vector dataset attribute data'), + _('Prints attributes of vector maps registered in a space time vector dataset.'), + _('Raster dataset color table'), + _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), + _('Raster calculations'), + _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), + _('3D raster calculations'), + _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), + _('Interpolate gaps in raster datasets'), + _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), + _('Aggregation'), + _('Neighborhood analysis in raster dataset'), + _('Performs a neighborhood analysis for each map in a space time raster dataset.'), + _('Aggregation in raster datasets'), + _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), + _('Temporal aggregation'), + _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), + _('Temporal aggregation by dataset'), + _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), + _('Sampling'), + _('Sample a space time raster dataset at point coordinates'), + _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), + _('Query raster dataset by vector points dataset'), + _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), + _('Observe specific locations in raster dataset'), + _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), + _('Temporal sampling'), + _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), + _('Reports and statistics'), + _('Space time datasets metadata'), + _('Lists information about space time datasets and maps.'), + _('Univariate raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), + _('Univariate vector dataset statistics'), + _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), + _('Univariate 3D raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), + _('Report temporal topology'), + _('Lists temporal topology of a space time dataset.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Timeline tool'), + _('Plot temporal extents.'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Attribute table manager'), + _('Launches graphical attribute table manager.'), + _('Cartographic Composer'), + _('Launch Cartographic Composer'), + _('Georectify'), + _('Manage Ground Control Points for Georectification'), + _('Graphical modeler'), + _('Launch Graphical modeler'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Map Swipe'), + _('Launch Map Swipe'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('Timeline tool'), + _('Plot temporal extents.'), + ''] +menustrings_menudata.PsMapMenuData'> = [ + _('&File'), + _('Page setup'), + _('Specify paper size, margins and orientation'), + _('Load instruction file'), + _('Load text file with mapping instructions'), + _('Export instruction file'), + _('Generate text file with mapping instructions'), + _('Export to PostScript'), + _('Generate PostScript output'), + _('Export to PDF'), + _('Generate PDF output'), + _('Launch ps.map dialog'), + _('Launch ps.map dialog'), + _('Quit'), + _('Close Cartographic Composer'), + _('&Insert'), + _('Map frame'), + _('Add or edit map frame'), + _('Raster map'), + _('Add or edit raster map'), + _('Vector map'), + _('Add or edit vector map'), + _('Map legend'), + _('Add or edit raster and vector legend'), + _('Map info'), + _('Add or edit map info'), + _('Scale bar'), + _('Add or edit scale bar'), + _('Text'), + _('Add text'), + _('Image'), + _('Add image'), + _('North Arrow'), + _('Add north arrow'), + _('Delete'), + _('Delete selected object'), + _('&Help'), + _('Help'), + _('Display the HTML man pages of Cartographic Composer'), + _('About Cartographic Composer'), + _('Display information about Cartographic Composer'), + ''] +menustrings_menudata.LayerManagerMenuData'> = [ + _('&File'), + _('Workspace'), + _('New'), + _('Create new workspace'), + _('Open'), + _('Load workspace from file'), + _('Save'), + _('Save workspace'), + _('Save as'), + _('Save workspace to file'), + _('Close'), + _('Close workspace file'), + _('Load GRC file (Tcl/Tk GUI)'), + _('Load map layers from GRC file to layer tree'), + _('Map display'), + _('Add raster'), + _('Add raster map layer to current display'), + _('Add vector'), + _('Add vector map layer to current display'), + _('Add multiple rasters or vectors'), + _('Add multiple raster or vector map layers to current display'), + _('Add RGB raster layer'), + _('Add RGB raster map layer to current display'), + _('Add web service layer'), + _('Add web service layer'), + _('New map display window'), + _('Open new map display window'), + _('Render all map displays'), + _('Re-render maps in all open map display windows'), + _('Close current map display window'), + _('Close current map display window'), + _('Close all open map display windows'), + _('Close all open map display windows'), + _('Import raster data'), + _('Simplified raster import with reprojection'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('Import of common raster formats'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('ASCII x,y,z point import and gridding'), + _('ASCII grid import'), + _('Converts a GRASS ASCII raster file to binary raster map.'), + _('ASCII polygons, lines, and point import'), + _('Creates raster maps from ASCII polygon/line/point data files.'), + _('Raw binary array import'), + _('Import a binary raster file into a GRASS raster map layer.'), + _('GRIDATB.FOR import'), + _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), + _('Matlab 2D array import'), + _('Imports a binary MAT-File(v4) to a GRASS raster.'), + _('PNG import'), + _('Imports non-georeferenced PNG format image.'), + _('SPOT NDVI import'), + _('Imports SPOT VGT NDVI data into a raster map.'), + _('SRTM HGT import'), + _('Imports SRTM HGT files into raster map.'), + _('Terra ASTER HDF import'), + _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), + _('LAS LiDAR points import'), + _('Creates a raster map from LAS LiDAR points using univariate statistics.'), + _('Unpack raster map'), + _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Import vector data'), + _('Simplified vector import with reprojection'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('Import of common vector formats'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('ASCII points or GRASS ASCII format'), + _('Creates a vector map from an ASCII points file or ASCII vector file.'), + _('ASCII points as a vector lines'), + _('Imports ASCII x,y[,z] coordinates as a series of lines.'), + _('DXF import'), + _('Converts files in DXF format to GRASS vector map format.'), + _('WFS'), + _('Imports GetFeature from a WFS server.'), + _('ESRI e00 import'), + _('Imports E00 file into a vector map.'), + _('Geonames import'), + _('Imports geonames.org country files into a vector points map.'), + _('Matlab array or Mapgen format import'), + _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), + _('LAS LiDAR points import'), + _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), + _('Unpack vector map'), + _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Import 3D raster data'), + _('ASCII 3D import'), + _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), + _('Raw binary array 3D import'), + _('Imports a binary raster file into a GRASS 3D raster map.'), + _('Vis5D import'), + _('Import database table'), + _('Common import formats'), + _('Imports attribute tables in various formats.'), + _('Export raster map'), + _('Common export formats'), + _('Exports GRASS raster maps into GDAL supported formats.'), + _('ASCII grid export'), + _('Converts a raster map layer into a GRASS ASCII text file.'), + _('ASCII x,y,z points export'), + _('Exports a raster map to a text file as x,y,z values based on cell centers.'), + _('GRIDATB.FOR export'), + _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), + _('Matlab 2D array export'), + _('Exports a GRASS raster to a binary MAT-File.'), + _('Raw binary array export'), + _('Exports a GRASS raster to a binary array.'), + _('MPEG-1 export'), + _('Converts raster map series to MPEG movie.'), + _('PNG export'), + _('Export a GRASS raster map as a non-georeferenced PNG image.'), + _('PPM export'), + _('Converts a GRASS raster map to a PPM image file.'), + _('PPM from RGB export'), + _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), + _('POV-Ray export'), + _('Converts a raster map layer into a height-field file for POV-Ray.'), + _('VRML export'), + _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), + _('VTK export'), + _('Converts raster maps into the VTK-ASCII format.'), + _('Pack raster map'), + _('Exports a raster map as GRASS GIS specific archive file'), + _('Export vector map'), + _('Common export formats'), + _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), + _('ASCII points or GRASS ASCII vector export'), + _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), + _('DXF export'), + _('Exports vector map to DXF file format.'), + _('PostGIS export'), + _('Exports a vector map layer to PostGIS feature table.'), + _('POV-Ray export'), + _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), + _('SVG export'), + _('Exports a vector map to SVG file.'), + _('VTK export'), + _('Converts a vector map to VTK ASCII output.'), + _('Pack vector map'), + _('Exports a vector map as GRASS GIS specific archive file'), + _('Export 3D raster maps'), + _('ASCII 3D export'), + _('Converts a 3D raster map layer into a ASCII text file.'), + _('Raw binary array 3D export'), + _('Exports a GRASS 3D raster map to a binary array.'), + _('Vis5D export'), + _('VTK export'), + _('Converts 3D raster maps into the VTK-ASCII format.'), + _('Export database table'), + _('Common export formats'), + _('Exports attribute tables into various formats.'), + _('Link external data'), + _('Link external raster data'), + _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), + _('Link external vector data'), + _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), + _('Output format for raster data'), + _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), + _('Output format for vector data'), + _('Defines vector output format utilizing OGR library.'), + _('Manage maps'), + _('Copy'), + _("Copies available data files in the current mapset search path to the user's current mapset."), + _('List'), + _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), + _('Rename'), + _("Renames data base element files in the user's current mapset."), + _('Delete'), + _("Removes data base element files from the user's current mapset using the search pattern."), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('3D raster to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('Georectify'), + _('Manage Ground Control Points for Georectification'), + _('Graphical modeler'), + _('Launch Graphical modeler'), + _('Run model'), + _('Run model prepared by Graphical modeler'), + _('3D image rendering'), + _('Animation tool'), + _('Launch animation tool.'), + _('Bearing/distance to coordinates'), + _('A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system'), + _('Cartographic Composer'), + _('Launch Cartographic Composer'), + _('Map Swipe'), + _('Launch Map Swipe'), + _('Launch script'), + _('Launches script file.'), + _('Simple Python Editor'), + _('Launches Simple Python Editor.'), + _('Close GUI'), + _('Close graphical user interface.'), + _('Quit GRASS GIS'), + _('Close GUI and exit GRASS GIS shell.'), + _('&Settings'), + _('Computational region'), + _('Show current region'), + _('Shows the extent and resolution of the computational region.'), + _('Show region using latitude and longitude'), + _('Shows the extent and resolution of the computational region.'), + _('Show current region extent in Map Display'), + _('Shows the extent of the computational region in Map Display.'), + _('Set region'), + _('Manages the boundary definitions for the geographic region.'), + _('GRASS working environment'), + _('Mapset access'), + _('Set/unset access to other mapsets in current location'), + _('User access'), + _('Controls access to the current mapset for other users on the system. If no option given, prints current status.'), + _('Change working environment'), + _('Changes/reports current mapset. Optionally create new mapset or list available mapsets in given location.'), + _('Change location and mapset'), + _('Change current location and mapset.'), + _('Change mapset'), + _('Change current mapset.'), + _('Change working directory'), + _('Change working directory'), + _('Show settings'), + _("Outputs and modifies the user's current GRASS variable settings."), + _('Change settings'), + _("Outputs and modifies the user's current GRASS variable settings. Prints all defined GRASS variables if no option is given."), + _('Create new location'), + _('Launches location wizard to create new GRASS location.'), + _('Create new mapset'), + _('Creates new mapset in the current location, changes current mapset.'), + _('Version and copyright'), + _('Displays version and copyright information.'), + _('Map projections'), + _('Display map projection'), + _('Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).'), + _('Manage projections'), + _('Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.'), + _('Convert coordinates'), + _('Converts coordinates from one projection to another (cs2cs frontend).'), + _('Addons extensions'), + _('Install extension from addons'), + _('Installs new extension from GRASS AddOns repository.'), + _('Manage installed extension'), + _('Updates or removes installed GRASS AddOns extension(s).'), + _('Preferences'), + _('User GUI preferences (display font, commands, digitizer, etc.)'), + _('&Raster'), + _('Develop raster map'), + _('Compress/decompress'), + _('Compresses and decompresses raster maps.'), + _('Region boundaries'), + _('Sets the boundary definitions for a raster map.'), + _('Manage NULL values'), + _('Manages NULL-values of given raster map.'), + _('Quantization'), + _('Produces the quantization file for a floating-point map.'), + _('Timestamp'), + _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), + _('Resample using aggregate statistics'), + _('Resamples raster map layers to a coarser grid using aggregation.'), + _('Resample using multiple methods'), + _('Resamples raster map to a finer grid using interpolation.'), + _('Resample using nearest neighbor'), + _('GRASS raster map layer data resampling capability.'), + _('Resample using spline tension'), + _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), + _('Resample using bspline'), + _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), + _('Resample using analytic kernel'), + _('Resamples raster map layers using an analytic kernel.'), + _('Support file maintenance'), + _('Allows creation and/or modification of raster map layer support files.'), + _('Update map statistics'), + _('Update raster map statistics'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Tiling'), + _('Produces tilings of the source projection for use in the destination region and projection.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a raster map.'), + _('Color tables (stddev)'), + _("Sets color rules based on stddev from a raster map's mean value."), + _('Manage color rules interactively'), + _('Interactive management of raster color tables.'), + _('Export color table'), + _('Exports the color table associated with a raster map.'), + _('Blend 2 color rasters'), + _('Blends color components of two raster maps by a given ratio.'), + _('Create RGB'), + _('Combines red, green and blue raster maps into a single composite raster map.'), + _('RGB to HIS'), + _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), + _('Query raster maps'), + _('Query values by coordinates'), + _('Queries raster maps on their category values and category labels.'), + _('Query colors by value'), + _('Queries colors for a raster map layer.'), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Raster buffers and distance'), + _('Buffer rasters'), + _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), + _('Concentric circles'), + _('Creates a raster map containing concentric rings around a given point.'), + _('Closest points'), + _('Locates the closest points between objects in two raster maps.'), + _('Grow by one cell'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Mask'), + _('Creates a MASK for limiting raster operation.'), + _('Raster map calculator'), + _('Simplified raster map calculator'), + _('Raster map calculator'), + _('Raster map calculator.'), + _('Neighborhood analysis'), + _('Moving window'), + _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), + _('Neighborhood points'), + _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), + _('Overlay rasters'), + _('Cross product'), + _('Creates a cross product of the category values from multiple raster map layers.'), + _('Patch raster maps'), + _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), + _('Raster series aggregation'), + _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), + _('Raster series accumulation'), + _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), + _('Statistical overlay'), + _('Calculates category or object oriented statistics (accumulator-based statistics).'), + _('Quantiles overlay'), + _('Compute category quantiles using two passes.'), + _('Solar radiance and shadows'), + _('LatLong map'), + _('Creates a latitude/longitude raster map.'), + _('Solar irradiance and irradiation'), + _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), + _('Shadows map'), + _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), + _('Sunshine hours and solar angles'), + _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), + _('Terrain analysis'), + _('Generate contour lines'), + _('Produces a vector map of specified contours from a raster map.'), + _('Cost surface'), + _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Cumulative movement costs'), + _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Least cost route or flow'), + _('Traces a flow through an elevation model or cost surface on a raster map.'), + _('Compute shaded relief'), + _('Creates shaded relief map from an elevation map (DEM). '), + _('Apply shade to raster'), + _('Drapes a color raster over an shaded relief or aspect map.'), + _('Slope and aspect'), + _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), + _('Landforms'), + _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), + _('Terrain parameters'), + _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), + _('Textural features'), + _('Generate images with textural features from a raster map.'), + _('Visibility'), + _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Horizon angle'), + _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), + _('Transform features'), + _('Clump'), + _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), + _('Grow'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Thin'), + _('Thins non-null cells that denote linear features in a raster map layer.'), + _('Hydrologic modeling'), + _('Carve stream channels'), + _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), + _('Fill lake'), + _('Fills lake at given point to given level.'), + _('Depressionless map and flowlines'), + _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), + _('Flow accumulation'), + _('Performs flow computation for massive grids.'), + _('Flow lines'), + _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), + _('Watershed analysis'), + _('Calculates hydrological parameters and RUSLE factors.'), + _('Watershed subbasins'), + _('Generates watershed subbasins raster map.'), + _('Watershed basin creation'), + _('Creates watershed basins from a drainage direction map.'), + _('Extraction of stream networks'), + _('Performs stream network extraction.'), + _('SIMWE Overland flow modeling'), + _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), + _('SIMWE Sediment flux modeling'), + _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), + _('Topographic index map'), + _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), + _('TOPMODEL simulation'), + _('Simulates TOPMODEL which is a physically based hydrologic model.'), + _('USLE K-factor'), + _('Computes USLE Soil Erodibility Factor (K).'), + _('USLE R-factor'), + _('Computes USLE R factor, Rainfall erosivity index.'), + _('Groundwater modeling'), + _('Groundwater flow'), + _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), + _('Groundwater solute transport'), + _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), + _('Landscape patch analysis'), + _('Set up sampling and analysis framework'), + _("Configuration editor for r.li.'index'"), + _('Edge density'), + _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), + _('Contrast weighted edge density'), + _('Calculates contrast weighted edge density index on a raster map'), + _('Patch area mean'), + _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), + _('Patch area range'), + _('Calculates range of patch area size on a raster map'), + _('Patch area Std Dev'), + _('Calculates standard deviation of patch area a raster map'), + _('Patch area Coeff Var'), + _('Calculates coefficient of variation of patch area on a raster map'), + _('Patch density'), + _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), + _('Patch number'), + _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), + _("Dominance's diversity"), + _("Calculates dominance's diversity index on a raster map"), + _("Shannon's diversity"), + _("Calculates Shannon's diversity index on a raster map"), + _("Simpson's diversity"), + _("Calculates Simpson's diversity index on a raster map"), + _('Richness'), + _('Calculates richness index on a raster map'), + _('Shape index'), + _('Calculates shape index on a raster map'), + _('Wildfire modeling'), + _('Rate of spread'), + _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), + _('Least-cost spread paths'), + _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), + _('Anisotropic spread simulation'), + _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), + _('Change category values and labels'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('Interactively edit category values'), + _('Edits cell values in a raster map.'), + _('Reclassify by size'), + _('Reclasses a raster map greater or less than user specified area size (in hectares).'), + _('Reclassify'), + _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), + _('Recode'), + _('Recodes categorical raster maps.'), + _('Rescale'), + _('Rescales the range of category values in a raster map layer.'), + _('Rescale with histogram'), + _('Rescales histogram equalized the range of category values in a raster map layer.'), + _('Generate random cells'), + _('Random cells'), + _('Generates random cell values with spatial dependence.'), + _('Random cells and vector points'), + _('Creates a raster map layer and vector point map containing randomly located points.'), + _('Generate surfaces'), + _('Fractal surface'), + _('Creates a fractal surface of a given fractal dimension.'), + _('Gaussian kernel density surface'), + _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), + _('Gaussian deviates surface'), + _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), + _('Plane'), + _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), + _('Random deviates surface'), + _('Produces a raster surface map of uniform random deviates with defined range.'), + _('Random surface with spatial dependence'), + _('Generates random surface(s) with spatial dependence.'), + _('Interpolate surfaces'), + _('Bilinear and bicubic from vector points'), + _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), + _('IDW from raster points'), + _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), + _('IDW from vector points'), + _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), + _('Raster contours'), + _('Generates surface raster map from rasterized contours.'), + _('Regularized spline tension'), + _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), + _('Raster series interpolation'), + _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), + _('Fill NULL cells'), + _('Fills no-data areas in raster maps using spline interpolation.'), + _('Reports and statistics'), + _('Basic raster metadata'), + _('Outputs basic information about a raster map.'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('General statistics'), + _('Generates area statistics for raster map.'), + _('Quantiles for large data sets'), + _('Compute quantiles using two passes.'), + _('Range of category values'), + _('Prints terse list of category values found in a raster map layer.'), + _('Sum area by raster map and category'), + _('Reports statistics for raster maps.'), + _('Statistics for clumped cells'), + _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), + _('Total corrected area'), + _('Prints estimation of surface area for raster map.'), + _('Univariate raster statistics'), + _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('Sample transects'), + _('Outputs the raster map layer values lying on user-defined line(s).'), + _('Sample transects (bearing/distance)'), + _('Outputs raster map layer values lying along user defined transect line(s).'), + _('Covariance/correlation'), + _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), + _('Linear regression'), + _('Calculates linear regression from two raster maps: y = a + b*x.'), + _('Multiple regression'), + _('Calculates multiple linear regression from raster maps.'), + _('Mutual category occurrences'), + _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), + _('&Vector'), + _('Develop vector map'), + _('Create new vector map'), + _('Create new empty vector map'), + _('Edit vector map (non-interactively)'), + _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), + _('Convert object types'), + _('Changes type of vector features.'), + _('Parallel lines'), + _('Creates parallel line to input vector lines.'), + _('Dissolve boundaries'), + _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), + _('Create 3D vector over raster'), + _('Converts 2D vector features to 3D by sampling of elevation raster map.'), + _('Extrude 3D vector map'), + _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), + _('Create labels'), + _('Creates paint labels for a vector map from attached attributes.'), + _('Reposition vector map'), + _('Performs an affine transformation (shift, scale and rotate) on vector map.'), + _('Rectify vector map'), + _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Support file maintenance'), + _('Updates vector map metadata.'), + _('Topology maintenance'), + _('Create or rebuild topology'), + _('Creates topology for vector map. Optionally also checks for topological errors.'), + _('Rebuild topology on all vector maps'), + _('Rebuilds topology on all vector maps in the current mapset.'), + _('Build polylines'), + _('Builds polylines from lines or boundaries.'), + _('Split lines'), + _('Splits vector lines to shorter segments.'), + _('Split polylines'), + _('Creates points/segments from input vector lines and positions.'), + _('Clean vector map'), + _('Toolset for cleaning topology of vector map.'), + _('Smooth or simplify'), + _('Performs vector based generalization.'), + _('Add centroids'), + _('Adds missing centroids to closed boundaries.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a vector map.'), + _('Manage color rules interactively'), + _('Interactive management of vector color tables.'), + _('Export color table'), + _('Exports the color table associated with a vector map.'), + _('Query vector map'), + _('Query with coordinate(s)'), + _('Queries a vector map at given locations.'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('Feature selection'), + _('Select by attributes'), + _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), + _('Select by another map'), + _('Selects features from vector map (A) by features from other vector map (B).'), + _('Map type conversions'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('Buffer vectors'), + _('Creates a buffer around vector features of given type.'), + _('Point analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Identify point clusters'), + _('Performs cluster identification.'), + _('Indices for quadrat counts of vector point lists'), + _('Indices for quadrat counts of vector point lists.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Tests for normality for vector points'), + _('Tests for normality for vector points.'), + _('Lidar analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Detect edges'), + _("Detects the object's edges from a LIDAR data set."), + _('Detect interiors'), + _('Building contour determination and Region Growing algorithm for determining the building inside'), + _('Correct and reclassify objects'), + _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), + _('Linear referencing'), + _('Create LRS'), + _('Creates a linear reference system.'), + _('Create stationing'), + _('Creates stationing from input lines, and linear reference system.'), + _('Create points/segments'), + _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), + _('Find line id and offset'), + _('Finds line id and real km+offset for given points in vector map using linear reference system.'), + _('Nearest features'), + _('Network analysis'), + _('Vector network analysis tool'), + _('Tool for interactive vector network analysis.'), + _('Network preparation'), + _('Performs network maintenance.'), + _('Allocate subnets'), + _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Split net'), + _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Shortest path'), + _('Finds shortest path on vector network.'), + _('Shortest path for sets of features'), + _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), + _('Shortest path using timetables'), + _('Finds shortest path using timetables.'), + _('Shortest path for all pairs'), + _('Computes the shortest path between all pairs of nodes in the network.'), + _('Visibility network'), + _('Performs visibility graph construction.'), + _('Bridges and articulation points'), + _('Computes bridges and articulation points in the network.'), + _('Maximum flow'), + _('Computes the maximum flow between two sets of nodes in the network.'), + _('Vertex connectivity'), + _('Computes vertex connectivity between two sets of nodes in the network.'), + _('Components'), + _('Computes strongly and weakly connected components in the network.'), + _('Centrality'), + _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), + _('Steiner tree'), + _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), + _('Minimum spanning tree'), + _('Computes minimum spanning tree for the network.'), + _('Traveling salesman analysis'), + _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), + _('Overlay vector maps'), + _('Clip vector maps'), + _('Overlay vector maps'), + _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), + _('Patch vector maps'), + _('Creates a new vector map by combining other vector maps.'), + _('Manage categories'), + _('Change or report categories'), + _('Attaches, deletes or reports vector categories to map geometry.'), + _('Reclassify'), + _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), + _('Update attributes'), + _('Update area attributes from raster'), + _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), + _('Update area attributes from vector'), + _('Count points in areas, calculate statistics from point attributes.'), + _('Update point attributes from areas'), + _('Uploads vector values at positions of vector points to the table.'), + _('Update database values from vector'), + _('Populates attribute values from vector features.'), + _('Sample raster maps at point locations'), + _('Uploads raster values at positions of vector points to the table.'), + _('Sample raster neighborhood around points'), + _('Samples a raster map at vector point locations.'), + _('Generate area for current region'), + _('Creates a vector polygon from the current region extent.'), + _('Generate areas from points'), + _('Convex hull'), + _('Produces a 2D/3D convex hull for a given vector map.'), + _('Delaunay triangles'), + _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), + _('Voronoi diagram/Thiessen polygons'), + _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), + _('Generate grid'), + _('Creates a vector map of a user-defined grid.'), + _('Generate points'), + _('Generate from database'), + _('Creates new vector (points) map from database table containing coordinates.'), + _('Generate points along lines'), + _('Creates points along input lines in new vector map with 2 layers.'), + _('Generate random points'), + _('Generates random 2D/3D vector points.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Remove outliers in point sets'), + _('Removes outliers from vector point data.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Reports and statistics'), + _('Basic vector metadata'), + _('Outputs basic information about a vector map.'), + _('Classify attribute data'), + _('Classifies attribute data, e.g. for thematic mapping'), + _('Report topology by category'), + _('Reports geometry statistics for vector maps.'), + _('Univariate attribute statistics for points'), + _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), + _('Univariate statistics for attribute columns'), + _('Calculates univariate statistics on selected table column for a GRASS vector map.'), + _('Sample transects'), + _('Vector map profiling tool'), + _('Quadrat indices'), + _('Indices for quadrat counts of vector point lists.'), + _('Test normality'), + _('Tests for normality for vector points.'), + _('&Imagery'), + _('Develop images and groups'), + _('Create/edit group'), + _('Creates, edits, and lists groups of imagery files.'), + _('Target group'), + _('Targets an imagery group to a GRASS location and mapset.'), + _('Mosaic images'), + _('Mosaics several images and extends colormap.'), + _('Manage image colors'), + _('Color balance for RGB'), + _('Performs auto-balancing of colors for RGB images.'), + _('HIS to RGB'), + _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), + _('RGB to HIS'), + _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), + _('Rectify image or raster'), + _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), + _('Histogram'), + _('Generate histogram of image'), + _('Spectral response'), + _('Displays spectral response at user specified locations in group or images.'), + _('Pan sharpening'), + _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), + _('Classify image'), + _('Clustering input for unsupervised classification'), + _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), + _('Input for supervised MLC'), + _('Generates statistics for i.maxlik from raster map.'), + _('Maximum likelihood classification (MLC)'), + _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Input for supervised SMAP'), + _('Generates statistics for i.smap from raster map.'), + _('Sequential maximum a posteriori classification (SMAP)'), + _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), + _('Object segmentation'), + _('Identifies segments (objects) from imagery data.'), + _('Filter image'), + _('Edge detection'), + _('Zero-crossing "edge detection" raster function for image processing.'), + _('Matrix/convolving filter'), + _('Performs raster map matrix filter.'), + _('Transform image'), + _('Canonical correlation'), + _('Canonical components analysis (CCA) program for image processing.'), + _('Principal components'), + _('Principal components analysis (PCA) for image processing.'), + _('Fast Fourier'), + _('Fast Fourier Transform (FFT) for image processing.'), + _('Inverse Fast Fourier'), + _('Inverse Fast Fourier Transform (IFFT) for image processing.'), + _('Satellite images tools'), + _('Aster DN to radiance/reflectance'), + _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), + _('Landsat DN to radiance/reflectance'), + _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), + _('Landsat cloud cover assessment'), + _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), + _('Modis quality control'), + _('Extracts quality control parameters from MODIS QC layers.'), + _('Atmospheric correction'), + _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), + _('Topographic correction'), + _('Computes topographic correction of reflectance.'), + _('Orthophoto tools'), + _('Manage GCPs for 3D correction'), + _('Georectifies a map and allows managing GCP for 3D correction.'), + _('Corrects scanning distortions'), + _('Corrects scanning distortions of a scanned aerial photo.'), + _('Satellite images products'), + _('Vegetation indices'), + _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), + _('Tasseled cap vegetation index'), + _('Performs Tasseled Cap (Kauth Thomas) transformation.'), + _('Albedo'), + _('Computes broad band albedo from surface reflectance.'), + _('Emissivity'), + _('Computes emissivity from NDVI, generic method for sparse land.'), + _('Biomass growth'), + _('Computes biomass growth, precursor of crop yield calculation.'), + _('Evapotranspiration calculation'), + _('Instantaneaous Net Radiation'), + _('Net radiation approximation (Bastiaanssen, 1995).'), + _('Soil heat flux'), + _('Soil heat flux approximation (Bastiaanssen, 1995).'), + _('Sensible heat flux'), + _('Computes sensible heat flux iteration SEBAL 01.'), + _('Evaporative fraction'), + _('Computes evaporative fraction and root zone soil moisture.'), + _('Actual Evapotranspiration'), + _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), + _('Temporal integration of ETa'), + _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), + _('Hargreaves methods Evapotranspiration'), + _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), + _('Penman-Monteith Evapotranspiration'), + _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), + _('Priestley-Taylor Evapotranspiration'), + _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), + _('Reports and statistics'), + _('Kappa analysis'), + _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), + _('OIF for LandSat TM'), + _('Calculates Optimum-Index-Factor table for spectral bands'), + _('3D r&aster'), + _('Develop 3D raster map'), + _('Manage 3D NULL values'), + _('Explicitly create the 3D NULL-value bitmap file.'), + _('Manage timestamp'), + _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), + _('Map type conversions'), + _('3D rasters to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('3D color tables'), + _('Creates/modifies the color table associated with a 3D raster map.'), + _('Export 3D color table'), + _('Exports the color table associated with a 3D raster map.'), + _('3D mask'), + _('Establishes the current working 3D raster mask.'), + _('3D raster map calculator'), + _('3D raster map calculator'), + _('Cross section'), + _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), + _('Groundwater modeling'), + _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), + _('Interpolate 3D raster from points'), + _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), + _('Reports and statistics'), + _('Basic 3D raster metadata'), + _('Outputs basic information about a user-specified 3D raster map layer.'), + _('3D raster statistics'), + _('Generates volume statistics for 3D raster maps.'), + _('Univariate statistics for 3D rasters'), + _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('&Database'), + _('Database information'), + _('List databases'), + _('Lists all databases for a given driver and location.'), + _('List drivers'), + _('Lists all database drivers.'), + _('List tables'), + _('Describe table'), + _('Describes a table in detail.'), + _('List columns'), + _('List all columns for a given table.'), + _('Manage databases'), + _('Connect'), + _('Prints/sets general DB connection for current mapset.'), + _('Login'), + _('Create database'), + _('Creates an empty database.'), + _('Drop database'), + _('Removes an existing database.'), + _('Drop table'), + _('Drops an attribute table.'), + _('Copy table'), + _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), + _('Drop column'), + _('Drops a column from selected attribute table.'), + _('Test'), + _('Test database driver, database must exist and set by db.connect.'), + _('Query'), + _('Query any table'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('SQL statement'), + _("Executes any SQL statement. For SELECT statements use 'db.select'."), + _('Vector database connections'), + _('New table'), + _('Creates and connects a new attribute table to a given layer of an existing vector map.'), + _('Remove table'), + _('Removes existing attribute table of a vector map.'), + _('Join table'), + _('Joins a database table to a vector map table.'), + _('Add columns'), + _('Adds one or more columns to the attribute table connected to a given vector map.'), + _('Drop column'), + _('Drops a column from the attribute table connected to a given vector map.'), + _('Rename column'), + _('Renames a column in the attribute table connected to a given vector map.'), + _('Change values'), + _('Updates a column in the attribute table connected to a vector map.'), + _('Drop row'), + _('Removes a vector feature from a vector map through attribute selection.'), + _('Reconnect vectors to database'), + _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), + _('Set vector map - database connection'), + _('Prints/sets DB connection for a vector map to attribute table.'), + _('&Temporal'), + _('Manage datasets'), + _('Connect temporal database'), + _('Prints/sets general temporal GIS database connection for current mapset.'), + _('Create'), + _('Creates a space time dataset.'), + _('Rename'), + _('Renames a space time dataset'), + _('Remove'), + _('Removes space time datasets from temporal database.'), + _('Update metadata'), + _('Modifies the metadata of a space time dataset.'), + _('Merge'), + _('Merges several space time datasets into a single space time dataset.'), + _('Temporally shift'), + _('Shifts temporally the maps of a space time dataset.'), + _('Snap maps of dataset'), + _('Snaps temporally the maps of a space time dataset.'), + _('List'), + _('Lists space time datasets and maps registered in the temporal database.'), + _('Manage maps in datasets'), + _('Register maps in datasets'), + _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), + _('Unregister maps from datasets'), + _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), + _('List raster dataset maps'), + _('Lists registered maps of a space time raster dataset.'), + _('List vector dataset maps'), + _('Lists registered maps of a space time vector dataset.'), + _('List 3D raster dataset maps'), + _('Lists registered maps of a space time raster3d dataset.'), + _('Import'), + _('Import raster dataset'), + _('Imports space time raster dataset.'), + _('Import vector dataset'), + _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), + _('Export'), + _('Export raster dataset'), + _('Exports space time raster dataset.'), + _('Export raster dataset as VTK time series'), + _('Exports space time raster dataset as VTK time series.'), + _('Export vector dataset'), + _('Exports a space time vector dataset as GRASS GIS specific archive file.'), + _('Convert raster dataset to 3D raster'), + _('Converts a space time raster dataset into a 3D raster map.'), + _('Extraction'), + _('Extract subset of raster dataset'), + _('Extracts a subset of a space time raster datasets.'), + _('Extract subset of vector dataset'), + _('Extracts a subset of a space time vector dataset.'), + _('Extract subset of 3D raster dataset'), + _('Extracts a subset of a space time 3D raster dataset.'), + _('Query vector dataset attribute data'), + _('Prints attributes of vector maps registered in a space time vector dataset.'), + _('Raster dataset color table'), + _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), + _('Raster calculations'), + _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), + _('3D raster calculations'), + _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), + _('Interpolate gaps in raster datasets'), + _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), + _('Aggregation'), + _('Neighborhood analysis in raster dataset'), + _('Performs a neighborhood analysis for each map in a space time raster dataset.'), + _('Aggregation in raster datasets'), + _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), + _('Temporal aggregation'), + _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), + _('Temporal aggregation by dataset'), + _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), + _('Sampling'), + _('Sample a space time raster dataset at point coordinates'), + _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), + _('Query raster dataset by vector points dataset'), + _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), + _('Observe specific locations in raster dataset'), + _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), + _('Temporal sampling'), + _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), + _('Reports and statistics'), + _('Space time datasets metadata'), + _('Lists information about space time datasets and maps.'), + _('Univariate raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), + _('Univariate vector dataset statistics'), + _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), + _('Univariate 3D raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), + _('Report temporal topology'), + _('Lists temporal topology of a space time dataset.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Timeline tool'), + _('Plot temporal extents.'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('&Help'), + _('GRASS help'), + _('Display the HTML man pages of GRASS GIS'), + _('GUI help'), + _('Display the HTML man pages of GRASS GIS'), + _('About system'), + _('Prints system information'), + _('About GRASS GIS'), + _('About GRASS GIS'), + ''] +menustrings_menudata.LayerManagerModuleTree'> = [ + _('Import, export and link data'), + _('Import raster data'), + _('Simplified raster import with reprojection'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('Import of common raster formats'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('ASCII x,y,z point import and gridding'), + _('ASCII grid import'), + _('Converts a GRASS ASCII raster file to binary raster map.'), + _('ASCII polygons, lines, and point import'), + _('Creates raster maps from ASCII polygon/line/point data files.'), + _('Raw binary array import'), + _('Import a binary raster file into a GRASS raster map layer.'), + _('GRIDATB.FOR import'), + _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), + _('Matlab 2D array import'), + _('Imports a binary MAT-File(v4) to a GRASS raster.'), + _('PNG import'), + _('Imports non-georeferenced PNG format image.'), + _('SPOT NDVI import'), + _('Imports SPOT VGT NDVI data into a raster map.'), + _('SRTM HGT import'), + _('Imports SRTM HGT files into raster map.'), + _('Terra ASTER HDF import'), + _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), + _('LAS LiDAR points import'), + _('Creates a raster map from LAS LiDAR points using univariate statistics.'), + _('Unpack raster map'), + _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Import vector data'), + _('Simplified vector import with reprojection'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('Import of common vector formats'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('ASCII points or GRASS ASCII format'), + _('Creates a vector map from an ASCII points file or ASCII vector file.'), + _('ASCII points as a vector lines'), + _('Imports ASCII x,y[,z] coordinates as a series of lines.'), + _('DXF import'), + _('Converts files in DXF format to GRASS vector map format.'), + _('WFS'), + _('Imports GetFeature from a WFS server.'), + _('ESRI e00 import'), + _('Imports E00 file into a vector map.'), + _('Geonames import'), + _('Imports geonames.org country files into a vector points map.'), + _('Matlab array or Mapgen format import'), + _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), + _('LAS LiDAR points import'), + _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), + _('Unpack vector map'), + _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Import 3D raster data'), + _('ASCII 3D import'), + _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), + _('Raw binary array 3D import'), + _('Imports a binary raster file into a GRASS 3D raster map.'), + _('Vis5D import'), + _('Import database table'), + _('Common import formats'), + _('Imports attribute tables in various formats.'), + _('Export raster map'), + _('Common export formats'), + _('Exports GRASS raster maps into GDAL supported formats.'), + _('ASCII grid export'), + _('Converts a raster map layer into a GRASS ASCII text file.'), + _('ASCII x,y,z points export'), + _('Exports a raster map to a text file as x,y,z values based on cell centers.'), + _('GRIDATB.FOR export'), + _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), + _('Matlab 2D array export'), + _('Exports a GRASS raster to a binary MAT-File.'), + _('Raw binary array export'), + _('Exports a GRASS raster to a binary array.'), + _('MPEG-1 export'), + _('Converts raster map series to MPEG movie.'), + _('PNG export'), + _('Export a GRASS raster map as a non-georeferenced PNG image.'), + _('PPM export'), + _('Converts a GRASS raster map to a PPM image file.'), + _('PPM from RGB export'), + _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), + _('POV-Ray export'), + _('Converts a raster map layer into a height-field file for POV-Ray.'), + _('VRML export'), + _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), + _('VTK export'), + _('Converts raster maps into the VTK-ASCII format.'), + _('Pack raster map'), + _('Exports a raster map as GRASS GIS specific archive file'), + _('Export vector map'), + _('Common export formats'), + _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), + _('ASCII points or GRASS ASCII vector export'), + _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), + _('DXF export'), + _('Exports vector map to DXF file format.'), + _('PostGIS export'), + _('Exports a vector map layer to PostGIS feature table.'), + _('POV-Ray export'), + _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), + _('SVG export'), + _('Exports a vector map to SVG file.'), + _('VTK export'), + _('Converts a vector map to VTK ASCII output.'), + _('Pack vector map'), + _('Exports a vector map as GRASS GIS specific archive file'), + _('Export 3D raster maps'), + _('ASCII 3D export'), + _('Converts a 3D raster map layer into a ASCII text file.'), + _('Raw binary array 3D export'), + _('Exports a GRASS 3D raster map to a binary array.'), + _('Vis5D export'), + _('VTK export'), + _('Converts 3D raster maps into the VTK-ASCII format.'), + _('Export database table'), + _('Common export formats'), + _('Exports attribute tables into various formats.'), + _('Link external data'), + _('Link external raster data'), + _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), + _('Link external vector data'), + _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), + _('Output format for raster data'), + _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), + _('Output format for vector data'), + _('Defines vector output format utilizing OGR library.'), + _('Manage maps'), + _('Copy'), + _("Copies available data files in the current mapset search path to the user's current mapset."), + _('List'), + _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), + _('Rename'), + _("Renames data base element files in the user's current mapset."), + _('Delete'), + _("Removes data base element files from the user's current mapset using the search pattern."), + _('Computational region'), + _('Show current region'), + _('Shows the extent and resolution of the computational region.'), + _('Show region using latitude and longitude'), + _('Shows the extent and resolution of the computational region.'), + _('Show current region extent in Map Display'), + _('Shows the extent of the computational region in Map Display.'), + _('Set region'), + _('Manages the boundary definitions for the geographic region.'), + _('&Raster'), + _('Develop raster map'), + _('Compress/decompress'), + _('Compresses and decompresses raster maps.'), + _('Region boundaries'), + _('Sets the boundary definitions for a raster map.'), + _('Manage NULL values'), + _('Manages NULL-values of given raster map.'), + _('Quantization'), + _('Produces the quantization file for a floating-point map.'), + _('Timestamp'), + _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), + _('Resample using aggregate statistics'), + _('Resamples raster map layers to a coarser grid using aggregation.'), + _('Resample using multiple methods'), + _('Resamples raster map to a finer grid using interpolation.'), + _('Resample using nearest neighbor'), + _('GRASS raster map layer data resampling capability.'), + _('Resample using spline tension'), + _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), + _('Resample using bspline'), + _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), + _('Resample using analytic kernel'), + _('Resamples raster map layers using an analytic kernel.'), + _('Support file maintenance'), + _('Allows creation and/or modification of raster map layer support files.'), + _('Update map statistics'), + _('Update raster map statistics'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Tiling'), + _('Produces tilings of the source projection for use in the destination region and projection.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a raster map.'), + _('Color tables (stddev)'), + _("Sets color rules based on stddev from a raster map's mean value."), + _('Manage color rules interactively'), + _('Interactive management of raster color tables.'), + _('Export color table'), + _('Exports the color table associated with a raster map.'), + _('Blend 2 color rasters'), + _('Blends color components of two raster maps by a given ratio.'), + _('Create RGB'), + _('Combines red, green and blue raster maps into a single composite raster map.'), + _('RGB to HIS'), + _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), + _('Query raster maps'), + _('Query values by coordinates'), + _('Queries raster maps on their category values and category labels.'), + _('Query colors by value'), + _('Queries colors for a raster map layer.'), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Raster buffers and distance'), + _('Buffer rasters'), + _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), + _('Concentric circles'), + _('Creates a raster map containing concentric rings around a given point.'), + _('Closest points'), + _('Locates the closest points between objects in two raster maps.'), + _('Grow by one cell'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Mask'), + _('Creates a MASK for limiting raster operation.'), + _('Raster map calculator'), + _('Simplified raster map calculator'), + _('Raster map calculator'), + _('Raster map calculator.'), + _('Neighborhood analysis'), + _('Moving window'), + _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), + _('Neighborhood points'), + _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), + _('Overlay rasters'), + _('Cross product'), + _('Creates a cross product of the category values from multiple raster map layers.'), + _('Patch raster maps'), + _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), + _('Raster series aggregation'), + _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), + _('Raster series accumulation'), + _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), + _('Statistical overlay'), + _('Calculates category or object oriented statistics (accumulator-based statistics).'), + _('Quantiles overlay'), + _('Compute category quantiles using two passes.'), + _('Solar radiance and shadows'), + _('LatLong map'), + _('Creates a latitude/longitude raster map.'), + _('Solar irradiance and irradiation'), + _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), + _('Shadows map'), + _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), + _('Sunshine hours and solar angles'), + _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), + _('Terrain analysis'), + _('Generate contour lines'), + _('Produces a vector map of specified contours from a raster map.'), + _('Cost surface'), + _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Cumulative movement costs'), + _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Least cost route or flow'), + _('Traces a flow through an elevation model or cost surface on a raster map.'), + _('Compute shaded relief'), + _('Creates shaded relief map from an elevation map (DEM). '), + _('Apply shade to raster'), + _('Drapes a color raster over an shaded relief or aspect map.'), + _('Slope and aspect'), + _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), + _('Landforms'), + _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), + _('Terrain parameters'), + _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), + _('Textural features'), + _('Generate images with textural features from a raster map.'), + _('Visibility'), + _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Horizon angle'), + _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), + _('Transform features'), + _('Clump'), + _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), + _('Grow'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Thin'), + _('Thins non-null cells that denote linear features in a raster map layer.'), + _('Hydrologic modeling'), + _('Carve stream channels'), + _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), + _('Fill lake'), + _('Fills lake at given point to given level.'), + _('Depressionless map and flowlines'), + _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), + _('Flow accumulation'), + _('Performs flow computation for massive grids.'), + _('Flow lines'), + _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), + _('Watershed analysis'), + _('Calculates hydrological parameters and RUSLE factors.'), + _('Watershed subbasins'), + _('Generates watershed subbasins raster map.'), + _('Watershed basin creation'), + _('Creates watershed basins from a drainage direction map.'), + _('Extraction of stream networks'), + _('Performs stream network extraction.'), + _('SIMWE Overland flow modeling'), + _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), + _('SIMWE Sediment flux modeling'), + _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), + _('Topographic index map'), + _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), + _('TOPMODEL simulation'), + _('Simulates TOPMODEL which is a physically based hydrologic model.'), + _('USLE K-factor'), + _('Computes USLE Soil Erodibility Factor (K).'), + _('USLE R-factor'), + _('Computes USLE R factor, Rainfall erosivity index.'), + _('Groundwater modeling'), + _('Groundwater flow'), + _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), + _('Groundwater solute transport'), + _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), + _('Landscape patch analysis'), + _('Set up sampling and analysis framework'), + _("Configuration editor for r.li.'index'"), + _('Edge density'), + _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), + _('Contrast weighted edge density'), + _('Calculates contrast weighted edge density index on a raster map'), + _('Patch area mean'), + _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), + _('Patch area range'), + _('Calculates range of patch area size on a raster map'), + _('Patch area Std Dev'), + _('Calculates standard deviation of patch area a raster map'), + _('Patch area Coeff Var'), + _('Calculates coefficient of variation of patch area on a raster map'), + _('Patch density'), + _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), + _('Patch number'), + _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), + _("Dominance's diversity"), + _("Calculates dominance's diversity index on a raster map"), + _("Shannon's diversity"), + _("Calculates Shannon's diversity index on a raster map"), + _("Simpson's diversity"), + _("Calculates Simpson's diversity index on a raster map"), + _('Richness'), + _('Calculates richness index on a raster map'), + _('Shape index'), + _('Calculates shape index on a raster map'), + _('Wildfire modeling'), + _('Rate of spread'), + _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), + _('Least-cost spread paths'), + _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), + _('Anisotropic spread simulation'), + _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), + _('Change category values and labels'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('Interactively edit category values'), + _('Edits cell values in a raster map.'), + _('Reclassify by size'), + _('Reclasses a raster map greater or less than user specified area size (in hectares).'), + _('Reclassify'), + _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), + _('Recode'), + _('Recodes categorical raster maps.'), + _('Rescale'), + _('Rescales the range of category values in a raster map layer.'), + _('Rescale with histogram'), + _('Rescales histogram equalized the range of category values in a raster map layer.'), + _('Generate random cells'), + _('Random cells'), + _('Generates random cell values with spatial dependence.'), + _('Random cells and vector points'), + _('Creates a raster map layer and vector point map containing randomly located points.'), + _('Generate surfaces'), + _('Fractal surface'), + _('Creates a fractal surface of a given fractal dimension.'), + _('Gaussian kernel density surface'), + _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), + _('Gaussian deviates surface'), + _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), + _('Plane'), + _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), + _('Random deviates surface'), + _('Produces a raster surface map of uniform random deviates with defined range.'), + _('Random surface with spatial dependence'), + _('Generates random surface(s) with spatial dependence.'), + _('Interpolate surfaces'), + _('Bilinear and bicubic from vector points'), + _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), + _('IDW from raster points'), + _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), + _('IDW from vector points'), + _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), + _('Raster contours'), + _('Generates surface raster map from rasterized contours.'), + _('Regularized spline tension'), + _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), + _('Raster series interpolation'), + _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), + _('Fill NULL cells'), + _('Fills no-data areas in raster maps using spline interpolation.'), + _('Reports and statistics'), + _('Basic raster metadata'), + _('Outputs basic information about a raster map.'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('General statistics'), + _('Generates area statistics for raster map.'), + _('Quantiles for large data sets'), + _('Compute quantiles using two passes.'), + _('Range of category values'), + _('Prints terse list of category values found in a raster map layer.'), + _('Sum area by raster map and category'), + _('Reports statistics for raster maps.'), + _('Statistics for clumped cells'), + _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), + _('Total corrected area'), + _('Prints estimation of surface area for raster map.'), + _('Univariate raster statistics'), + _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('Sample transects'), + _('Outputs the raster map layer values lying on user-defined line(s).'), + _('Sample transects (bearing/distance)'), + _('Outputs raster map layer values lying along user defined transect line(s).'), + _('Covariance/correlation'), + _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), + _('Linear regression'), + _('Calculates linear regression from two raster maps: y = a + b*x.'), + _('Multiple regression'), + _('Calculates multiple linear regression from raster maps.'), + _('Mutual category occurrences'), + _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), + _('&Vector'), + _('Develop vector map'), + _('Create new vector map'), + _('Create new empty vector map'), + _('Edit vector map (non-interactively)'), + _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), + _('Convert object types'), + _('Changes type of vector features.'), + _('Parallel lines'), + _('Creates parallel line to input vector lines.'), + _('Dissolve boundaries'), + _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), + _('Create 3D vector over raster'), + _('Converts 2D vector features to 3D by sampling of elevation raster map.'), + _('Extrude 3D vector map'), + _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), + _('Create labels'), + _('Creates paint labels for a vector map from attached attributes.'), + _('Reposition vector map'), + _('Performs an affine transformation (shift, scale and rotate) on vector map.'), + _('Rectify vector map'), + _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Support file maintenance'), + _('Updates vector map metadata.'), + _('Topology maintenance'), + _('Create or rebuild topology'), + _('Creates topology for vector map. Optionally also checks for topological errors.'), + _('Rebuild topology on all vector maps'), + _('Rebuilds topology on all vector maps in the current mapset.'), + _('Build polylines'), + _('Builds polylines from lines or boundaries.'), + _('Split lines'), + _('Splits vector lines to shorter segments.'), + _('Split polylines'), + _('Creates points/segments from input vector lines and positions.'), + _('Clean vector map'), + _('Toolset for cleaning topology of vector map.'), + _('Smooth or simplify'), + _('Performs vector based generalization.'), + _('Add centroids'), + _('Adds missing centroids to closed boundaries.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a vector map.'), + _('Manage color rules interactively'), + _('Interactive management of vector color tables.'), + _('Export color table'), + _('Exports the color table associated with a vector map.'), + _('Query vector map'), + _('Query with coordinate(s)'), + _('Queries a vector map at given locations.'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('Feature selection'), + _('Select by attributes'), + _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), + _('Select by another map'), + _('Selects features from vector map (A) by features from other vector map (B).'), + _('Map type conversions'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('Buffer vectors'), + _('Creates a buffer around vector features of given type.'), + _('Point analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Identify point clusters'), + _('Performs cluster identification.'), + _('Indices for quadrat counts of vector point lists'), + _('Indices for quadrat counts of vector point lists.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Tests for normality for vector points'), + _('Tests for normality for vector points.'), + _('Lidar analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Detect edges'), + _("Detects the object's edges from a LIDAR data set."), + _('Detect interiors'), + _('Building contour determination and Region Growing algorithm for determining the building inside'), + _('Correct and reclassify objects'), + _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), + _('Linear referencing'), + _('Create LRS'), + _('Creates a linear reference system.'), + _('Create stationing'), + _('Creates stationing from input lines, and linear reference system.'), + _('Create points/segments'), + _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), + _('Find line id and offset'), + _('Finds line id and real km+offset for given points in vector map using linear reference system.'), + _('Nearest features'), + _('Network analysis'), + _('Vector network analysis tool'), + _('Tool for interactive vector network analysis.'), + _('Network preparation'), + _('Performs network maintenance.'), + _('Allocate subnets'), + _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Split net'), + _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Shortest path'), + _('Finds shortest path on vector network.'), + _('Shortest path for sets of features'), + _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), + _('Shortest path using timetables'), + _('Finds shortest path using timetables.'), + _('Shortest path for all pairs'), + _('Computes the shortest path between all pairs of nodes in the network.'), + _('Visibility network'), + _('Performs visibility graph construction.'), + _('Bridges and articulation points'), + _('Computes bridges and articulation points in the network.'), + _('Maximum flow'), + _('Computes the maximum flow between two sets of nodes in the network.'), + _('Vertex connectivity'), + _('Computes vertex connectivity between two sets of nodes in the network.'), + _('Components'), + _('Computes strongly and weakly connected components in the network.'), + _('Centrality'), + _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), + _('Steiner tree'), + _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), + _('Minimum spanning tree'), + _('Computes minimum spanning tree for the network.'), + _('Traveling salesman analysis'), + _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), + _('Overlay vector maps'), + _('Clip vector maps'), + _('Overlay vector maps'), + _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), + _('Patch vector maps'), + _('Creates a new vector map by combining other vector maps.'), + _('Manage categories'), + _('Change or report categories'), + _('Attaches, deletes or reports vector categories to map geometry.'), + _('Reclassify'), + _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), + _('Update attributes'), + _('Update area attributes from raster'), + _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), + _('Update area attributes from vector'), + _('Count points in areas, calculate statistics from point attributes.'), + _('Update point attributes from areas'), + _('Uploads vector values at positions of vector points to the table.'), + _('Update database values from vector'), + _('Populates attribute values from vector features.'), + _('Sample raster maps at point locations'), + _('Uploads raster values at positions of vector points to the table.'), + _('Sample raster neighborhood around points'), + _('Samples a raster map at vector point locations.'), + _('Generate area for current region'), + _('Creates a vector polygon from the current region extent.'), + _('Generate areas from points'), + _('Convex hull'), + _('Produces a 2D/3D convex hull for a given vector map.'), + _('Delaunay triangles'), + _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), + _('Voronoi diagram/Thiessen polygons'), + _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), + _('Generate grid'), + _('Creates a vector map of a user-defined grid.'), + _('Generate points'), + _('Generate from database'), + _('Creates new vector (points) map from database table containing coordinates.'), + _('Generate points along lines'), + _('Creates points along input lines in new vector map with 2 layers.'), + _('Generate random points'), + _('Generates random 2D/3D vector points.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Remove outliers in point sets'), + _('Removes outliers from vector point data.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Reports and statistics'), + _('Basic vector metadata'), + _('Outputs basic information about a vector map.'), + _('Classify attribute data'), + _('Classifies attribute data, e.g. for thematic mapping'), + _('Report topology by category'), + _('Reports geometry statistics for vector maps.'), + _('Univariate attribute statistics for points'), + _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), + _('Univariate statistics for attribute columns'), + _('Calculates univariate statistics on selected table column for a GRASS vector map.'), + _('Sample transects'), + _('Vector map profiling tool'), + _('Quadrat indices'), + _('Indices for quadrat counts of vector point lists.'), + _('Test normality'), + _('Tests for normality for vector points.'), + _('&Imagery'), + _('Develop images and groups'), + _('Create/edit group'), + _('Creates, edits, and lists groups of imagery files.'), + _('Target group'), + _('Targets an imagery group to a GRASS location and mapset.'), + _('Mosaic images'), + _('Mosaics several images and extends colormap.'), + _('Manage image colors'), + _('Color balance for RGB'), + _('Performs auto-balancing of colors for RGB images.'), + _('HIS to RGB'), + _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), + _('RGB to HIS'), + _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), + _('Rectify image or raster'), + _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), + _('Histogram'), + _('Generate histogram of image'), + _('Spectral response'), + _('Displays spectral response at user specified locations in group or images.'), + _('Pan sharpening'), + _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), + _('Classify image'), + _('Clustering input for unsupervised classification'), + _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), + _('Input for supervised MLC'), + _('Generates statistics for i.maxlik from raster map.'), + _('Maximum likelihood classification (MLC)'), + _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Input for supervised SMAP'), + _('Generates statistics for i.smap from raster map.'), + _('Sequential maximum a posteriori classification (SMAP)'), + _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), + _('Object segmentation'), + _('Identifies segments (objects) from imagery data.'), + _('Filter image'), + _('Edge detection'), + _('Zero-crossing "edge detection" raster function for image processing.'), + _('Matrix/convolving filter'), + _('Performs raster map matrix filter.'), + _('Transform image'), + _('Canonical correlation'), + _('Canonical components analysis (CCA) program for image processing.'), + _('Principal components'), + _('Principal components analysis (PCA) for image processing.'), + _('Fast Fourier'), + _('Fast Fourier Transform (FFT) for image processing.'), + _('Inverse Fast Fourier'), + _('Inverse Fast Fourier Transform (IFFT) for image processing.'), + _('Satellite images tools'), + _('Aster DN to radiance/reflectance'), + _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), + _('Landsat DN to radiance/reflectance'), + _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), + _('Landsat cloud cover assessment'), + _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), + _('Modis quality control'), + _('Extracts quality control parameters from MODIS QC layers.'), + _('Atmospheric correction'), + _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), + _('Topographic correction'), + _('Computes topographic correction of reflectance.'), + _('Orthophoto tools'), + _('Manage GCPs for 3D correction'), + _('Georectifies a map and allows managing GCP for 3D correction.'), + _('Corrects scanning distortions'), + _('Corrects scanning distortions of a scanned aerial photo.'), + _('Satellite images products'), + _('Vegetation indices'), + _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), + _('Tasseled cap vegetation index'), + _('Performs Tasseled Cap (Kauth Thomas) transformation.'), + _('Albedo'), + _('Computes broad band albedo from surface reflectance.'), + _('Emissivity'), + _('Computes emissivity from NDVI, generic method for sparse land.'), + _('Biomass growth'), + _('Computes biomass growth, precursor of crop yield calculation.'), + _('Evapotranspiration calculation'), + _('Instantaneaous Net Radiation'), + _('Net radiation approximation (Bastiaanssen, 1995).'), + _('Soil heat flux'), + _('Soil heat flux approximation (Bastiaanssen, 1995).'), + _('Sensible heat flux'), + _('Computes sensible heat flux iteration SEBAL 01.'), + _('Evaporative fraction'), + _('Computes evaporative fraction and root zone soil moisture.'), + _('Actual Evapotranspiration'), + _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), + _('Temporal integration of ETa'), + _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), + _('Hargreaves methods Evapotranspiration'), + _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), + _('Penman-Monteith Evapotranspiration'), + _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), + _('Priestley-Taylor Evapotranspiration'), + _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), + _('Reports and statistics'), + _('Kappa analysis'), + _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), + _('OIF for LandSat TM'), + _('Calculates Optimum-Index-Factor table for spectral bands'), + _('3D r&aster'), + _('Develop 3D raster map'), + _('Manage 3D NULL values'), + _('Explicitly create the 3D NULL-value bitmap file.'), + _('Manage timestamp'), + _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), + _('Map type conversions'), + _('3D rasters to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('3D color tables'), + _('Creates/modifies the color table associated with a 3D raster map.'), + _('Export 3D color table'), + _('Exports the color table associated with a 3D raster map.'), + _('3D mask'), + _('Establishes the current working 3D raster mask.'), + _('3D raster map calculator'), + _('3D raster map calculator'), + _('Cross section'), + _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), + _('Groundwater modeling'), + _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), + _('Interpolate 3D raster from points'), + _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), + _('Reports and statistics'), + _('Basic 3D raster metadata'), + _('Outputs basic information about a user-specified 3D raster map layer.'), + _('3D raster statistics'), + _('Generates volume statistics for 3D raster maps.'), + _('Univariate statistics for 3D rasters'), + _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('&Database'), + _('Database information'), + _('List databases'), + _('Lists all databases for a given driver and location.'), + _('List drivers'), + _('Lists all database drivers.'), + _('List tables'), + _('Describe table'), + _('Describes a table in detail.'), + _('List columns'), + _('List all columns for a given table.'), + _('Manage databases'), + _('Connect'), + _('Prints/sets general DB connection for current mapset.'), + _('Login'), + _('Create database'), + _('Creates an empty database.'), + _('Drop database'), + _('Removes an existing database.'), + _('Drop table'), + _('Drops an attribute table.'), + _('Copy table'), + _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), + _('Drop column'), + _('Drops a column from selected attribute table.'), + _('Test'), + _('Test database driver, database must exist and set by db.connect.'), + _('Query'), + _('Query any table'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('SQL statement'), + _("Executes any SQL statement. For SELECT statements use 'db.select'."), + _('Vector database connections'), + _('New table'), + _('Creates and connects a new attribute table to a given layer of an existing vector map.'), + _('Remove table'), + _('Removes existing attribute table of a vector map.'), + _('Join table'), + _('Joins a database table to a vector map table.'), + _('Add columns'), + _('Adds one or more columns to the attribute table connected to a given vector map.'), + _('Drop column'), + _('Drops a column from the attribute table connected to a given vector map.'), + _('Rename column'), + _('Renames a column in the attribute table connected to a given vector map.'), + _('Change values'), + _('Updates a column in the attribute table connected to a vector map.'), + _('Drop row'), + _('Removes a vector feature from a vector map through attribute selection.'), + _('Reconnect vectors to database'), + _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), + _('Set vector map - database connection'), + _('Prints/sets DB connection for a vector map to attribute table.'), + _('&Temporal'), + _('Manage datasets'), + _('Connect temporal database'), + _('Prints/sets general temporal GIS database connection for current mapset.'), + _('Create'), + _('Creates a space time dataset.'), + _('Rename'), + _('Renames a space time dataset'), + _('Remove'), + _('Removes space time datasets from temporal database.'), + _('Update metadata'), + _('Modifies the metadata of a space time dataset.'), + _('Merge'), + _('Merges several space time datasets into a single space time dataset.'), + _('Temporally shift'), + _('Shifts temporally the maps of a space time dataset.'), + _('Snap maps of dataset'), + _('Snaps temporally the maps of a space time dataset.'), + _('List'), + _('Lists space time datasets and maps registered in the temporal database.'), + _('Manage maps in datasets'), + _('Register maps in datasets'), + _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), + _('Unregister maps from datasets'), + _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), + _('List raster dataset maps'), + _('Lists registered maps of a space time raster dataset.'), + _('List vector dataset maps'), + _('Lists registered maps of a space time vector dataset.'), + _('List 3D raster dataset maps'), + _('Lists registered maps of a space time raster3d dataset.'), + _('Import'), + _('Import raster dataset'), + _('Imports space time raster dataset.'), + _('Import vector dataset'), + _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), + _('Export'), + _('Export raster dataset'), + _('Exports space time raster dataset.'), + _('Export raster dataset as VTK time series'), + _('Exports space time raster dataset as VTK time series.'), + _('Export vector dataset'), + _('Exports a space time vector dataset as GRASS GIS specific archive file.'), + _('Convert raster dataset to 3D raster'), + _('Converts a space time raster dataset into a 3D raster map.'), + _('Extraction'), + _('Extract subset of raster dataset'), + _('Extracts a subset of a space time raster datasets.'), + _('Extract subset of vector dataset'), + _('Extracts a subset of a space time vector dataset.'), + _('Extract subset of 3D raster dataset'), + _('Extracts a subset of a space time 3D raster dataset.'), + _('Query vector dataset attribute data'), + _('Prints attributes of vector maps registered in a space time vector dataset.'), + _('Raster dataset color table'), + _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), + _('Raster calculations'), + _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), + _('3D raster calculations'), + _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), + _('Interpolate gaps in raster datasets'), + _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), + _('Aggregation'), + _('Neighborhood analysis in raster dataset'), + _('Performs a neighborhood analysis for each map in a space time raster dataset.'), + _('Aggregation in raster datasets'), + _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), + _('Temporal aggregation'), + _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), + _('Temporal aggregation by dataset'), + _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), + _('Sampling'), + _('Sample a space time raster dataset at point coordinates'), + _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), + _('Query raster dataset by vector points dataset'), + _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), + _('Observe specific locations in raster dataset'), + _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), + _('Temporal sampling'), + _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), + _('Reports and statistics'), + _('Space time datasets metadata'), + _('Lists information about space time datasets and maps.'), + _('Univariate raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), + _('Univariate vector dataset statistics'), + _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), + _('Univariate 3D raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), + _('Report temporal topology'), + _('Lists temporal topology of a space time dataset.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Timeline tool'), + _('Plot temporal extents.'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Attribute table manager'), + _('Launches graphical attribute table manager.'), + _('Cartographic Composer'), + _('Launch Cartographic Composer'), + _('Georectify'), + _('Manage Ground Control Points for Georectification'), + _('Graphical modeler'), + _('Launch Graphical modeler'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Map Swipe'), + _('Launch Map Swipe'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('Timeline tool'), + _('Plot temporal extents.'), + ''] +menustrings_menudata.PsMapMenuData'> = [ + _('&File'), + _('Page setup'), + _('Specify paper size, margins and orientation'), + _('Load instruction file'), + _('Load text file with mapping instructions'), + _('Export instruction file'), + _('Generate text file with mapping instructions'), + _('Export to PostScript'), + _('Generate PostScript output'), + _('Export to PDF'), + _('Generate PDF output'), + _('Launch ps.map dialog'), + _('Launch ps.map dialog'), + _('Quit'), + _('Close Cartographic Composer'), + _('&Insert'), + _('Map frame'), + _('Add or edit map frame'), + _('Raster map'), + _('Add or edit raster map'), + _('Vector map'), + _('Add or edit vector map'), + _('Map legend'), + _('Add or edit raster and vector legend'), + _('Map info'), + _('Add or edit map info'), + _('Scale bar'), + _('Add or edit scale bar'), + _('Text'), + _('Add text'), + _('Image'), + _('Add image'), + _('North Arrow'), + _('Add north arrow'), + _('Delete'), + _('Delete selected object'), + _('&Help'), + _('Help'), + _('Display the HTML man pages of Cartographic Composer'), + _('About Cartographic Composer'), + _('Display information about Cartographic Composer'), + ''] +menustrings_menudata.LayerManagerMenuData'> = [ + _('&File'), + _('Workspace'), + _('New'), + _('Create new workspace'), + _('Open'), + _('Load workspace from file'), + _('Save'), + _('Save workspace'), + _('Save as'), + _('Save workspace to file'), + _('Close'), + _('Close workspace file'), + _('Load GRC file (Tcl/Tk GUI)'), + _('Load map layers from GRC file to layer tree'), + _('Map display'), + _('Add raster'), + _('Add raster map layer to current display'), + _('Add vector'), + _('Add vector map layer to current display'), + _('Add multiple rasters or vectors'), + _('Add multiple raster or vector map layers to current display'), + _('Add RGB raster layer'), + _('Add RGB raster map layer to current display'), + _('Add web service layer'), + _('Add web service layer'), + _('New map display window'), + _('Open new map display window'), + _('Render all map displays'), + _('Re-render maps in all open map display windows'), + _('Close current map display window'), + _('Close current map display window'), + _('Close all open map display windows'), + _('Close all open map display windows'), + _('Import raster data'), + _('Simplified raster import with reprojection'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('Import of common raster formats'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('ASCII x,y,z point import and gridding'), + _('ASCII grid import'), + _('Converts a GRASS ASCII raster file to binary raster map.'), + _('ASCII polygons, lines, and point import'), + _('Creates raster maps from ASCII polygon/line/point data files.'), + _('Raw binary array import'), + _('Import a binary raster file into a GRASS raster map layer.'), + _('GRIDATB.FOR import'), + _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), + _('Matlab 2D array import'), + _('Imports a binary MAT-File(v4) to a GRASS raster.'), + _('PNG import'), + _('Imports non-georeferenced PNG format image.'), + _('SPOT NDVI import'), + _('Imports SPOT VGT NDVI data into a raster map.'), + _('SRTM HGT import'), + _('Imports SRTM HGT files into raster map.'), + _('Terra ASTER HDF import'), + _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), + _('LAS LiDAR points import'), + _('Creates a raster map from LAS LiDAR points using univariate statistics.'), + _('Unpack raster map'), + _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Import vector data'), + _('Simplified vector import with reprojection'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('Import of common vector formats'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('ASCII points or GRASS ASCII format'), + _('Creates a vector map from an ASCII points file or ASCII vector file.'), + _('ASCII points as a vector lines'), + _('Imports ASCII x,y[,z] coordinates as a series of lines.'), + _('DXF import'), + _('Converts files in DXF format to GRASS vector map format.'), + _('WFS'), + _('Imports GetFeature from a WFS server.'), + _('ESRI e00 import'), + _('Imports E00 file into a vector map.'), + _('Geonames import'), + _('Imports geonames.org country files into a vector points map.'), + _('Matlab array or Mapgen format import'), + _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), + _('LAS LiDAR points import'), + _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), + _('Unpack vector map'), + _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Import 3D raster data'), + _('ASCII 3D import'), + _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), + _('Raw binary array 3D import'), + _('Imports a binary raster file into a GRASS 3D raster map.'), + _('Vis5D import'), + _('Import database table'), + _('Common import formats'), + _('Imports attribute tables in various formats.'), + _('Export raster map'), + _('Common export formats'), + _('Exports GRASS raster maps into GDAL supported formats.'), + _('ASCII grid export'), + _('Converts a raster map layer into a GRASS ASCII text file.'), + _('ASCII x,y,z points export'), + _('Exports a raster map to a text file as x,y,z values based on cell centers.'), + _('GRIDATB.FOR export'), + _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), + _('Matlab 2D array export'), + _('Exports a GRASS raster to a binary MAT-File.'), + _('Raw binary array export'), + _('Exports a GRASS raster to a binary array.'), + _('MPEG-1 export'), + _('Converts raster map series to MPEG movie.'), + _('PNG export'), + _('Export a GRASS raster map as a non-georeferenced PNG image.'), + _('PPM export'), + _('Converts a GRASS raster map to a PPM image file.'), + _('PPM from RGB export'), + _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), + _('POV-Ray export'), + _('Converts a raster map layer into a height-field file for POV-Ray.'), + _('VRML export'), + _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), + _('VTK export'), + _('Converts raster maps into the VTK-ASCII format.'), + _('Pack raster map'), + _('Exports a raster map as GRASS GIS specific archive file'), + _('Export vector map'), + _('Common export formats'), + _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), + _('ASCII points or GRASS ASCII vector export'), + _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), + _('DXF export'), + _('Exports vector map to DXF file format.'), + _('PostGIS export'), + _('Exports a vector map layer to PostGIS feature table.'), + _('POV-Ray export'), + _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), + _('SVG export'), + _('Exports a vector map to SVG file.'), + _('VTK export'), + _('Converts a vector map to VTK ASCII output.'), + _('Pack vector map'), + _('Exports a vector map as GRASS GIS specific archive file'), + _('Export 3D raster maps'), + _('ASCII 3D export'), + _('Converts a 3D raster map layer into a ASCII text file.'), + _('Raw binary array 3D export'), + _('Exports a GRASS 3D raster map to a binary array.'), + _('Vis5D export'), + _('VTK export'), + _('Converts 3D raster maps into the VTK-ASCII format.'), + _('Export database table'), + _('Common export formats'), + _('Exports attribute tables into various formats.'), + _('Link external data'), + _('Link external raster data'), + _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), + _('Link external vector data'), + _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), + _('Output format for raster data'), + _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), + _('Output format for vector data'), + _('Defines vector output format utilizing OGR library.'), + _('Manage maps'), + _('Copy'), + _("Copies available data files in the current mapset search path to the user's current mapset."), + _('List'), + _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), + _('Rename'), + _("Renames data base element files in the user's current mapset."), + _('Delete'), + _("Removes data base element files from the user's current mapset using the search pattern."), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('3D raster to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('Georectify'), + _('Manage Ground Control Points for Georectification'), + _('Graphical modeler'), + _('Launch Graphical modeler'), + _('Run model'), + _('Run model prepared by Graphical modeler'), + _('3D image rendering'), + _('Animation tool'), + _('Launch animation tool.'), + _('Bearing/distance to coordinates'), + _('A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system'), + _('Cartographic Composer'), + _('Launch Cartographic Composer'), + _('Map Swipe'), + _('Launch Map Swipe'), + _('Launch script'), + _('Launches script file.'), + _('Simple Python Editor'), + _('Launches Simple Python Editor.'), + _('Close GUI'), + _('Close graphical user interface.'), + _('Quit GRASS GIS'), + _('Close GUI and exit GRASS GIS shell.'), + _('&Settings'), + _('Computational region'), + _('Show current region'), + _('Shows the extent and resolution of the computational region.'), + _('Show region using latitude and longitude'), + _('Shows the extent and resolution of the computational region.'), + _('Show current region extent in Map Display'), + _('Shows the extent of the computational region in Map Display.'), + _('Set region'), + _('Manages the boundary definitions for the geographic region.'), + _('GRASS working environment'), + _('Mapset access'), + _('Set/unset access to other mapsets in current location'), + _('User access'), + _('Controls access to the current mapset for other users on the system. If no option given, prints current status.'), + _('Change working environment'), + _('Changes/reports current mapset. Optionally create new mapset or list available mapsets in given location.'), + _('Change location and mapset'), + _('Change current location and mapset.'), + _('Change mapset'), + _('Change current mapset.'), + _('Change working directory'), + _('Change working directory'), + _('Show settings'), + _("Outputs and modifies the user's current GRASS variable settings."), + _('Change settings'), + _("Outputs and modifies the user's current GRASS variable settings. Prints all defined GRASS variables if no option is given."), + _('Create new location'), + _('Launches location wizard to create new GRASS location.'), + _('Create new mapset'), + _('Creates new mapset in the current location, changes current mapset.'), + _('Version and copyright'), + _('Displays version and copyright information.'), + _('Map projections'), + _('Display map projection'), + _('Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).'), + _('Manage projections'), + _('Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.'), + _('Convert coordinates'), + _('Converts coordinates from one projection to another (cs2cs frontend).'), + _('Addons extensions'), + _('Install extension from addons'), + _('Installs new extension from GRASS AddOns repository.'), + _('Manage installed extension'), + _('Updates or removes installed GRASS AddOns extension(s).'), + _('Preferences'), + _('User GUI preferences (display font, commands, digitizer, etc.)'), + _('&Raster'), + _('Develop raster map'), + _('Compress/decompress'), + _('Compresses and decompresses raster maps.'), + _('Region boundaries'), + _('Sets the boundary definitions for a raster map.'), + _('Manage NULL values'), + _('Manages NULL-values of given raster map.'), + _('Quantization'), + _('Produces the quantization file for a floating-point map.'), + _('Timestamp'), + _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), + _('Resample using aggregate statistics'), + _('Resamples raster map layers to a coarser grid using aggregation.'), + _('Resample using multiple methods'), + _('Resamples raster map to a finer grid using interpolation.'), + _('Resample using nearest neighbor'), + _('GRASS raster map layer data resampling capability.'), + _('Resample using spline tension'), + _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), + _('Resample using bspline'), + _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), + _('Resample using analytic kernel'), + _('Resamples raster map layers using an analytic kernel.'), + _('Support file maintenance'), + _('Allows creation and/or modification of raster map layer support files.'), + _('Update map statistics'), + _('Update raster map statistics'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Tiling'), + _('Produces tilings of the source projection for use in the destination region and projection.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a raster map.'), + _('Color tables (stddev)'), + _("Sets color rules based on stddev from a raster map's mean value."), + _('Manage color rules interactively'), + _('Interactive management of raster color tables.'), + _('Export color table'), + _('Exports the color table associated with a raster map.'), + _('Blend 2 color rasters'), + _('Blends color components of two raster maps by a given ratio.'), + _('Create RGB'), + _('Combines red, green and blue raster maps into a single composite raster map.'), + _('RGB to HIS'), + _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), + _('Query raster maps'), + _('Query values by coordinates'), + _('Queries raster maps on their category values and category labels.'), + _('Query colors by value'), + _('Queries colors for a raster map layer.'), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Raster buffers and distance'), + _('Buffer rasters'), + _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), + _('Concentric circles'), + _('Creates a raster map containing concentric rings around a given point.'), + _('Closest points'), + _('Locates the closest points between objects in two raster maps.'), + _('Grow by one cell'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Mask'), + _('Creates a MASK for limiting raster operation.'), + _('Raster map calculator'), + _('Simplified raster map calculator'), + _('Raster map calculator'), + _('Raster map calculator.'), + _('Neighborhood analysis'), + _('Moving window'), + _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), + _('Neighborhood points'), + _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), + _('Overlay rasters'), + _('Cross product'), + _('Creates a cross product of the category values from multiple raster map layers.'), + _('Patch raster maps'), + _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), + _('Raster series aggregation'), + _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), + _('Raster series accumulation'), + _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), + _('Statistical overlay'), + _('Calculates category or object oriented statistics (accumulator-based statistics).'), + _('Quantiles overlay'), + _('Compute category quantiles using two passes.'), + _('Solar radiance and shadows'), + _('LatLong map'), + _('Creates a latitude/longitude raster map.'), + _('Solar irradiance and irradiation'), + _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), + _('Shadows map'), + _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), + _('Sunshine hours and solar angles'), + _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), + _('Terrain analysis'), + _('Generate contour lines'), + _('Produces a vector map of specified contours from a raster map.'), + _('Cost surface'), + _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Cumulative movement costs'), + _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Least cost route or flow'), + _('Traces a flow through an elevation model or cost surface on a raster map.'), + _('Compute shaded relief'), + _('Creates shaded relief map from an elevation map (DEM). '), + _('Apply shade to raster'), + _('Drapes a color raster over an shaded relief or aspect map.'), + _('Slope and aspect'), + _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), + _('Landforms'), + _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), + _('Terrain parameters'), + _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), + _('Textural features'), + _('Generate images with textural features from a raster map.'), + _('Visibility'), + _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Horizon angle'), + _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), + _('Transform features'), + _('Clump'), + _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), + _('Grow'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Thin'), + _('Thins non-null cells that denote linear features in a raster map layer.'), + _('Hydrologic modeling'), + _('Carve stream channels'), + _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), + _('Fill lake'), + _('Fills lake at given point to given level.'), + _('Depressionless map and flowlines'), + _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), + _('Flow accumulation'), + _('Performs flow computation for massive grids.'), + _('Flow lines'), + _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), + _('Watershed analysis'), + _('Calculates hydrological parameters and RUSLE factors.'), + _('Watershed subbasins'), + _('Generates watershed subbasins raster map.'), + _('Watershed basin creation'), + _('Creates watershed basins from a drainage direction map.'), + _('Extraction of stream networks'), + _('Performs stream network extraction.'), + _('SIMWE Overland flow modeling'), + _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), + _('SIMWE Sediment flux modeling'), + _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), + _('Topographic index map'), + _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), + _('TOPMODEL simulation'), + _('Simulates TOPMODEL which is a physically based hydrologic model.'), + _('USLE K-factor'), + _('Computes USLE Soil Erodibility Factor (K).'), + _('USLE R-factor'), + _('Computes USLE R factor, Rainfall erosivity index.'), + _('Groundwater modeling'), + _('Groundwater flow'), + _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), + _('Groundwater solute transport'), + _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), + _('Landscape patch analysis'), + _('Set up sampling and analysis framework'), + _("Configuration editor for r.li.'index'"), + _('Edge density'), + _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), + _('Contrast weighted edge density'), + _('Calculates contrast weighted edge density index on a raster map'), + _('Patch area mean'), + _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), + _('Patch area range'), + _('Calculates range of patch area size on a raster map'), + _('Patch area Std Dev'), + _('Calculates standard deviation of patch area a raster map'), + _('Patch area Coeff Var'), + _('Calculates coefficient of variation of patch area on a raster map'), + _('Patch density'), + _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), + _('Patch number'), + _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), + _("Dominance's diversity"), + _("Calculates dominance's diversity index on a raster map"), + _("Shannon's diversity"), + _("Calculates Shannon's diversity index on a raster map"), + _("Simpson's diversity"), + _("Calculates Simpson's diversity index on a raster map"), + _('Richness'), + _('Calculates richness index on a raster map'), + _('Shape index'), + _('Calculates shape index on a raster map'), + _('Wildfire modeling'), + _('Rate of spread'), + _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), + _('Least-cost spread paths'), + _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), + _('Anisotropic spread simulation'), + _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), + _('Change category values and labels'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('Interactively edit category values'), + _('Edits cell values in a raster map.'), + _('Reclassify by size'), + _('Reclasses a raster map greater or less than user specified area size (in hectares).'), + _('Reclassify'), + _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), + _('Recode'), + _('Recodes categorical raster maps.'), + _('Rescale'), + _('Rescales the range of category values in a raster map layer.'), + _('Rescale with histogram'), + _('Rescales histogram equalized the range of category values in a raster map layer.'), + _('Generate random cells'), + _('Random cells'), + _('Generates random cell values with spatial dependence.'), + _('Random cells and vector points'), + _('Creates a raster map layer and vector point map containing randomly located points.'), + _('Generate surfaces'), + _('Fractal surface'), + _('Creates a fractal surface of a given fractal dimension.'), + _('Gaussian kernel density surface'), + _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), + _('Gaussian deviates surface'), + _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), + _('Plane'), + _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), + _('Random deviates surface'), + _('Produces a raster surface map of uniform random deviates with defined range.'), + _('Random surface with spatial dependence'), + _('Generates random surface(s) with spatial dependence.'), + _('Interpolate surfaces'), + _('Bilinear and bicubic from vector points'), + _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), + _('IDW from raster points'), + _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), + _('IDW from vector points'), + _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), + _('Raster contours'), + _('Generates surface raster map from rasterized contours.'), + _('Regularized spline tension'), + _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), + _('Raster series interpolation'), + _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), + _('Fill NULL cells'), + _('Fills no-data areas in raster maps using spline interpolation.'), + _('Reports and statistics'), + _('Basic raster metadata'), + _('Outputs basic information about a raster map.'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('General statistics'), + _('Generates area statistics for raster map.'), + _('Quantiles for large data sets'), + _('Compute quantiles using two passes.'), + _('Range of category values'), + _('Prints terse list of category values found in a raster map layer.'), + _('Sum area by raster map and category'), + _('Reports statistics for raster maps.'), + _('Statistics for clumped cells'), + _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), + _('Total corrected area'), + _('Prints estimation of surface area for raster map.'), + _('Univariate raster statistics'), + _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('Sample transects'), + _('Outputs the raster map layer values lying on user-defined line(s).'), + _('Sample transects (bearing/distance)'), + _('Outputs raster map layer values lying along user defined transect line(s).'), + _('Covariance/correlation'), + _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), + _('Linear regression'), + _('Calculates linear regression from two raster maps: y = a + b*x.'), + _('Multiple regression'), + _('Calculates multiple linear regression from raster maps.'), + _('Mutual category occurrences'), + _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), + _('&Vector'), + _('Develop vector map'), + _('Create new vector map'), + _('Create new empty vector map'), + _('Edit vector map (non-interactively)'), + _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), + _('Convert object types'), + _('Changes type of vector features.'), + _('Parallel lines'), + _('Creates parallel line to input vector lines.'), + _('Dissolve boundaries'), + _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), + _('Create 3D vector over raster'), + _('Converts 2D vector features to 3D by sampling of elevation raster map.'), + _('Extrude 3D vector map'), + _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), + _('Create labels'), + _('Creates paint labels for a vector map from attached attributes.'), + _('Reposition vector map'), + _('Performs an affine transformation (shift, scale and rotate) on vector map.'), + _('Rectify vector map'), + _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Support file maintenance'), + _('Updates vector map metadata.'), + _('Topology maintenance'), + _('Create or rebuild topology'), + _('Creates topology for vector map. Optionally also checks for topological errors.'), + _('Rebuild topology on all vector maps'), + _('Rebuilds topology on all vector maps in the current mapset.'), + _('Build polylines'), + _('Builds polylines from lines or boundaries.'), + _('Split lines'), + _('Splits vector lines to shorter segments.'), + _('Split polylines'), + _('Creates points/segments from input vector lines and positions.'), + _('Clean vector map'), + _('Toolset for cleaning topology of vector map.'), + _('Smooth or simplify'), + _('Performs vector based generalization.'), + _('Add centroids'), + _('Adds missing centroids to closed boundaries.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a vector map.'), + _('Manage color rules interactively'), + _('Interactive management of vector color tables.'), + _('Export color table'), + _('Exports the color table associated with a vector map.'), + _('Query vector map'), + _('Query with coordinate(s)'), + _('Queries a vector map at given locations.'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('Feature selection'), + _('Select by attributes'), + _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), + _('Select by another map'), + _('Selects features from vector map (A) by features from other vector map (B).'), + _('Map type conversions'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('Buffer vectors'), + _('Creates a buffer around vector features of given type.'), + _('Point analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Identify point clusters'), + _('Performs cluster identification.'), + _('Indices for quadrat counts of vector point lists'), + _('Indices for quadrat counts of vector point lists.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Tests for normality for vector points'), + _('Tests for normality for vector points.'), + _('Lidar analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Detect edges'), + _("Detects the object's edges from a LIDAR data set."), + _('Detect interiors'), + _('Building contour determination and Region Growing algorithm for determining the building inside'), + _('Correct and reclassify objects'), + _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), + _('Linear referencing'), + _('Create LRS'), + _('Creates a linear reference system.'), + _('Create stationing'), + _('Creates stationing from input lines, and linear reference system.'), + _('Create points/segments'), + _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), + _('Find line id and offset'), + _('Finds line id and real km+offset for given points in vector map using linear reference system.'), + _('Nearest features'), + _("Finds the nearest element in vector map 'to' for elements in vector map 'from'."), + _('Network analysis'), + _('Vector network analysis tool'), + _('Tool for interactive vector network analysis.'), + _('Network preparation'), + _('Performs network maintenance.'), + _('Allocate subnets'), + _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Split net'), + _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Shortest path'), + _('Finds shortest path on vector network.'), + _('Shortest path for sets of features'), + _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), + _('Shortest path using timetables'), + _('Finds shortest path using timetables.'), + _('Shortest path for all pairs'), + _('Computes the shortest path between all pairs of nodes in the network.'), + _('Visibility network'), + _('Performs visibility graph construction.'), + _('Bridges and articulation points'), + _('Computes bridges and articulation points in the network.'), + _('Maximum flow'), + _('Computes the maximum flow between two sets of nodes in the network.'), + _('Vertex connectivity'), + _('Computes vertex connectivity between two sets of nodes in the network.'), + _('Components'), + _('Computes strongly and weakly connected components in the network.'), + _('Centrality'), + _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), + _('Steiner tree'), + _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), + _('Minimum spanning tree'), + _('Computes minimum spanning tree for the network.'), + _('Traveling salesman analysis'), + _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), + _('Overlay vector maps'), + _('Clip vector maps'), + _('Overlay vector maps'), + _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), + _('Patch vector maps'), + _('Creates a new vector map by combining other vector maps.'), + _('Manage categories'), + _('Change or report categories'), + _('Attaches, deletes or reports vector categories to map geometry.'), + _('Reclassify'), + _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), + _('Update attributes'), + _('Update area attributes from raster'), + _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), + _('Update area attributes from vector'), + _('Count points in areas, calculate statistics from point attributes.'), + _('Update point attributes from areas'), + _('Uploads vector values at positions of vector points to the table.'), + _('Update database values from vector'), + _('Populates attribute values from vector features.'), + _('Sample raster maps at point locations'), + _('Uploads raster values at positions of vector points to the table.'), + _('Sample raster neighborhood around points'), + _('Samples a raster map at vector point locations.'), + _('Generate area for current region'), + _('Creates a vector polygon from the current region extent.'), + _('Generate areas from points'), + _('Convex hull'), + _('Produces a 2D/3D convex hull for a given vector map.'), + _('Delaunay triangles'), + _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), + _('Voronoi diagram/Thiessen polygons'), + _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), + _('Generate grid'), + _('Creates a vector map of a user-defined grid.'), + _('Generate points'), + _('Generate from database'), + _('Creates new vector (points) map from database table containing coordinates.'), + _('Generate points along lines'), + _('Creates points along input lines in new vector map with 2 layers.'), + _('Generate random points'), + _('Generates random 2D/3D vector points.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Remove outliers in point sets'), + _('Removes outliers from vector point data.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Reports and statistics'), + _('Basic vector metadata'), + _('Outputs basic information about a vector map.'), + _('Classify attribute data'), + _('Classifies attribute data, e.g. for thematic mapping'), + _('Report topology by category'), + _('Reports geometry statistics for vector maps.'), + _('Univariate attribute statistics for points'), + _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), + _('Univariate statistics for attribute columns'), + _('Calculates univariate statistics on selected table column for a GRASS vector map.'), + _('Sample transects'), + _('Vector map profiling tool'), + _('Quadrat indices'), + _('Indices for quadrat counts of vector point lists.'), + _('Test normality'), + _('Tests for normality for vector points.'), + _('&Imagery'), + _('Develop images and groups'), + _('Create/edit group'), + _('Creates, edits, and lists groups of imagery files.'), + _('Target group'), + _('Targets an imagery group to a GRASS location and mapset.'), + _('Mosaic images'), + _('Mosaics several images and extends colormap.'), + _('Manage image colors'), + _('Color balance for RGB'), + _('Performs auto-balancing of colors for RGB images.'), + _('HIS to RGB'), + _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), + _('RGB to HIS'), + _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), + _('Rectify image or raster'), + _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), + _('Histogram'), + _('Generate histogram of image'), + _('Spectral response'), + _('Displays spectral response at user specified locations in group or images.'), + _('Pan sharpening'), + _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), + _('Classify image'), + _('Clustering input for unsupervised classification'), + _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), + _('Input for supervised MLC'), + _('Generates statistics for i.maxlik from raster map.'), + _('Maximum likelihood classification (MLC)'), + _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Input for supervised SMAP'), + _('Generates statistics for i.smap from raster map.'), + _('Sequential maximum a posteriori classification (SMAP)'), + _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), + _('Object segmentation'), + _('Identifies segments (objects) from imagery data.'), + _('Filter image'), + _('Edge detection'), + _('Zero-crossing "edge detection" raster function for image processing.'), + _('Matrix/convolving filter'), + _('Performs raster map matrix filter.'), + _('Transform image'), + _('Canonical correlation'), + _('Canonical components analysis (CCA) program for image processing.'), + _('Principal components'), + _('Principal components analysis (PCA) for image processing.'), + _('Fast Fourier'), + _('Fast Fourier Transform (FFT) for image processing.'), + _('Inverse Fast Fourier'), + _('Inverse Fast Fourier Transform (IFFT) for image processing.'), + _('Satellite images tools'), + _('Aster DN to radiance/reflectance'), + _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), + _('Landsat DN to radiance/reflectance'), + _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), + _('Landsat cloud cover assessment'), + _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), + _('Modis quality control'), + _('Extracts quality control parameters from MODIS QC layers.'), + _('Atmospheric correction'), + _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), + _('Topographic correction'), + _('Computes topographic correction of reflectance.'), + _('Orthophoto tools'), + _('Manage GCPs for 3D correction'), + _('Georectifies a map and allows managing GCP for 3D correction.'), + _('Corrects scanning distortions'), + _('Corrects scanning distortions of a scanned aerial photo.'), + _('Satellite images products'), + _('Vegetation indices'), + _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), + _('Tasseled cap vegetation index'), + _('Performs Tasseled Cap (Kauth Thomas) transformation.'), + _('Albedo'), + _('Computes broad band albedo from surface reflectance.'), + _('Emissivity'), + _('Computes emissivity from NDVI, generic method for sparse land.'), + _('Biomass growth'), + _('Computes biomass growth, precursor of crop yield calculation.'), + _('Evapotranspiration calculation'), + _('Instantaneaous Net Radiation'), + _('Net radiation approximation (Bastiaanssen, 1995).'), + _('Soil heat flux'), + _('Soil heat flux approximation (Bastiaanssen, 1995).'), + _('Sensible heat flux'), + _('Computes sensible heat flux iteration SEBAL 01.'), + _('Evaporative fraction'), + _('Computes evaporative fraction and root zone soil moisture.'), + _('Actual Evapotranspiration'), + _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), + _('Temporal integration of ETa'), + _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), + _('Hargreaves methods Evapotranspiration'), + _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), + _('Penman-Monteith Evapotranspiration'), + _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), + _('Priestley-Taylor Evapotranspiration'), + _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), + _('Reports and statistics'), + _('Kappa analysis'), + _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), + _('OIF for LandSat TM'), + _('Calculates Optimum-Index-Factor table for spectral bands'), + _('3D r&aster'), + _('Develop 3D raster map'), + _('Manage 3D NULL values'), + _('Explicitly create the 3D NULL-value bitmap file.'), + _('Manage timestamp'), + _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), + _('Map type conversions'), + _('3D rasters to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('3D color tables'), + _('Creates/modifies the color table associated with a 3D raster map.'), + _('Export 3D color table'), + _('Exports the color table associated with a 3D raster map.'), + _('3D mask'), + _('Establishes the current working 3D raster mask.'), + _('3D raster map calculator'), + _('3D raster map calculator'), + _('Cross section'), + _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), + _('Groundwater modeling'), + _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), + _('Interpolate 3D raster from points'), + _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), + _('Reports and statistics'), + _('Basic 3D raster metadata'), + _('Outputs basic information about a user-specified 3D raster map layer.'), + _('3D raster statistics'), + _('Generates volume statistics for 3D raster maps.'), + _('Univariate statistics for 3D rasters'), + _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('&Database'), + _('Database information'), + _('List databases'), + _('Lists all databases for a given driver and location.'), + _('List drivers'), + _('Lists all database drivers.'), + _('List tables'), + _('Lists all tables for a given database.'), + _('Describe table'), + _('Describes a table in detail.'), + _('List columns'), + _('List all columns for a given table.'), + _('Manage databases'), + _('Connect'), + _('Prints/sets general DB connection for current mapset.'), + _('Login'), + _('Sets user/password for DB driver/database.'), + _('Create database'), + _('Creates an empty database.'), + _('Drop database'), + _('Removes an existing database.'), + _('Drop table'), + _('Drops an attribute table.'), + _('Copy table'), + _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), + _('Drop column'), + _('Drops a column from selected attribute table.'), + _('Test'), + _('Test database driver, database must exist and set by db.connect.'), + _('Query'), + _('Query any table'), + _('Selects data from attribute table. Performs SQL query statement(s).'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('SQL statement'), + _("Executes any SQL statement. For SELECT statements use 'db.select'."), + _('Vector database connections'), + _('New table'), + _('Creates and connects a new attribute table to a given layer of an existing vector map.'), + _('Remove table'), + _('Removes existing attribute table of a vector map.'), + _('Join table'), + _('Joins a database table to a vector map table.'), + _('Add columns'), + _('Adds one or more columns to the attribute table connected to a given vector map.'), + _('Drop column'), + _('Drops a column from the attribute table connected to a given vector map.'), + _('Rename column'), + _('Renames a column in the attribute table connected to a given vector map.'), + _('Change values'), + _('Updates a column in the attribute table connected to a vector map.'), + _('Drop row'), + _('Removes a vector feature from a vector map through attribute selection.'), + _('Reconnect vectors to database'), + _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), + _('Set vector map - database connection'), + _('Prints/sets DB connection for a vector map to attribute table.'), + _('&Temporal'), + _('Manage datasets'), + _('Connect temporal database'), + _('Prints/sets general temporal GIS database connection for current mapset.'), + _('Create'), + _('Creates a space time dataset.'), + _('Rename'), + _('Renames a space time dataset'), + _('Remove'), + _('Removes space time datasets from temporal database.'), + _('Update metadata'), + _('Modifies the metadata of a space time dataset.'), + _('Merge'), + _('Merges several space time datasets into a single space time dataset.'), + _('Temporally shift'), + _('Shifts temporally the maps of a space time dataset.'), + _('Snap maps of dataset'), + _('Snaps temporally the maps of a space time dataset.'), + _('List'), + _('Lists space time datasets and maps registered in the temporal database.'), + _('Manage maps in datasets'), + _('Register maps in datasets'), + _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), + _('Unregister maps from datasets'), + _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), + _('List raster dataset maps'), + _('Lists registered maps of a space time raster dataset.'), + _('List vector dataset maps'), + _('Lists registered maps of a space time vector dataset.'), + _('List 3D raster dataset maps'), + _('Lists registered maps of a space time raster3d dataset.'), + _('Import'), + _('Import raster dataset'), + _('Imports space time raster dataset.'), + _('Import vector dataset'), + _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), + _('Export'), + _('Export raster dataset'), + _('Exports space time raster dataset.'), + _('Export raster dataset as VTK time series'), + _('Exports space time raster dataset as VTK time series.'), + _('Export vector dataset'), + _('Exports a space time vector dataset as GRASS GIS specific archive file.'), + _('Convert raster dataset to 3D raster'), + _('Converts a space time raster dataset into a 3D raster map.'), + _('Extraction'), + _('Extract subset of raster dataset'), + _('Extracts a subset of a space time raster datasets.'), + _('Extract subset of vector dataset'), + _('Extracts a subset of a space time vector dataset.'), + _('Extract subset of 3D raster dataset'), + _('Extracts a subset of a space time 3D raster dataset.'), + _('Query vector dataset attribute data'), + _('Prints attributes of vector maps registered in a space time vector dataset.'), + _('Raster dataset color table'), + _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), + _('Raster calculations'), + _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), + _('3D raster calculations'), + _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), + _('Interpolate gaps in raster datasets'), + _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), + _('Aggregation'), + _('Neighborhood analysis in raster dataset'), + _('Performs a neighborhood analysis for each map in a space time raster dataset.'), + _('Aggregation in raster datasets'), + _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), + _('Temporal aggregation'), + _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), + _('Temporal aggregation by dataset'), + _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), + _('Sampling'), + _('Sample a space time raster dataset at point coordinates'), + _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), + _('Query raster dataset by vector points dataset'), + _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), + _('Observe specific locations in raster dataset'), + _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), + _('Temporal sampling'), + _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), + _('Reports and statistics'), + _('Space time datasets metadata'), + _('Lists information about space time datasets and maps.'), + _('Univariate raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), + _('Univariate vector dataset statistics'), + _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), + _('Univariate 3D raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), + _('Report temporal topology'), + _('Lists temporal topology of a space time dataset.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Timeline tool'), + _('Plot temporal extents.'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('&Help'), + _('GRASS help'), + _('Display the HTML man pages of GRASS GIS'), + _('GUI help'), + _('Display the HTML man pages of GRASS GIS'), + _('About system'), + _('Prints system information'), + _('About GRASS GIS'), + _('About GRASS GIS'), + ''] +menustrings_menudata.LayerManagerModuleTree'> = [ + _('Import, export and link data'), + _('Import raster data'), + _('Simplified raster import with reprojection'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('Import of common raster formats'), + _('Imports raster data into a GRASS raster map using GDAL library.'), + _('ASCII x,y,z point import and gridding'), + _('ASCII grid import'), + _('Converts a GRASS ASCII raster file to binary raster map.'), + _('ASCII polygons, lines, and point import'), + _('Creates raster maps from ASCII polygon/line/point data files.'), + _('Raw binary array import'), + _('Import a binary raster file into a GRASS raster map layer.'), + _('GRIDATB.FOR import'), + _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), + _('Matlab 2D array import'), + _('Imports a binary MAT-File(v4) to a GRASS raster.'), + _('PNG import'), + _('Imports non-georeferenced PNG format image.'), + _('SPOT NDVI import'), + _('Imports SPOT VGT NDVI data into a raster map.'), + _('SRTM HGT import'), + _('Imports SRTM HGT files into raster map.'), + _('Terra ASTER HDF import'), + _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), + _('LAS LiDAR points import'), + _('Creates a raster map from LAS LiDAR points using univariate statistics.'), + _('Unpack raster map'), + _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Import vector data'), + _('Simplified vector import with reprojection'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('Import of common vector formats'), + _('Imports vector data into a GRASS vector map using OGR library.'), + _('ASCII points or GRASS ASCII format'), + _('Creates a vector map from an ASCII points file or ASCII vector file.'), + _('ASCII points as a vector lines'), + _('Imports ASCII x,y[,z] coordinates as a series of lines.'), + _('DXF import'), + _('Converts files in DXF format to GRASS vector map format.'), + _('WFS'), + _('Imports GetFeature from a WFS server.'), + _('ESRI e00 import'), + _('Imports E00 file into a vector map.'), + _('Geonames import'), + _('Imports geonames.org country files into a vector points map.'), + _('Matlab array or Mapgen format import'), + _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), + _('LAS LiDAR points import'), + _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), + _('Unpack vector map'), + _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Import 3D raster data'), + _('ASCII 3D import'), + _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), + _('Raw binary array 3D import'), + _('Imports a binary raster file into a GRASS 3D raster map.'), + _('Vis5D import'), + _('Import database table'), + _('Common import formats'), + _('Imports attribute tables in various formats.'), + _('Export raster map'), + _('Common export formats'), + _('Exports GRASS raster maps into GDAL supported formats.'), + _('ASCII grid export'), + _('Converts a raster map layer into a GRASS ASCII text file.'), + _('ASCII x,y,z points export'), + _('Exports a raster map to a text file as x,y,z values based on cell centers.'), + _('GRIDATB.FOR export'), + _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), + _('Matlab 2D array export'), + _('Exports a GRASS raster to a binary MAT-File.'), + _('Raw binary array export'), + _('Exports a GRASS raster to a binary array.'), + _('MPEG-1 export'), + _('Converts raster map series to MPEG movie.'), + _('PNG export'), + _('Export a GRASS raster map as a non-georeferenced PNG image.'), + _('PPM export'), + _('Converts a GRASS raster map to a PPM image file.'), + _('PPM from RGB export'), + _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), + _('POV-Ray export'), + _('Converts a raster map layer into a height-field file for POV-Ray.'), + _('VRML export'), + _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), + _('VTK export'), + _('Converts raster maps into the VTK-ASCII format.'), + _('Pack raster map'), + _('Exports a raster map as GRASS GIS specific archive file'), + _('Export vector map'), + _('Common export formats'), + _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), + _('ASCII points or GRASS ASCII vector export'), + _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), + _('DXF export'), + _('Exports vector map to DXF file format.'), + _('PostGIS export'), + _('Exports a vector map layer to PostGIS feature table.'), + _('POV-Ray export'), + _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), + _('SVG export'), + _('Exports a vector map to SVG file.'), + _('VTK export'), + _('Converts a vector map to VTK ASCII output.'), + _('Pack vector map'), + _('Exports a vector map as GRASS GIS specific archive file'), + _('Export 3D raster maps'), + _('ASCII 3D export'), + _('Converts a 3D raster map layer into a ASCII text file.'), + _('Raw binary array 3D export'), + _('Exports a GRASS 3D raster map to a binary array.'), + _('Vis5D export'), + _('VTK export'), + _('Converts 3D raster maps into the VTK-ASCII format.'), + _('Export database table'), + _('Common export formats'), + _('Exports attribute tables into various formats.'), + _('Link external data'), + _('Link external raster data'), + _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), + _('Link external vector data'), + _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), + _('Output format for raster data'), + _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), + _('Output format for vector data'), + _('Defines vector output format utilizing OGR library.'), + _('Manage maps'), + _('Copy'), + _("Copies available data files in the current mapset search path to the user's current mapset."), + _('List'), + _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), + _('Rename'), + _("Renames data base element files in the user's current mapset."), + _('Delete'), + _("Removes data base element files from the user's current mapset using the search pattern."), + _('Computational region'), + _('Show current region'), + _('Shows the extent and resolution of the computational region.'), + _('Show region using latitude and longitude'), + _('Shows the extent and resolution of the computational region.'), + _('Show current region extent in Map Display'), + _('Shows the extent of the computational region in Map Display.'), + _('Set region'), + _('Manages the boundary definitions for the geographic region.'), + _('&Raster'), + _('Develop raster map'), + _('Compress/decompress'), + _('Compresses and decompresses raster maps.'), + _('Region boundaries'), + _('Sets the boundary definitions for a raster map.'), + _('Manage NULL values'), + _('Manages NULL-values of given raster map.'), + _('Quantization'), + _('Produces the quantization file for a floating-point map.'), + _('Timestamp'), + _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), + _('Resample using aggregate statistics'), + _('Resamples raster map layers to a coarser grid using aggregation.'), + _('Resample using multiple methods'), + _('Resamples raster map to a finer grid using interpolation.'), + _('Resample using nearest neighbor'), + _('GRASS raster map layer data resampling capability.'), + _('Resample using spline tension'), + _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), + _('Resample using bspline'), + _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), + _('Resample using analytic kernel'), + _('Resamples raster map layers using an analytic kernel.'), + _('Support file maintenance'), + _('Allows creation and/or modification of raster map layer support files.'), + _('Update map statistics'), + _('Update raster map statistics'), + _('Reproject raster map from different GRASS location'), + _('Re-projects a raster map from given location to the current location.'), + _('Tiling'), + _('Produces tilings of the source projection for use in the destination region and projection.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a raster map.'), + _('Color tables (stddev)'), + _("Sets color rules based on stddev from a raster map's mean value."), + _('Manage color rules interactively'), + _('Interactive management of raster color tables.'), + _('Export color table'), + _('Exports the color table associated with a raster map.'), + _('Blend 2 color rasters'), + _('Blends color components of two raster maps by a given ratio.'), + _('Create RGB'), + _('Combines red, green and blue raster maps into a single composite raster map.'), + _('RGB to HIS'), + _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), + _('Query raster maps'), + _('Query values by coordinates'), + _('Queries raster maps on their category values and category labels.'), + _('Query colors by value'), + _('Queries colors for a raster map layer.'), + _('Map type conversions'), + _('Raster to vector'), + _('Converts a raster map into a vector map.'), + _('Raster series to 3D raster'), + _('Converts 2D raster map slices to one 3D raster volume map.'), + _('Raster 2.5D to 3D raster'), + _('Creates a 3D volume map based on 2D elevation and value raster maps.'), + _('Raster buffers and distance'), + _('Buffer rasters'), + _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), + _('Concentric circles'), + _('Creates a raster map containing concentric rings around a given point.'), + _('Closest points'), + _('Locates the closest points between objects in two raster maps.'), + _('Grow by one cell'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Mask'), + _('Creates a MASK for limiting raster operation.'), + _('Raster map calculator'), + _('Simplified raster map calculator'), + _('Raster map calculator'), + _('Raster map calculator.'), + _('Neighborhood analysis'), + _('Moving window'), + _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), + _('Neighborhood points'), + _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), + _('Overlay rasters'), + _('Cross product'), + _('Creates a cross product of the category values from multiple raster map layers.'), + _('Patch raster maps'), + _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), + _('Raster series aggregation'), + _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), + _('Raster series accumulation'), + _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), + _('Statistical overlay'), + _('Calculates category or object oriented statistics (accumulator-based statistics).'), + _('Quantiles overlay'), + _('Compute category quantiles using two passes.'), + _('Solar radiance and shadows'), + _('LatLong map'), + _('Creates a latitude/longitude raster map.'), + _('Solar irradiance and irradiation'), + _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), + _('Shadows map'), + _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), + _('Sunshine hours and solar angles'), + _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), + _('Terrain analysis'), + _('Generate contour lines'), + _('Produces a vector map of specified contours from a raster map.'), + _('Cost surface'), + _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Cumulative movement costs'), + _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), + _('Least cost route or flow'), + _('Traces a flow through an elevation model or cost surface on a raster map.'), + _('Compute shaded relief'), + _('Creates shaded relief map from an elevation map (DEM). '), + _('Apply shade to raster'), + _('Drapes a color raster over an shaded relief or aspect map.'), + _('Slope and aspect'), + _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), + _('Landforms'), + _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), + _('Terrain parameters'), + _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), + _('Textural features'), + _('Generate images with textural features from a raster map.'), + _('Visibility'), + _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), + _('Distance to features'), + _('Generates a raster map containing distances to nearest raster features.'), + _('Horizon angle'), + _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), + _('Transform features'), + _('Clump'), + _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), + _('Grow'), + _('Generates a raster map layer with contiguous areas grown by one cell.'), + _('Thin'), + _('Thins non-null cells that denote linear features in a raster map layer.'), + _('Hydrologic modeling'), + _('Carve stream channels'), + _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), + _('Fill lake'), + _('Fills lake at given point to given level.'), + _('Depressionless map and flowlines'), + _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), + _('Flow accumulation'), + _('Performs flow computation for massive grids.'), + _('Flow lines'), + _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), + _('Watershed analysis'), + _('Calculates hydrological parameters and RUSLE factors.'), + _('Watershed subbasins'), + _('Generates watershed subbasins raster map.'), + _('Watershed basin creation'), + _('Creates watershed basins from a drainage direction map.'), + _('Extraction of stream networks'), + _('Performs stream network extraction.'), + _('SIMWE Overland flow modeling'), + _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), + _('SIMWE Sediment flux modeling'), + _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), + _('Topographic index map'), + _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), + _('TOPMODEL simulation'), + _('Simulates TOPMODEL which is a physically based hydrologic model.'), + _('USLE K-factor'), + _('Computes USLE Soil Erodibility Factor (K).'), + _('USLE R-factor'), + _('Computes USLE R factor, Rainfall erosivity index.'), + _('Groundwater modeling'), + _('Groundwater flow'), + _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), + _('Groundwater solute transport'), + _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), + _('Landscape patch analysis'), + _('Set up sampling and analysis framework'), + _("Configuration editor for r.li.'index'"), + _('Edge density'), + _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), + _('Contrast weighted edge density'), + _('Calculates contrast weighted edge density index on a raster map'), + _('Patch area mean'), + _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), + _('Patch area range'), + _('Calculates range of patch area size on a raster map'), + _('Patch area Std Dev'), + _('Calculates standard deviation of patch area a raster map'), + _('Patch area Coeff Var'), + _('Calculates coefficient of variation of patch area on a raster map'), + _('Patch density'), + _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), + _('Patch number'), + _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), + _("Dominance's diversity"), + _("Calculates dominance's diversity index on a raster map"), + _("Shannon's diversity"), + _("Calculates Shannon's diversity index on a raster map"), + _("Simpson's diversity"), + _("Calculates Simpson's diversity index on a raster map"), + _('Richness'), + _('Calculates richness index on a raster map'), + _('Shape index'), + _('Calculates shape index on a raster map'), + _('Wildfire modeling'), + _('Rate of spread'), + _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), + _('Least-cost spread paths'), + _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), + _('Anisotropic spread simulation'), + _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), + _('Change category values and labels'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('Interactively edit category values'), + _('Edits cell values in a raster map.'), + _('Reclassify by size'), + _('Reclasses a raster map greater or less than user specified area size (in hectares).'), + _('Reclassify'), + _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), + _('Recode'), + _('Recodes categorical raster maps.'), + _('Rescale'), + _('Rescales the range of category values in a raster map layer.'), + _('Rescale with histogram'), + _('Rescales histogram equalized the range of category values in a raster map layer.'), + _('Generate random cells'), + _('Random cells'), + _('Generates random cell values with spatial dependence.'), + _('Random cells and vector points'), + _('Creates a raster map layer and vector point map containing randomly located points.'), + _('Generate surfaces'), + _('Fractal surface'), + _('Creates a fractal surface of a given fractal dimension.'), + _('Gaussian kernel density surface'), + _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), + _('Gaussian deviates surface'), + _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), + _('Plane'), + _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), + _('Random deviates surface'), + _('Produces a raster surface map of uniform random deviates with defined range.'), + _('Random surface with spatial dependence'), + _('Generates random surface(s) with spatial dependence.'), + _('Interpolate surfaces'), + _('Bilinear and bicubic from vector points'), + _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), + _('IDW from raster points'), + _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), + _('IDW from vector points'), + _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), + _('Raster contours'), + _('Generates surface raster map from rasterized contours.'), + _('Regularized spline tension'), + _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), + _('Raster series interpolation'), + _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), + _('Fill NULL cells'), + _('Fills no-data areas in raster maps using spline interpolation.'), + _('Reports and statistics'), + _('Basic raster metadata'), + _('Outputs basic information about a raster map.'), + _('Manage category information'), + _('Manages category values and labels associated with user-specified raster map layers.'), + _('General statistics'), + _('Generates area statistics for raster map.'), + _('Quantiles for large data sets'), + _('Compute quantiles using two passes.'), + _('Range of category values'), + _('Prints terse list of category values found in a raster map layer.'), + _('Sum area by raster map and category'), + _('Reports statistics for raster maps.'), + _('Statistics for clumped cells'), + _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), + _('Total corrected area'), + _('Prints estimation of surface area for raster map.'), + _('Univariate raster statistics'), + _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('Sample transects'), + _('Outputs the raster map layer values lying on user-defined line(s).'), + _('Sample transects (bearing/distance)'), + _('Outputs raster map layer values lying along user defined transect line(s).'), + _('Covariance/correlation'), + _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), + _('Linear regression'), + _('Calculates linear regression from two raster maps: y = a + b*x.'), + _('Multiple regression'), + _('Calculates multiple linear regression from raster maps.'), + _('Mutual category occurrences'), + _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), + _('&Vector'), + _('Develop vector map'), + _('Create new vector map'), + _('Create new empty vector map'), + _('Edit vector map (non-interactively)'), + _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), + _('Convert object types'), + _('Changes type of vector features.'), + _('Parallel lines'), + _('Creates parallel line to input vector lines.'), + _('Dissolve boundaries'), + _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), + _('Create 3D vector over raster'), + _('Converts 2D vector features to 3D by sampling of elevation raster map.'), + _('Extrude 3D vector map'), + _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), + _('Create labels'), + _('Creates paint labels for a vector map from attached attributes.'), + _('Reposition vector map'), + _('Performs an affine transformation (shift, scale and rotate) on vector map.'), + _('Rectify vector map'), + _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), + _('Reproject vector map from different GRASS location'), + _('Re-projects a vector map from one location to the current location.'), + _('Support file maintenance'), + _('Updates vector map metadata.'), + _('Topology maintenance'), + _('Create or rebuild topology'), + _('Creates topology for vector map. Optionally also checks for topological errors.'), + _('Rebuild topology on all vector maps'), + _('Rebuilds topology on all vector maps in the current mapset.'), + _('Build polylines'), + _('Builds polylines from lines or boundaries.'), + _('Split lines'), + _('Splits vector lines to shorter segments.'), + _('Split polylines'), + _('Creates points/segments from input vector lines and positions.'), + _('Clean vector map'), + _('Toolset for cleaning topology of vector map.'), + _('Smooth or simplify'), + _('Performs vector based generalization.'), + _('Add centroids'), + _('Adds missing centroids to closed boundaries.'), + _('Manage colors'), + _('Color tables'), + _('Creates/modifies the color table associated with a vector map.'), + _('Manage color rules interactively'), + _('Interactive management of vector color tables.'), + _('Export color table'), + _('Exports the color table associated with a vector map.'), + _('Query vector map'), + _('Query with coordinate(s)'), + _('Queries a vector map at given locations.'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('Feature selection'), + _('Select by attributes'), + _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), + _('Select by another map'), + _('Selects features from vector map (A) by features from other vector map (B).'), + _('Map type conversions'), + _('Vector to raster'), + _('Converts (rasterize) a vector map into a raster map.'), + _('Vector to 3D raster'), + _('Converts a vector map (only points) into a 3D raster map.'), + _('2D vector to 3D vector'), + _('Performs transformation of 2D vector features to 3D.'), + _('Buffer vectors'), + _('Creates a buffer around vector features of given type.'), + _('Point analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Identify point clusters'), + _('Performs cluster identification.'), + _('Indices for quadrat counts of vector point lists'), + _('Indices for quadrat counts of vector point lists.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Tests for normality for vector points'), + _('Tests for normality for vector points.'), + _('Lidar analysis'), + _('Identify and remove outliers'), + _('Removes outliers from vector point data.'), + _('Detect edges'), + _("Detects the object's edges from a LIDAR data set."), + _('Detect interiors'), + _('Building contour determination and Region Growing algorithm for determining the building inside'), + _('Correct and reclassify objects'), + _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), + _('Linear referencing'), + _('Create LRS'), + _('Creates a linear reference system.'), + _('Create stationing'), + _('Creates stationing from input lines, and linear reference system.'), + _('Create points/segments'), + _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), + _('Find line id and offset'), + _('Finds line id and real km+offset for given points in vector map using linear reference system.'), + _('Nearest features'), + _("Finds the nearest element in vector map 'to' for elements in vector map 'from'."), + _('Network analysis'), + _('Vector network analysis tool'), + _('Tool for interactive vector network analysis.'), + _('Network preparation'), + _('Performs network maintenance.'), + _('Allocate subnets'), + _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Split net'), + _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), + _('Shortest path'), + _('Finds shortest path on vector network.'), + _('Shortest path for sets of features'), + _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), + _('Shortest path using timetables'), + _('Finds shortest path using timetables.'), + _('Shortest path for all pairs'), + _('Computes the shortest path between all pairs of nodes in the network.'), + _('Visibility network'), + _('Performs visibility graph construction.'), + _('Bridges and articulation points'), + _('Computes bridges and articulation points in the network.'), + _('Maximum flow'), + _('Computes the maximum flow between two sets of nodes in the network.'), + _('Vertex connectivity'), + _('Computes vertex connectivity between two sets of nodes in the network.'), + _('Components'), + _('Computes strongly and weakly connected components in the network.'), + _('Centrality'), + _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), + _('Steiner tree'), + _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), + _('Minimum spanning tree'), + _('Computes minimum spanning tree for the network.'), + _('Traveling salesman analysis'), + _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), + _('Overlay vector maps'), + _('Clip vector maps'), + _('Overlay vector maps'), + _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), + _('Patch vector maps'), + _('Creates a new vector map by combining other vector maps.'), + _('Manage categories'), + _('Change or report categories'), + _('Attaches, deletes or reports vector categories to map geometry.'), + _('Reclassify'), + _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), + _('Update attributes'), + _('Update area attributes from raster'), + _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), + _('Update area attributes from vector'), + _('Count points in areas, calculate statistics from point attributes.'), + _('Update point attributes from areas'), + _('Uploads vector values at positions of vector points to the table.'), + _('Update database values from vector'), + _('Populates attribute values from vector features.'), + _('Sample raster maps at point locations'), + _('Uploads raster values at positions of vector points to the table.'), + _('Sample raster neighborhood around points'), + _('Samples a raster map at vector point locations.'), + _('Generate area for current region'), + _('Creates a vector polygon from the current region extent.'), + _('Generate areas from points'), + _('Convex hull'), + _('Produces a 2D/3D convex hull for a given vector map.'), + _('Delaunay triangles'), + _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), + _('Voronoi diagram/Thiessen polygons'), + _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), + _('Generate grid'), + _('Creates a vector map of a user-defined grid.'), + _('Generate points'), + _('Generate from database'), + _('Creates new vector (points) map from database table containing coordinates.'), + _('Generate points along lines'), + _('Creates points along input lines in new vector map with 2 layers.'), + _('Generate random points'), + _('Generates random 2D/3D vector points.'), + _('Perturb points'), + _('Random location perturbations of vector points.'), + _('Remove outliers in point sets'), + _('Removes outliers from vector point data.'), + _('Test/training point sets'), + _('Randomly partition points into test/train sets.'), + _('Reports and statistics'), + _('Basic vector metadata'), + _('Outputs basic information about a vector map.'), + _('Classify attribute data'), + _('Classifies attribute data, e.g. for thematic mapping'), + _('Report topology by category'), + _('Reports geometry statistics for vector maps.'), + _('Univariate attribute statistics for points'), + _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), + _('Univariate statistics for attribute columns'), + _('Calculates univariate statistics on selected table column for a GRASS vector map.'), + _('Sample transects'), + _('Vector map profiling tool'), + _('Quadrat indices'), + _('Indices for quadrat counts of vector point lists.'), + _('Test normality'), + _('Tests for normality for vector points.'), + _('&Imagery'), + _('Develop images and groups'), + _('Create/edit group'), + _('Creates, edits, and lists groups of imagery files.'), + _('Target group'), + _('Targets an imagery group to a GRASS location and mapset.'), + _('Mosaic images'), + _('Mosaics several images and extends colormap.'), + _('Manage image colors'), + _('Color balance for RGB'), + _('Performs auto-balancing of colors for RGB images.'), + _('HIS to RGB'), + _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), + _('RGB to HIS'), + _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), + _('Rectify image or raster'), + _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), + _('Histogram'), + _('Generate histogram of image'), + _('Spectral response'), + _('Displays spectral response at user specified locations in group or images.'), + _('Pan sharpening'), + _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), + _('Classify image'), + _('Clustering input for unsupervised classification'), + _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), + _('Input for supervised MLC'), + _('Generates statistics for i.maxlik from raster map.'), + _('Maximum likelihood classification (MLC)'), + _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Input for supervised SMAP'), + _('Generates statistics for i.smap from raster map.'), + _('Sequential maximum a posteriori classification (SMAP)'), + _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), + _('Object segmentation'), + _('Identifies segments (objects) from imagery data.'), + _('Filter image'), + _('Edge detection'), + _('Zero-crossing "edge detection" raster function for image processing.'), + _('Matrix/convolving filter'), + _('Performs raster map matrix filter.'), + _('Transform image'), + _('Canonical correlation'), + _('Canonical components analysis (CCA) program for image processing.'), + _('Principal components'), + _('Principal components analysis (PCA) for image processing.'), + _('Fast Fourier'), + _('Fast Fourier Transform (FFT) for image processing.'), + _('Inverse Fast Fourier'), + _('Inverse Fast Fourier Transform (IFFT) for image processing.'), + _('Satellite images tools'), + _('Aster DN to radiance/reflectance'), + _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), + _('Landsat DN to radiance/reflectance'), + _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), + _('Landsat cloud cover assessment'), + _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), + _('Modis quality control'), + _('Extracts quality control parameters from MODIS QC layers.'), + _('Atmospheric correction'), + _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), + _('Topographic correction'), + _('Computes topographic correction of reflectance.'), + _('Orthophoto tools'), + _('Manage GCPs for 3D correction'), + _('Georectifies a map and allows managing GCP for 3D correction.'), + _('Corrects scanning distortions'), + _('Corrects scanning distortions of a scanned aerial photo.'), + _('Satellite images products'), + _('Vegetation indices'), + _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), + _('Tasseled cap vegetation index'), + _('Performs Tasseled Cap (Kauth Thomas) transformation.'), + _('Albedo'), + _('Computes broad band albedo from surface reflectance.'), + _('Emissivity'), + _('Computes emissivity from NDVI, generic method for sparse land.'), + _('Biomass growth'), + _('Computes biomass growth, precursor of crop yield calculation.'), + _('Evapotranspiration calculation'), + _('Instantaneaous Net Radiation'), + _('Net radiation approximation (Bastiaanssen, 1995).'), + _('Soil heat flux'), + _('Soil heat flux approximation (Bastiaanssen, 1995).'), + _('Sensible heat flux'), + _('Computes sensible heat flux iteration SEBAL 01.'), + _('Evaporative fraction'), + _('Computes evaporative fraction and root zone soil moisture.'), + _('Actual Evapotranspiration'), + _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), + _('Temporal integration of ETa'), + _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), + _('Hargreaves methods Evapotranspiration'), + _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), + _('Penman-Monteith Evapotranspiration'), + _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), + _('Priestley-Taylor Evapotranspiration'), + _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), + _('Reports and statistics'), + _('Kappa analysis'), + _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), + _('OIF for LandSat TM'), + _('Calculates Optimum-Index-Factor table for spectral bands'), + _('3D r&aster'), + _('Develop 3D raster map'), + _('Manage 3D NULL values'), + _('Explicitly create the 3D NULL-value bitmap file.'), + _('Manage timestamp'), + _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), + _('Map type conversions'), + _('3D rasters to raster series'), + _('Converts 3D raster maps to 2D raster maps'), + _('3D color tables'), + _('Creates/modifies the color table associated with a 3D raster map.'), + _('Export 3D color table'), + _('Exports the color table associated with a 3D raster map.'), + _('3D mask'), + _('Establishes the current working 3D raster mask.'), + _('3D raster map calculator'), + _('3D raster map calculator'), + _('Cross section'), + _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), + _('Groundwater modeling'), + _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), + _('Interpolate 3D raster from points'), + _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), + _('Reports and statistics'), + _('Basic 3D raster metadata'), + _('Outputs basic information about a user-specified 3D raster map layer.'), + _('3D raster statistics'), + _('Generates volume statistics for 3D raster maps.'), + _('Univariate statistics for 3D rasters'), + _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), + _('&Database'), + _('Database information'), + _('List databases'), + _('Lists all databases for a given driver and location.'), + _('List drivers'), + _('Lists all database drivers.'), + _('List tables'), + _('Lists all tables for a given database.'), + _('Describe table'), + _('Describes a table in detail.'), + _('List columns'), + _('List all columns for a given table.'), + _('Manage databases'), + _('Connect'), + _('Prints/sets general DB connection for current mapset.'), + _('Login'), + _('Sets user/password for DB driver/database.'), + _('Create database'), + _('Creates an empty database.'), + _('Drop database'), + _('Removes an existing database.'), + _('Drop table'), + _('Drops an attribute table.'), + _('Copy table'), + _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), + _('Drop column'), + _('Drops a column from selected attribute table.'), + _('Test'), + _('Test database driver, database must exist and set by db.connect.'), + _('Query'), + _('Query any table'), + _('Selects data from attribute table. Performs SQL query statement(s).'), + _('Query vector attribute data'), + _('Prints vector map attributes.'), + _('SQL statement'), + _("Executes any SQL statement. For SELECT statements use 'db.select'."), + _('Vector database connections'), + _('New table'), + _('Creates and connects a new attribute table to a given layer of an existing vector map.'), + _('Remove table'), + _('Removes existing attribute table of a vector map.'), + _('Join table'), + _('Joins a database table to a vector map table.'), + _('Add columns'), + _('Adds one or more columns to the attribute table connected to a given vector map.'), + _('Drop column'), + _('Drops a column from the attribute table connected to a given vector map.'), + _('Rename column'), + _('Renames a column in the attribute table connected to a given vector map.'), + _('Change values'), + _('Updates a column in the attribute table connected to a vector map.'), + _('Drop row'), + _('Removes a vector feature from a vector map through attribute selection.'), + _('Reconnect vectors to database'), + _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), + _('Set vector map - database connection'), + _('Prints/sets DB connection for a vector map to attribute table.'), + _('&Temporal'), + _('Manage datasets'), + _('Connect temporal database'), + _('Prints/sets general temporal GIS database connection for current mapset.'), + _('Create'), + _('Creates a space time dataset.'), + _('Rename'), + _('Renames a space time dataset'), + _('Remove'), + _('Removes space time datasets from temporal database.'), + _('Update metadata'), + _('Modifies the metadata of a space time dataset.'), + _('Merge'), + _('Merges several space time datasets into a single space time dataset.'), + _('Temporally shift'), + _('Shifts temporally the maps of a space time dataset.'), + _('Snap maps of dataset'), + _('Snaps temporally the maps of a space time dataset.'), + _('List'), + _('Lists space time datasets and maps registered in the temporal database.'), + _('Manage maps in datasets'), + _('Register maps in datasets'), + _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), + _('Unregister maps from datasets'), + _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), + _('List raster dataset maps'), + _('Lists registered maps of a space time raster dataset.'), + _('List vector dataset maps'), + _('Lists registered maps of a space time vector dataset.'), + _('List 3D raster dataset maps'), + _('Lists registered maps of a space time raster3d dataset.'), + _('Import'), + _('Import raster dataset'), + _('Imports space time raster dataset.'), + _('Import vector dataset'), + _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), + _('Export'), + _('Export raster dataset'), + _('Exports space time raster dataset.'), + _('Export raster dataset as VTK time series'), + _('Exports space time raster dataset as VTK time series.'), + _('Export vector dataset'), + _('Exports a space time vector dataset as GRASS GIS specific archive file.'), + _('Convert raster dataset to 3D raster'), + _('Converts a space time raster dataset into a 3D raster map.'), + _('Extraction'), + _('Extract subset of raster dataset'), + _('Extracts a subset of a space time raster datasets.'), + _('Extract subset of vector dataset'), + _('Extracts a subset of a space time vector dataset.'), + _('Extract subset of 3D raster dataset'), + _('Extracts a subset of a space time 3D raster dataset.'), + _('Query vector dataset attribute data'), + _('Prints attributes of vector maps registered in a space time vector dataset.'), + _('Raster dataset color table'), + _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), + _('Raster calculations'), + _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), + _('3D raster calculations'), + _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), + _('Interpolate gaps in raster datasets'), + _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), + _('Aggregation'), + _('Neighborhood analysis in raster dataset'), + _('Performs a neighborhood analysis for each map in a space time raster dataset.'), + _('Aggregation in raster datasets'), + _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), + _('Temporal aggregation'), + _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), + _('Temporal aggregation by dataset'), + _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), + _('Sampling'), + _('Sample a space time raster dataset at point coordinates'), + _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), + _('Query raster dataset by vector points dataset'), + _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), + _('Observe specific locations in raster dataset'), + _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), + _('Temporal sampling'), + _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), + _('Reports and statistics'), + _('Space time datasets metadata'), + _('Lists information about space time datasets and maps.'), + _('Univariate raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), + _('Univariate vector dataset statistics'), + _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), + _('Univariate 3D raster dataset statistics'), + _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), + _('Report temporal topology'), + _('Lists temporal topology of a space time dataset.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Timeline tool'), + _('Plot temporal extents.'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('GUI tools'), + _('Animation tool'), + _('Launch animation tool.'), + _('Attribute table manager'), + _('Launches graphical attribute table manager.'), + _('Cartographic Composer'), + _('Launch Cartographic Composer'), + _('Georectify'), + _('Manage Ground Control Points for Georectification'), + _('Graphical modeler'), + _('Launch Graphical modeler'), + _('Interactive input for supervised classification'), + _('Generates spectral signatures by allowing the user to outline training areas.'), + _('Map Swipe'), + _('Launch Map Swipe'), + _('Temporal plot tool'), + _('Plot temporal values.'), + _('Timeline tool'), + _('Plot temporal extents.'), + ''] +menustrings_menudata.PsMapMenuData'> = [ + _('&File'), + _('Page setup'), + _('Specify paper size, margins and orientation'), + _('Load instruction file'), + _('Load text file with mapping instructions'), + _('Export instruction file'), + _('Generate text file with mapping instructions'), + _('Export to PostScript'), + _('Generate PostScript output'), + _('Export to PDF'), + _('Generate PDF output'), + _('Launch ps.map dialog'), + _('Launch ps.map dialog'), + _('Quit'), + _('Close Cartographic Composer'), + _('&Insert'), + _('Map frame'), + _('Add or edit map frame'), + _('Raster map'), + _('Add or edit raster map'), + _('Vector map'), + _('Add or edit vector map'), + _('Map legend'), + _('Add or edit raster and vector legend'), + _('Map info'), + _('Add or edit map info'), + _('Scale bar'), + _('Add or edit scale bar'), + _('Text'), + _('Add text'), + _('Image'), + _('Add image'), + _('North Arrow'), + _('Add north arrow'), + _('Delete'), + _('Delete selected object'), + _('&Help'), + _('Help'), + _('Display the HTML man pages of Cartographic Composer'), + _('About Cartographic Composer'), + _('Display information about Cartographic Composer'), + ''] From b2d1d614395cc98e81bdcab1f202885c9f8bb8fb Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 23:10:26 +0100 Subject: [PATCH 250/264] cmake cleanup --- CMakeLists.txt | 38 ++++------------ cmake/ctypesgen.cmake | 6 +++ cmake/locale_strings.cmake | 6 +++ cmake/mkhtml.cmake.in | 6 +++ cmake/modules/build_docs.cmake | 7 +++ cmake/modules/build_library_in_subdir.cmake | 5 +-- cmake/modules/build_module.cmake | 8 +++- cmake/modules/build_program.cmake | 2 +- cmake/modules/build_py_module.cmake | 10 ++++- cmake/modules/copy_python_file.cmake | 28 ------------ .../modules/copy_python_files_in_subdir.cmake | 6 +++ cmake/modules/get_host_arch.cmake | 6 ++- cmake/modules/get_versions.cmake | 5 +++ cmake/modules/repo_status.cmake | 5 +++ cmake/modules/set_compiler_flags.cmake | 18 ++++---- cmake/modules/update_per_group_target.cmake | 19 -------- cmake/py_cli.bat.in | 2 - cmake/py_cli_install.bat.in | 2 - cmake/run_grass.bat.in | 12 ------ cmake/run_grass.sh.in | 13 ------ cmake/run_python.bat.in | 13 ------ cmake/run_python.sh.in | 13 ------ lib/python/pygrass/CMakeLists.txt | 24 ----------- lib/vector/diglib/CMakeLists.txt | 43 ------------------- tools/CMakeLists.txt | 12 +++--- 25 files changed, 89 insertions(+), 220 deletions(-) delete mode 100644 cmake/modules/copy_python_file.cmake delete mode 100644 cmake/modules/update_per_group_target.cmake delete mode 100644 cmake/py_cli.bat.in delete mode 100644 cmake/py_cli_install.bat.in delete mode 100644 cmake/run_grass.bat.in delete mode 100755 cmake/run_grass.sh.in delete mode 100644 cmake/run_python.bat.in delete mode 100755 cmake/run_python.sh.in delete mode 100644 lib/python/pygrass/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dfa1e57915..8672a555b2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,9 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Grass root that adds options to activate/deactivate 3rd party libraries +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + cmake_minimum_required(VERSION 3.3) set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) @@ -99,8 +105,6 @@ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) endif() -include(update_per_group_target) -include(copy_python_file) include(build_docs) include(build_module) include(build_program) @@ -112,15 +116,6 @@ include(build_py_module) include(check_target) -# function(set_runtime_output_dir target_name output_dir) -# set(runtime_output_dir "${CMAKE_BINARY_DIR}/driver/db/" -# ADD_CUSTOM_COMMAND(TARGET ${target_name} POST_BUILD -# COMMAND ${CMAKE_COMMAND} -E make_directory ${output_dir} -# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/${target_name} ${output_dir} -# DEPENDS ${target_name} -# ) -# endfunction() - add_subdirectory(thirdparty) set(GISBASE ${CMAKE_BINARY_DIR}/gisbase) @@ -149,27 +144,10 @@ set(grass_env_command ${CMAKE_COMMAND} -E env "LANGUAGE=C" "MODULE_TOPDIR=${MODULE_TOPDIR}" "GRASS_PYTHON=${PYTHON_EXECUTABLE}" - "VERSION_NUMBER=\"7.9.dev\"" - "VERSION_DATE=\"2019\"") + "VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" + "VERSION_DATE=\"${GRASS_VERSION_DATE}\"") configure_file(cmake/mkhtml.cmake.in ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake @ONLY) -file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} module_top_dir) -file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} bin_dir) -file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} GRASS_PYTHON) - -file(TO_NATIVE_PATH ${GISBASE} gis_base_dir) - -if(WIN32) -set(SCRIPT_EXT ".bat") -set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.bat) -set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.bat) -else() -set(SCRIPT_EXT ".sh") -set(RUN_GRASS ${CMAKE_BINARY_DIR}/tools/run_grass.sh) -set(RUN_PYTHON ${CMAKE_BINARY_DIR}/tools/run_python.sh) -endif() -configure_file(cmake/run_python${SCRIPT_EXT}.in ${RUN_PYTHON} @ONLY) -configure_file(cmake/run_grass${SCRIPT_EXT}.in ${RUN_GRASS} @ONLY) set(NO_HTML_DESCR_TARGETS "g.parser;ximgview;test.raster3d.lib") add_subdirectory(include) diff --git a/cmake/ctypesgen.cmake b/cmake/ctypesgen.cmake index 9c6eb98df94..7fc3edd46d3 100644 --- a/cmake/ctypesgen.cmake +++ b/cmake/ctypesgen.cmake @@ -1,3 +1,9 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Cmake building of lib/python/ctypes (TODO) +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") set(ENV{GISBASE} "${BIN_DIR}") set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") diff --git a/cmake/locale_strings.cmake b/cmake/locale_strings.cmake index 3f2327bb682..581b681f2c7 100644 --- a/cmake/locale_strings.cmake +++ b/cmake/locale_strings.cmake @@ -1,3 +1,9 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: create translation strings for grass scripts +# environment. TODO use custom_command POST_BUILD directly +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") set(ENV{GISBASE} "${BIN_DIR}") diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in index cec8348ba7d..93e780f654d 100644 --- a/cmake/mkhtml.cmake.in +++ b/cmake/mkhtml.cmake.in @@ -1,3 +1,9 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Create PGM_NAME.html by running mkthml.py. This first set a grass +# environment and call --html-description on the program. +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. function(fatal_error file_name) message(STATUS "ENV{PATH}=$ENV{PATH}") message(STATUS "ENV{PYTHONPATH}=$ENV{PYTHONPATH}") diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake index daaa3aefd35..66a357991d9 100644 --- a/cmake/modules/build_docs.cmake +++ b/cmake/modules/build_docs.cmake @@ -1,3 +1,10 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Create PGM_NAME.html by running mkthml.py. This first set a grass +# environment. TODO use custom_command POST_BUILD directly +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + function(build_docs target_name) get_target_property(G_SRC_DIR ${target_name} G_SRC_DIR) get_target_property(G_TARGET_FILE ${target_name} G_TARGET_FILE) diff --git a/cmake/modules/build_library_in_subdir.cmake b/cmake/modules/build_library_in_subdir.cmake index 28e1179bb70..44415bea900 100644 --- a/cmake/modules/build_library_in_subdir.cmake +++ b/cmake/modules/build_library_in_subdir.cmake @@ -1,7 +1,6 @@ # AUTHOR(S): Rashad Kanavath -# PURPOSE: CMake macro to build a grass library under sub directory -# which is passed as argument to macro -# COPYRIGHT: (C) 2000 by the GRASS Development Team +# PURPOSE: This is the macro to make grass libraries through build_module function. +# COPYRIGHT: (C) 2020 by the GRASS Development Team # This program is free software under the GPL (>=v2) # Read the file COPYING that comes with GRASS for details. diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 3b042f242c2..40fc1b96a82 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,3 +1,10 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: This is the main function that builds all grass libraries (prefixed with grass_) +# and grass exeuctables. This cmake function is tailored to meet requirement of grass gnu make rules +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + include(GenerateExportHeader) function(build_module) cmake_parse_arguments(G @@ -10,7 +17,6 @@ function(build_module) message(FATAL_ERROR "G_NAME empty") endif() - ## update_per_group_target(${G_NAME}) foreach(PRIMARY_DEPEND ${G_PRIMARY_DEPENDS}) if (NOT TARGET ${PRIMARY_DEPEND}) message(STATUS "${G_NAME} disabled because ${PRIMARY_DEPEND} is not available") diff --git a/cmake/modules/build_program.cmake b/cmake/modules/build_program.cmake index 1595426a542..31c381ab55f 100644 --- a/cmake/modules/build_program.cmake +++ b/cmake/modules/build_program.cmake @@ -1,6 +1,6 @@ # AUTHOR(S): Rashad Kanavath # PURPOSE: Shortcut macro to call build_module with EXE argument set -# COPYRIGHT: (C) 2000 by the GRASS Development Team +# COPYRIGHT: (C) 2020 by the GRASS Development Team # This program is free software under the GPL (>=v2) # Read the file COPYING that comes with GRASS for details. macro(build_program) diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake index 614a51745fd..661b59b45a6 100644 --- a/cmake/modules/build_py_module.cmake +++ b/cmake/modules/build_py_module.cmake @@ -1,3 +1,11 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: build_py_module is the main function that builds both scripts and gui/wxpython +# targets. build_gui_in_subdir and build_script_in_subdir are simple shortcut macros +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + + macro(build_gui_in_subdir dir_name) build_py_module(NAME ${dir_name} DST_DIR gui/wxpython @@ -104,7 +112,7 @@ else() add_custom_target(${G_TARGET_NAME} COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - DEPENDS ${PY_MODULE_FILE}) + DEPENDS ${PY_MODULE_FILE} gui_wxpython) endif() set(modules_list "${G_TARGET_NAME};${modules_list}" CACHE INTERNAL "list of modules") diff --git a/cmake/modules/copy_python_file.cmake b/cmake/modules/copy_python_file.cmake deleted file mode 100644 index 813107ec894..00000000000 --- a/cmake/modules/copy_python_file.cmake +++ /dev/null @@ -1,28 +0,0 @@ - - -function(copy_python_file py_file install_dest) - get_filename_component(py_file_NAME ${py_file} NAME) - set(output_path ${GISBASE}/${install_dest}) - set(copied_file_path ${output_path}/${py_file_NAME}) - add_custom_command(OUTPUT ${copied_file_path} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${py_file} ${output_path} - DEPENDS g.parser - COMMENT "Copy ${output_path}/${py_file_NAME}" - VERBATIM) - set(pyc_file_path "${copied_file_path}c") - add_custom_command( - OUTPUT ${pyc_file_path} - COMMAND ${PYTHON_EXECUTABLE} -t -m py_compile ${copied_file_path} - DEPENDS ${copied_file_path} - COMMENT "Generating ${pyc_file_path}" - VERBATIM) - - #set_source_files_properties("${pyc_file_path}" GENERATED) - string(REPLACE "/" "_" targ_name ${install_dest}) - #message(FATAL_ERROR "targ_name=${targ_name}") - add_custom_target(${targ_name}_${py_file_NAME} ALL - DEPENDS ${pyc_file_path}) -SET_TARGET_PROPERTIES (${targ_name}_${py_file_NAME} PROPERTIES FOLDER copy) - install(FILES ${copied_file_path} DESTINATION ${install_dest}) - -endfunction() diff --git a/cmake/modules/copy_python_files_in_subdir.cmake b/cmake/modules/copy_python_files_in_subdir.cmake index 254425d86b5..62cee3f5816 100644 --- a/cmake/modules/copy_python_files_in_subdir.cmake +++ b/cmake/modules/copy_python_files_in_subdir.cmake @@ -1,3 +1,9 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Simply copy python file in given subdirectory +# Destination will be relative to GISBASE directory set in root CMakeLists.txt +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. function(copy_python_files_in_subdir dir_name dst_prefix) file(GLOB PY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${dir_name}/*.py") string(REPLACE "/" "_" targ_name ${dir_name}) diff --git a/cmake/modules/get_host_arch.cmake b/cmake/modules/get_host_arch.cmake index 3e23f2111db..c4e7b8a7178 100644 --- a/cmake/modules/get_host_arch.cmake +++ b/cmake/modules/get_host_arch.cmake @@ -1,4 +1,8 @@ - +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Get host system architecuture +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. function(get_host_arch var_arch) set(host_arch_value "x86_64") # default value diff --git a/cmake/modules/get_versions.cmake b/cmake/modules/get_versions.cmake index 28555710875..5578440c2ed 100644 --- a/cmake/modules/get_versions.cmake +++ b/cmake/modules/get_versions.cmake @@ -1,3 +1,8 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Read major, minor patch, date from given version file +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. function(get_versions file_path var_major var_minor var_release var_date) set(version_major 0) diff --git a/cmake/modules/repo_status.cmake b/cmake/modules/repo_status.cmake index b19d07cab62..ca13362fe45 100644 --- a/cmake/modules/repo_status.cmake +++ b/cmake/modules/repo_status.cmake @@ -1,3 +1,8 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Read git status of grass repository if building from git clone +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. function(repo_status repo_dir version_git_var) if(NOT EXISTS "${repo_dir}/.git") diff --git a/cmake/modules/set_compiler_flags.cmake b/cmake/modules/set_compiler_flags.cmake index a1ca8d5d00d..871f9f6bb2e 100644 --- a/cmake/modules/set_compiler_flags.cmake +++ b/cmake/modules/set_compiler_flags.cmake @@ -1,13 +1,13 @@ macro(set_compiler_flags) if(MSVC) - set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS /DNOMINMAX") - if(CMAKE_C_FLAGS) - set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") - endif() - - set(GRASS_CXX_FLAGS "/D_CRT_SECURE_NO_WARNINGS /DNOMINMAX") - if(CMAKE_CXX_FLAGS) - set(CMAKE_CXX_FLAGS "${GRASS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") - endif() + set(GRASS_C_FLAGS "/D_CRT_SECURE_NO_WARNINGS /DNOMINMAX /DGRASS_CMAKE_BUILD=1") + set(GRASS_CXX_FLAGS "${GRASS_C_FLAGS}") +else() + set(GRASS_C_FLAGS "-DGRASS_CMAKE_BUILD=1") + set(GRASS_CXX_FLAGS "${GRASS_C_FLAGS}") endif() + +set(CMAKE_CXX_FLAGS "${GRASS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") +set(CMAKE_C_FLAGS "${GRASS_C_FLAGS} ${CMAKE_C_FLAGS}") + endmacro() \ No newline at end of file diff --git a/cmake/modules/update_per_group_target.cmake b/cmake/modules/update_per_group_target.cmake deleted file mode 100644 index b08bef7cf64..00000000000 --- a/cmake/modules/update_per_group_target.cmake +++ /dev/null @@ -1,19 +0,0 @@ - -function(update_per_group_target t_name) - if(${t_name} MATCHES "(^([a-z|0-9]+)\\.)") - string(REPLACE "." ";" name_to_list "${t_name}") - list(GET name_to_list 0 all_target_name) - if(all_target_name) - set(all_target_name ${all_target_name}-all) - else() - message(FATAL_ERROR "all_target_name=${all_target_name} \t t_name=${t_name}") - endif() - - if(TARGET ${all_target_name}) - add_dependencies(${all_target_name} ${t_name}) - else() - add_custom_target(${all_target_name} DEPENDS ${t_name}) - endif() - endif() - -endfunction() diff --git a/cmake/py_cli.bat.in b/cmake/py_cli.bat.in deleted file mode 100644 index 70b208554ba..00000000000 --- a/cmake/py_cli.bat.in +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -"@python_exe@" "@scripts_dir@\@PGM_NAME2@.py" %* \ No newline at end of file diff --git a/cmake/py_cli_install.bat.in b/cmake/py_cli_install.bat.in deleted file mode 100644 index 18cdcbf4989..00000000000 --- a/cmake/py_cli_install.bat.in +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -"%GRASS_PYTHON%" "%GISBASE%\script\@PGM_NAME2@.py" %* diff --git a/cmake/run_grass.bat.in b/cmake/run_grass.bat.in deleted file mode 100644 index 623dd513497..00000000000 --- a/cmake/run_grass.bat.in +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -set MODULE_TOPDIR=@module_top_dir@ -set GISBASE=@bin_dir@ -set GISRC=@bin_dir@\etc\config\rc -set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% -set LC_ALL=C -set LANG=C -set LANGUAGE=C -set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -set VERSION_DATE=@GRASS_VERSION_DATE@ -%* - diff --git a/cmake/run_grass.sh.in b/cmake/run_grass.sh.in deleted file mode 100755 index a2d65dd311f..00000000000 --- a/cmake/run_grass.sh.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -export MODULE_TOPDIR=@module_top_dir@ -export GISBASE=@gis_base_dir@ -export GISRC=@gis_base_dir@/etc/config/rc -export PATH=@gis_base_dir@/bin:@gis_base_dir@/scripts:$PATH -export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH -export LC_ALL=C -export LANG=C -export LANGUAGE=C -export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -export VERSION_DATE=@GRASS_VERSION_DATE@ -"$@" - diff --git a/cmake/run_python.bat.in b/cmake/run_python.bat.in deleted file mode 100644 index 1d600c79411..00000000000 --- a/cmake/run_python.bat.in +++ /dev/null @@ -1,13 +0,0 @@ -@echo off -set MODULE_TOPDIR=@module_top_dir@ -set GISBASE=@bin_dir@ -set GISRC=@bin_dir@\etc\config\rc -set PATH=@bin_dir@\bin;@bin_dir@\scripts;%PATH% -set "PATH=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64;%PATH%" -set PYTHONPATH=@bin_dir@\etc\python;@bin_dir@\gui\wxpython;%PYTHONPATH% -set LC_ALL=C -set LANG=C -set LANGUAGE=C -set VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -set VERSION_DATE=@GRASS_VERSION_DATE@ -"@GRASS_PYTHON@" %* diff --git a/cmake/run_python.sh.in b/cmake/run_python.sh.in deleted file mode 100755 index 9f5e664385e..00000000000 --- a/cmake/run_python.sh.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -export MODULE_TOPDIR=@module_top_dir@ -export GISBASE=@gis_base_dir@ -export GISRC=@gis_base_dir@/etc/config/rc -export PATH=@gis_base_dir@/bin:@gis_base_dir@/scripts:$PATH -export LD_LIBRARY_PATH=@bin_dir@/lib:$LD_LIBRARY_PATH -export PYTHONPATH=@gis_base_dir@/etc/python:@gis_base_dir@/gui/wxpython:$PYTHONPATH -export LC_ALL=C -export LANG=C -export LANGUAGE=C -export VERSION_NUMBER=@GRASS_VERSION_NUMBER@ -export VERSION_DATE=@GRASS_VERSION_DATE@ -"@GRASS_PYTHON@" "$@" diff --git a/lib/python/pygrass/CMakeLists.txt b/lib/python/pygrass/CMakeLists.txt deleted file mode 100644 index 155ee2b8886..00000000000 --- a/lib/python/pygrass/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory etc/python/grass/pygrass/) - copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/errors.py etc/python/grass/pygrass) - copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/utils.py etc/python/grass/pygrass) - copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/orderdict.py etc/python/grass/pygrass) - - build_pymodule_in_subdir(messages etc/python/grass/pygrass) - - build_pymodule_in_subdir(modules etc/python/grass/pygrass) - - build_pymodule_in_subdir(modules/interface etc/python/grass/pygrass/modules) - - build_pymodule_in_subdir(modules/grid etc/python/grass/pygrass/modules) - - build_pymodule_in_subdir(raster etc/python/grass/pygrass) - - build_pymodule_in_subdir(vector etc/python/grass/pygrass) - - build_pymodule_in_subdir(gis etc/python/grass/pygrass) - - build_pymodule_in_subdir(shell etc/python/grass/pygrass) - - build_pymodule_in_subdir(tests etc/python/grass/pygrass) - - build_pymodule_in_subdir(rpc etc/python/grass/pygrass) diff --git a/lib/vector/diglib/CMakeLists.txt b/lib/vector/diglib/CMakeLists.txt index 3d1f1b69ec1..6bef6eb5711 100644 --- a/lib/vector/diglib/CMakeLists.txt +++ b/lib/vector/diglib/CMakeLists.txt @@ -1,51 +1,8 @@ -# MODULE_TOPDIR = ../../.. - -# include $(MODULE_TOPDIR)/include/Make/Vars.make - -# MOD_OBJS := $(filter-out test.o port_test.o,$(AUTO_OBJS)) - -# LIB = DIG2 - -# include $(MODULE_TOPDIR)/include/Make/Lib.make - -# EXTRA_INC = $(VECT_INC) -# EXTRA_CFLAGS = $(VECT_CFLAGS) -# LIBES = $(GISLIB) $(RTREELIB) $(MATHLIB) - -# #compile if LFS (Large File Support) present: -# ifneq ($(USE_LARGEFILES),) -# TESTFILE = test64.ok -# else -# TESTFILE = test32.ok -# endif - -# default: lib -# @echo "==============TEST=============" -# ifeq ($(strip $(CROSS_COMPILING)),) -# $(MAKE) test -# endif - -# test: $(OBJDIR)/test.tmp $(TESTFILE) -# cmp $(OBJDIR)/test.tmp $(TESTFILE) - -# $(OBJDIR)/test.tmp: $(OBJDIR)/test$(EXE) -# cd $(OBJDIR) && $(call run_grass,./test) - -# # Test portable read/write functions -# $(OBJDIR)/test$(EXE): $(OBJDIR)/test.o $(DIG2DEP) -# $(call linker) - -# $(OBJDIR)/test$(EXE): LIBES = $(DIG2LIB) - - set(dig2_SRCS allocation.c cindex.c frmt.c line_dist.c plus.c plus_node.c port_init.c prune.c struct_alloc.c update.c angle.c cindex_rw.c head.c linecros.c plus_area.c plus_struct.c spindex.c box.c file.c inside.c list.c plus_line.c poly.c portable.c spindex_rw.c type.c ) - - - build_module(NAME grass_dig2 SOURCES ${dig2_SRCS} DEPENDS GDAL GEOS grass_gmath grass_gis grass_rtree) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 1e7dbd5d958..d688c2ec778 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,8 +1,3 @@ -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py tools) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.html2man.py tools) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/ghtml.py tools) -copy_python_file(${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/ggroff.py tools) set(current_time_s_ms_SRCS "timer/main.c") if(MSVC) @@ -18,4 +13,11 @@ build_program(NAME g.echo SOURCES g.echo.c RUNTIME_OUTPUT_DIR tools PACKAGE "NONE") + add_dependencies(g.echo python_doc_tools) + add_custom_target(python_doc_tools + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py ${GISBASE}/tools + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/g.html2man.py ${GISBASE}/tools + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/ghtml.py ${GISBASE}/tools + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/g.html2man/ggroff.py ${GISBASE}/tools + ) From 601f7aa5b74d4974002b75c9ea7f0e86eb82e3bc Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 23:10:52 +0100 Subject: [PATCH 251/264] reorder dependencies of gui/wxpython modules --- gui/CMakeLists.txt | 2 +- gui/wxpython/CMakeLists.txt | 30 +++++++++++++++++------------- include/CMakeLists.txt | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index d1cbeb1fefb..d3f053a5fa5 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -8,7 +8,7 @@ add_custom_target(copy_gui_images COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_BINARY_DIR}/gui/ DEPENDS copy_gui_icons_flags) -install(DIRECTORY gui/images DESTINATION gui) +install(DIRECTORY images DESTINATION gui) #add_subdirectory(images) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 8cf13532bc8..29d3364372f 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -1,28 +1,32 @@ # missing docs -set(gui_DIRS animation datacatalog dbmgr gcp gmodeler -iclass image2target mapswipe photo2image psmap rlisetup timeline tplot vdigit) -foreach(gui_DIR ${gui_DIRS}) - build_gui_in_subdir(${gui_DIR}) -endforeach() set(WXPYTHON_DIR ${GISBASE}/gui/wxpython) set(gui_lib_DIRS core gui_core icons iscatt lmgr location_wizard mapdisp mapwin modules nviz rdigit startup tools vnet web_services wxplot) +set(gui_lib_targets) +foreach(gui_lib_DIR ${gui_lib_DIRS}) + copy_python_files_in_subdir(${gui_lib_DIR} gui/wxpython) + list(APPEND gui_lib_targets python_${gui_lib_DIR}) +endforeach() add_custom_target(gui_wxpython COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py ${WXPYTHON_DIR}/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py ${WXPYTHON_DIR}/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/ - DEPENDS python_core python_gui_core python_icons python_iscatt python_lmgr python_location_wizard - python_mapdisp python_mapwin python_modules python_nviz python_rdigit python_startup python_vnet - python_web_services python_wxplot) + DEPENDS ${gui_lib_targets}) -foreach(gui_lib_DIR ${gui_lib_DIRS}) - copy_python_files_in_subdir(${gui_lib_DIR} gui/wxpython) +set(gui_DIRS animation datacatalog dbmgr gcp gmodeler +iclass image2target mapswipe photo2image psmap rlisetup timeline tplot vdigit) +set(g_gui_targets) +foreach(gui_DIR ${gui_DIRS}) + build_gui_in_subdir(${gui_DIR}) + list(APPEND g_gui_targets "g.gui.${gui_DIR}") endforeach() + + install(FILES README DESTINATION gui/wxpython) ### copy all python files gui/ lib/python @@ -33,17 +37,17 @@ add_custom_target(copy_wxpython_xml COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xml ${WXPYTHON_DIR}/xml/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ ##### DEPENDS copy_gui_images - DEPENDS ALL_MODULES) + DEPENDS gui_wxpython) add_custom_target(compile_python_files COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts COMMAND ${PYTHON_EXECUTABLE} -m compileall ${WXPYTHON_DIR} - DEPENDS copy_wxpython_xml) + DEPENDS ALL_MODULES) add_custom_target(build_modules_items_xml COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/build_modules_xml.py > ${WXPYTHON_DIR}/xml/module_items.xml - DEPENDS compile_python_files + DEPENDS copy_wxpython_xml compile_python_files ${g_gui_targets} COMMENT "Generating interface description for all modules..." VERBATIM) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 910a97d7120..c54cb46fae9 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -258,7 +258,7 @@ foreach(srch ${SRCHS}) list(APPEND include_depends ${output_dir}/${srch_NAME} ) endforeach() -add_custom_target(copy_header DEPENDS ${include_depends} python gui_wxpython) +add_custom_target(copy_header DEPENDS ${include_depends} python) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") From b2c7bb99b359cb70b58ed94a9fb35b76d5ee0ea5 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 23:11:27 +0100 Subject: [PATCH 252/264] avoid breakage in autconf build --- include/calc.h | 2 ++ include/iostream/mm.h | 3 ++- lib/dspf/viz.h | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/calc.h b/include/calc.h index 1da37da4d30..9d501d85e8b 100644 --- a/include/calc.h +++ b/include/calc.h @@ -33,7 +33,9 @@ typedef struct func_desc #define SET_NULL_F(x) (Rast_set_f_null_value((x),1)) #define SET_NULL_D(x) (Rast_set_d_null_value((x),1)) +#ifdef GRASS_CMAKE_BUILD #include +#endif extern GRASS_CALC_EXPORT volatile int floating_point_exception; extern GRASS_CALC_EXPORT volatile int floating_point_exception_occurred; diff --git a/include/iostream/mm.h b/include/iostream/mm.h index 051e16a4a03..7c3bb2206d8 100644 --- a/include/iostream/mm.h +++ b/include/iostream/mm.h @@ -84,8 +84,9 @@ enum MM_stream_usage { }; - +#ifdef GRASS_CMAKE_BUILD #include +#endif // Declarations of a very simple memory manager designed to work with // BTEs that rely on the underlying OS to manage physical memory. class GRASS_IOSTREAM_EXPORT MM_register { diff --git a/lib/dspf/viz.h b/lib/dspf/viz.h index f89ed975dca..69bf4720046 100644 --- a/lib/dspf/viz.h +++ b/lib/dspf/viz.h @@ -97,6 +97,7 @@ int print_head_info(file_info *); /* struct_copy.c */ int struct_copy(char *, char *, int); - +#ifdef GRASS_CMAKE_BUILD #include +#endif extern GRASS_DSPF_EXPORT CELL_ENTRY cell_table[]; From 29159484e0bbcdc994dcb0bf6a2dbffbecb322b2 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 13 Jan 2020 23:35:25 +0100 Subject: [PATCH 253/264] missing file copy --- tools/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index d688c2ec778..af18a2a4f1f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,3 +1,4 @@ +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mkhtml.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) set(current_time_s_ms_SRCS "timer/main.c") if(MSVC) From 88a4b6fe6c5c536f6dccc7bd4d43d803fdff5487 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Sat, 18 Jan 2020 01:12:03 +0100 Subject: [PATCH 254/264] fix mkhtml doc building, exe, lib, python, gui --- CMakeLists.txt | 25 ++-- cmake/locale_strings.cmake | 1 - cmake/mkhtml.cmake.in | 135 ------------------- cmake/modules/build_docs.cmake | 48 ------- cmake/modules/build_gui_in_subdir.cmake | 93 +++++++++++++ cmake/modules/build_module.cmake | 73 ++++++++-- cmake/modules/build_py_module.cmake | 150 --------------------- cmake/modules/build_script_in_subdir.cmake | 103 ++++++++++++++ cmake/windows_launch.bat.in | 2 +- gui/wxpython/CMakeLists.txt | 3 +- 10 files changed, 274 insertions(+), 359 deletions(-) delete mode 100644 cmake/mkhtml.cmake.in delete mode 100644 cmake/modules/build_docs.cmake create mode 100644 cmake/modules/build_gui_in_subdir.cmake delete mode 100644 cmake/modules/build_py_module.cmake create mode 100644 cmake/modules/build_script_in_subdir.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 8672a555b2c..bb10172df55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,18 +105,17 @@ if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) endif() -include(build_docs) include(build_module) include(build_program) include(build_program_in_subdir) include(build_library_in_subdir) include(copy_python_files_in_subdir) -include(build_py_module) - - +include(build_script_in_subdir) +include(build_gui_in_subdir) include(check_target) add_subdirectory(thirdparty) +set(MKHTML_PY ${CMAKE_BINARY_DIR}/tools/mkhtml.py) set(GISBASE ${CMAKE_BINARY_DIR}/gisbase) file(TO_NATIVE_PATH "${GISBASE}" GISBASE_NATIVE) @@ -126,28 +125,30 @@ file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}" MODULE_TOPDIR) file(TO_NATIVE_PATH "${GISBASE}/scripts" SCRIPTS_DIR) file(TO_NATIVE_PATH "${GISBASE}/etc/config/rc" GISRC) file(TO_NATIVE_PATH "${GISBASE}/etc/python" ETC_PYTHON_DIR) -file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" ETC_WXPYTHON_DIR) +file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" GUI_WXPYTHON_DIR) if(WIN32) set(sep "\;") +set(env_path "") else() -set(sep "\:") +set(sep ":") +set(env_path ":$ENV{PATH}") endif() + set(grass_env_command ${CMAKE_COMMAND} -E env - "PATH=${BINARY_DIR}${sep}${SCRIPTS_DIR}" - "PYTHONPATH=${ETC_PYTHON_DIR}${sep}${ETC_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}" + "PATH=${BINARY_DIR}${sep}${SCRIPTS_DIR}${env_path}" + "PYTHONPATH=${ETC_PYTHON_DIR}${sep}${GUI_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}" "LD_LIBRARY_PATH=${LIB_DIR}${sep}$ENV{LD_LIBRARY_PATH}" "GISBASE=${GISBASE_NATIVE}" "GISRC=${GISRC}" "LC_ALL=C" "LANG=C" "LANGUAGE=C" - "MODULE_TOPDIR=${MODULE_TOPDIR}" - "GRASS_PYTHON=${PYTHON_EXECUTABLE}" + "MODULE_TOPDIR=${MODULE_TOPDIR}" "VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" "VERSION_DATE=\"${GRASS_VERSION_DATE}\"") -configure_file(cmake/mkhtml.cmake.in ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake @ONLY) + set(NO_HTML_DESCR_TARGETS "g.parser;ximgview;test.raster3d.lib") add_subdirectory(include) @@ -163,7 +164,7 @@ execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/scripts/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/demolocation/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/config/ - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/db/driver/ + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/driver/db/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/tools/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/lib/ COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/lister/ diff --git a/cmake/locale_strings.cmake b/cmake/locale_strings.cmake index 581b681f2c7..95d09556767 100644 --- a/cmake/locale_strings.cmake +++ b/cmake/locale_strings.cmake @@ -24,7 +24,6 @@ set(output_to_write) foreach(line ${varname}) string(REPLACE "\"" "\\\"" line "${line}") set(line "_(\"${line}\")") - #message("line=${line}") list(APPEND output_to_write "${line}") endforeach() diff --git a/cmake/mkhtml.cmake.in b/cmake/mkhtml.cmake.in deleted file mode 100644 index 93e780f654d..00000000000 --- a/cmake/mkhtml.cmake.in +++ /dev/null @@ -1,135 +0,0 @@ -# AUTHOR(S): Rashad Kanavath -# PURPOSE: Create PGM_NAME.html by running mkthml.py. This first set a grass -# environment and call --html-description on the program. -# COPYRIGHT: (C) 2020 by the GRASS Development Team -# This program is free software under the GPL (>=v2) -# Read the file COPYING that comes with GRASS for details. -function(fatal_error file_name) - message(STATUS "ENV{PATH}=$ENV{PATH}") - message(STATUS "ENV{PYTHONPATH}=$ENV{PYTHONPATH}") - message(STATUS "ENV{GISRC}=$ENV{GISRC}") - message(STATUS "ENV{GISBASE}=$ENV{GISBASE}") - if(UNIX) - message(STATUS "ENV{LD_LIBRARY_PATH}=$ENV{LD_LIBRARY_PATH}") - endif() - message(STATUS "G_TARGET_FILE=${G_TARGET_FILE}") - execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${G_TARGET_FILE}) - message(SEND_ERROR "Failed to create ${file_name}") - -endfunction() - -if(NOT HTML_FILE) - - if(G_TARGET_FILE) - file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) - endif() - return() -endif() - -set(GISBASE "@GISBASE@") -set(TOP_DIR "@CMAKE_SOURCE_DIR@") -set(BINARY_DIR "@CMAKE_BINARY_DIR@") -set(PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@") -file(TO_NATIVE_PATH "${TOP_DIR}" MODULE_TOPDIR ) -file(TO_NATIVE_PATH "${GISBASE}" GIS_BASE_DIR ) -file(TO_NATIVE_PATH "${GIS_BASE_DIR}/etc/config/rc" GISRC) -file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BIN_DIR) -file(TO_NATIVE_PATH "${GIS_BASE_DIR}/bin" GISBASE_BIN_DIR) -file(TO_NATIVE_PATH "${GIS_BASE_DIR}/scripts" SCRIPTS_DIR) -file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" WXPYTHON_DIR) -file(TO_NATIVE_PATH "${GISBASE}/etc/python" PYTHON_DIR) - -if(WIN32) - set(P_SEP ";") -else() - set(P_SEP ":") -endif() - -set(ENV{PATH} "${GISBASE_BIN_DIR}${P_SEP}${BIN_DIR}${P_SEP}$ENV{PATH}") -set(ENV{GISBASE} "${GIS_BASE_DIR}") -set(ENV{MODULE_TOPDIR} "${MODULE_TOPDIR}") -set(ENV{GISRC} "${GISRC}") -set(ENV{LC_ALL} C) -set(ENV{LANG} C) -set(ENV{LANGUAGE} C) -if(UNIX) - set(GRASS_LD_LIBRARY_PATH "${BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}") - string(REGEX REPLACE "^(.*)\\${P_SEP}$" "\\1" GRASS_LD_LIBRARY_PATH "${GRASS_LD_LIBRARY_PATH}") - set(ENV{LD_LIBRARY_PATH} ${GRASS_LD_LIBRARY_PATH}) -endif() - -set(GRASS_PYTHONPATH "${WXPYTHON_DIR}${P_SEP}${PYTHON_DIR}${P_SEP}$ENV{PYTHONPATH}") -string(REGEX REPLACE "^(.*)\\${P_SEP}$" "\\1" GRASS_PYTHONPATH "${GRASS_PYTHONPATH}") -set(ENV{PYTHONPATH} "${GRASS_PYTHONPATH}") - -get_filename_component(HTML_FILE_NAME ${HTML_FILE} NAME) -get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) - -string(REPLACE ".html" "" PGM_NAME "${HTML_FILE_NAME}" ) - -string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) -set(TMP_HTML_FILE ${PGM_SOURCE_DIR}/${TMP_HTML_NAME}) -set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) -set(MKHTML_PY ${BINARY_DIR}/tools/mkhtml.py) - -if(RUN_HTML_DESCR) - set(PGM_EXT "") - if(WIN32) - set(PGM_EXT ".exe") - endif() - - if(PYTHON_SCRIPT) - set(PGM_EXT ".py") - set(launcher "${PYTHON_EXECUTABLE}") - else() - set(launcher "") - endif() - #message("Running ${PGM_SOURCE_DIR} ${launcher} ${PGM_NAME}${PGM_EXT} --html-description" ) - execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${launcher} ${PGM_NAME}${PGM_EXT} "--html-description" - OUTPUT_FILE ${TMP_HTML_FILE} - RESULT_VARIABLE html_descr_rv) - - #TODO: print TMP_HTML_FILE contents in case of failure. - if(NOT html_descr_rv EQUAL 0) - message("Running html-description says ${html_descr_rv}") - fatal_error(${TMP_HTML_FILE}) - endif() - - if(NOT EXISTS ${TMP_HTML_FILE}) - fatal_error(${TMP_HTML_FILE}) - endif() -endif(RUN_HTML_DESCR) - -message(STATUS "Creating ${OUT_HTML_FILE}") -execute_process( - COMMAND ${CMAKE_COMMAND} -E chdir ${PGM_SOURCE_DIR} ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} - OUTPUT_FILE ${OUT_HTML_FILE} - RESULT_VARIABLE mkhtml_rv) - -#message("mkhtml_rv=${mkhtml_rv}") -if(NOT mkhtml_rv EQUAL 0) - fatal_error(${OUT_HTML_FILE}) -endif() - -file(GLOB IMG_FILES ${PGM_SOURCE_DIR}/*.png ${PGM_SOURCE_DIR}/*.jpg) -foreach(IMG_FILE ${IMG_FILES}) - file(COPY ${IMG_FILE} DESTINATION ${GISBASE}/docs/html) -endforeach() - -if(PYTHON_SCRIPT) - if(WIN32) - file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) - configure_file(${TOP_DIR}/cmake/py_cli_install.bat.in ${OUTPUT_DIR}/${PGM_NAME}.bat @ONLY) - else(WIN32) - file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} - RENAME ${PGM_NAME} - FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) - endif(WIN32) -else(PYTHON_SCRIPT) - file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) -endif(PYTHON_SCRIPT) - - -file(REMOVE ${TMP_HTML_FILE}) - diff --git a/cmake/modules/build_docs.cmake b/cmake/modules/build_docs.cmake deleted file mode 100644 index 66a357991d9..00000000000 --- a/cmake/modules/build_docs.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# AUTHOR(S): Rashad Kanavath -# PURPOSE: Create PGM_NAME.html by running mkthml.py. This first set a grass -# environment. TODO use custom_command POST_BUILD directly -# COPYRIGHT: (C) 2020 by the GRASS Development Team -# This program is free software under the GPL (>=v2) -# Read the file COPYING that comes with GRASS for details. - -function(build_docs target_name) - get_target_property(G_SRC_DIR ${target_name} G_SRC_DIR) - get_target_property(G_TARGET_FILE ${target_name} G_TARGET_FILE) - get_target_property(RUN_HTML_DESCR ${target_name} RUN_HTML_DESCR) - get_target_property(G_RUNTIME_OUTPUT_DIR ${target_name} G_RUNTIME_OUTPUT_DIR) - get_target_property(G_HTML_FILE_NAME ${target_name} G_HTML_FILE_NAME) - get_target_property(PYTHON_SCRIPT ${target_name} PYTHON_SCRIPT) - - - set(html_file ${G_SRC_DIR}/${G_HTML_FILE_NAME}) - set(HTML_FILE) - set(no_docs_list "grass_sqlp;echo;clean_temp;lock;run") - - if(EXISTS ${html_file}) - set(HTML_FILE ${html_file}) - install(FILES ${GISBASE}/docs/html/${G_HTML_FILE_NAME} DESTINATION docs/html) - else() - file(GLOB html_files ${G_SRC_DIR}/*.html) - if(html_files) - if(NOT ${target_name} IN_LIST no_docs_list) - message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${G_RUNTIME_OUTPUT_DIR} | ${target_name}") - endif() - endif() - endif() - - - add_custom_command(TARGET ${target_name} POST_BUILD - COMMAND ${CMAKE_COMMAND} - -DHTML_FILE=${HTML_FILE} - -DRUN_HTML_DESCR=${RUN_HTML_DESCR} - -DG_TARGET_FILE=${G_TARGET_FILE} - -DOUTPUT_DIR=${G_RUNTIME_OUTPUT_DIR} - -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -DPYTHON_SCRIPT=${PYTHON_SCRIPT} - -P ${CMAKE_BINARY_DIR}/cmake/mkhtml.cmake - ) - - #add_custom_target(${target_name}_html ALL DEPENDS ${G_RUNTIME_OUTPUT_DIR}/${target_name}.exe) - - - endfunction() diff --git a/cmake/modules/build_gui_in_subdir.cmake b/cmake/modules/build_gui_in_subdir.cmake new file mode 100644 index 00000000000..c206d6ffab8 --- /dev/null +++ b/cmake/modules/build_gui_in_subdir.cmake @@ -0,0 +1,93 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: build_gui_in_subdir is the cmake function that builds g.gui.* modules +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + +function(build_gui_in_subdir dir_name) + set(G_NAME ${dir_name}) + set(G_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) + set(G_TARGET_NAME g.gui.${G_NAME}) + + set(HTML_FILE_NAME ${G_TARGET_NAME}) + + file(GLOB PYTHON_FILES "${G_SRC_DIR}/*.py") + if(NOT PYTHON_FILES) + message(FATAL_ERROR "[${G_TARGET_NAME}]: No PYTHON_FILES found.") + endif() + + if(NOT PY_MODULE_FILE) + set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) + if(EXISTS "${PY_MODULE_FILE}") + file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) + set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) + else() + set(PY_MODULE_FILE "") + set(MAIN_SCRIPT_FILE "") + endif() + endif() + + if (NOT EXISTS ${PY_MODULE_FILE}) + message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") + endif() + + if(WIN32) + #file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) + set(PGM_NAME ${G_TARGET_NAME}) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_TARGET_NAME}.bat @ONLY) + set(copy_script_command ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_TARGET_NAME}.bat + ${GISBASE}/scripts/${G_TARGET_NAME}.bat) +else(WIN32) + set(copy_script_command ${CMAKE_COMMAND} -E echo "") +endif(WIN32) + add_custom_target(${G_TARGET_NAME} + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/wxpython/${G_NAME}/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/gui/wxpython/${G_NAME}/ + COMMAND ${copy_script_command} + DEPENDS g.parser ${gui_lib_targets}) + + set(modules_list "${G_TARGET_NAME};${modules_list}" CACHE INTERNAL "list of modules") + + set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) + + install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) + + if(WITH_DOCS) + + file(GLOB IMG_FILES ${G_SRC_DIR}/*.png ${G_SRC_DIR}/*.jpg) +set(copy_images_command ${CMAKE_COMMAND} -E echo "") +if(IMG_FILES) + set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) +endif() + + set(HTML_FILE ${G_SRC_DIR}/${G_TARGET_NAME}.html) + if(EXISTS ${HTML_FILE}) + install(FILES ${GISBASE}/docs/html/${G_TARGET_NAME}.html DESTINATION docs/html) + else() + set(HTML_FILE) + file(GLOB html_files ${G_SRC_DIR}/*.html) + if(html_files) + message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${GISBASE}/scripts| ${G_TARGET_NAME}") + endif() + endif() + +set(TMP_HTML_FILE ${G_SRC_DIR}/${G_TARGET_NAME}.tmp.html) +set(OUT_HTML_FILE ${GISBASE}/docs/html/${G_TARGET_NAME}.html) + +add_custom_command(TARGET ${G_TARGET_NAME} POST_BUILD + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${G_TARGET_NAME}.py "--html-description" > ${TMP_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_TARGET_NAME} > ${OUT_HTML_FILE} + COMMAND ${copy_images_command} + COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${GISBASE}/scripts/ + COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} + COMMENT "Creating ${OUT_HTML_FILE}") + + endif(WITH_DOCS) + ##install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) + +endfunction() diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 40fc1b96a82..299af23ba02 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -183,24 +183,77 @@ function(build_module) endif() # To use this property later in build_docs - set(PGM_EXT "NONE") + set(PGM_EXT "") if(WIN32) if(G_EXE) set(PGM_EXT ".exe") endif() endif() - set_target_properties(${G_NAME} PROPERTIES RUN_HTML_DESCR "${RUN_HTML_DESCR}") - set_target_properties(${G_NAME} PROPERTIES G_TARGET_FILE "$") - set_target_properties(${G_NAME} PROPERTIES PGM_NAME "${PGM_NAME}") - set_target_properties(${G_NAME} PROPERTIES G_SRC_DIR "${G_SRCDIR}") - set_target_properties(${G_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${G_RUNTIME_OUTPUT_DIR}") - set_target_properties(${G_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - set_target_properties(${G_NAME} PROPERTIES PYTHON_SCRIPT FALSE) if(WITH_DOCS) - build_docs(${G_NAME}) - endif() # WITH_DOCS + + set(G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") + + set(html_file ${G_SRCDIR}/${G_HTML_FILE_NAME}) + set(HTML_FILE) + set(no_docs_list "grass_sqlp;echo;clean_temp;lock;run") + + if(EXISTS ${html_file}) + set(HTML_FILE ${html_file}) + install(FILES ${GISBASE}/docs/html/${G_HTML_FILE_NAME} DESTINATION docs/html) + else() + file(GLOB html_files ${G_SRCDIR}/*.html) + if(html_files) + if(NOT ${target_name} IN_LIST no_docs_list) + message(FATAL_ERROR "${html_file} does not exists. ${G_SRCDIR} \n ${G_RUNTIME_OUTPUT_DIR} | ${target_name}") + endif() + endif() + endif() + + + if(NOT HTML_FILE) + return() + endif() +##message("HTML_FILE=${HTML_FILE}") + +get_filename_component(HTML_FILE_NAME ${HTML_FILE} NAME) +get_filename_component(PGM_SOURCE_DIR ${HTML_FILE} PATH) + +string(REPLACE ".html" "" PGM_NAME "${HTML_FILE_NAME}" ) +string(REPLACE ".html" ".tmp.html" TMP_HTML_NAME ${HTML_FILE_NAME}) +set(TMP_HTML_FILE ${G_SRCDIR}/${TMP_HTML_NAME}) +set(OUT_HTML_FILE ${GISBASE}/docs/html/${HTML_FILE_NAME}) + +set(PGM_EXT "") +if(WIN32) + set(PGM_EXT ".exe") +endif() + +set(html_descr_argument "--html-description") +if(RUN_HTML_DESCR) +set(html_descr_command ${G_NAME}${PGM_EXT} "--html-description") +else() +set(html_descr_command ${CMAKE_COMMAND} -E echo "") +endif() + +file(GLOB IMG_FILES ${G_SRCDIR}/*.png ${G_SRCDIR}/*.jpg) +set(copy_images_command ${CMAKE_COMMAND} -E echo "") +if(IMG_FILES) + set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) +endif() + +add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRCDIR} + ${html_descr_command} > ${TMP_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRCDIR} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${PGM_NAME} > ${OUT_HTML_FILE} + COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR} + COMMAND ${copy_images_command} + COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} + COMMENT "Creating ${OUT_HTML_FILE}") + +endif() # WITH_DOCS foreach(test_SOURCE ${G_TEST_SOURCES}) add_test(NAME ${G_NAME}-test diff --git a/cmake/modules/build_py_module.cmake b/cmake/modules/build_py_module.cmake deleted file mode 100644 index 661b59b45a6..00000000000 --- a/cmake/modules/build_py_module.cmake +++ /dev/null @@ -1,150 +0,0 @@ -# AUTHOR(S): Rashad Kanavath -# PURPOSE: build_py_module is the main function that builds both scripts and gui/wxpython -# targets. build_gui_in_subdir and build_script_in_subdir are simple shortcut macros -# COPYRIGHT: (C) 2020 by the GRASS Development Team -# This program is free software under the GPL (>=v2) -# Read the file COPYING that comes with GRASS for details. - - -macro(build_gui_in_subdir dir_name) - build_py_module(NAME ${dir_name} - DST_DIR gui/wxpython - TYPE "GUI") -endmacro() - - -macro(build_script_in_subdir dir_name) - build_py_module(NAME ${dir_name} - DST_DIR etc - TYPE "SCRIPT") -endmacro() - - -function(build_py_module) - cmake_parse_arguments(G - "" - "NAME;SRC_DIR;SRC_REGEX;DST_DIR;TYPE;HTML_FILE_NAME" - "SOURCES;DEPENDS" ${ARGN} ) - - if(NOT G_SRC_DIR) - set(G_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) - endif() - - if(NOT G_SRC_REGEX) - set(G_SRC_REGEX "*.py") - endif() - - if(NOT G_TYPE) - message(FATAL_ERROR "TYPE argument is required") - endif() - - set(types "GUI;SCRIPT") - if(NOT "${G_TYPE}" IN_LIST types) - message(FATAL_ERROR "TYPE is '${G_TYPE}'. Supported values are ${types}") - endif() - - set(G_TARGET_NAME_PREFIX "") - if(G_TYPE STREQUAL "GUI") - set(G_TARGET_NAME_PREFIX "g.gui.") - endif() - - set(G_TARGET_NAME ${G_TARGET_NAME_PREFIX}${G_NAME}) - - if(G_HTML_FILE_NAME) - set(HTML_FILE_NAME ${G_HTML_FILE_NAME}) - else() - set(HTML_FILE_NAME ${G_TARGET_NAME}) - endif() - - - file(GLOB PYTHON_FILES "${G_SRC_DIR}/${G_SRC_REGEX}") - if(NOT PYTHON_FILES) - message(FATAL_ERROR "[${G_TARGET_NAME}]: No PYTHON_FILES found.") - endif() - - -# message("PYTHON_FILES=${PYTHON_FILES}") - ##################### TRANSLATE STRING FOR SCRIPTS AND GUI ##################### -if(NOT PY_MODULE_FILE) - set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) - if(EXISTS "${PY_MODULE_FILE}") - file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) - set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) - else() - set(PY_MODULE_FILE "") - set(MAIN_SCRIPT_FILE "") - endif() -endif() - -if(NOT G_TYPE STREQUAL "LIB") - if (NOT EXISTS ${PY_MODULE_FILE}) - message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") - endif() -endif()# if(NOT G_TYPE STREQUAL "LIB") - - ######################## TRANSLATE STRING FOR SCRIPTS ######################### - set(TRANSLATE_C_FILE "") - - if(G_TYPE STREQUAL "SCRIPT") - set(TRANSLATE_C_FILE - ${CMAKE_SOURCE_DIR}/locale/scriptstrings/${G_NAME}_to_translate.c) - - add_custom_command( - OUTPUT ${TRANSLATE_C_FILE} - DEPENDS g.parser ${PY_MODULE_FILE} - COMMAND ${CMAKE_COMMAND} - -DINPUT_FILE=${MAIN_SCRIPT_FILE} - -DOUTPUT_FILE=${TRANSLATE_C_FILE} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake - COMMENT "Generating ${TRANSLATE_C_FILE}" - VERBATIM) - endif() - - ## message("Adding python taret ${G_TARGET_NAME}") - - -if(G_TYPE STREQUAL "SCRIPT") - add_custom_target(${G_TARGET_NAME} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PY_MODULE_FILE} ${GISBASE}/scripts/ - DEPENDS ${TRANSLATE_C_FILE}) -else() - add_custom_target(${G_TARGET_NAME} - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/${G_DST_DIR}/${G_NAME}/ - DEPENDS ${PY_MODULE_FILE} gui_wxpython) -endif() - - set(modules_list "${G_TARGET_NAME};${modules_list}" CACHE INTERNAL "list of modules") - - if(G_TYPE STREQUAL "GUI") - set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) - endif() - - if(G_TYPE STREQUAL "SCRIPT") - set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER scripts) - endif() - - - install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) - - - if(WITH_DOCS) - - set_target_properties(${G_TARGET_NAME} PROPERTIES G_SRC_DIR "${G_SRC_DIR}") - set_target_properties(${G_TARGET_NAME} PROPERTIES G_TARGET_FILE "${MAIN_SCRIPT_FILE}") - set_target_properties(${G_TARGET_NAME} PROPERTIES RUN_HTML_DESCR TRUE) - set_target_properties(${G_TARGET_NAME} PROPERTIES PYTHON_SCRIPT TRUE) - set_target_properties(${G_TARGET_NAME} PROPERTIES G_RUNTIME_OUTPUT_DIR "${GISBASE}/scripts") - set_target_properties(${G_TARGET_NAME} PROPERTIES G_HTML_FILE_NAME "${HTML_FILE_NAME}.html") - - build_docs(${G_TARGET_NAME}) - - #add_dependencies(${G_TARGET_NAME} pylib.script pylib.exceptions) - add_dependencies(${G_TARGET_NAME} g.parser) - - endif(WITH_DOCS) - - install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) - -endfunction() diff --git a/cmake/modules/build_script_in_subdir.cmake b/cmake/modules/build_script_in_subdir.cmake new file mode 100644 index 00000000000..d00368cc139 --- /dev/null +++ b/cmake/modules/build_script_in_subdir.cmake @@ -0,0 +1,103 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: A CMake function that builds grass python script modules +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. + +function(build_script_in_subdir dir_name) + #build_py_module(NAME ${dir_name}) + set(G_NAME ${dir_name}) + + set(G_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}) + + file(GLOB PYTHON_FILES "${G_SRC_DIR}/*.py") + if(NOT PYTHON_FILES) + message(FATAL_ERROR "[${G_NAME}]: No PYTHON_FILES found.") + endif() + +if(NOT PY_MODULE_FILE) + set(PY_MODULE_FILE ${G_SRC_DIR}/${G_NAME}.py) + if(EXISTS "${PY_MODULE_FILE}") + file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) + set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_NAME}.py) + else() + set(PY_MODULE_FILE "") + set(MAIN_SCRIPT_FILE "") + endif() +endif() + +if (NOT EXISTS ${PY_MODULE_FILE}) + message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") +endif() + + set(TRANSLATE_C_FILE + ${CMAKE_SOURCE_DIR}/locale/scriptstrings/${G_NAME}_to_translate.c) +if(WIN32) + #file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) + set(PGM_NAME ${G_NAME}) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}.bat @ONLY) + set(copy_script_command ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}.bat + ${GISBASE}/scripts/${G_NAME}.bat) +else(WIN32) + set(copy_script_command ${CMAKE_COMMAND} -E echo "") +endif(WIN32) + + +add_custom_target(${G_NAME} + DEPENDS g.parser ${PY_MODULE_FILE} + COMMAND ${CMAKE_COMMAND} + -DINPUT_FILE=${MAIN_SCRIPT_FILE} + -DOUTPUT_FILE=${TRANSLATE_C_FILE} + -DBIN_DIR=${CMAKE_BINARY_DIR} + -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + COMMAND ${copy_script_command} + VERBATIM) + set(modules_list "${G_NAME};${modules_list}" CACHE INTERNAL "list of modules") + + set_target_properties (${G_NAME} PROPERTIES FOLDER scripts) + + install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) + + + set(HTML_FILE_NAME ${G_NAME}) + if(WITH_DOCS) + + file(GLOB IMG_FILES ${G_SRC_DIR}/*.png ${G_SRC_DIR}/*.jpg) +set(copy_images_command ${CMAKE_COMMAND} -E echo "") +if(IMG_FILES) + set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) +endif() + + + set(HTML_FILE ${G_SRC_DIR}/${G_NAME}.html) + if(EXISTS ${HTML_FILE}) + install(FILES ${GISBASE}/docs/html/${G_NAME}.html DESTINATION docs/html) + else() + set(HTML_FILE) + file(GLOB html_files ${G_SRC_DIR}/*.html) + if(html_files) + message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${GISBASE}/scripts| ${G_NAME}") + endif() + endif() + +set(TMP_HTML_FILE ${G_SRC_DIR}/${G_NAME}.tmp.html) +set(OUT_HTML_FILE ${GISBASE}/docs/html/${G_NAME}.html) + + +add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${G_NAME}.py "--html-description" > ${TMP_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_NAME} > ${OUT_HTML_FILE} + COMMAND ${copy_images_command} + COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${GISBASE}/scripts/ + COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} + COMMENT "Creating ${OUT_HTML_FILE}") + + +endif(WITH_DOCS) + +endfunction() \ No newline at end of file diff --git a/cmake/windows_launch.bat.in b/cmake/windows_launch.bat.in index c689d36fd30..aa03bb369bf 100644 --- a/cmake/windows_launch.bat.in +++ b/cmake/windows_launch.bat.in @@ -1,2 +1,2 @@ @echo off -"@GRASS_PYTHON@" "@bin_dir@\scripts\@G_NAME@.py" %* +"%GRASS_PYTHON%" "%GISBASE%\scripts\@PGM_NAME@.py" %* \ No newline at end of file diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 29d3364372f..45b2e2f5d2a 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -14,8 +14,7 @@ endforeach() add_custom_target(gui_wxpython COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py ${WXPYTHON_DIR}/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py ${WXPYTHON_DIR}/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/ - DEPENDS ${gui_lib_targets}) + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/) set(gui_DIRS animation datacatalog dbmgr gcp gmodeler iclass image2target mapswipe photo2image psmap rlisetup timeline tplot vdigit) From a0882433d348a326da82f37279b4ea116cbdd34f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 22:24:53 +0100 Subject: [PATCH 255/264] fix find scripts on windows --- cmake/find_scripts/FindLibLAS.cmake | 29 +++++++++++-------------- cmake/find_scripts/FindPostgreSQL.cmake | 1 + 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/cmake/find_scripts/FindLibLAS.cmake b/cmake/find_scripts/FindLibLAS.cmake index f2617df978e..75383dc818c 100644 --- a/cmake/find_scripts/FindLibLAS.cmake +++ b/cmake/find_scripts/FindLibLAS.cmake @@ -2,37 +2,34 @@ find_path(LibLAS_INCLUDE_DIR NAMES liblas.h PATH_SUFFIXES capi PATH_SUFFIXES liblas/capi - DOC "path to liblas.h" -) - + DOC "path to liblas.h") find_library(LibLAS_C_LIBRARY - NAMES liblas_c + NAMES liblas_c las_c las # Help the user find it if we cannot. DOC "path liblas_c library") - if (LibLAS_INCLUDE_DIR) -unset(las_version_CONTENTS) + unset(las_version_CONTENTS) file(READ "${LibLAS_INCLUDE_DIR}/las_version.h" las_version_CONTENTS) - STRING(REGEX MATCH "#define +LIBLAS_VERSION_MAJOR +([0-9]+)" _dummy "${las_version_CONTENTS}") - SET(LibLAS_VERSION_MAJOR "${CMAKE_MATCH_1}") + STRING(REGEX MATCH "#define +LIBLAS_VERSION_MAJOR +([0-9]+)" _dummy "${las_version_CONTENTS}") + SET(LibLAS_VERSION_MAJOR "${CMAKE_MATCH_1}") string(REGEX MATCH "#define +LIBLAS_VERSION_MINOR +([0-9])" _dummy "${las_version_CONTENTS}") set(LibLAS_VERSION_MINOR "${CMAKE_MATCH_1}") - string(REGEX MATCH "#define +LIBLAS_VERSION_REV +([0-9])" _dummy "${las_version_CONTENTS}") + string(REGEX MATCH "#define +LIBLAS_VERSION_REV +([0-9])" _dummy "${las_version_CONTENTS}") set(LIBLAS_VERSION_REV "${CMAKE_MATCH_1}") - + set(LibLAS_VERSION_STRING - "${LibLAS_VERSION_MAJOR}.${LibLAS_VERSION_MINOR}.${LIBLAS_VERSION_REV}") + "${LibLAS_VERSION_MAJOR}.${LibLAS_VERSION_MINOR}.${LIBLAS_VERSION_REV}") endif() #message(FATAL_ERROR "LibLAS_LIBRARY=${LibLAS_LIBRARY}") if(LibLAS_INCLUDE_DIR AND LibLAS_C_LIBRARY) - set(LibLAS_FOUND TRUE) + set(LibLAS_FOUND TRUE) endif() - include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LibLAS - REQUIRED_VARS LibLAS_C_LIBRARY LibLAS_INCLUDE_DIR - VERSION_VAR LibLAS_VERSION_STRING) +find_package_handle_standard_args( + LibLAS + REQUIRED_VARS LibLAS_C_LIBRARY LibLAS_INCLUDE_DIR + VERSION_VAR LibLAS_VERSION_STRING) diff --git a/cmake/find_scripts/FindPostgreSQL.cmake b/cmake/find_scripts/FindPostgreSQL.cmake index 0683d82e2d3..74fc4901d8d 100644 --- a/cmake/find_scripts/FindPostgreSQL.cmake +++ b/cmake/find_scripts/FindPostgreSQL.cmake @@ -65,6 +65,7 @@ find_path(PostgreSQL_TYPE_INCLUDE_DIR postgresql pgsql/server postgresql/server + postgresql/9.5/server include/server # Help the user find it if we cannot. From 511b542b92f75eeaf1dd4062f79c114c4c73b04a Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 22:26:41 +0100 Subject: [PATCH 256/264] fix always out of date for custom targets --- cmake/copy_g_gui_module.cmake | 35 +++++ cmake/locale_strings.cmake | 63 ++++++++- cmake/modules/build_gui_in_subdir.cmake | 136 ++++++++++-------- cmake/modules/build_module.cmake | 8 +- cmake/modules/build_script_in_subdir.cmake | 154 ++++++++++----------- gui/CMakeLists.txt | 13 +- gui/icons/CMakeLists.txt | 39 +++--- gui/images/CMakeLists.txt | 18 +-- gui/wxpython/CMakeLists.txt | 11 +- gui/wxpython/docs/CMakeLists.txt | 13 ++ include/CMakeLists.txt | 2 +- lib/python/CMakeLists.txt | 6 +- scripts/CMakeLists.txt | 24 +++- thirdparty/CMakeLists.txt | 8 +- 14 files changed, 323 insertions(+), 207 deletions(-) create mode 100644 cmake/copy_g_gui_module.cmake create mode 100644 gui/wxpython/docs/CMakeLists.txt diff --git a/cmake/copy_g_gui_module.cmake b/cmake/copy_g_gui_module.cmake new file mode 100644 index 00000000000..78f54c96e32 --- /dev/null +++ b/cmake/copy_g_gui_module.cmake @@ -0,0 +1,35 @@ +# AUTHOR(S): Rashad Kanavath +# PURPOSE: Copy g.gui script plus .bat file if on windows +# COPYRIGHT: (C) 2020 by the GRASS Development Team +# This program is free software under the GPL (>=v2) +# Read the file COPYING that comes with GRASS for details. +# -DSOURCE_DIR +# -DGISBASE +# -DG_NAME +# -DSRC_SCRIPT_FILE +# -DBINARY_DIR + +set(SCRIPT_EXT "") +if(WIN32) + set(SCRIPT_EXT ".py") +endif() + +if(WIN32) + set(PGM_NAME ${G_NAME}) + configure_file( + ${SOURCE_DIR}/cmake/windows_launch.bat.in + ${GISBASE}/bin/${G_NAME}.bat @ONLY) +endif(WIN32) + +set(TMP_SCRIPT_FILE ${BINARY_DIR}/CMakeFiles/${G_NAME}${SCRIPT_EXT}) +configure_file(${SRC_SCRIPT_FILE} ${TMP_SCRIPT_FILE} COPYONLY) +file( + COPY ${TMP_SCRIPT_FILE} + DESTINATION ${GISBASE}/scripts/ + FILE_PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + + +file(REMOVE ${TMP_SCRIPT_FILE}) diff --git a/cmake/locale_strings.cmake b/cmake/locale_strings.cmake index 95d09556767..fe1bed4c6d5 100644 --- a/cmake/locale_strings.cmake +++ b/cmake/locale_strings.cmake @@ -4,17 +4,67 @@ # COPYRIGHT: (C) 2020 by the GRASS Development Team # This program is free software under the GPL (>=v2) # Read the file COPYING that comes with GRASS for details. +#-DBINARY_DIR= +#-DG_NAME= +#-DSRC_SCRIPT_FILE= +#-DOUTPUT_FILE= +#-DSOURCE_DIR= -set(ENV{GISRC} "${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}") -set(ENV{GISBASE} "${BIN_DIR}") -set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}") -set(ENV{PYTHONPATH} "${BIN_DIR}/gui/wxpython:${BIN_DIR}/etc/python:$ENV{PYTHONPATH}") +set(GISBASE ${BINARY_DIR}/gisbase) +file(TO_NATIVE_PATH "${GISBASE}" GISBASE_NATIVE) +file(TO_NATIVE_PATH "${GISBASE}/etc/config/rc" GISRC) +file(TO_NATIVE_PATH "${BINARY_DIR}/bin" BINARY_DIR) +file(TO_NATIVE_PATH "${BINARY_DIR}/lib" LIB_DIR) +file(TO_NATIVE_PATH "${SOURCE_DIR}" MODULE_TOPDIR) +file(TO_NATIVE_PATH "${GISBASE}/scripts" SCRIPTS_DIR) +file(TO_NATIVE_PATH "${GISBASE}/etc/python" ETC_PYTHON_DIR) +file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" GUI_WXPYTHON_DIR) + +if(WIN32) + set(sep "\;") + set(env_path "") +else() + set(sep ":") + set(env_path ":$ENV{PATH}") +endif() + +set(ENV{GISBASE} "${GISBASE_NATIVE}") +set(ENV{GISRC} ${GISRC}) +set(ENV{PATH} "${BINARY_DIR}${sep}${SCRIPTS_DIR}${env_path}") +set(ENV{PYTHONPATH} "${ETC_PYTHON_DIR}${sep}${GUI_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}") if(NOT MSVC) - set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}/lib:$ENV{LD_LIBRARY_PATH}") + set(ENV{LD_LIBRARY_PATH} "${LIB_DIR}${sep}$ENV{LD_LIBRARY_PATH}") endif() set(ENV{LC_ALL} C) +set(ENV{LANG} C) +set(ENV{LANGUAGE} C) +set(ENV{MODULE_TOPDIR} ${MODULE_TOPDIR}) + +set(SCRIPT_EXT "") +if(WIN32) + set(SCRIPT_EXT ".py") +endif() + +if(WIN32) + set(PGM_NAME ${G_NAME}) + configure_file( + ${SOURCE_DIR}/cmake/windows_launch.bat.in + ${GISBASE}/bin/${G_NAME}.bat @ONLY) +endif(WIN32) + +set(TMP_SCRIPT_FILE ${BINARY_DIR}/CMakeFiles/${G_NAME}${SCRIPT_EXT}) +configure_file(${SRC_SCRIPT_FILE} ${TMP_SCRIPT_FILE} COPYONLY) +file( + COPY ${TMP_SCRIPT_FILE} + DESTINATION ${GISBASE}/scripts/ + FILE_PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + -execute_process(COMMAND ${BIN_DIR}/bin/g.parser -t ${INPUT_FILE} +execute_process(COMMAND + ${BINARY_DIR}/bin/g.parser -t ${GISBASE}/scripts/${G_NAME}${SCRIPT_EXT} OUTPUT_VARIABLE run_g_parser_OV ERROR_VARIABLE run_g_parser_EV RESULT_VARIABLE run_g_parser_RV) @@ -29,3 +79,4 @@ endforeach() string(REGEX REPLACE ";" "\n" output_to_write "${output_to_write}") file(WRITE "${OUTPUT_FILE}" "${output_to_write}\n") +file(REMOVE ${TMP_SCRIPT_FILE}) diff --git a/cmake/modules/build_gui_in_subdir.cmake b/cmake/modules/build_gui_in_subdir.cmake index c206d6ffab8..12d51e64d9a 100644 --- a/cmake/modules/build_gui_in_subdir.cmake +++ b/cmake/modules/build_gui_in_subdir.cmake @@ -16,78 +16,92 @@ function(build_gui_in_subdir dir_name) message(FATAL_ERROR "[${G_TARGET_NAME}]: No PYTHON_FILES found.") endif() - if(NOT PY_MODULE_FILE) - set(PY_MODULE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) - if(EXISTS "${PY_MODULE_FILE}") - file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) - set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_TARGET_NAME}.py) - else() - set(PY_MODULE_FILE "") - set(MAIN_SCRIPT_FILE "") - endif() - endif() + set(SRC_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${G_NAME}/${G_TARGET_NAME}.py) - if (NOT EXISTS ${PY_MODULE_FILE}) - message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") + if (NOT EXISTS ${SRC_SCRIPT_FILE}) + message(FATAL_ERROR "${SRC_SCRIPT_FILE} does not exists") endif() + + set(SCRIPT_EXT "") if(WIN32) - #file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) - set(PGM_NAME ${G_TARGET_NAME}) - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_TARGET_NAME}.bat @ONLY) - set(copy_script_command ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_TARGET_NAME}.bat - ${GISBASE}/scripts/${G_TARGET_NAME}.bat) -else(WIN32) - set(copy_script_command ${CMAKE_COMMAND} -E echo "") -endif(WIN32) - add_custom_target(${G_TARGET_NAME} - COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/wxpython/${G_NAME}/ - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/gui/wxpython/${G_NAME}/ - COMMAND ${copy_script_command} - DEPENDS g.parser ${gui_lib_targets}) + set(SCRIPT_EXT ".py") + endif() + set(GUI_STAMP_FILE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}.stamp) + + ADD_CUSTOM_COMMAND(OUTPUT ${GUI_STAMP_FILE} + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/wxpython/${G_NAME}/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PYTHON_FILES} ${GISBASE}/gui/wxpython/${G_NAME}/ + COMMAND ${CMAKE_COMMAND} -E touch ${GUI_STAMP_FILE}) + + set(OUT_SCRIPT_FILE ${GISBASE}/scripts/${G_TARGET_NAME}${SCRIPT_EXT}) + ADD_CUSTOM_COMMAND(OUTPUT ${OUT_SCRIPT_FILE} + COMMAND ${CMAKE_COMMAND} + -DSOURCE_DIR=${CMAKE_SOURCE_DIR} + -DBINARY_DIR=${CMAKE_BINARY_DIR} + -DSRC_SCRIPT_FILE=${SRC_SCRIPT_FILE} + -DG_NAME=${G_TARGET_NAME} + -DGISBASE=${GISBASE} + -P ${CMAKE_SOURCE_DIR}/cmake/copy_g_gui_module.cmake + DEPENDS g.parser ${SRC_SCRIPT_FILE}) + - set(modules_list "${G_TARGET_NAME};${modules_list}" CACHE INTERNAL "list of modules") + if(WITH_DOCS) - set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) + file(GLOB IMG_FILES ${G_SRC_DIR}/*.png ${G_SRC_DIR}/*.jpg) + set(copy_images_command ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_TARGET_NAME}) + if(IMG_FILES) + set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) + endif() + + set(HTML_FILE ${G_SRC_DIR}/${G_TARGET_NAME}.html) + if(EXISTS ${HTML_FILE}) + install(FILES ${GISBASE}/docs/html/${G_TARGET_NAME}.html DESTINATION docs/html) + else() + set(HTML_FILE) + file(GLOB html_files ${G_SRC_DIR}/*.html) + if(html_files) + message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${GISBASE}/scripts| ${G_TARGET_NAME}") + endif() + endif() + + set(TMP_HTML_FILE ${G_SRC_DIR}/${G_TARGET_NAME}.tmp.html) + set(OUT_HTML_FILE ${GISBASE}/docs/html/${G_TARGET_NAME}.html) + set(GUI_HTML_FILE ${GISBASE}/docs/html/wxGUI.${G_NAME}.html) - install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) + ADD_CUSTOM_COMMAND(OUTPUT ${OUT_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${G_TARGET_NAME}.py "--html-description" > ${TMP_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_TARGET_NAME} ${GRASS_VERSION_DATE} > ${OUT_HTML_FILE} + COMMENT "Creating ${OUT_HTML_FILE}" + COMMAND ${copy_images_command} + COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_TARGET_NAME} ${GRASS_VERSION_DATE} > ${GUI_HTML_FILE} + COMMENT "Creating ${GUI_HTML_FILE}" + DEPENDS ${OUT_SCRIPT_FILE} GUI_WXPYTHON LIB_PYTHON + ) - if(WITH_DOCS) + install(FILES ${OUT_HTML_FILE} DESTINATION docs/html/) - file(GLOB IMG_FILES ${G_SRC_DIR}/*.png ${G_SRC_DIR}/*.jpg) -set(copy_images_command ${CMAKE_COMMAND} -E echo "") -if(IMG_FILES) - set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) -endif() + endif() #WITH_DOCS - set(HTML_FILE ${G_SRC_DIR}/${G_TARGET_NAME}.html) - if(EXISTS ${HTML_FILE}) - install(FILES ${GISBASE}/docs/html/${G_TARGET_NAME}.html DESTINATION docs/html) - else() - set(HTML_FILE) - file(GLOB html_files ${G_SRC_DIR}/*.html) - if(html_files) - message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${GISBASE}/scripts| ${G_TARGET_NAME}") - endif() + + ADD_CUSTOM_TARGET(${G_TARGET_NAME} + DEPENDS ${GUI_STAMP_FILE} ${OUT_SCRIPT_FILE} ${OUT_HTML_FILE}) + + + set(modules_list "${G_TARGET_NAME};${modules_list}" CACHE INTERNAL "list of modules") + + set_target_properties (${G_TARGET_NAME} PROPERTIES FOLDER gui) + + + if(WIN32) + install(PROGRAMS ${GISBASE}/scripts/${G_TARGET_NAME}.bat DESTINATION scripts) endif() + + install(PROGRAMS ${GISBASE}/scripts/${G_TARGET_NAME}${SCRIPT_EXT} DESTINATION scripts) -set(TMP_HTML_FILE ${G_SRC_DIR}/${G_TARGET_NAME}.tmp.html) -set(OUT_HTML_FILE ${GISBASE}/docs/html/${G_TARGET_NAME}.html) - -add_custom_command(TARGET ${G_TARGET_NAME} POST_BUILD - COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} - ${PYTHON_EXECUTABLE} ${G_TARGET_NAME}.py "--html-description" > ${TMP_HTML_FILE} - COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} - ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_TARGET_NAME} > ${OUT_HTML_FILE} - COMMAND ${copy_images_command} - COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${GISBASE}/scripts/ - COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} - COMMENT "Creating ${OUT_HTML_FILE}") - - endif(WITH_DOCS) - ##install(FILES ${PYTHON_FILES} DESTINATION etc/${G_NAME}) endfunction() diff --git a/cmake/modules/build_module.cmake b/cmake/modules/build_module.cmake index 299af23ba02..9a87e5d03e6 100644 --- a/cmake/modules/build_module.cmake +++ b/cmake/modules/build_module.cmake @@ -1,3 +1,4 @@ + # AUTHOR(S): Rashad Kanavath # PURPOSE: This is the main function that builds all grass libraries (prefixed with grass_) # and grass exeuctables. This cmake function is tailored to meet requirement of grass gnu make rules @@ -213,6 +214,9 @@ function(build_module) if(NOT HTML_FILE) + add_custom_command(TARGET ${G_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${G_RUNTIME_OUTPUT_DIR} + ) return() endif() ##message("HTML_FILE=${HTML_FILE}") @@ -234,11 +238,11 @@ set(html_descr_argument "--html-description") if(RUN_HTML_DESCR) set(html_descr_command ${G_NAME}${PGM_EXT} "--html-description") else() -set(html_descr_command ${CMAKE_COMMAND} -E echo "") + set(html_descr_command ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}) endif() file(GLOB IMG_FILES ${G_SRCDIR}/*.png ${G_SRCDIR}/*.jpg) -set(copy_images_command ${CMAKE_COMMAND} -E echo "") +set(copy_images_command ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}) if(IMG_FILES) set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) endif() diff --git a/cmake/modules/build_script_in_subdir.cmake b/cmake/modules/build_script_in_subdir.cmake index d00368cc139..cc09a1cef32 100644 --- a/cmake/modules/build_script_in_subdir.cmake +++ b/cmake/modules/build_script_in_subdir.cmake @@ -15,89 +15,83 @@ function(build_script_in_subdir dir_name) message(FATAL_ERROR "[${G_NAME}]: No PYTHON_FILES found.") endif() -if(NOT PY_MODULE_FILE) - set(PY_MODULE_FILE ${G_SRC_DIR}/${G_NAME}.py) - if(EXISTS "${PY_MODULE_FILE}") - file(COPY ${PY_MODULE_FILE} DESTINATION ${CMAKE_BINARY_DIR}/scripts/) - set(MAIN_SCRIPT_FILE ${CMAKE_BINARY_DIR}/scripts/${G_NAME}.py) - else() - set(PY_MODULE_FILE "") - set(MAIN_SCRIPT_FILE "") - endif() -endif() -if (NOT EXISTS ${PY_MODULE_FILE}) - message(FATAL_ERROR "${PY_MODULE_FILE} does not exists") -endif() + set(SRC_SCRIPT_FILE ${G_SRC_DIR}/${G_NAME}.py) - set(TRANSLATE_C_FILE - ${CMAKE_SOURCE_DIR}/locale/scriptstrings/${G_NAME}_to_translate.c) -if(WIN32) - #file(INSTALL ${G_TARGET_FILE} DESTINATION ${OUTPUT_DIR} USE_SOURCE_PERMISSIONS) - set(PGM_NAME ${G_NAME}) - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/windows_launch.bat.in - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}.bat @ONLY) - set(copy_script_command ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}.bat - ${GISBASE}/scripts/${G_NAME}.bat) -else(WIN32) - set(copy_script_command ${CMAKE_COMMAND} -E echo "") -endif(WIN32) - - -add_custom_target(${G_NAME} - DEPENDS g.parser ${PY_MODULE_FILE} - COMMAND ${CMAKE_COMMAND} - -DINPUT_FILE=${MAIN_SCRIPT_FILE} - -DOUTPUT_FILE=${TRANSLATE_C_FILE} - -DBIN_DIR=${CMAKE_BINARY_DIR} - -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake - COMMAND ${copy_script_command} - VERBATIM) - set(modules_list "${G_NAME};${modules_list}" CACHE INTERNAL "list of modules") - - set_target_properties (${G_NAME} PROPERTIES FOLDER scripts) - - install(PROGRAMS ${MAIN_SCRIPT_FILE} DESTINATION scripts) - - - set(HTML_FILE_NAME ${G_NAME}) - if(WITH_DOCS) - - file(GLOB IMG_FILES ${G_SRC_DIR}/*.png ${G_SRC_DIR}/*.jpg) -set(copy_images_command ${CMAKE_COMMAND} -E echo "") -if(IMG_FILES) - set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) -endif() - - - set(HTML_FILE ${G_SRC_DIR}/${G_NAME}.html) - if(EXISTS ${HTML_FILE}) - install(FILES ${GISBASE}/docs/html/${G_NAME}.html DESTINATION docs/html) - else() - set(HTML_FILE) - file(GLOB html_files ${G_SRC_DIR}/*.html) - if(html_files) - message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${GISBASE}/scripts| ${G_NAME}") - endif() + if (NOT EXISTS ${SRC_SCRIPT_FILE}) + message(FATAL_ERROR "${SRC_SCRIPT_FILE} does not exists") + return() endif() -set(TMP_HTML_FILE ${G_SRC_DIR}/${G_NAME}.tmp.html) -set(OUT_HTML_FILE ${GISBASE}/docs/html/${G_NAME}.html) - - -add_custom_command(TARGET ${G_NAME} POST_BUILD - COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} - ${PYTHON_EXECUTABLE} ${G_NAME}.py "--html-description" > ${TMP_HTML_FILE} - COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} - ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_NAME} > ${OUT_HTML_FILE} - COMMAND ${copy_images_command} - COMMAND ${CMAKE_COMMAND} -E copy ${PY_MODULE_FILE} ${GISBASE}/scripts/ - COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} - COMMENT "Creating ${OUT_HTML_FILE}") + set(SCRIPT_EXT "") + if(WIN32) + set(SCRIPT_EXT ".py") + endif() + + set(TRANSLATE_C_FILE + ${CMAKE_SOURCE_DIR}/locale/scriptstrings/${G_NAME}_to_translate.c) + + ADD_CUSTOM_COMMAND(OUTPUT ${TRANSLATE_C_FILE} + COMMAND ${CMAKE_COMMAND} + -DBINARY_DIR=${CMAKE_BINARY_DIR} + -DG_NAME=${G_NAME} + -DSRC_SCRIPT_FILE=${SRC_SCRIPT_FILE} + -DSOURCE_DIR=${CMAKE_SOURCE_DIR} + -DOUTPUT_FILE=${TRANSLATE_C_FILE} + -P ${CMAKE_SOURCE_DIR}/cmake/locale_strings.cmake + DEPENDS g.parser) + + set(HTML_FILE_NAME ${G_NAME}) + set(OUT_HTML_FILE "") + + if(WITH_DOCS) -endif(WITH_DOCS) - -endfunction() \ No newline at end of file + file(GLOB IMG_FILES ${G_SRC_DIR}/*.png ${G_SRC_DIR}/*.jpg) + set(copy_images_command ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${G_NAME}) + if(IMG_FILES) + set(copy_images_command ${CMAKE_COMMAND} -E copy ${IMG_FILES} ${GISBASE}/docs/html/) + endif() + + set(HTML_FILE ${G_SRC_DIR}/${G_NAME}.html) + if(EXISTS ${HTML_FILE}) + install(FILES ${GISBASE}/docs/html/${G_NAME}.html DESTINATION docs/html) + else() + set(HTML_FILE) + file(GLOB html_files ${G_SRC_DIR}/*.html) + if(html_files) + message(FATAL_ERROR "${html_file} does not exists. ${G_SRC_DIR} \n ${GISBASE}/scripts| ${G_NAME}") + endif() + endif() + + set(TMP_HTML_FILE ${G_SRC_DIR}/${G_NAME}.tmp.html) + set(OUT_HTML_FILE ${GISBASE}/docs/html/${G_NAME}.html) + + + ADD_CUSTOM_COMMAND(OUTPUT ${OUT_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${G_NAME}.py "--html-description" > ${TMP_HTML_FILE} + COMMAND ${grass_env_command} ${CMAKE_COMMAND} -E chdir ${G_SRC_DIR} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} ${G_NAME} > ${OUT_HTML_FILE} + COMMAND ${copy_images_command} + COMMAND ${CMAKE_COMMAND} -E remove ${TMP_HTML_FILE} + COMMENT "Creating ${OUT_HTML_FILE}" + DEPENDS ${TRANSLATE_C_FILE} LIB_PYTHON) + + install(FILES ${OUT_HTML_FILE} DESTINATION docs/html/) + + endif() #WITH_DOCS + + ADD_CUSTOM_TARGET(${G_NAME} DEPENDS ${TRANSLATE_C_FILE} ${OUT_HTML_FILE}) + + set(modules_list "${G_NAME};${modules_list}" CACHE INTERNAL "list of modules") + + set_target_properties (${G_NAME} PROPERTIES FOLDER scripts) + + if(WIN32) + install(PROGRAMS ${GISBASE}/scripts/${G_NAME}.bat DESTINATION scripts) + endif() + + install(PROGRAMS ${GISBASE}/scripts/${G_NAME}${SCRIPT_EXT} DESTINATION scripts) + +endfunction() diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index d3f053a5fa5..04d60dd4d9f 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,16 +1,9 @@ -#TODO -add_subdirectory(icons) -# images -#file(GLOB gui_images "${CMAKE_CURRENT_SOURCE_DIR}/images/*.png") -#install(FILES ${gui_images} DESTINATION gui/images ) -add_custom_target(copy_gui_images -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_BINARY_DIR}/gui/ -DEPENDS copy_gui_icons_flags) -install(DIRECTORY images DESTINATION gui) +add_subdirectory(icons) +add_subdirectory(images) + -#add_subdirectory(images) #add_subdirectory(scripts) diff --git a/gui/icons/CMakeLists.txt b/gui/icons/CMakeLists.txt index bf3b6227f2a..c17f9f43d87 100644 --- a/gui/icons/CMakeLists.txt +++ b/gui/icons/CMakeLists.txt @@ -1,30 +1,25 @@ file(GLOB SRCICO "*.ico" "*.png") file(GLOB SRCICONS "grass/*.png") file(GLOB SRCFLAGS "flags/*.png") - -add_custom_target(make_images_dir -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gui/icons/grass -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gui/flags -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/docs/html/icons -COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gui/images/symbols) - -add_custom_target(copy_gui_icons -COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${CMAKE_BINARY_DIR}/gui/icons/ -DEPENDS make_images_dir) - -add_custom_target(copy_gui_icons_grass -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/grass ${CMAKE_BINARY_DIR}/gui/icons/ -DEPENDS copy_gui_icons) - -add_custom_target(copy_gui_icons_flags +set(icons_stamp_file ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/GUI_ICONS.stamp) +add_custom_command(OUTPUT ${icons_stamp_file} +COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/icons/grass +COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/flags +COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/docs/html/icons +COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/images/symbols +COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${GISBASE}/gui/icons/ +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/grass ${GISBASE}/gui/icons/ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/flags ${CMAKE_BINARY_DIR}/gui/icons/ -DEPENDS copy_gui_icons_grass) - -foreach(icon_file ${SRCICONS}) - add_custom_command(TARGET copy_gui_icons_flags POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${icon_file} ${CMAKE_BINARY_DIR}/docs/html/ - COMMENT "Copying icon: ${icon_file}") +COMMAND ${CMAKE_COMMAND} -E touch ${icons_stamp_file}) + +set(output_icons) +foreach(SRCICON ${SRCICONS}) + get_filename_component(FILE_NAME ${SRCICON} NAME) + add_custom_command(OUTPUT ${GISBASE}/docs/html/${FILE_NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${SRCICON} ${GISBASE}/docs/html) + list(APPEND output_icons ${GISBASE}/docs/html/${FILE_NAME}) endforeach() +add_custom_target(copy_gui_icons DEPENDS ${output_icons} ${icons_stamp_file}) install(FILES ${SRCICO} DESTINATION gui/icons) install(FILES ${SRCICONS} DESTINATION gui/icons/grass) diff --git a/gui/images/CMakeLists.txt b/gui/images/CMakeLists.txt index f6e10ccbbfe..dae7887c356 100644 --- a/gui/images/CMakeLists.txt +++ b/gui/images/CMakeLists.txt @@ -1,13 +1,13 @@ - # symbols -add_custom_target(copy_gui_symbols -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/basic ${CMAKE_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/demo ${CMAKE_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extra ${CMAKE_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/geology ${CMAKE_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/legend ${CMAKE_BINARY_DIR}/gui/images/symbols/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/n_arrows ${CMAKE_BINARY_DIR}/gui/images/symbols/ -DEPENDS copy_gui_images) + +set(images_stamp_file ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/GUI_IMAGES.stamp) + +add_custom_command(OUTPUT ${images_stamp_file} +COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/symbols/ ${GISBASE}/gui/images/ +COMMAND ${CMAKE_COMMAND} -E touch ${images_stamp_file} +) + +add_custom_target(copy_gui_images DEPENDS copy_gui_icons ${images_stamp_file}) install(DIRECTORY basic DESTINATION gui/images/symbols/) install(DIRECTORY demo DESTINATION gui/images/symbols/) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 45b2e2f5d2a..71fb0a0decf 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -11,10 +11,11 @@ foreach(gui_lib_DIR ${gui_lib_DIRS}) copy_python_files_in_subdir(${gui_lib_DIR} gui/wxpython) list(APPEND gui_lib_targets python_${gui_lib_DIR}) endforeach() -add_custom_target(gui_wxpython +add_custom_target(GUI_WXPYTHON COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set.py ${WXPYTHON_DIR}/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gis_set_error.py ${WXPYTHON_DIR}/ - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/) + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/ + DEPENDS ${gui_lib_targets}) set(gui_DIRS animation datacatalog dbmgr gcp gmodeler iclass image2target mapswipe photo2image psmap rlisetup timeline tplot vdigit) @@ -25,6 +26,7 @@ foreach(gui_DIR ${gui_DIRS}) endforeach() +add_subdirectory(docs) install(FILES README DESTINATION gui/wxpython) @@ -35,8 +37,7 @@ install(FILES README DESTINATION gui/wxpython) add_custom_target(copy_wxpython_xml COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xml ${WXPYTHON_DIR}/xml/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../xml/grass-interface.dtd ${GISBASE}/gui/ - ##### DEPENDS copy_gui_images - DEPENDS gui_wxpython) + DEPENDS GUI_WXPYTHON) add_custom_target(compile_python_files COMMAND ${PYTHON_EXECUTABLE} -m compileall ${GISBASE}/scripts @@ -73,4 +74,4 @@ add_custom_target(build_menustrings ALL ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "psmap" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py - DEPENDS build_module_tree_menudata) + DEPENDS build_module_tree_menudata copy_gui_images) diff --git a/gui/wxpython/docs/CMakeLists.txt b/gui/wxpython/docs/CMakeLists.txt new file mode 100644 index 00000000000..a04446a98ba --- /dev/null +++ b/gui/wxpython/docs/CMakeLists.txt @@ -0,0 +1,13 @@ + +set(wxpython_html_files) + +ADD_CUSTOM_COMMAND(OUTPUT ${GISBASE}/docs/html/wxGUI.components.html + COMMAND ${grass_env_command} + ${PYTHON_EXECUTABLE} ${MKHTML_PY} wxGUI.components ${GRASS_VERSION_DATE} > ${GISBASE}/docs/html/wxGUI.components.html + COMMENT "Creating ${GISBASE}/docs/html/wxGUI.components.html" + DEPENDS GUI_WXPYTHON LIB_PYTHON + ) + +list(APPEND wxpython_html_files ${GISBASE}/docs/html/wxGUI.components.html) + +ADD_CUSTOM_TARGET(wxpython_docs DEPENDS ${wxpython_html_files}) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index c54cb46fae9..eaee72ad362 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -258,7 +258,7 @@ foreach(srch ${SRCHS}) list(APPEND include_depends ${output_dir}/${srch_NAME} ) endforeach() -add_custom_target(copy_header DEPENDS ${include_depends} python) +add_custom_target(copy_header DEPENDS ${include_depends} LIB_PYTHON) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/grass/version.h") diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt index 9becf9a6ada..d5c83185200 100644 --- a/lib/python/CMakeLists.txt +++ b/lib/python/CMakeLists.txt @@ -23,7 +23,7 @@ configure_file(script/setup.py ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py COPYONLY) -add_custom_target(python +add_custom_target(LIB_PYTHON COMMAND ${CMAKE_COMMAND} -E echo "#coding=utf-8" > ${GISBASE}/etc/python/__init__.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${GISBASE}/etc/python/grass/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/etc/python/grass/script/setup.py ${GISBASE}/etc/python/grass/script/ @@ -37,6 +37,6 @@ add_custom_target(python #TODO: MODULES DISABLED # add_subdirectory(ctypes) -set_target_properties (python PROPERTIES FOLDER lib) +set_target_properties (LIB_PYTHON PROPERTIES FOLDER lib) -install(DIRECTORY ${GISBASE}/etc/python/grass DESTINATION etc/python/grass/) \ No newline at end of file +install(DIRECTORY ${GISBASE}/etc/python/grass DESTINATION etc/python/grass/) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index dd5a4c9d4c9..54aa07d1fdf 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -73,14 +73,30 @@ set(script_DIRS v.unpack v.what.strds v.what.vect + wxpyimgview + r.mapcalc.simple + r.in.wms ) -#TODO: MODULES DISABLED -#wxpyimgview foreach(script_DIR ${script_DIRS}) build_script_in_subdir(${script_DIR}) endforeach() - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms -DESTINATION ${CMAKE_BINARY_DIR}/etc/) + DESTINATION ${CMAKE_BINARY_DIR}/etc/) + +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/wxpyimgview/wxpyimgview_gui.py + DESTINATION ${CMAKE_BINARY_DIR}/etc/) + +add_custom_target(r.in.wms_files + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/r.in.wms/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms/wms_base.py ${GISBASE}/etc/r.in.wms/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms/wms_cap_parsers.py ${GISBASE}/etc/r.in.wms/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms/wms_drv.py ${GISBASE}/etc/r.in.wms/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms/wms_gdal_drv.py ${GISBASE}/etc/r.in.wms/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/r.in.wms/srs.py ${GISBASE}/etc/r.in.wms/ + DEPENDS v.to.lines + ) +add_dependencies(r.in.wms r.in.wms_files) + + set_target_properties (r.in.wms_files PROPERTIES FOLDER scripts) \ No newline at end of file diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 9f90faaa1ac..766989972ea 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -136,11 +136,11 @@ set_property(TARGET PDAL PROPERTY INTERFACE_LINK_LIBRARIES ${PDAL_LIBRARIES} ) set_property(TARGET PDAL PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PDAL_INCLUDE_DIRS} ) endif() -find_package(libLAS QUIET) +find_package(LibLAS QUIET) if(LIBLAS_FOUND) -add_library(LIBLAS INTERFACE IMPORTED GLOBAL) -set_property(TARGET LIBLAS PROPERTY INTERFACE_LINK_LIBRARIES ${LibLAS_C_LIBRARY} ) -set_property(TARGET LIBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LibLAS_INCLUDE_DIR} ) + add_library(LIBLAS INTERFACE IMPORTED GLOBAL) + set_property(TARGET LIBLAS PROPERTY INTERFACE_LINK_LIBRARIES ${LibLAS_C_LIBRARY} ) + set_property(TARGET LIBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LibLAS_INCLUDE_DIR} ) endif() find_package(NetCDF QUIET) From f493d49a63baf0ece70ba1037d9fc53cfb574240 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 22:27:08 +0100 Subject: [PATCH 257/264] fix missing optional dependds to grass gis library --- lib/gis/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gis/CMakeLists.txt b/lib/gis/CMakeLists.txt index 1ca84004591..49a825d61d5 100644 --- a/lib/gis/CMakeLists.txt +++ b/lib/gis/CMakeLists.txt @@ -35,7 +35,7 @@ endif() build_module(NAME grass_gis SOURCES "${gislib_SRCS}" DEPENDS grass_datetime ZLIB - OPTIONAL_DEPENDS PTHREAD BZIP2 ICONV + OPTIONAL_DEPENDS PTHREAD BZIP2 ICONV POSTGRES DEFS "${grass_gis_DEFS}" ) From e376a6aba65d793ca9491537b789a2fb762ad869 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 22:27:53 +0100 Subject: [PATCH 258/264] fix missing math.h include --- raster/r.in.lidar/info.c | 1 + raster3d/r3.in.lidar/info.c | 1 + 2 files changed, 2 insertions(+) diff --git a/raster/r.in.lidar/info.c b/raster/r.in.lidar/info.c index 97b3ca5504d..00896d39d57 100644 --- a/raster/r.in.lidar/info.c +++ b/raster/r.in.lidar/info.c @@ -12,6 +12,7 @@ */ #include +#include /* For INIFINITY */ #include diff --git a/raster3d/r3.in.lidar/info.c b/raster3d/r3.in.lidar/info.c index 434dc838d96..0f5b2f4862e 100644 --- a/raster3d/r3.in.lidar/info.c +++ b/raster3d/r3.in.lidar/info.c @@ -13,6 +13,7 @@ */ #include +#include #include From 2e65c3afb91fa434ff156e1f2f7e040388264156 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 22:28:31 +0100 Subject: [PATCH 259/264] wrong path used under cmake binary directory --- lib/init/grass.bat.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init/grass.bat.in b/lib/init/grass.bat.in index 656e6355709..cb95984ee55 100644 --- a/lib/init/grass.bat.in +++ b/lib/init/grass.bat.in @@ -11,7 +11,7 @@ set GEOTIFF_CSV=@GEOTIFF_CSV@ ::set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf -set PATH=@gisbase_init_dir@\bin;@BINARY_DIR@\bin;@DLL_PATH_LIST@;%PATH% +set PATH=@gisbase_init_dir@\bin;@BINARY_DIR@;@DLL_PATH_LIST@;%PATH% set GISBASE=@gisbase_init_dir@ From 53326c42b0bb1f666ad437a86acacfceda94b31e Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 22:29:55 +0100 Subject: [PATCH 260/264] keep autoconf build conflict with cmake --- include/calc.h | 2 ++ include/iostream/mm.h | 3 +++ lib/dspf/viz.h | 2 ++ lib/gis/gisinit.c | 2 ++ 4 files changed, 9 insertions(+) diff --git a/include/calc.h b/include/calc.h index 9d501d85e8b..2e6fcc87d3d 100644 --- a/include/calc.h +++ b/include/calc.h @@ -35,6 +35,8 @@ typedef struct func_desc #ifdef GRASS_CMAKE_BUILD #include +#else +#define GRASS_CALC_EXPORT #endif extern GRASS_CALC_EXPORT volatile int floating_point_exception; diff --git a/include/iostream/mm.h b/include/iostream/mm.h index 7c3bb2206d8..92d934ae8be 100644 --- a/include/iostream/mm.h +++ b/include/iostream/mm.h @@ -86,7 +86,10 @@ enum MM_stream_usage { #ifdef GRASS_CMAKE_BUILD #include +#else +#define GRASS_IOSTREAM_EXPORT #endif + // Declarations of a very simple memory manager designed to work with // BTEs that rely on the underlying OS to manage physical memory. class GRASS_IOSTREAM_EXPORT MM_register { diff --git a/lib/dspf/viz.h b/lib/dspf/viz.h index 69bf4720046..73f8ed87212 100644 --- a/lib/dspf/viz.h +++ b/lib/dspf/viz.h @@ -99,5 +99,7 @@ int print_head_info(file_info *); int struct_copy(char *, char *, int); #ifdef GRASS_CMAKE_BUILD #include +#else +#define GRASS_DSPF_EXPORT #endif extern GRASS_DSPF_EXPORT CELL_ENTRY cell_table[]; diff --git a/lib/gis/gisinit.c b/lib/gis/gisinit.c index 87be9c5dc16..ddfef70f183 100644 --- a/lib/gis/gisinit.c +++ b/lib/gis/gisinit.c @@ -28,6 +28,8 @@ #ifdef GRASS_CMAKE_BUILD #include +#else +#define GRASS_GIS_EXPORT #endif struct G__ G__; From 1dc86e8375ddc7d62a94e23c7e35a8cf2ece1507 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 20 Jan 2020 23:57:00 +0100 Subject: [PATCH 261/264] .bat files must be in scripts/ --- cmake/copy_g_gui_module.cmake | 2 +- cmake/locale_strings.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/copy_g_gui_module.cmake b/cmake/copy_g_gui_module.cmake index 78f54c96e32..46246dc4ca0 100644 --- a/cmake/copy_g_gui_module.cmake +++ b/cmake/copy_g_gui_module.cmake @@ -18,7 +18,7 @@ if(WIN32) set(PGM_NAME ${G_NAME}) configure_file( ${SOURCE_DIR}/cmake/windows_launch.bat.in - ${GISBASE}/bin/${G_NAME}.bat @ONLY) + ${GISBASE}/scripts/${G_NAME}.bat @ONLY) endif(WIN32) set(TMP_SCRIPT_FILE ${BINARY_DIR}/CMakeFiles/${G_NAME}${SCRIPT_EXT}) diff --git a/cmake/locale_strings.cmake b/cmake/locale_strings.cmake index fe1bed4c6d5..79a42843ee9 100644 --- a/cmake/locale_strings.cmake +++ b/cmake/locale_strings.cmake @@ -49,7 +49,7 @@ if(WIN32) set(PGM_NAME ${G_NAME}) configure_file( ${SOURCE_DIR}/cmake/windows_launch.bat.in - ${GISBASE}/bin/${G_NAME}.bat @ONLY) + ${GISBASE}/scripts/${G_NAME}.bat @ONLY) endif(WIN32) set(TMP_SCRIPT_FILE ${BINARY_DIR}/CMakeFiles/${G_NAME}${SCRIPT_EXT}) From 95259c8594d9e57e49d24626ab7e5b86eb63caed Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 17 Feb 2020 09:47:45 +0100 Subject: [PATCH 262/264] fix installation of gui/images, gui/icons --- gui/icons/CMakeLists.txt | 65 ++++++++++++++++++++++--------------- gui/images/CMakeLists.txt | 25 +++++++++----- gui/wxpython/CMakeLists.txt | 6 ++-- 3 files changed, 59 insertions(+), 37 deletions(-) diff --git a/gui/icons/CMakeLists.txt b/gui/icons/CMakeLists.txt index c17f9f43d87..9072ecfbb44 100644 --- a/gui/icons/CMakeLists.txt +++ b/gui/icons/CMakeLists.txt @@ -1,31 +1,44 @@ -file(GLOB SRCICO "*.ico" "*.png") -file(GLOB SRCICONS "grass/*.png") -file(GLOB SRCFLAGS "flags/*.png") -set(icons_stamp_file ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/GUI_ICONS.stamp) -add_custom_command(OUTPUT ${icons_stamp_file} -COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/icons/grass -COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/flags -COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/docs/html/icons -COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/images/symbols -COMMAND ${CMAKE_COMMAND} -E copy ${SRCICO} ${GISBASE}/gui/icons/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/grass ${GISBASE}/gui/icons/ -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/flags ${CMAKE_BINARY_DIR}/gui/icons/ -COMMAND ${CMAKE_COMMAND} -E touch ${icons_stamp_file}) +file(GLOB GUI_ICONS "*.ico" "*.png") +file(GLOB GRASS_ICONS "grass/*.png") +file(GLOB FLAGS_ICONS "flags/*.png") + +add_custom_target(make_gui_icons_dirs + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/icons/grass + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/icons/flags + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/docs/html/icons + COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/images/symbols + ) set(output_icons) -foreach(SRCICON ${SRCICONS}) - get_filename_component(FILE_NAME ${SRCICON} NAME) - add_custom_command(OUTPUT ${GISBASE}/docs/html/${FILE_NAME} - COMMAND ${CMAKE_COMMAND} -E copy ${SRCICON} ${GISBASE}/docs/html) - list(APPEND output_icons ${GISBASE}/docs/html/${FILE_NAME}) +foreach(ICON ${GUI_ICONS}) + get_filename_component(FILE_NAME ${ICON} NAME) + add_custom_command(OUTPUT ${GISBASE}/gui/icons/${FILE_NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${ICON} ${GISBASE}/gui/icons/) + list(APPEND output_icons ${GISBASE}/gui/icons/${FILE_NAME}) +endforeach() + +foreach(ICON ${GRASS_ICONS}) + get_filename_component(FILE_NAME ${ICON} NAME) + add_custom_command(OUTPUT ${GISBASE}/gui/icons/grass/${FILE_NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${ICON} ${GISBASE}/gui/icons/grass/ + COMMAND ${CMAKE_COMMAND} -E copy ${ICON} ${GISBASE}/docs/html/icons/) + list(APPEND output_icons ${GISBASE}/gui/icons/grass/${FILE_NAME}) + list(APPEND output_icons ${GISBASE}/docs/html/icons/${FILE_NAME}) +endforeach() + +foreach(ICON ${FLAGS_ICONS}) + get_filename_component(FILE_NAME ${ICON} NAME) + add_custom_command(OUTPUT ${GISBASE}/gui/icons/flags/${FILE_NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${ICON} ${GISBASE}/gui/icons/flags/) + list(APPEND output_icons ${GISBASE}/gui/icons/flags/${FILE_NAME}) endforeach() -add_custom_target(copy_gui_icons DEPENDS ${output_icons} ${icons_stamp_file}) -install(FILES ${SRCICO} DESTINATION gui/icons) -install(FILES ${SRCICONS} DESTINATION gui/icons/grass) -install(FILES ${SRCFLAGS} DESTINATION gui/icons/flags) -install(FILES ${SRCICONS} DESTINATION docs/html/icons) +add_custom_target(gui_icons DEPENDS make_gui_icons_dirs ${output_icons}) +install(FILES ${GUI_ICONS} DESTINATION gui/icons) +install(FILES ${GRASS_ICONS} DESTINATION gui/icons/grass) +install(FILES ${FLAGS_ICONS} DESTINATION gui/icons/flags) +install(FILES ${GRASS_ICONS} DESTINATION docs/html/icons) install(FILES grass.desktop DESTINATION share/applications) foreach(icon_type 8 16 22 24 32 36 40 42 48 64 72 80 96 128 192) set(icon_size "${icon_type}x${icon_type}") @@ -33,7 +46,7 @@ foreach(icon_type 8 16 22 24 32 36 40 42 48 64 72 80 96 128 192) endforeach() install(FILES grass.svg - DESTINATION share/icons/hicolor/scalable/apps - RENAME grass71.svg) + DESTINATION share/icons/hicolor/scalable/apps + RENAME grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.svg) -install(FILES grass.appdata.xml DESTINATION share/appdata ) +install(FILES grass.appdata.xml DESTINATION share/appdata) diff --git a/gui/images/CMakeLists.txt b/gui/images/CMakeLists.txt index dae7887c356..263c9ef1ad4 100644 --- a/gui/images/CMakeLists.txt +++ b/gui/images/CMakeLists.txt @@ -1,14 +1,23 @@ -# symbols +file(GLOB GUI_IMAGES "*.png") -set(images_stamp_file ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/GUI_IMAGES.stamp) +set(output_images) +foreach(IMG ${GUI_IMAGES}) + get_filename_component(FILE_NAME ${IMG} NAME) + add_custom_command(OUTPUT ${GISBASE}/gui/images/${FILE_NAME} + COMMAND ${CMAKE_COMMAND} -E copy ${IMG} ${GISBASE}/gui/images/) + list(APPEND output_images ${GISBASE}/gui/images/${FILE_NAME}) +endforeach() -add_custom_command(OUTPUT ${images_stamp_file} -COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/symbols/ ${GISBASE}/gui/images/ -COMMAND ${CMAKE_COMMAND} -E touch ${images_stamp_file} -) - -add_custom_target(copy_gui_images DEPENDS copy_gui_icons ${images_stamp_file}) +add_custom_target(gui_images + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/symbols/basic/ ${GISBASE}/gui/images/symbols/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/symbols/demo/ ${GISBASE}/gui/images/symbols/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/symbols/extra/ ${GISBASE}/gui/images/symbols/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/symbols/geology/ ${GISBASE}/gui/images/symbols/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/symbols/legend/ ${GISBASE}/gui/images/symbols/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/symbols/n_arrows/ ${GISBASE}/gui/images/symbols/ + DEPENDS gui_icons ${output_images}) +install(FILES ${GUI_IMAGES} DESTINATION gui/images/) install(DIRECTORY basic DESTINATION gui/images/symbols/) install(DIRECTORY demo DESTINATION gui/images/symbols/) install(DIRECTORY extra DESTINATION gui/images/symbols/) diff --git a/gui/wxpython/CMakeLists.txt b/gui/wxpython/CMakeLists.txt index 71fb0a0decf..ef69efa6076 100644 --- a/gui/wxpython/CMakeLists.txt +++ b/gui/wxpython/CMakeLists.txt @@ -3,7 +3,7 @@ set(WXPYTHON_DIR ${GISBASE}/gui/wxpython) -set(gui_lib_DIRS core gui_core icons iscatt lmgr location_wizard +set(gui_lib_DIRS core gui_core icons iscatt lmgr location_wizard mapdisp mapwin modules nviz rdigit startup tools vnet web_services wxplot) set(gui_lib_targets) @@ -17,7 +17,7 @@ add_custom_target(GUI_WXPYTHON COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/wxgui.py ${WXPYTHON_DIR}/ DEPENDS ${gui_lib_targets}) -set(gui_DIRS animation datacatalog dbmgr gcp gmodeler +set(gui_DIRS animation datacatalog dbmgr gcp gmodeler iclass image2target mapswipe photo2image psmap rlisetup timeline tplot vdigit) set(g_gui_targets) foreach(gui_DIR ${gui_DIRS}) @@ -74,4 +74,4 @@ add_custom_target(build_menustrings ALL ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "module_tree" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py COMMAND ${grass_env_command} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/core/menutree.py "psmap" >> ${CMAKE_CURRENT_SOURCE_DIR}/menustrings.py - DEPENDS build_module_tree_menudata copy_gui_images) + DEPENDS build_module_tree_menudata gui_images) From 3c221d32cb0a4e600edec3e525ca0cb3cb10e379 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Mon, 17 Feb 2020 09:50:30 +0100 Subject: [PATCH 263/264] Revert "install html file is exists" This reverts commit 9e83f6f4a9ae4e164ceaf8b23cfb207081c14763. --- gui/wxpython/menustrings.py | 6099 ----------------------------------- 1 file changed, 6099 deletions(-) delete mode 100644 gui/wxpython/menustrings.py diff --git a/gui/wxpython/menustrings.py b/gui/wxpython/menustrings.py deleted file mode 100644 index daccb6470b0..00000000000 --- a/gui/wxpython/menustrings.py +++ /dev/null @@ -1,6099 +0,0 @@ -menustrings_menudata.LayerManagerMenuData'> = [ - _('&File'), - _('Workspace'), - _('New'), - _('Create new workspace'), - _('Open'), - _('Load workspace from file'), - _('Save'), - _('Save workspace'), - _('Save as'), - _('Save workspace to file'), - _('Close'), - _('Close workspace file'), - _('Load GRC file (Tcl/Tk GUI)'), - _('Load map layers from GRC file to layer tree'), - _('Map display'), - _('Add raster'), - _('Add raster map layer to current display'), - _('Add vector'), - _('Add vector map layer to current display'), - _('Add multiple rasters or vectors'), - _('Add multiple raster or vector map layers to current display'), - _('Add RGB raster layer'), - _('Add RGB raster map layer to current display'), - _('Add web service layer'), - _('Add web service layer'), - _('New map display window'), - _('Open new map display window'), - _('Render all map displays'), - _('Re-render maps in all open map display windows'), - _('Close current map display window'), - _('Close current map display window'), - _('Close all open map display windows'), - _('Close all open map display windows'), - _('Import raster data'), - _('Simplified raster import with reprojection'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('Import of common raster formats'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('ASCII x,y,z point import and gridding'), - _('ASCII grid import'), - _('Converts a GRASS ASCII raster file to binary raster map.'), - _('ASCII polygons, lines, and point import'), - _('Creates raster maps from ASCII polygon/line/point data files.'), - _('Raw binary array import'), - _('Import a binary raster file into a GRASS raster map layer.'), - _('GRIDATB.FOR import'), - _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), - _('Matlab 2D array import'), - _('Imports a binary MAT-File(v4) to a GRASS raster.'), - _('PNG import'), - _('Imports non-georeferenced PNG format image.'), - _('SPOT NDVI import'), - _('Imports SPOT VGT NDVI data into a raster map.'), - _('SRTM HGT import'), - _('Imports SRTM HGT files into raster map.'), - _('Terra ASTER HDF import'), - _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), - _('LAS LiDAR points import'), - _('Creates a raster map from LAS LiDAR points using univariate statistics.'), - _('Unpack raster map'), - _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Import vector data'), - _('Simplified vector import with reprojection'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('Import of common vector formats'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('ASCII points or GRASS ASCII format'), - _('Creates a vector map from an ASCII points file or ASCII vector file.'), - _('ASCII points as a vector lines'), - _('Imports ASCII x,y[,z] coordinates as a series of lines.'), - _('DXF import'), - _('Converts files in DXF format to GRASS vector map format.'), - _('WFS'), - _('Imports GetFeature from a WFS server.'), - _('ESRI e00 import'), - _('Imports E00 file into a vector map.'), - _('Geonames import'), - _('Imports geonames.org country files into a vector points map.'), - _('Matlab array or Mapgen format import'), - _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), - _('LAS LiDAR points import'), - _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), - _('Unpack vector map'), - _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Import 3D raster data'), - _('ASCII 3D import'), - _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), - _('Raw binary array 3D import'), - _('Imports a binary raster file into a GRASS 3D raster map.'), - _('Vis5D import'), - _('Import database table'), - _('Common import formats'), - _('Imports attribute tables in various formats.'), - _('Export raster map'), - _('Common export formats'), - _('Exports GRASS raster maps into GDAL supported formats.'), - _('ASCII grid export'), - _('Converts a raster map layer into a GRASS ASCII text file.'), - _('ASCII x,y,z points export'), - _('Exports a raster map to a text file as x,y,z values based on cell centers.'), - _('GRIDATB.FOR export'), - _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), - _('Matlab 2D array export'), - _('Exports a GRASS raster to a binary MAT-File.'), - _('Raw binary array export'), - _('Exports a GRASS raster to a binary array.'), - _('MPEG-1 export'), - _('Converts raster map series to MPEG movie.'), - _('PNG export'), - _('Export a GRASS raster map as a non-georeferenced PNG image.'), - _('PPM export'), - _('Converts a GRASS raster map to a PPM image file.'), - _('PPM from RGB export'), - _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), - _('POV-Ray export'), - _('Converts a raster map layer into a height-field file for POV-Ray.'), - _('VRML export'), - _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), - _('VTK export'), - _('Converts raster maps into the VTK-ASCII format.'), - _('Pack raster map'), - _('Exports a raster map as GRASS GIS specific archive file'), - _('Export vector map'), - _('Common export formats'), - _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), - _('ASCII points or GRASS ASCII vector export'), - _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), - _('DXF export'), - _('Exports vector map to DXF file format.'), - _('PostGIS export'), - _('Exports a vector map layer to PostGIS feature table.'), - _('POV-Ray export'), - _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), - _('SVG export'), - _('Exports a vector map to SVG file.'), - _('VTK export'), - _('Converts a vector map to VTK ASCII output.'), - _('Pack vector map'), - _('Exports a vector map as GRASS GIS specific archive file'), - _('Export 3D raster maps'), - _('ASCII 3D export'), - _('Converts a 3D raster map layer into a ASCII text file.'), - _('Raw binary array 3D export'), - _('Exports a GRASS 3D raster map to a binary array.'), - _('Vis5D export'), - _('VTK export'), - _('Converts 3D raster maps into the VTK-ASCII format.'), - _('Export database table'), - _('Common export formats'), - _('Exports attribute tables into various formats.'), - _('Link external data'), - _('Link external raster data'), - _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), - _('Link external vector data'), - _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), - _('Output format for raster data'), - _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), - _('Output format for vector data'), - _('Defines vector output format utilizing OGR library.'), - _('Manage maps'), - _('Copy'), - _("Copies available data files in the current mapset search path to the user's current mapset."), - _('List'), - _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), - _('Rename'), - _("Renames data base element files in the user's current mapset."), - _('Delete'), - _("Removes data base element files from the user's current mapset using the search pattern."), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('3D raster to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('Georectify'), - _('Manage Ground Control Points for Georectification'), - _('Graphical modeler'), - _('Launch Graphical modeler'), - _('Run model'), - _('Run model prepared by Graphical modeler'), - _('3D image rendering'), - _('Animation tool'), - _('Launch animation tool.'), - _('Bearing/distance to coordinates'), - _('A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system'), - _('Cartographic Composer'), - _('Launch Cartographic Composer'), - _('Map Swipe'), - _('Launch Map Swipe'), - _('Launch script'), - _('Launches script file.'), - _('Simple Python Editor'), - _('Launches Simple Python Editor.'), - _('Close GUI'), - _('Close graphical user interface.'), - _('Quit GRASS GIS'), - _('Close GUI and exit GRASS GIS shell.'), - _('&Settings'), - _('Computational region'), - _('Show current region'), - _('Shows the extent and resolution of the computational region.'), - _('Show region using latitude and longitude'), - _('Shows the extent and resolution of the computational region.'), - _('Show current region extent in Map Display'), - _('Shows the extent of the computational region in Map Display.'), - _('Set region'), - _('Manages the boundary definitions for the geographic region.'), - _('GRASS working environment'), - _('Mapset access'), - _('Set/unset access to other mapsets in current location'), - _('User access'), - _('Controls access to the current mapset for other users on the system. If no option given, prints current status.'), - _('Change working environment'), - _('Changes/reports current mapset. Optionally create new mapset or list available mapsets in given location.'), - _('Change location and mapset'), - _('Change current location and mapset.'), - _('Change mapset'), - _('Change current mapset.'), - _('Change working directory'), - _('Change working directory'), - _('Show settings'), - _("Outputs and modifies the user's current GRASS variable settings."), - _('Change settings'), - _("Outputs and modifies the user's current GRASS variable settings. Prints all defined GRASS variables if no option is given."), - _('Create new location'), - _('Launches location wizard to create new GRASS location.'), - _('Create new mapset'), - _('Creates new mapset in the current location, changes current mapset.'), - _('Version and copyright'), - _('Displays version and copyright information.'), - _('Map projections'), - _('Display map projection'), - _('Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).'), - _('Manage projections'), - _('Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.'), - _('Convert coordinates'), - _('Converts coordinates from one projection to another (cs2cs frontend).'), - _('Addons extensions'), - _('Install extension from addons'), - _('Installs new extension from GRASS AddOns repository.'), - _('Manage installed extension'), - _('Updates or removes installed GRASS AddOns extension(s).'), - _('Preferences'), - _('User GUI preferences (display font, commands, digitizer, etc.)'), - _('&Raster'), - _('Develop raster map'), - _('Compress/decompress'), - _('Compresses and decompresses raster maps.'), - _('Region boundaries'), - _('Sets the boundary definitions for a raster map.'), - _('Manage NULL values'), - _('Manages NULL-values of given raster map.'), - _('Quantization'), - _('Produces the quantization file for a floating-point map.'), - _('Timestamp'), - _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), - _('Resample using aggregate statistics'), - _('Resamples raster map layers to a coarser grid using aggregation.'), - _('Resample using multiple methods'), - _('Resamples raster map to a finer grid using interpolation.'), - _('Resample using nearest neighbor'), - _('GRASS raster map layer data resampling capability.'), - _('Resample using spline tension'), - _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), - _('Resample using bspline'), - _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), - _('Resample using analytic kernel'), - _('Resamples raster map layers using an analytic kernel.'), - _('Support file maintenance'), - _('Allows creation and/or modification of raster map layer support files.'), - _('Update map statistics'), - _('Update raster map statistics'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Tiling'), - _('Produces tilings of the source projection for use in the destination region and projection.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a raster map.'), - _('Color tables (stddev)'), - _("Sets color rules based on stddev from a raster map's mean value."), - _('Manage color rules interactively'), - _('Interactive management of raster color tables.'), - _('Export color table'), - _('Exports the color table associated with a raster map.'), - _('Blend 2 color rasters'), - _('Blends color components of two raster maps by a given ratio.'), - _('Create RGB'), - _('Combines red, green and blue raster maps into a single composite raster map.'), - _('RGB to HIS'), - _('Query raster maps'), - _('Query values by coordinates'), - _('Queries raster maps on their category values and category labels.'), - _('Query colors by value'), - _('Queries colors for a raster map layer.'), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Raster buffers and distance'), - _('Buffer rasters'), - _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), - _('Concentric circles'), - _('Creates a raster map containing concentric rings around a given point.'), - _('Closest points'), - _('Locates the closest points between objects in two raster maps.'), - _('Grow by one cell'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Mask'), - _('Creates a MASK for limiting raster operation.'), - _('Raster map calculator'), - _('Simplified raster map calculator'), - _('Raster map calculator'), - _('Raster map calculator.'), - _('Neighborhood analysis'), - _('Moving window'), - _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), - _('Neighborhood points'), - _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), - _('Overlay rasters'), - _('Cross product'), - _('Creates a cross product of the category values from multiple raster map layers.'), - _('Patch raster maps'), - _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), - _('Raster series aggregation'), - _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), - _('Raster series accumulation'), - _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), - _('Statistical overlay'), - _('Calculates category or object oriented statistics (accumulator-based statistics).'), - _('Quantiles overlay'), - _('Compute category quantiles using two passes.'), - _('Solar radiance and shadows'), - _('LatLong map'), - _('Creates a latitude/longitude raster map.'), - _('Solar irradiance and irradiation'), - _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), - _('Shadows map'), - _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), - _('Sunshine hours and solar angles'), - _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), - _('Terrain analysis'), - _('Generate contour lines'), - _('Produces a vector map of specified contours from a raster map.'), - _('Cost surface'), - _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Cumulative movement costs'), - _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Least cost route or flow'), - _('Traces a flow through an elevation model or cost surface on a raster map.'), - _('Compute shaded relief'), - _('Creates shaded relief map from an elevation map (DEM). '), - _('Apply shade to raster'), - _('Drapes a color raster over an shaded relief or aspect map.'), - _('Slope and aspect'), - _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), - _('Landforms'), - _('Terrain parameters'), - _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), - _('Textural features'), - _('Generate images with textural features from a raster map.'), - _('Visibility'), - _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Horizon angle'), - _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), - _('Transform features'), - _('Clump'), - _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), - _('Grow'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Thin'), - _('Thins non-null cells that denote linear features in a raster map layer.'), - _('Hydrologic modeling'), - _('Carve stream channels'), - _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), - _('Fill lake'), - _('Fills lake at given point to given level.'), - _('Depressionless map and flowlines'), - _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), - _('Flow accumulation'), - _('Performs flow computation for massive grids.'), - _('Flow lines'), - _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), - _('Watershed analysis'), - _('Calculates hydrological parameters and RUSLE factors.'), - _('Watershed subbasins'), - _('Generates watershed subbasins raster map.'), - _('Watershed basin creation'), - _('Creates watershed basins from a drainage direction map.'), - _('Extraction of stream networks'), - _('Performs stream network extraction.'), - _('SIMWE Overland flow modeling'), - _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), - _('SIMWE Sediment flux modeling'), - _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), - _('Topographic index map'), - _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), - _('TOPMODEL simulation'), - _('Simulates TOPMODEL which is a physically based hydrologic model.'), - _('USLE K-factor'), - _('Computes USLE Soil Erodibility Factor (K).'), - _('USLE R-factor'), - _('Computes USLE R factor, Rainfall erosivity index.'), - _('Groundwater modeling'), - _('Groundwater flow'), - _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), - _('Groundwater solute transport'), - _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), - _('Landscape patch analysis'), - _('Set up sampling and analysis framework'), - _("Configuration editor for r.li.'index'"), - _('Edge density'), - _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), - _('Contrast weighted edge density'), - _('Calculates contrast weighted edge density index on a raster map'), - _('Patch area mean'), - _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), - _('Patch area range'), - _('Calculates range of patch area size on a raster map'), - _('Patch area Std Dev'), - _('Calculates standard deviation of patch area a raster map'), - _('Patch area Coeff Var'), - _('Calculates coefficient of variation of patch area on a raster map'), - _('Patch density'), - _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), - _('Patch number'), - _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), - _("Dominance's diversity"), - _("Calculates dominance's diversity index on a raster map"), - _("Shannon's diversity"), - _("Calculates Shannon's diversity index on a raster map"), - _("Simpson's diversity"), - _("Calculates Simpson's diversity index on a raster map"), - _('Richness'), - _('Calculates richness index on a raster map'), - _('Shape index'), - _('Calculates shape index on a raster map'), - _('Wildfire modeling'), - _('Rate of spread'), - _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), - _('Least-cost spread paths'), - _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), - _('Anisotropic spread simulation'), - _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), - _('Change category values and labels'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('Interactively edit category values'), - _('Edits cell values in a raster map.'), - _('Reclassify by size'), - _('Reclasses a raster map greater or less than user specified area size (in hectares).'), - _('Reclassify'), - _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), - _('Recode'), - _('Recodes categorical raster maps.'), - _('Rescale'), - _('Rescales the range of category values in a raster map layer.'), - _('Rescale with histogram'), - _('Rescales histogram equalized the range of category values in a raster map layer.'), - _('Generate random cells'), - _('Random cells'), - _('Generates random cell values with spatial dependence.'), - _('Random cells and vector points'), - _('Creates a raster map layer and vector point map containing randomly located points.'), - _('Generate surfaces'), - _('Fractal surface'), - _('Creates a fractal surface of a given fractal dimension.'), - _('Gaussian kernel density surface'), - _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), - _('Gaussian deviates surface'), - _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), - _('Plane'), - _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), - _('Random deviates surface'), - _('Produces a raster surface map of uniform random deviates with defined range.'), - _('Random surface with spatial dependence'), - _('Generates random surface(s) with spatial dependence.'), - _('Interpolate surfaces'), - _('Bilinear and bicubic from vector points'), - _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), - _('IDW from raster points'), - _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), - _('IDW from vector points'), - _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), - _('Raster contours'), - _('Generates surface raster map from rasterized contours.'), - _('Regularized spline tension'), - _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), - _('Raster series interpolation'), - _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), - _('Fill NULL cells'), - _('Fills no-data areas in raster maps using spline interpolation.'), - _('Reports and statistics'), - _('Basic raster metadata'), - _('Outputs basic information about a raster map.'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('General statistics'), - _('Generates area statistics for raster map.'), - _('Quantiles for large data sets'), - _('Compute quantiles using two passes.'), - _('Range of category values'), - _('Prints terse list of category values found in a raster map layer.'), - _('Sum area by raster map and category'), - _('Reports statistics for raster maps.'), - _('Statistics for clumped cells'), - _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), - _('Total corrected area'), - _('Prints estimation of surface area for raster map.'), - _('Univariate raster statistics'), - _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('Sample transects'), - _('Outputs the raster map layer values lying on user-defined line(s).'), - _('Sample transects (bearing/distance)'), - _('Outputs raster map layer values lying along user defined transect line(s).'), - _('Covariance/correlation'), - _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), - _('Linear regression'), - _('Calculates linear regression from two raster maps: y = a + b*x.'), - _('Multiple regression'), - _('Calculates multiple linear regression from raster maps.'), - _('Mutual category occurrences'), - _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), - _('&Vector'), - _('Develop vector map'), - _('Create new vector map'), - _('Create new empty vector map'), - _('Edit vector map (non-interactively)'), - _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), - _('Convert object types'), - _('Changes type of vector features.'), - _('Parallel lines'), - _('Creates parallel line to input vector lines.'), - _('Dissolve boundaries'), - _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), - _('Create 3D vector over raster'), - _('Converts 2D vector features to 3D by sampling of elevation raster map.'), - _('Extrude 3D vector map'), - _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), - _('Create labels'), - _('Creates paint labels for a vector map from attached attributes.'), - _('Reposition vector map'), - _('Performs an affine transformation (shift, scale and rotate) on vector map.'), - _('Rectify vector map'), - _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Support file maintenance'), - _('Updates vector map metadata.'), - _('Topology maintenance'), - _('Create or rebuild topology'), - _('Creates topology for vector map. Optionally also checks for topological errors.'), - _('Rebuild topology on all vector maps'), - _('Rebuilds topology on all vector maps in the current mapset.'), - _('Build polylines'), - _('Split lines'), - _('Splits vector lines to shorter segments.'), - _('Split polylines'), - _('Creates points/segments from input vector lines and positions.'), - _('Clean vector map'), - _('Toolset for cleaning topology of vector map.'), - _('Smooth or simplify'), - _('Performs vector based generalization.'), - _('Add centroids'), - _('Adds missing centroids to closed boundaries.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a vector map.'), - _('Manage color rules interactively'), - _('Interactive management of vector color tables.'), - _('Export color table'), - _('Exports the color table associated with a vector map.'), - _('Query vector map'), - _('Query with coordinate(s)'), - _('Queries a vector map at given locations.'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('Feature selection'), - _('Select by attributes'), - _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), - _('Select by another map'), - _('Selects features from vector map (A) by features from other vector map (B).'), - _('Map type conversions'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('Buffer vectors'), - _('Creates a buffer around vector features of given type.'), - _('Point analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Identify point clusters'), - _('Performs cluster identification.'), - _('Indices for quadrat counts of vector point lists'), - _('Indices for quadrat counts of vector point lists.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Tests for normality for vector points'), - _('Tests for normality for vector points.'), - _('Lidar analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Detect edges'), - _("Detects the object's edges from a LIDAR data set."), - _('Detect interiors'), - _('Building contour determination and Region Growing algorithm for determining the building inside'), - _('Correct and reclassify objects'), - _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), - _('Linear referencing'), - _('Create LRS'), - _('Creates a linear reference system.'), - _('Create stationing'), - _('Creates stationing from input lines, and linear reference system.'), - _('Create points/segments'), - _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), - _('Find line id and offset'), - _('Finds line id and real km+offset for given points in vector map using linear reference system.'), - _('Nearest features'), - _('Network analysis'), - _('Vector network analysis tool'), - _('Tool for interactive vector network analysis.'), - _('Network preparation'), - _('Performs network maintenance.'), - _('Allocate subnets'), - _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Split net'), - _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Shortest path'), - _('Finds shortest path on vector network.'), - _('Shortest path for sets of features'), - _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), - _('Shortest path using timetables'), - _('Finds shortest path using timetables.'), - _('Shortest path for all pairs'), - _('Computes the shortest path between all pairs of nodes in the network.'), - _('Visibility network'), - _('Performs visibility graph construction.'), - _('Bridges and articulation points'), - _('Computes bridges and articulation points in the network.'), - _('Maximum flow'), - _('Computes the maximum flow between two sets of nodes in the network.'), - _('Vertex connectivity'), - _('Computes vertex connectivity between two sets of nodes in the network.'), - _('Components'), - _('Computes strongly and weakly connected components in the network.'), - _('Centrality'), - _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), - _('Steiner tree'), - _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), - _('Minimum spanning tree'), - _('Computes minimum spanning tree for the network.'), - _('Traveling salesman analysis'), - _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), - _('Overlay vector maps'), - _('Clip vector maps'), - _('Overlay vector maps'), - _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), - _('Patch vector maps'), - _('Creates a new vector map by combining other vector maps.'), - _('Manage categories'), - _('Change or report categories'), - _('Attaches, deletes or reports vector categories to map geometry.'), - _('Reclassify'), - _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), - _('Update attributes'), - _('Update area attributes from raster'), - _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), - _('Update area attributes from vector'), - _('Count points in areas, calculate statistics from point attributes.'), - _('Update point attributes from areas'), - _('Uploads vector values at positions of vector points to the table.'), - _('Update database values from vector'), - _('Populates attribute values from vector features.'), - _('Sample raster maps at point locations'), - _('Uploads raster values at positions of vector points to the table.'), - _('Sample raster neighborhood around points'), - _('Samples a raster map at vector point locations.'), - _('Generate area for current region'), - _('Creates a vector polygon from the current region extent.'), - _('Generate areas from points'), - _('Convex hull'), - _('Produces a 2D/3D convex hull for a given vector map.'), - _('Delaunay triangles'), - _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), - _('Voronoi diagram/Thiessen polygons'), - _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), - _('Generate grid'), - _('Creates a vector map of a user-defined grid.'), - _('Generate points'), - _('Generate from database'), - _('Creates new vector (points) map from database table containing coordinates.'), - _('Generate points along lines'), - _('Creates points along input lines in new vector map with 2 layers.'), - _('Generate random points'), - _('Generates random 2D/3D vector points.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Remove outliers in point sets'), - _('Removes outliers from vector point data.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Reports and statistics'), - _('Basic vector metadata'), - _('Outputs basic information about a vector map.'), - _('Classify attribute data'), - _('Classifies attribute data, e.g. for thematic mapping'), - _('Report topology by category'), - _('Reports geometry statistics for vector maps.'), - _('Univariate attribute statistics for points'), - _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), - _('Univariate statistics for attribute columns'), - _('Calculates univariate statistics on selected table column for a GRASS vector map.'), - _('Sample transects'), - _('Quadrat indices'), - _('Indices for quadrat counts of vector point lists.'), - _('Test normality'), - _('Tests for normality for vector points.'), - _('&Imagery'), - _('Develop images and groups'), - _('Create/edit group'), - _('Creates, edits, and lists groups of imagery files.'), - _('Target group'), - _('Targets an imagery group to a GRASS location and mapset.'), - _('Mosaic images'), - _('Mosaics several images and extends colormap.'), - _('Manage image colors'), - _('Color balance for RGB'), - _('Performs auto-balancing of colors for RGB images.'), - _('HIS to RGB'), - _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), - _('RGB to HIS'), - _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), - _('Rectify image or raster'), - _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), - _('Histogram'), - _('Generate histogram of image'), - _('Spectral response'), - _('Displays spectral response at user specified locations in group or images.'), - _('Pan sharpening'), - _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), - _('Classify image'), - _('Clustering input for unsupervised classification'), - _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), - _('Input for supervised MLC'), - _('Generates statistics for i.maxlik from raster map.'), - _('Maximum likelihood classification (MLC)'), - _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Input for supervised SMAP'), - _('Generates statistics for i.smap from raster map.'), - _('Sequential maximum a posteriori classification (SMAP)'), - _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), - _('Object segmentation'), - _('Identifies segments (objects) from imagery data.'), - _('Filter image'), - _('Edge detection'), - _('Zero-crossing "edge detection" raster function for image processing.'), - _('Matrix/convolving filter'), - _('Performs raster map matrix filter.'), - _('Transform image'), - _('Canonical correlation'), - _('Canonical components analysis (CCA) program for image processing.'), - _('Principal components'), - _('Principal components analysis (PCA) for image processing.'), - _('Fast Fourier'), - _('Fast Fourier Transform (FFT) for image processing.'), - _('Inverse Fast Fourier'), - _('Inverse Fast Fourier Transform (IFFT) for image processing.'), - _('Satellite images tools'), - _('Aster DN to radiance/reflectance'), - _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), - _('Landsat DN to radiance/reflectance'), - _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), - _('Landsat cloud cover assessment'), - _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), - _('Modis quality control'), - _('Extracts quality control parameters from MODIS QC layers.'), - _('Atmospheric correction'), - _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), - _('Topographic correction'), - _('Computes topographic correction of reflectance.'), - _('Orthophoto tools'), - _('Manage GCPs for 3D correction'), - _('Georectifies a map and allows managing GCP for 3D correction.'), - _('Corrects scanning distortions'), - _('Corrects scanning distortions of a scanned aerial photo.'), - _('Satellite images products'), - _('Vegetation indices'), - _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), - _('Tasseled cap vegetation index'), - _('Performs Tasseled Cap (Kauth Thomas) transformation.'), - _('Albedo'), - _('Computes broad band albedo from surface reflectance.'), - _('Emissivity'), - _('Computes emissivity from NDVI, generic method for sparse land.'), - _('Biomass growth'), - _('Computes biomass growth, precursor of crop yield calculation.'), - _('Evapotranspiration calculation'), - _('Instantaneaous Net Radiation'), - _('Net radiation approximation (Bastiaanssen, 1995).'), - _('Soil heat flux'), - _('Soil heat flux approximation (Bastiaanssen, 1995).'), - _('Sensible heat flux'), - _('Computes sensible heat flux iteration SEBAL 01.'), - _('Evaporative fraction'), - _('Computes evaporative fraction and root zone soil moisture.'), - _('Actual Evapotranspiration'), - _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), - _('Temporal integration of ETa'), - _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), - _('Hargreaves methods Evapotranspiration'), - _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), - _('Penman-Monteith Evapotranspiration'), - _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), - _('Priestley-Taylor Evapotranspiration'), - _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), - _('Reports and statistics'), - _('Kappa analysis'), - _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), - _('OIF for LandSat TM'), - _('Calculates Optimum-Index-Factor table for spectral bands'), - _('3D r&aster'), - _('Develop 3D raster map'), - _('Manage 3D NULL values'), - _('Explicitly create the 3D NULL-value bitmap file.'), - _('Manage timestamp'), - _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), - _('Map type conversions'), - _('3D rasters to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('3D color tables'), - _('Creates/modifies the color table associated with a 3D raster map.'), - _('Export 3D color table'), - _('Exports the color table associated with a 3D raster map.'), - _('3D mask'), - _('Establishes the current working 3D raster mask.'), - _('3D raster map calculator'), - _('3D raster map calculator'), - _('Cross section'), - _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), - _('Groundwater modeling'), - _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), - _('Interpolate 3D raster from points'), - _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), - _('Reports and statistics'), - _('Basic 3D raster metadata'), - _('Outputs basic information about a user-specified 3D raster map layer.'), - _('3D raster statistics'), - _('Generates volume statistics for 3D raster maps.'), - _('Univariate statistics for 3D rasters'), - _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('&Database'), - _('Database information'), - _('List databases'), - _('Lists all databases for a given driver and location.'), - _('List drivers'), - _('Lists all database drivers.'), - _('List tables'), - _('Describe table'), - _('Describes a table in detail.'), - _('List columns'), - _('List all columns for a given table.'), - _('Manage databases'), - _('Connect'), - _('Prints/sets general DB connection for current mapset.'), - _('Login'), - _('Create database'), - _('Creates an empty database.'), - _('Drop database'), - _('Removes an existing database.'), - _('Drop table'), - _('Drops an attribute table.'), - _('Copy table'), - _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), - _('Drop column'), - _('Drops a column from selected attribute table.'), - _('Test'), - _('Test database driver, database must exist and set by db.connect.'), - _('Query'), - _('Query any table'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('SQL statement'), - _("Executes any SQL statement. For SELECT statements use 'db.select'."), - _('Vector database connections'), - _('New table'), - _('Creates and connects a new attribute table to a given layer of an existing vector map.'), - _('Remove table'), - _('Removes existing attribute table of a vector map.'), - _('Join table'), - _('Joins a database table to a vector map table.'), - _('Add columns'), - _('Adds one or more columns to the attribute table connected to a given vector map.'), - _('Drop column'), - _('Drops a column from the attribute table connected to a given vector map.'), - _('Rename column'), - _('Renames a column in the attribute table connected to a given vector map.'), - _('Change values'), - _('Updates a column in the attribute table connected to a vector map.'), - _('Drop row'), - _('Removes a vector feature from a vector map through attribute selection.'), - _('Reconnect vectors to database'), - _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), - _('Set vector map - database connection'), - _('Prints/sets DB connection for a vector map to attribute table.'), - _('&Temporal'), - _('Manage datasets'), - _('Connect temporal database'), - _('Prints/sets general temporal GIS database connection for current mapset.'), - _('Create'), - _('Creates a space time dataset.'), - _('Rename'), - _('Renames a space time dataset'), - _('Remove'), - _('Removes space time datasets from temporal database.'), - _('Update metadata'), - _('Modifies the metadata of a space time dataset.'), - _('Merge'), - _('Merges several space time datasets into a single space time dataset.'), - _('Temporally shift'), - _('Shifts temporally the maps of a space time dataset.'), - _('Snap maps of dataset'), - _('Snaps temporally the maps of a space time dataset.'), - _('List'), - _('Lists space time datasets and maps registered in the temporal database.'), - _('Manage maps in datasets'), - _('Register maps in datasets'), - _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), - _('Unregister maps from datasets'), - _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), - _('List raster dataset maps'), - _('Lists registered maps of a space time raster dataset.'), - _('List vector dataset maps'), - _('Lists registered maps of a space time vector dataset.'), - _('List 3D raster dataset maps'), - _('Lists registered maps of a space time raster3d dataset.'), - _('Import'), - _('Import raster dataset'), - _('Imports space time raster dataset.'), - _('Import vector dataset'), - _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), - _('Export'), - _('Export raster dataset'), - _('Exports space time raster dataset.'), - _('Export raster dataset as VTK time series'), - _('Exports space time raster dataset as VTK time series.'), - _('Export vector dataset'), - _('Exports a space time vector dataset as GRASS GIS specific archive file.'), - _('Convert raster dataset to 3D raster'), - _('Converts a space time raster dataset into a 3D raster map.'), - _('Extraction'), - _('Extract subset of raster dataset'), - _('Extracts a subset of a space time raster datasets.'), - _('Extract subset of vector dataset'), - _('Extracts a subset of a space time vector dataset.'), - _('Extract subset of 3D raster dataset'), - _('Extracts a subset of a space time 3D raster dataset.'), - _('Query vector dataset attribute data'), - _('Prints attributes of vector maps registered in a space time vector dataset.'), - _('Raster dataset color table'), - _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), - _('Raster calculations'), - _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), - _('3D raster calculations'), - _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), - _('Interpolate gaps in raster datasets'), - _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), - _('Aggregation'), - _('Neighborhood analysis in raster dataset'), - _('Performs a neighborhood analysis for each map in a space time raster dataset.'), - _('Aggregation in raster datasets'), - _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), - _('Temporal aggregation'), - _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), - _('Temporal aggregation by dataset'), - _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), - _('Sampling'), - _('Sample a space time raster dataset at point coordinates'), - _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), - _('Query raster dataset by vector points dataset'), - _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), - _('Observe specific locations in raster dataset'), - _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), - _('Temporal sampling'), - _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), - _('Reports and statistics'), - _('Space time datasets metadata'), - _('Lists information about space time datasets and maps.'), - _('Univariate raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), - _('Univariate vector dataset statistics'), - _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), - _('Univariate 3D raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), - _('Report temporal topology'), - _('Lists temporal topology of a space time dataset.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Timeline tool'), - _('Plot temporal extents.'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('&Help'), - _('GRASS help'), - _('Display the HTML man pages of GRASS GIS'), - _('GUI help'), - _('Display the HTML man pages of GRASS GIS'), - _('About system'), - _('Prints system information'), - _('About GRASS GIS'), - _('About GRASS GIS'), - ''] -menustrings_menudata.LayerManagerModuleTree'> = [ - _('Import, export and link data'), - _('Import raster data'), - _('Simplified raster import with reprojection'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('Import of common raster formats'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('ASCII x,y,z point import and gridding'), - _('ASCII grid import'), - _('Converts a GRASS ASCII raster file to binary raster map.'), - _('ASCII polygons, lines, and point import'), - _('Creates raster maps from ASCII polygon/line/point data files.'), - _('Raw binary array import'), - _('Import a binary raster file into a GRASS raster map layer.'), - _('GRIDATB.FOR import'), - _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), - _('Matlab 2D array import'), - _('Imports a binary MAT-File(v4) to a GRASS raster.'), - _('PNG import'), - _('Imports non-georeferenced PNG format image.'), - _('SPOT NDVI import'), - _('Imports SPOT VGT NDVI data into a raster map.'), - _('SRTM HGT import'), - _('Imports SRTM HGT files into raster map.'), - _('Terra ASTER HDF import'), - _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), - _('LAS LiDAR points import'), - _('Creates a raster map from LAS LiDAR points using univariate statistics.'), - _('Unpack raster map'), - _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Import vector data'), - _('Simplified vector import with reprojection'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('Import of common vector formats'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('ASCII points or GRASS ASCII format'), - _('Creates a vector map from an ASCII points file or ASCII vector file.'), - _('ASCII points as a vector lines'), - _('Imports ASCII x,y[,z] coordinates as a series of lines.'), - _('DXF import'), - _('Converts files in DXF format to GRASS vector map format.'), - _('WFS'), - _('Imports GetFeature from a WFS server.'), - _('ESRI e00 import'), - _('Imports E00 file into a vector map.'), - _('Geonames import'), - _('Imports geonames.org country files into a vector points map.'), - _('Matlab array or Mapgen format import'), - _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), - _('LAS LiDAR points import'), - _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), - _('Unpack vector map'), - _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Import 3D raster data'), - _('ASCII 3D import'), - _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), - _('Raw binary array 3D import'), - _('Imports a binary raster file into a GRASS 3D raster map.'), - _('Vis5D import'), - _('Import database table'), - _('Common import formats'), - _('Imports attribute tables in various formats.'), - _('Export raster map'), - _('Common export formats'), - _('Exports GRASS raster maps into GDAL supported formats.'), - _('ASCII grid export'), - _('Converts a raster map layer into a GRASS ASCII text file.'), - _('ASCII x,y,z points export'), - _('Exports a raster map to a text file as x,y,z values based on cell centers.'), - _('GRIDATB.FOR export'), - _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), - _('Matlab 2D array export'), - _('Exports a GRASS raster to a binary MAT-File.'), - _('Raw binary array export'), - _('Exports a GRASS raster to a binary array.'), - _('MPEG-1 export'), - _('Converts raster map series to MPEG movie.'), - _('PNG export'), - _('Export a GRASS raster map as a non-georeferenced PNG image.'), - _('PPM export'), - _('Converts a GRASS raster map to a PPM image file.'), - _('PPM from RGB export'), - _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), - _('POV-Ray export'), - _('Converts a raster map layer into a height-field file for POV-Ray.'), - _('VRML export'), - _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), - _('VTK export'), - _('Converts raster maps into the VTK-ASCII format.'), - _('Pack raster map'), - _('Exports a raster map as GRASS GIS specific archive file'), - _('Export vector map'), - _('Common export formats'), - _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), - _('ASCII points or GRASS ASCII vector export'), - _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), - _('DXF export'), - _('Exports vector map to DXF file format.'), - _('PostGIS export'), - _('Exports a vector map layer to PostGIS feature table.'), - _('POV-Ray export'), - _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), - _('SVG export'), - _('Exports a vector map to SVG file.'), - _('VTK export'), - _('Converts a vector map to VTK ASCII output.'), - _('Pack vector map'), - _('Exports a vector map as GRASS GIS specific archive file'), - _('Export 3D raster maps'), - _('ASCII 3D export'), - _('Converts a 3D raster map layer into a ASCII text file.'), - _('Raw binary array 3D export'), - _('Exports a GRASS 3D raster map to a binary array.'), - _('Vis5D export'), - _('VTK export'), - _('Converts 3D raster maps into the VTK-ASCII format.'), - _('Export database table'), - _('Common export formats'), - _('Exports attribute tables into various formats.'), - _('Link external data'), - _('Link external raster data'), - _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), - _('Link external vector data'), - _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), - _('Output format for raster data'), - _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), - _('Output format for vector data'), - _('Defines vector output format utilizing OGR library.'), - _('Manage maps'), - _('Copy'), - _("Copies available data files in the current mapset search path to the user's current mapset."), - _('List'), - _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), - _('Rename'), - _("Renames data base element files in the user's current mapset."), - _('Delete'), - _("Removes data base element files from the user's current mapset using the search pattern."), - _('Computational region'), - _('Show current region'), - _('Shows the extent and resolution of the computational region.'), - _('Show region using latitude and longitude'), - _('Shows the extent and resolution of the computational region.'), - _('Show current region extent in Map Display'), - _('Shows the extent of the computational region in Map Display.'), - _('Set region'), - _('Manages the boundary definitions for the geographic region.'), - _('&Raster'), - _('Develop raster map'), - _('Compress/decompress'), - _('Compresses and decompresses raster maps.'), - _('Region boundaries'), - _('Sets the boundary definitions for a raster map.'), - _('Manage NULL values'), - _('Manages NULL-values of given raster map.'), - _('Quantization'), - _('Produces the quantization file for a floating-point map.'), - _('Timestamp'), - _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), - _('Resample using aggregate statistics'), - _('Resamples raster map layers to a coarser grid using aggregation.'), - _('Resample using multiple methods'), - _('Resamples raster map to a finer grid using interpolation.'), - _('Resample using nearest neighbor'), - _('GRASS raster map layer data resampling capability.'), - _('Resample using spline tension'), - _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), - _('Resample using bspline'), - _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), - _('Resample using analytic kernel'), - _('Resamples raster map layers using an analytic kernel.'), - _('Support file maintenance'), - _('Allows creation and/or modification of raster map layer support files.'), - _('Update map statistics'), - _('Update raster map statistics'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Tiling'), - _('Produces tilings of the source projection for use in the destination region and projection.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a raster map.'), - _('Color tables (stddev)'), - _("Sets color rules based on stddev from a raster map's mean value."), - _('Manage color rules interactively'), - _('Interactive management of raster color tables.'), - _('Export color table'), - _('Exports the color table associated with a raster map.'), - _('Blend 2 color rasters'), - _('Blends color components of two raster maps by a given ratio.'), - _('Create RGB'), - _('Combines red, green and blue raster maps into a single composite raster map.'), - _('RGB to HIS'), - _('Query raster maps'), - _('Query values by coordinates'), - _('Queries raster maps on their category values and category labels.'), - _('Query colors by value'), - _('Queries colors for a raster map layer.'), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Raster buffers and distance'), - _('Buffer rasters'), - _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), - _('Concentric circles'), - _('Creates a raster map containing concentric rings around a given point.'), - _('Closest points'), - _('Locates the closest points between objects in two raster maps.'), - _('Grow by one cell'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Mask'), - _('Creates a MASK for limiting raster operation.'), - _('Raster map calculator'), - _('Simplified raster map calculator'), - _('Raster map calculator'), - _('Raster map calculator.'), - _('Neighborhood analysis'), - _('Moving window'), - _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), - _('Neighborhood points'), - _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), - _('Overlay rasters'), - _('Cross product'), - _('Creates a cross product of the category values from multiple raster map layers.'), - _('Patch raster maps'), - _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), - _('Raster series aggregation'), - _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), - _('Raster series accumulation'), - _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), - _('Statistical overlay'), - _('Calculates category or object oriented statistics (accumulator-based statistics).'), - _('Quantiles overlay'), - _('Compute category quantiles using two passes.'), - _('Solar radiance and shadows'), - _('LatLong map'), - _('Creates a latitude/longitude raster map.'), - _('Solar irradiance and irradiation'), - _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), - _('Shadows map'), - _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), - _('Sunshine hours and solar angles'), - _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), - _('Terrain analysis'), - _('Generate contour lines'), - _('Produces a vector map of specified contours from a raster map.'), - _('Cost surface'), - _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Cumulative movement costs'), - _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Least cost route or flow'), - _('Traces a flow through an elevation model or cost surface on a raster map.'), - _('Compute shaded relief'), - _('Creates shaded relief map from an elevation map (DEM). '), - _('Apply shade to raster'), - _('Drapes a color raster over an shaded relief or aspect map.'), - _('Slope and aspect'), - _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), - _('Landforms'), - _('Terrain parameters'), - _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), - _('Textural features'), - _('Generate images with textural features from a raster map.'), - _('Visibility'), - _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Horizon angle'), - _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), - _('Transform features'), - _('Clump'), - _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), - _('Grow'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Thin'), - _('Thins non-null cells that denote linear features in a raster map layer.'), - _('Hydrologic modeling'), - _('Carve stream channels'), - _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), - _('Fill lake'), - _('Fills lake at given point to given level.'), - _('Depressionless map and flowlines'), - _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), - _('Flow accumulation'), - _('Performs flow computation for massive grids.'), - _('Flow lines'), - _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), - _('Watershed analysis'), - _('Calculates hydrological parameters and RUSLE factors.'), - _('Watershed subbasins'), - _('Generates watershed subbasins raster map.'), - _('Watershed basin creation'), - _('Creates watershed basins from a drainage direction map.'), - _('Extraction of stream networks'), - _('Performs stream network extraction.'), - _('SIMWE Overland flow modeling'), - _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), - _('SIMWE Sediment flux modeling'), - _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), - _('Topographic index map'), - _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), - _('TOPMODEL simulation'), - _('Simulates TOPMODEL which is a physically based hydrologic model.'), - _('USLE K-factor'), - _('Computes USLE Soil Erodibility Factor (K).'), - _('USLE R-factor'), - _('Computes USLE R factor, Rainfall erosivity index.'), - _('Groundwater modeling'), - _('Groundwater flow'), - _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), - _('Groundwater solute transport'), - _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), - _('Landscape patch analysis'), - _('Set up sampling and analysis framework'), - _("Configuration editor for r.li.'index'"), - _('Edge density'), - _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), - _('Contrast weighted edge density'), - _('Calculates contrast weighted edge density index on a raster map'), - _('Patch area mean'), - _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), - _('Patch area range'), - _('Calculates range of patch area size on a raster map'), - _('Patch area Std Dev'), - _('Calculates standard deviation of patch area a raster map'), - _('Patch area Coeff Var'), - _('Calculates coefficient of variation of patch area on a raster map'), - _('Patch density'), - _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), - _('Patch number'), - _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), - _("Dominance's diversity"), - _("Calculates dominance's diversity index on a raster map"), - _("Shannon's diversity"), - _("Calculates Shannon's diversity index on a raster map"), - _("Simpson's diversity"), - _("Calculates Simpson's diversity index on a raster map"), - _('Richness'), - _('Calculates richness index on a raster map'), - _('Shape index'), - _('Calculates shape index on a raster map'), - _('Wildfire modeling'), - _('Rate of spread'), - _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), - _('Least-cost spread paths'), - _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), - _('Anisotropic spread simulation'), - _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), - _('Change category values and labels'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('Interactively edit category values'), - _('Edits cell values in a raster map.'), - _('Reclassify by size'), - _('Reclasses a raster map greater or less than user specified area size (in hectares).'), - _('Reclassify'), - _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), - _('Recode'), - _('Recodes categorical raster maps.'), - _('Rescale'), - _('Rescales the range of category values in a raster map layer.'), - _('Rescale with histogram'), - _('Rescales histogram equalized the range of category values in a raster map layer.'), - _('Generate random cells'), - _('Random cells'), - _('Generates random cell values with spatial dependence.'), - _('Random cells and vector points'), - _('Creates a raster map layer and vector point map containing randomly located points.'), - _('Generate surfaces'), - _('Fractal surface'), - _('Creates a fractal surface of a given fractal dimension.'), - _('Gaussian kernel density surface'), - _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), - _('Gaussian deviates surface'), - _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), - _('Plane'), - _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), - _('Random deviates surface'), - _('Produces a raster surface map of uniform random deviates with defined range.'), - _('Random surface with spatial dependence'), - _('Generates random surface(s) with spatial dependence.'), - _('Interpolate surfaces'), - _('Bilinear and bicubic from vector points'), - _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), - _('IDW from raster points'), - _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), - _('IDW from vector points'), - _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), - _('Raster contours'), - _('Generates surface raster map from rasterized contours.'), - _('Regularized spline tension'), - _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), - _('Raster series interpolation'), - _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), - _('Fill NULL cells'), - _('Fills no-data areas in raster maps using spline interpolation.'), - _('Reports and statistics'), - _('Basic raster metadata'), - _('Outputs basic information about a raster map.'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('General statistics'), - _('Generates area statistics for raster map.'), - _('Quantiles for large data sets'), - _('Compute quantiles using two passes.'), - _('Range of category values'), - _('Prints terse list of category values found in a raster map layer.'), - _('Sum area by raster map and category'), - _('Reports statistics for raster maps.'), - _('Statistics for clumped cells'), - _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), - _('Total corrected area'), - _('Prints estimation of surface area for raster map.'), - _('Univariate raster statistics'), - _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('Sample transects'), - _('Outputs the raster map layer values lying on user-defined line(s).'), - _('Sample transects (bearing/distance)'), - _('Outputs raster map layer values lying along user defined transect line(s).'), - _('Covariance/correlation'), - _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), - _('Linear regression'), - _('Calculates linear regression from two raster maps: y = a + b*x.'), - _('Multiple regression'), - _('Calculates multiple linear regression from raster maps.'), - _('Mutual category occurrences'), - _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), - _('&Vector'), - _('Develop vector map'), - _('Create new vector map'), - _('Create new empty vector map'), - _('Edit vector map (non-interactively)'), - _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), - _('Convert object types'), - _('Changes type of vector features.'), - _('Parallel lines'), - _('Creates parallel line to input vector lines.'), - _('Dissolve boundaries'), - _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), - _('Create 3D vector over raster'), - _('Converts 2D vector features to 3D by sampling of elevation raster map.'), - _('Extrude 3D vector map'), - _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), - _('Create labels'), - _('Creates paint labels for a vector map from attached attributes.'), - _('Reposition vector map'), - _('Performs an affine transformation (shift, scale and rotate) on vector map.'), - _('Rectify vector map'), - _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Support file maintenance'), - _('Updates vector map metadata.'), - _('Topology maintenance'), - _('Create or rebuild topology'), - _('Creates topology for vector map. Optionally also checks for topological errors.'), - _('Rebuild topology on all vector maps'), - _('Rebuilds topology on all vector maps in the current mapset.'), - _('Build polylines'), - _('Split lines'), - _('Splits vector lines to shorter segments.'), - _('Split polylines'), - _('Creates points/segments from input vector lines and positions.'), - _('Clean vector map'), - _('Toolset for cleaning topology of vector map.'), - _('Smooth or simplify'), - _('Performs vector based generalization.'), - _('Add centroids'), - _('Adds missing centroids to closed boundaries.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a vector map.'), - _('Manage color rules interactively'), - _('Interactive management of vector color tables.'), - _('Export color table'), - _('Exports the color table associated with a vector map.'), - _('Query vector map'), - _('Query with coordinate(s)'), - _('Queries a vector map at given locations.'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('Feature selection'), - _('Select by attributes'), - _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), - _('Select by another map'), - _('Selects features from vector map (A) by features from other vector map (B).'), - _('Map type conversions'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('Buffer vectors'), - _('Creates a buffer around vector features of given type.'), - _('Point analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Identify point clusters'), - _('Performs cluster identification.'), - _('Indices for quadrat counts of vector point lists'), - _('Indices for quadrat counts of vector point lists.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Tests for normality for vector points'), - _('Tests for normality for vector points.'), - _('Lidar analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Detect edges'), - _("Detects the object's edges from a LIDAR data set."), - _('Detect interiors'), - _('Building contour determination and Region Growing algorithm for determining the building inside'), - _('Correct and reclassify objects'), - _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), - _('Linear referencing'), - _('Create LRS'), - _('Creates a linear reference system.'), - _('Create stationing'), - _('Creates stationing from input lines, and linear reference system.'), - _('Create points/segments'), - _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), - _('Find line id and offset'), - _('Finds line id and real km+offset for given points in vector map using linear reference system.'), - _('Nearest features'), - _('Network analysis'), - _('Vector network analysis tool'), - _('Tool for interactive vector network analysis.'), - _('Network preparation'), - _('Performs network maintenance.'), - _('Allocate subnets'), - _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Split net'), - _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Shortest path'), - _('Finds shortest path on vector network.'), - _('Shortest path for sets of features'), - _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), - _('Shortest path using timetables'), - _('Finds shortest path using timetables.'), - _('Shortest path for all pairs'), - _('Computes the shortest path between all pairs of nodes in the network.'), - _('Visibility network'), - _('Performs visibility graph construction.'), - _('Bridges and articulation points'), - _('Computes bridges and articulation points in the network.'), - _('Maximum flow'), - _('Computes the maximum flow between two sets of nodes in the network.'), - _('Vertex connectivity'), - _('Computes vertex connectivity between two sets of nodes in the network.'), - _('Components'), - _('Computes strongly and weakly connected components in the network.'), - _('Centrality'), - _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), - _('Steiner tree'), - _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), - _('Minimum spanning tree'), - _('Computes minimum spanning tree for the network.'), - _('Traveling salesman analysis'), - _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), - _('Overlay vector maps'), - _('Clip vector maps'), - _('Overlay vector maps'), - _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), - _('Patch vector maps'), - _('Creates a new vector map by combining other vector maps.'), - _('Manage categories'), - _('Change or report categories'), - _('Attaches, deletes or reports vector categories to map geometry.'), - _('Reclassify'), - _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), - _('Update attributes'), - _('Update area attributes from raster'), - _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), - _('Update area attributes from vector'), - _('Count points in areas, calculate statistics from point attributes.'), - _('Update point attributes from areas'), - _('Uploads vector values at positions of vector points to the table.'), - _('Update database values from vector'), - _('Populates attribute values from vector features.'), - _('Sample raster maps at point locations'), - _('Uploads raster values at positions of vector points to the table.'), - _('Sample raster neighborhood around points'), - _('Samples a raster map at vector point locations.'), - _('Generate area for current region'), - _('Creates a vector polygon from the current region extent.'), - _('Generate areas from points'), - _('Convex hull'), - _('Produces a 2D/3D convex hull for a given vector map.'), - _('Delaunay triangles'), - _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), - _('Voronoi diagram/Thiessen polygons'), - _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), - _('Generate grid'), - _('Creates a vector map of a user-defined grid.'), - _('Generate points'), - _('Generate from database'), - _('Creates new vector (points) map from database table containing coordinates.'), - _('Generate points along lines'), - _('Creates points along input lines in new vector map with 2 layers.'), - _('Generate random points'), - _('Generates random 2D/3D vector points.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Remove outliers in point sets'), - _('Removes outliers from vector point data.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Reports and statistics'), - _('Basic vector metadata'), - _('Outputs basic information about a vector map.'), - _('Classify attribute data'), - _('Classifies attribute data, e.g. for thematic mapping'), - _('Report topology by category'), - _('Reports geometry statistics for vector maps.'), - _('Univariate attribute statistics for points'), - _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), - _('Univariate statistics for attribute columns'), - _('Calculates univariate statistics on selected table column for a GRASS vector map.'), - _('Sample transects'), - _('Quadrat indices'), - _('Indices for quadrat counts of vector point lists.'), - _('Test normality'), - _('Tests for normality for vector points.'), - _('&Imagery'), - _('Develop images and groups'), - _('Create/edit group'), - _('Creates, edits, and lists groups of imagery files.'), - _('Target group'), - _('Targets an imagery group to a GRASS location and mapset.'), - _('Mosaic images'), - _('Mosaics several images and extends colormap.'), - _('Manage image colors'), - _('Color balance for RGB'), - _('Performs auto-balancing of colors for RGB images.'), - _('HIS to RGB'), - _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), - _('RGB to HIS'), - _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), - _('Rectify image or raster'), - _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), - _('Histogram'), - _('Generate histogram of image'), - _('Spectral response'), - _('Displays spectral response at user specified locations in group or images.'), - _('Pan sharpening'), - _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), - _('Classify image'), - _('Clustering input for unsupervised classification'), - _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), - _('Input for supervised MLC'), - _('Generates statistics for i.maxlik from raster map.'), - _('Maximum likelihood classification (MLC)'), - _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Input for supervised SMAP'), - _('Generates statistics for i.smap from raster map.'), - _('Sequential maximum a posteriori classification (SMAP)'), - _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), - _('Object segmentation'), - _('Identifies segments (objects) from imagery data.'), - _('Filter image'), - _('Edge detection'), - _('Zero-crossing "edge detection" raster function for image processing.'), - _('Matrix/convolving filter'), - _('Performs raster map matrix filter.'), - _('Transform image'), - _('Canonical correlation'), - _('Canonical components analysis (CCA) program for image processing.'), - _('Principal components'), - _('Principal components analysis (PCA) for image processing.'), - _('Fast Fourier'), - _('Fast Fourier Transform (FFT) for image processing.'), - _('Inverse Fast Fourier'), - _('Inverse Fast Fourier Transform (IFFT) for image processing.'), - _('Satellite images tools'), - _('Aster DN to radiance/reflectance'), - _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), - _('Landsat DN to radiance/reflectance'), - _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), - _('Landsat cloud cover assessment'), - _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), - _('Modis quality control'), - _('Extracts quality control parameters from MODIS QC layers.'), - _('Atmospheric correction'), - _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), - _('Topographic correction'), - _('Computes topographic correction of reflectance.'), - _('Orthophoto tools'), - _('Manage GCPs for 3D correction'), - _('Georectifies a map and allows managing GCP for 3D correction.'), - _('Corrects scanning distortions'), - _('Corrects scanning distortions of a scanned aerial photo.'), - _('Satellite images products'), - _('Vegetation indices'), - _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), - _('Tasseled cap vegetation index'), - _('Performs Tasseled Cap (Kauth Thomas) transformation.'), - _('Albedo'), - _('Computes broad band albedo from surface reflectance.'), - _('Emissivity'), - _('Computes emissivity from NDVI, generic method for sparse land.'), - _('Biomass growth'), - _('Computes biomass growth, precursor of crop yield calculation.'), - _('Evapotranspiration calculation'), - _('Instantaneaous Net Radiation'), - _('Net radiation approximation (Bastiaanssen, 1995).'), - _('Soil heat flux'), - _('Soil heat flux approximation (Bastiaanssen, 1995).'), - _('Sensible heat flux'), - _('Computes sensible heat flux iteration SEBAL 01.'), - _('Evaporative fraction'), - _('Computes evaporative fraction and root zone soil moisture.'), - _('Actual Evapotranspiration'), - _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), - _('Temporal integration of ETa'), - _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), - _('Hargreaves methods Evapotranspiration'), - _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), - _('Penman-Monteith Evapotranspiration'), - _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), - _('Priestley-Taylor Evapotranspiration'), - _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), - _('Reports and statistics'), - _('Kappa analysis'), - _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), - _('OIF for LandSat TM'), - _('Calculates Optimum-Index-Factor table for spectral bands'), - _('3D r&aster'), - _('Develop 3D raster map'), - _('Manage 3D NULL values'), - _('Explicitly create the 3D NULL-value bitmap file.'), - _('Manage timestamp'), - _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), - _('Map type conversions'), - _('3D rasters to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('3D color tables'), - _('Creates/modifies the color table associated with a 3D raster map.'), - _('Export 3D color table'), - _('Exports the color table associated with a 3D raster map.'), - _('3D mask'), - _('Establishes the current working 3D raster mask.'), - _('3D raster map calculator'), - _('3D raster map calculator'), - _('Cross section'), - _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), - _('Groundwater modeling'), - _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), - _('Interpolate 3D raster from points'), - _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), - _('Reports and statistics'), - _('Basic 3D raster metadata'), - _('Outputs basic information about a user-specified 3D raster map layer.'), - _('3D raster statistics'), - _('Generates volume statistics for 3D raster maps.'), - _('Univariate statistics for 3D rasters'), - _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('&Database'), - _('Database information'), - _('List databases'), - _('Lists all databases for a given driver and location.'), - _('List drivers'), - _('Lists all database drivers.'), - _('List tables'), - _('Describe table'), - _('Describes a table in detail.'), - _('List columns'), - _('List all columns for a given table.'), - _('Manage databases'), - _('Connect'), - _('Prints/sets general DB connection for current mapset.'), - _('Login'), - _('Create database'), - _('Creates an empty database.'), - _('Drop database'), - _('Removes an existing database.'), - _('Drop table'), - _('Drops an attribute table.'), - _('Copy table'), - _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), - _('Drop column'), - _('Drops a column from selected attribute table.'), - _('Test'), - _('Test database driver, database must exist and set by db.connect.'), - _('Query'), - _('Query any table'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('SQL statement'), - _("Executes any SQL statement. For SELECT statements use 'db.select'."), - _('Vector database connections'), - _('New table'), - _('Creates and connects a new attribute table to a given layer of an existing vector map.'), - _('Remove table'), - _('Removes existing attribute table of a vector map.'), - _('Join table'), - _('Joins a database table to a vector map table.'), - _('Add columns'), - _('Adds one or more columns to the attribute table connected to a given vector map.'), - _('Drop column'), - _('Drops a column from the attribute table connected to a given vector map.'), - _('Rename column'), - _('Renames a column in the attribute table connected to a given vector map.'), - _('Change values'), - _('Updates a column in the attribute table connected to a vector map.'), - _('Drop row'), - _('Removes a vector feature from a vector map through attribute selection.'), - _('Reconnect vectors to database'), - _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), - _('Set vector map - database connection'), - _('Prints/sets DB connection for a vector map to attribute table.'), - _('&Temporal'), - _('Manage datasets'), - _('Connect temporal database'), - _('Prints/sets general temporal GIS database connection for current mapset.'), - _('Create'), - _('Creates a space time dataset.'), - _('Rename'), - _('Renames a space time dataset'), - _('Remove'), - _('Removes space time datasets from temporal database.'), - _('Update metadata'), - _('Modifies the metadata of a space time dataset.'), - _('Merge'), - _('Merges several space time datasets into a single space time dataset.'), - _('Temporally shift'), - _('Shifts temporally the maps of a space time dataset.'), - _('Snap maps of dataset'), - _('Snaps temporally the maps of a space time dataset.'), - _('List'), - _('Lists space time datasets and maps registered in the temporal database.'), - _('Manage maps in datasets'), - _('Register maps in datasets'), - _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), - _('Unregister maps from datasets'), - _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), - _('List raster dataset maps'), - _('Lists registered maps of a space time raster dataset.'), - _('List vector dataset maps'), - _('Lists registered maps of a space time vector dataset.'), - _('List 3D raster dataset maps'), - _('Lists registered maps of a space time raster3d dataset.'), - _('Import'), - _('Import raster dataset'), - _('Imports space time raster dataset.'), - _('Import vector dataset'), - _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), - _('Export'), - _('Export raster dataset'), - _('Exports space time raster dataset.'), - _('Export raster dataset as VTK time series'), - _('Exports space time raster dataset as VTK time series.'), - _('Export vector dataset'), - _('Exports a space time vector dataset as GRASS GIS specific archive file.'), - _('Convert raster dataset to 3D raster'), - _('Converts a space time raster dataset into a 3D raster map.'), - _('Extraction'), - _('Extract subset of raster dataset'), - _('Extracts a subset of a space time raster datasets.'), - _('Extract subset of vector dataset'), - _('Extracts a subset of a space time vector dataset.'), - _('Extract subset of 3D raster dataset'), - _('Extracts a subset of a space time 3D raster dataset.'), - _('Query vector dataset attribute data'), - _('Prints attributes of vector maps registered in a space time vector dataset.'), - _('Raster dataset color table'), - _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), - _('Raster calculations'), - _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), - _('3D raster calculations'), - _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), - _('Interpolate gaps in raster datasets'), - _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), - _('Aggregation'), - _('Neighborhood analysis in raster dataset'), - _('Performs a neighborhood analysis for each map in a space time raster dataset.'), - _('Aggregation in raster datasets'), - _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), - _('Temporal aggregation'), - _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), - _('Temporal aggregation by dataset'), - _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), - _('Sampling'), - _('Sample a space time raster dataset at point coordinates'), - _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), - _('Query raster dataset by vector points dataset'), - _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), - _('Observe specific locations in raster dataset'), - _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), - _('Temporal sampling'), - _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), - _('Reports and statistics'), - _('Space time datasets metadata'), - _('Lists information about space time datasets and maps.'), - _('Univariate raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), - _('Univariate vector dataset statistics'), - _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), - _('Univariate 3D raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), - _('Report temporal topology'), - _('Lists temporal topology of a space time dataset.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Timeline tool'), - _('Plot temporal extents.'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Attribute table manager'), - _('Launches graphical attribute table manager.'), - _('Cartographic Composer'), - _('Launch Cartographic Composer'), - _('Georectify'), - _('Manage Ground Control Points for Georectification'), - _('Graphical modeler'), - _('Launch Graphical modeler'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Map Swipe'), - _('Launch Map Swipe'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('Timeline tool'), - _('Plot temporal extents.'), - ''] -menustrings_menudata.PsMapMenuData'> = [ - _('&File'), - _('Page setup'), - _('Specify paper size, margins and orientation'), - _('Load instruction file'), - _('Load text file with mapping instructions'), - _('Export instruction file'), - _('Generate text file with mapping instructions'), - _('Export to PostScript'), - _('Generate PostScript output'), - _('Export to PDF'), - _('Generate PDF output'), - _('Launch ps.map dialog'), - _('Launch ps.map dialog'), - _('Quit'), - _('Close Cartographic Composer'), - _('&Insert'), - _('Map frame'), - _('Add or edit map frame'), - _('Raster map'), - _('Add or edit raster map'), - _('Vector map'), - _('Add or edit vector map'), - _('Map legend'), - _('Add or edit raster and vector legend'), - _('Map info'), - _('Add or edit map info'), - _('Scale bar'), - _('Add or edit scale bar'), - _('Text'), - _('Add text'), - _('Image'), - _('Add image'), - _('North Arrow'), - _('Add north arrow'), - _('Delete'), - _('Delete selected object'), - _('&Help'), - _('Help'), - _('Display the HTML man pages of Cartographic Composer'), - _('About Cartographic Composer'), - _('Display information about Cartographic Composer'), - ''] -menustrings_menudata.LayerManagerMenuData'> = [ - _('&File'), - _('Workspace'), - _('New'), - _('Create new workspace'), - _('Open'), - _('Load workspace from file'), - _('Save'), - _('Save workspace'), - _('Save as'), - _('Save workspace to file'), - _('Close'), - _('Close workspace file'), - _('Load GRC file (Tcl/Tk GUI)'), - _('Load map layers from GRC file to layer tree'), - _('Map display'), - _('Add raster'), - _('Add raster map layer to current display'), - _('Add vector'), - _('Add vector map layer to current display'), - _('Add multiple rasters or vectors'), - _('Add multiple raster or vector map layers to current display'), - _('Add RGB raster layer'), - _('Add RGB raster map layer to current display'), - _('Add web service layer'), - _('Add web service layer'), - _('New map display window'), - _('Open new map display window'), - _('Render all map displays'), - _('Re-render maps in all open map display windows'), - _('Close current map display window'), - _('Close current map display window'), - _('Close all open map display windows'), - _('Close all open map display windows'), - _('Import raster data'), - _('Simplified raster import with reprojection'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('Import of common raster formats'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('ASCII x,y,z point import and gridding'), - _('ASCII grid import'), - _('Converts a GRASS ASCII raster file to binary raster map.'), - _('ASCII polygons, lines, and point import'), - _('Creates raster maps from ASCII polygon/line/point data files.'), - _('Raw binary array import'), - _('Import a binary raster file into a GRASS raster map layer.'), - _('GRIDATB.FOR import'), - _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), - _('Matlab 2D array import'), - _('Imports a binary MAT-File(v4) to a GRASS raster.'), - _('PNG import'), - _('Imports non-georeferenced PNG format image.'), - _('SPOT NDVI import'), - _('Imports SPOT VGT NDVI data into a raster map.'), - _('SRTM HGT import'), - _('Imports SRTM HGT files into raster map.'), - _('Terra ASTER HDF import'), - _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), - _('LAS LiDAR points import'), - _('Creates a raster map from LAS LiDAR points using univariate statistics.'), - _('Unpack raster map'), - _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Import vector data'), - _('Simplified vector import with reprojection'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('Import of common vector formats'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('ASCII points or GRASS ASCII format'), - _('Creates a vector map from an ASCII points file or ASCII vector file.'), - _('ASCII points as a vector lines'), - _('Imports ASCII x,y[,z] coordinates as a series of lines.'), - _('DXF import'), - _('Converts files in DXF format to GRASS vector map format.'), - _('WFS'), - _('Imports GetFeature from a WFS server.'), - _('ESRI e00 import'), - _('Imports E00 file into a vector map.'), - _('Geonames import'), - _('Imports geonames.org country files into a vector points map.'), - _('Matlab array or Mapgen format import'), - _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), - _('LAS LiDAR points import'), - _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), - _('Unpack vector map'), - _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Import 3D raster data'), - _('ASCII 3D import'), - _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), - _('Raw binary array 3D import'), - _('Imports a binary raster file into a GRASS 3D raster map.'), - _('Vis5D import'), - _('Import database table'), - _('Common import formats'), - _('Imports attribute tables in various formats.'), - _('Export raster map'), - _('Common export formats'), - _('Exports GRASS raster maps into GDAL supported formats.'), - _('ASCII grid export'), - _('Converts a raster map layer into a GRASS ASCII text file.'), - _('ASCII x,y,z points export'), - _('Exports a raster map to a text file as x,y,z values based on cell centers.'), - _('GRIDATB.FOR export'), - _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), - _('Matlab 2D array export'), - _('Exports a GRASS raster to a binary MAT-File.'), - _('Raw binary array export'), - _('Exports a GRASS raster to a binary array.'), - _('MPEG-1 export'), - _('Converts raster map series to MPEG movie.'), - _('PNG export'), - _('Export a GRASS raster map as a non-georeferenced PNG image.'), - _('PPM export'), - _('Converts a GRASS raster map to a PPM image file.'), - _('PPM from RGB export'), - _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), - _('POV-Ray export'), - _('Converts a raster map layer into a height-field file for POV-Ray.'), - _('VRML export'), - _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), - _('VTK export'), - _('Converts raster maps into the VTK-ASCII format.'), - _('Pack raster map'), - _('Exports a raster map as GRASS GIS specific archive file'), - _('Export vector map'), - _('Common export formats'), - _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), - _('ASCII points or GRASS ASCII vector export'), - _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), - _('DXF export'), - _('Exports vector map to DXF file format.'), - _('PostGIS export'), - _('Exports a vector map layer to PostGIS feature table.'), - _('POV-Ray export'), - _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), - _('SVG export'), - _('Exports a vector map to SVG file.'), - _('VTK export'), - _('Converts a vector map to VTK ASCII output.'), - _('Pack vector map'), - _('Exports a vector map as GRASS GIS specific archive file'), - _('Export 3D raster maps'), - _('ASCII 3D export'), - _('Converts a 3D raster map layer into a ASCII text file.'), - _('Raw binary array 3D export'), - _('Exports a GRASS 3D raster map to a binary array.'), - _('Vis5D export'), - _('VTK export'), - _('Converts 3D raster maps into the VTK-ASCII format.'), - _('Export database table'), - _('Common export formats'), - _('Exports attribute tables into various formats.'), - _('Link external data'), - _('Link external raster data'), - _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), - _('Link external vector data'), - _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), - _('Output format for raster data'), - _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), - _('Output format for vector data'), - _('Defines vector output format utilizing OGR library.'), - _('Manage maps'), - _('Copy'), - _("Copies available data files in the current mapset search path to the user's current mapset."), - _('List'), - _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), - _('Rename'), - _("Renames data base element files in the user's current mapset."), - _('Delete'), - _("Removes data base element files from the user's current mapset using the search pattern."), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('3D raster to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('Georectify'), - _('Manage Ground Control Points for Georectification'), - _('Graphical modeler'), - _('Launch Graphical modeler'), - _('Run model'), - _('Run model prepared by Graphical modeler'), - _('3D image rendering'), - _('Animation tool'), - _('Launch animation tool.'), - _('Bearing/distance to coordinates'), - _('A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system'), - _('Cartographic Composer'), - _('Launch Cartographic Composer'), - _('Map Swipe'), - _('Launch Map Swipe'), - _('Launch script'), - _('Launches script file.'), - _('Simple Python Editor'), - _('Launches Simple Python Editor.'), - _('Close GUI'), - _('Close graphical user interface.'), - _('Quit GRASS GIS'), - _('Close GUI and exit GRASS GIS shell.'), - _('&Settings'), - _('Computational region'), - _('Show current region'), - _('Shows the extent and resolution of the computational region.'), - _('Show region using latitude and longitude'), - _('Shows the extent and resolution of the computational region.'), - _('Show current region extent in Map Display'), - _('Shows the extent of the computational region in Map Display.'), - _('Set region'), - _('Manages the boundary definitions for the geographic region.'), - _('GRASS working environment'), - _('Mapset access'), - _('Set/unset access to other mapsets in current location'), - _('User access'), - _('Controls access to the current mapset for other users on the system. If no option given, prints current status.'), - _('Change working environment'), - _('Changes/reports current mapset. Optionally create new mapset or list available mapsets in given location.'), - _('Change location and mapset'), - _('Change current location and mapset.'), - _('Change mapset'), - _('Change current mapset.'), - _('Change working directory'), - _('Change working directory'), - _('Show settings'), - _("Outputs and modifies the user's current GRASS variable settings."), - _('Change settings'), - _("Outputs and modifies the user's current GRASS variable settings. Prints all defined GRASS variables if no option is given."), - _('Create new location'), - _('Launches location wizard to create new GRASS location.'), - _('Create new mapset'), - _('Creates new mapset in the current location, changes current mapset.'), - _('Version and copyright'), - _('Displays version and copyright information.'), - _('Map projections'), - _('Display map projection'), - _('Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).'), - _('Manage projections'), - _('Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.'), - _('Convert coordinates'), - _('Converts coordinates from one projection to another (cs2cs frontend).'), - _('Addons extensions'), - _('Install extension from addons'), - _('Installs new extension from GRASS AddOns repository.'), - _('Manage installed extension'), - _('Updates or removes installed GRASS AddOns extension(s).'), - _('Preferences'), - _('User GUI preferences (display font, commands, digitizer, etc.)'), - _('&Raster'), - _('Develop raster map'), - _('Compress/decompress'), - _('Compresses and decompresses raster maps.'), - _('Region boundaries'), - _('Sets the boundary definitions for a raster map.'), - _('Manage NULL values'), - _('Manages NULL-values of given raster map.'), - _('Quantization'), - _('Produces the quantization file for a floating-point map.'), - _('Timestamp'), - _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), - _('Resample using aggregate statistics'), - _('Resamples raster map layers to a coarser grid using aggregation.'), - _('Resample using multiple methods'), - _('Resamples raster map to a finer grid using interpolation.'), - _('Resample using nearest neighbor'), - _('GRASS raster map layer data resampling capability.'), - _('Resample using spline tension'), - _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), - _('Resample using bspline'), - _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), - _('Resample using analytic kernel'), - _('Resamples raster map layers using an analytic kernel.'), - _('Support file maintenance'), - _('Allows creation and/or modification of raster map layer support files.'), - _('Update map statistics'), - _('Update raster map statistics'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Tiling'), - _('Produces tilings of the source projection for use in the destination region and projection.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a raster map.'), - _('Color tables (stddev)'), - _("Sets color rules based on stddev from a raster map's mean value."), - _('Manage color rules interactively'), - _('Interactive management of raster color tables.'), - _('Export color table'), - _('Exports the color table associated with a raster map.'), - _('Blend 2 color rasters'), - _('Blends color components of two raster maps by a given ratio.'), - _('Create RGB'), - _('Combines red, green and blue raster maps into a single composite raster map.'), - _('RGB to HIS'), - _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), - _('Query raster maps'), - _('Query values by coordinates'), - _('Queries raster maps on their category values and category labels.'), - _('Query colors by value'), - _('Queries colors for a raster map layer.'), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Raster buffers and distance'), - _('Buffer rasters'), - _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), - _('Concentric circles'), - _('Creates a raster map containing concentric rings around a given point.'), - _('Closest points'), - _('Locates the closest points between objects in two raster maps.'), - _('Grow by one cell'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Mask'), - _('Creates a MASK for limiting raster operation.'), - _('Raster map calculator'), - _('Simplified raster map calculator'), - _('Raster map calculator'), - _('Raster map calculator.'), - _('Neighborhood analysis'), - _('Moving window'), - _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), - _('Neighborhood points'), - _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), - _('Overlay rasters'), - _('Cross product'), - _('Creates a cross product of the category values from multiple raster map layers.'), - _('Patch raster maps'), - _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), - _('Raster series aggregation'), - _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), - _('Raster series accumulation'), - _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), - _('Statistical overlay'), - _('Calculates category or object oriented statistics (accumulator-based statistics).'), - _('Quantiles overlay'), - _('Compute category quantiles using two passes.'), - _('Solar radiance and shadows'), - _('LatLong map'), - _('Creates a latitude/longitude raster map.'), - _('Solar irradiance and irradiation'), - _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), - _('Shadows map'), - _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), - _('Sunshine hours and solar angles'), - _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), - _('Terrain analysis'), - _('Generate contour lines'), - _('Produces a vector map of specified contours from a raster map.'), - _('Cost surface'), - _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Cumulative movement costs'), - _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Least cost route or flow'), - _('Traces a flow through an elevation model or cost surface on a raster map.'), - _('Compute shaded relief'), - _('Creates shaded relief map from an elevation map (DEM). '), - _('Apply shade to raster'), - _('Drapes a color raster over an shaded relief or aspect map.'), - _('Slope and aspect'), - _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), - _('Landforms'), - _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), - _('Terrain parameters'), - _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), - _('Textural features'), - _('Generate images with textural features from a raster map.'), - _('Visibility'), - _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Horizon angle'), - _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), - _('Transform features'), - _('Clump'), - _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), - _('Grow'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Thin'), - _('Thins non-null cells that denote linear features in a raster map layer.'), - _('Hydrologic modeling'), - _('Carve stream channels'), - _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), - _('Fill lake'), - _('Fills lake at given point to given level.'), - _('Depressionless map and flowlines'), - _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), - _('Flow accumulation'), - _('Performs flow computation for massive grids.'), - _('Flow lines'), - _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), - _('Watershed analysis'), - _('Calculates hydrological parameters and RUSLE factors.'), - _('Watershed subbasins'), - _('Generates watershed subbasins raster map.'), - _('Watershed basin creation'), - _('Creates watershed basins from a drainage direction map.'), - _('Extraction of stream networks'), - _('Performs stream network extraction.'), - _('SIMWE Overland flow modeling'), - _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), - _('SIMWE Sediment flux modeling'), - _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), - _('Topographic index map'), - _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), - _('TOPMODEL simulation'), - _('Simulates TOPMODEL which is a physically based hydrologic model.'), - _('USLE K-factor'), - _('Computes USLE Soil Erodibility Factor (K).'), - _('USLE R-factor'), - _('Computes USLE R factor, Rainfall erosivity index.'), - _('Groundwater modeling'), - _('Groundwater flow'), - _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), - _('Groundwater solute transport'), - _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), - _('Landscape patch analysis'), - _('Set up sampling and analysis framework'), - _("Configuration editor for r.li.'index'"), - _('Edge density'), - _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), - _('Contrast weighted edge density'), - _('Calculates contrast weighted edge density index on a raster map'), - _('Patch area mean'), - _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), - _('Patch area range'), - _('Calculates range of patch area size on a raster map'), - _('Patch area Std Dev'), - _('Calculates standard deviation of patch area a raster map'), - _('Patch area Coeff Var'), - _('Calculates coefficient of variation of patch area on a raster map'), - _('Patch density'), - _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), - _('Patch number'), - _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), - _("Dominance's diversity"), - _("Calculates dominance's diversity index on a raster map"), - _("Shannon's diversity"), - _("Calculates Shannon's diversity index on a raster map"), - _("Simpson's diversity"), - _("Calculates Simpson's diversity index on a raster map"), - _('Richness'), - _('Calculates richness index on a raster map'), - _('Shape index'), - _('Calculates shape index on a raster map'), - _('Wildfire modeling'), - _('Rate of spread'), - _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), - _('Least-cost spread paths'), - _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), - _('Anisotropic spread simulation'), - _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), - _('Change category values and labels'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('Interactively edit category values'), - _('Edits cell values in a raster map.'), - _('Reclassify by size'), - _('Reclasses a raster map greater or less than user specified area size (in hectares).'), - _('Reclassify'), - _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), - _('Recode'), - _('Recodes categorical raster maps.'), - _('Rescale'), - _('Rescales the range of category values in a raster map layer.'), - _('Rescale with histogram'), - _('Rescales histogram equalized the range of category values in a raster map layer.'), - _('Generate random cells'), - _('Random cells'), - _('Generates random cell values with spatial dependence.'), - _('Random cells and vector points'), - _('Creates a raster map layer and vector point map containing randomly located points.'), - _('Generate surfaces'), - _('Fractal surface'), - _('Creates a fractal surface of a given fractal dimension.'), - _('Gaussian kernel density surface'), - _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), - _('Gaussian deviates surface'), - _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), - _('Plane'), - _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), - _('Random deviates surface'), - _('Produces a raster surface map of uniform random deviates with defined range.'), - _('Random surface with spatial dependence'), - _('Generates random surface(s) with spatial dependence.'), - _('Interpolate surfaces'), - _('Bilinear and bicubic from vector points'), - _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), - _('IDW from raster points'), - _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), - _('IDW from vector points'), - _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), - _('Raster contours'), - _('Generates surface raster map from rasterized contours.'), - _('Regularized spline tension'), - _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), - _('Raster series interpolation'), - _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), - _('Fill NULL cells'), - _('Fills no-data areas in raster maps using spline interpolation.'), - _('Reports and statistics'), - _('Basic raster metadata'), - _('Outputs basic information about a raster map.'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('General statistics'), - _('Generates area statistics for raster map.'), - _('Quantiles for large data sets'), - _('Compute quantiles using two passes.'), - _('Range of category values'), - _('Prints terse list of category values found in a raster map layer.'), - _('Sum area by raster map and category'), - _('Reports statistics for raster maps.'), - _('Statistics for clumped cells'), - _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), - _('Total corrected area'), - _('Prints estimation of surface area for raster map.'), - _('Univariate raster statistics'), - _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('Sample transects'), - _('Outputs the raster map layer values lying on user-defined line(s).'), - _('Sample transects (bearing/distance)'), - _('Outputs raster map layer values lying along user defined transect line(s).'), - _('Covariance/correlation'), - _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), - _('Linear regression'), - _('Calculates linear regression from two raster maps: y = a + b*x.'), - _('Multiple regression'), - _('Calculates multiple linear regression from raster maps.'), - _('Mutual category occurrences'), - _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), - _('&Vector'), - _('Develop vector map'), - _('Create new vector map'), - _('Create new empty vector map'), - _('Edit vector map (non-interactively)'), - _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), - _('Convert object types'), - _('Changes type of vector features.'), - _('Parallel lines'), - _('Creates parallel line to input vector lines.'), - _('Dissolve boundaries'), - _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), - _('Create 3D vector over raster'), - _('Converts 2D vector features to 3D by sampling of elevation raster map.'), - _('Extrude 3D vector map'), - _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), - _('Create labels'), - _('Creates paint labels for a vector map from attached attributes.'), - _('Reposition vector map'), - _('Performs an affine transformation (shift, scale and rotate) on vector map.'), - _('Rectify vector map'), - _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Support file maintenance'), - _('Updates vector map metadata.'), - _('Topology maintenance'), - _('Create or rebuild topology'), - _('Creates topology for vector map. Optionally also checks for topological errors.'), - _('Rebuild topology on all vector maps'), - _('Rebuilds topology on all vector maps in the current mapset.'), - _('Build polylines'), - _('Builds polylines from lines or boundaries.'), - _('Split lines'), - _('Splits vector lines to shorter segments.'), - _('Split polylines'), - _('Creates points/segments from input vector lines and positions.'), - _('Clean vector map'), - _('Toolset for cleaning topology of vector map.'), - _('Smooth or simplify'), - _('Performs vector based generalization.'), - _('Add centroids'), - _('Adds missing centroids to closed boundaries.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a vector map.'), - _('Manage color rules interactively'), - _('Interactive management of vector color tables.'), - _('Export color table'), - _('Exports the color table associated with a vector map.'), - _('Query vector map'), - _('Query with coordinate(s)'), - _('Queries a vector map at given locations.'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('Feature selection'), - _('Select by attributes'), - _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), - _('Select by another map'), - _('Selects features from vector map (A) by features from other vector map (B).'), - _('Map type conversions'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('Buffer vectors'), - _('Creates a buffer around vector features of given type.'), - _('Point analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Identify point clusters'), - _('Performs cluster identification.'), - _('Indices for quadrat counts of vector point lists'), - _('Indices for quadrat counts of vector point lists.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Tests for normality for vector points'), - _('Tests for normality for vector points.'), - _('Lidar analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Detect edges'), - _("Detects the object's edges from a LIDAR data set."), - _('Detect interiors'), - _('Building contour determination and Region Growing algorithm for determining the building inside'), - _('Correct and reclassify objects'), - _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), - _('Linear referencing'), - _('Create LRS'), - _('Creates a linear reference system.'), - _('Create stationing'), - _('Creates stationing from input lines, and linear reference system.'), - _('Create points/segments'), - _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), - _('Find line id and offset'), - _('Finds line id and real km+offset for given points in vector map using linear reference system.'), - _('Nearest features'), - _('Network analysis'), - _('Vector network analysis tool'), - _('Tool for interactive vector network analysis.'), - _('Network preparation'), - _('Performs network maintenance.'), - _('Allocate subnets'), - _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Split net'), - _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Shortest path'), - _('Finds shortest path on vector network.'), - _('Shortest path for sets of features'), - _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), - _('Shortest path using timetables'), - _('Finds shortest path using timetables.'), - _('Shortest path for all pairs'), - _('Computes the shortest path between all pairs of nodes in the network.'), - _('Visibility network'), - _('Performs visibility graph construction.'), - _('Bridges and articulation points'), - _('Computes bridges and articulation points in the network.'), - _('Maximum flow'), - _('Computes the maximum flow between two sets of nodes in the network.'), - _('Vertex connectivity'), - _('Computes vertex connectivity between two sets of nodes in the network.'), - _('Components'), - _('Computes strongly and weakly connected components in the network.'), - _('Centrality'), - _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), - _('Steiner tree'), - _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), - _('Minimum spanning tree'), - _('Computes minimum spanning tree for the network.'), - _('Traveling salesman analysis'), - _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), - _('Overlay vector maps'), - _('Clip vector maps'), - _('Overlay vector maps'), - _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), - _('Patch vector maps'), - _('Creates a new vector map by combining other vector maps.'), - _('Manage categories'), - _('Change or report categories'), - _('Attaches, deletes or reports vector categories to map geometry.'), - _('Reclassify'), - _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), - _('Update attributes'), - _('Update area attributes from raster'), - _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), - _('Update area attributes from vector'), - _('Count points in areas, calculate statistics from point attributes.'), - _('Update point attributes from areas'), - _('Uploads vector values at positions of vector points to the table.'), - _('Update database values from vector'), - _('Populates attribute values from vector features.'), - _('Sample raster maps at point locations'), - _('Uploads raster values at positions of vector points to the table.'), - _('Sample raster neighborhood around points'), - _('Samples a raster map at vector point locations.'), - _('Generate area for current region'), - _('Creates a vector polygon from the current region extent.'), - _('Generate areas from points'), - _('Convex hull'), - _('Produces a 2D/3D convex hull for a given vector map.'), - _('Delaunay triangles'), - _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), - _('Voronoi diagram/Thiessen polygons'), - _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), - _('Generate grid'), - _('Creates a vector map of a user-defined grid.'), - _('Generate points'), - _('Generate from database'), - _('Creates new vector (points) map from database table containing coordinates.'), - _('Generate points along lines'), - _('Creates points along input lines in new vector map with 2 layers.'), - _('Generate random points'), - _('Generates random 2D/3D vector points.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Remove outliers in point sets'), - _('Removes outliers from vector point data.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Reports and statistics'), - _('Basic vector metadata'), - _('Outputs basic information about a vector map.'), - _('Classify attribute data'), - _('Classifies attribute data, e.g. for thematic mapping'), - _('Report topology by category'), - _('Reports geometry statistics for vector maps.'), - _('Univariate attribute statistics for points'), - _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), - _('Univariate statistics for attribute columns'), - _('Calculates univariate statistics on selected table column for a GRASS vector map.'), - _('Sample transects'), - _('Vector map profiling tool'), - _('Quadrat indices'), - _('Indices for quadrat counts of vector point lists.'), - _('Test normality'), - _('Tests for normality for vector points.'), - _('&Imagery'), - _('Develop images and groups'), - _('Create/edit group'), - _('Creates, edits, and lists groups of imagery files.'), - _('Target group'), - _('Targets an imagery group to a GRASS location and mapset.'), - _('Mosaic images'), - _('Mosaics several images and extends colormap.'), - _('Manage image colors'), - _('Color balance for RGB'), - _('Performs auto-balancing of colors for RGB images.'), - _('HIS to RGB'), - _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), - _('RGB to HIS'), - _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), - _('Rectify image or raster'), - _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), - _('Histogram'), - _('Generate histogram of image'), - _('Spectral response'), - _('Displays spectral response at user specified locations in group or images.'), - _('Pan sharpening'), - _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), - _('Classify image'), - _('Clustering input for unsupervised classification'), - _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), - _('Input for supervised MLC'), - _('Generates statistics for i.maxlik from raster map.'), - _('Maximum likelihood classification (MLC)'), - _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Input for supervised SMAP'), - _('Generates statistics for i.smap from raster map.'), - _('Sequential maximum a posteriori classification (SMAP)'), - _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), - _('Object segmentation'), - _('Identifies segments (objects) from imagery data.'), - _('Filter image'), - _('Edge detection'), - _('Zero-crossing "edge detection" raster function for image processing.'), - _('Matrix/convolving filter'), - _('Performs raster map matrix filter.'), - _('Transform image'), - _('Canonical correlation'), - _('Canonical components analysis (CCA) program for image processing.'), - _('Principal components'), - _('Principal components analysis (PCA) for image processing.'), - _('Fast Fourier'), - _('Fast Fourier Transform (FFT) for image processing.'), - _('Inverse Fast Fourier'), - _('Inverse Fast Fourier Transform (IFFT) for image processing.'), - _('Satellite images tools'), - _('Aster DN to radiance/reflectance'), - _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), - _('Landsat DN to radiance/reflectance'), - _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), - _('Landsat cloud cover assessment'), - _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), - _('Modis quality control'), - _('Extracts quality control parameters from MODIS QC layers.'), - _('Atmospheric correction'), - _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), - _('Topographic correction'), - _('Computes topographic correction of reflectance.'), - _('Orthophoto tools'), - _('Manage GCPs for 3D correction'), - _('Georectifies a map and allows managing GCP for 3D correction.'), - _('Corrects scanning distortions'), - _('Corrects scanning distortions of a scanned aerial photo.'), - _('Satellite images products'), - _('Vegetation indices'), - _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), - _('Tasseled cap vegetation index'), - _('Performs Tasseled Cap (Kauth Thomas) transformation.'), - _('Albedo'), - _('Computes broad band albedo from surface reflectance.'), - _('Emissivity'), - _('Computes emissivity from NDVI, generic method for sparse land.'), - _('Biomass growth'), - _('Computes biomass growth, precursor of crop yield calculation.'), - _('Evapotranspiration calculation'), - _('Instantaneaous Net Radiation'), - _('Net radiation approximation (Bastiaanssen, 1995).'), - _('Soil heat flux'), - _('Soil heat flux approximation (Bastiaanssen, 1995).'), - _('Sensible heat flux'), - _('Computes sensible heat flux iteration SEBAL 01.'), - _('Evaporative fraction'), - _('Computes evaporative fraction and root zone soil moisture.'), - _('Actual Evapotranspiration'), - _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), - _('Temporal integration of ETa'), - _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), - _('Hargreaves methods Evapotranspiration'), - _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), - _('Penman-Monteith Evapotranspiration'), - _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), - _('Priestley-Taylor Evapotranspiration'), - _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), - _('Reports and statistics'), - _('Kappa analysis'), - _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), - _('OIF for LandSat TM'), - _('Calculates Optimum-Index-Factor table for spectral bands'), - _('3D r&aster'), - _('Develop 3D raster map'), - _('Manage 3D NULL values'), - _('Explicitly create the 3D NULL-value bitmap file.'), - _('Manage timestamp'), - _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), - _('Map type conversions'), - _('3D rasters to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('3D color tables'), - _('Creates/modifies the color table associated with a 3D raster map.'), - _('Export 3D color table'), - _('Exports the color table associated with a 3D raster map.'), - _('3D mask'), - _('Establishes the current working 3D raster mask.'), - _('3D raster map calculator'), - _('3D raster map calculator'), - _('Cross section'), - _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), - _('Groundwater modeling'), - _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), - _('Interpolate 3D raster from points'), - _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), - _('Reports and statistics'), - _('Basic 3D raster metadata'), - _('Outputs basic information about a user-specified 3D raster map layer.'), - _('3D raster statistics'), - _('Generates volume statistics for 3D raster maps.'), - _('Univariate statistics for 3D rasters'), - _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('&Database'), - _('Database information'), - _('List databases'), - _('Lists all databases for a given driver and location.'), - _('List drivers'), - _('Lists all database drivers.'), - _('List tables'), - _('Describe table'), - _('Describes a table in detail.'), - _('List columns'), - _('List all columns for a given table.'), - _('Manage databases'), - _('Connect'), - _('Prints/sets general DB connection for current mapset.'), - _('Login'), - _('Create database'), - _('Creates an empty database.'), - _('Drop database'), - _('Removes an existing database.'), - _('Drop table'), - _('Drops an attribute table.'), - _('Copy table'), - _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), - _('Drop column'), - _('Drops a column from selected attribute table.'), - _('Test'), - _('Test database driver, database must exist and set by db.connect.'), - _('Query'), - _('Query any table'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('SQL statement'), - _("Executes any SQL statement. For SELECT statements use 'db.select'."), - _('Vector database connections'), - _('New table'), - _('Creates and connects a new attribute table to a given layer of an existing vector map.'), - _('Remove table'), - _('Removes existing attribute table of a vector map.'), - _('Join table'), - _('Joins a database table to a vector map table.'), - _('Add columns'), - _('Adds one or more columns to the attribute table connected to a given vector map.'), - _('Drop column'), - _('Drops a column from the attribute table connected to a given vector map.'), - _('Rename column'), - _('Renames a column in the attribute table connected to a given vector map.'), - _('Change values'), - _('Updates a column in the attribute table connected to a vector map.'), - _('Drop row'), - _('Removes a vector feature from a vector map through attribute selection.'), - _('Reconnect vectors to database'), - _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), - _('Set vector map - database connection'), - _('Prints/sets DB connection for a vector map to attribute table.'), - _('&Temporal'), - _('Manage datasets'), - _('Connect temporal database'), - _('Prints/sets general temporal GIS database connection for current mapset.'), - _('Create'), - _('Creates a space time dataset.'), - _('Rename'), - _('Renames a space time dataset'), - _('Remove'), - _('Removes space time datasets from temporal database.'), - _('Update metadata'), - _('Modifies the metadata of a space time dataset.'), - _('Merge'), - _('Merges several space time datasets into a single space time dataset.'), - _('Temporally shift'), - _('Shifts temporally the maps of a space time dataset.'), - _('Snap maps of dataset'), - _('Snaps temporally the maps of a space time dataset.'), - _('List'), - _('Lists space time datasets and maps registered in the temporal database.'), - _('Manage maps in datasets'), - _('Register maps in datasets'), - _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), - _('Unregister maps from datasets'), - _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), - _('List raster dataset maps'), - _('Lists registered maps of a space time raster dataset.'), - _('List vector dataset maps'), - _('Lists registered maps of a space time vector dataset.'), - _('List 3D raster dataset maps'), - _('Lists registered maps of a space time raster3d dataset.'), - _('Import'), - _('Import raster dataset'), - _('Imports space time raster dataset.'), - _('Import vector dataset'), - _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), - _('Export'), - _('Export raster dataset'), - _('Exports space time raster dataset.'), - _('Export raster dataset as VTK time series'), - _('Exports space time raster dataset as VTK time series.'), - _('Export vector dataset'), - _('Exports a space time vector dataset as GRASS GIS specific archive file.'), - _('Convert raster dataset to 3D raster'), - _('Converts a space time raster dataset into a 3D raster map.'), - _('Extraction'), - _('Extract subset of raster dataset'), - _('Extracts a subset of a space time raster datasets.'), - _('Extract subset of vector dataset'), - _('Extracts a subset of a space time vector dataset.'), - _('Extract subset of 3D raster dataset'), - _('Extracts a subset of a space time 3D raster dataset.'), - _('Query vector dataset attribute data'), - _('Prints attributes of vector maps registered in a space time vector dataset.'), - _('Raster dataset color table'), - _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), - _('Raster calculations'), - _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), - _('3D raster calculations'), - _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), - _('Interpolate gaps in raster datasets'), - _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), - _('Aggregation'), - _('Neighborhood analysis in raster dataset'), - _('Performs a neighborhood analysis for each map in a space time raster dataset.'), - _('Aggregation in raster datasets'), - _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), - _('Temporal aggregation'), - _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), - _('Temporal aggregation by dataset'), - _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), - _('Sampling'), - _('Sample a space time raster dataset at point coordinates'), - _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), - _('Query raster dataset by vector points dataset'), - _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), - _('Observe specific locations in raster dataset'), - _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), - _('Temporal sampling'), - _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), - _('Reports and statistics'), - _('Space time datasets metadata'), - _('Lists information about space time datasets and maps.'), - _('Univariate raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), - _('Univariate vector dataset statistics'), - _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), - _('Univariate 3D raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), - _('Report temporal topology'), - _('Lists temporal topology of a space time dataset.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Timeline tool'), - _('Plot temporal extents.'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('&Help'), - _('GRASS help'), - _('Display the HTML man pages of GRASS GIS'), - _('GUI help'), - _('Display the HTML man pages of GRASS GIS'), - _('About system'), - _('Prints system information'), - _('About GRASS GIS'), - _('About GRASS GIS'), - ''] -menustrings_menudata.LayerManagerModuleTree'> = [ - _('Import, export and link data'), - _('Import raster data'), - _('Simplified raster import with reprojection'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('Import of common raster formats'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('ASCII x,y,z point import and gridding'), - _('ASCII grid import'), - _('Converts a GRASS ASCII raster file to binary raster map.'), - _('ASCII polygons, lines, and point import'), - _('Creates raster maps from ASCII polygon/line/point data files.'), - _('Raw binary array import'), - _('Import a binary raster file into a GRASS raster map layer.'), - _('GRIDATB.FOR import'), - _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), - _('Matlab 2D array import'), - _('Imports a binary MAT-File(v4) to a GRASS raster.'), - _('PNG import'), - _('Imports non-georeferenced PNG format image.'), - _('SPOT NDVI import'), - _('Imports SPOT VGT NDVI data into a raster map.'), - _('SRTM HGT import'), - _('Imports SRTM HGT files into raster map.'), - _('Terra ASTER HDF import'), - _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), - _('LAS LiDAR points import'), - _('Creates a raster map from LAS LiDAR points using univariate statistics.'), - _('Unpack raster map'), - _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Import vector data'), - _('Simplified vector import with reprojection'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('Import of common vector formats'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('ASCII points or GRASS ASCII format'), - _('Creates a vector map from an ASCII points file or ASCII vector file.'), - _('ASCII points as a vector lines'), - _('Imports ASCII x,y[,z] coordinates as a series of lines.'), - _('DXF import'), - _('Converts files in DXF format to GRASS vector map format.'), - _('WFS'), - _('Imports GetFeature from a WFS server.'), - _('ESRI e00 import'), - _('Imports E00 file into a vector map.'), - _('Geonames import'), - _('Imports geonames.org country files into a vector points map.'), - _('Matlab array or Mapgen format import'), - _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), - _('LAS LiDAR points import'), - _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), - _('Unpack vector map'), - _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Import 3D raster data'), - _('ASCII 3D import'), - _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), - _('Raw binary array 3D import'), - _('Imports a binary raster file into a GRASS 3D raster map.'), - _('Vis5D import'), - _('Import database table'), - _('Common import formats'), - _('Imports attribute tables in various formats.'), - _('Export raster map'), - _('Common export formats'), - _('Exports GRASS raster maps into GDAL supported formats.'), - _('ASCII grid export'), - _('Converts a raster map layer into a GRASS ASCII text file.'), - _('ASCII x,y,z points export'), - _('Exports a raster map to a text file as x,y,z values based on cell centers.'), - _('GRIDATB.FOR export'), - _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), - _('Matlab 2D array export'), - _('Exports a GRASS raster to a binary MAT-File.'), - _('Raw binary array export'), - _('Exports a GRASS raster to a binary array.'), - _('MPEG-1 export'), - _('Converts raster map series to MPEG movie.'), - _('PNG export'), - _('Export a GRASS raster map as a non-georeferenced PNG image.'), - _('PPM export'), - _('Converts a GRASS raster map to a PPM image file.'), - _('PPM from RGB export'), - _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), - _('POV-Ray export'), - _('Converts a raster map layer into a height-field file for POV-Ray.'), - _('VRML export'), - _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), - _('VTK export'), - _('Converts raster maps into the VTK-ASCII format.'), - _('Pack raster map'), - _('Exports a raster map as GRASS GIS specific archive file'), - _('Export vector map'), - _('Common export formats'), - _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), - _('ASCII points or GRASS ASCII vector export'), - _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), - _('DXF export'), - _('Exports vector map to DXF file format.'), - _('PostGIS export'), - _('Exports a vector map layer to PostGIS feature table.'), - _('POV-Ray export'), - _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), - _('SVG export'), - _('Exports a vector map to SVG file.'), - _('VTK export'), - _('Converts a vector map to VTK ASCII output.'), - _('Pack vector map'), - _('Exports a vector map as GRASS GIS specific archive file'), - _('Export 3D raster maps'), - _('ASCII 3D export'), - _('Converts a 3D raster map layer into a ASCII text file.'), - _('Raw binary array 3D export'), - _('Exports a GRASS 3D raster map to a binary array.'), - _('Vis5D export'), - _('VTK export'), - _('Converts 3D raster maps into the VTK-ASCII format.'), - _('Export database table'), - _('Common export formats'), - _('Exports attribute tables into various formats.'), - _('Link external data'), - _('Link external raster data'), - _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), - _('Link external vector data'), - _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), - _('Output format for raster data'), - _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), - _('Output format for vector data'), - _('Defines vector output format utilizing OGR library.'), - _('Manage maps'), - _('Copy'), - _("Copies available data files in the current mapset search path to the user's current mapset."), - _('List'), - _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), - _('Rename'), - _("Renames data base element files in the user's current mapset."), - _('Delete'), - _("Removes data base element files from the user's current mapset using the search pattern."), - _('Computational region'), - _('Show current region'), - _('Shows the extent and resolution of the computational region.'), - _('Show region using latitude and longitude'), - _('Shows the extent and resolution of the computational region.'), - _('Show current region extent in Map Display'), - _('Shows the extent of the computational region in Map Display.'), - _('Set region'), - _('Manages the boundary definitions for the geographic region.'), - _('&Raster'), - _('Develop raster map'), - _('Compress/decompress'), - _('Compresses and decompresses raster maps.'), - _('Region boundaries'), - _('Sets the boundary definitions for a raster map.'), - _('Manage NULL values'), - _('Manages NULL-values of given raster map.'), - _('Quantization'), - _('Produces the quantization file for a floating-point map.'), - _('Timestamp'), - _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), - _('Resample using aggregate statistics'), - _('Resamples raster map layers to a coarser grid using aggregation.'), - _('Resample using multiple methods'), - _('Resamples raster map to a finer grid using interpolation.'), - _('Resample using nearest neighbor'), - _('GRASS raster map layer data resampling capability.'), - _('Resample using spline tension'), - _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), - _('Resample using bspline'), - _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), - _('Resample using analytic kernel'), - _('Resamples raster map layers using an analytic kernel.'), - _('Support file maintenance'), - _('Allows creation and/or modification of raster map layer support files.'), - _('Update map statistics'), - _('Update raster map statistics'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Tiling'), - _('Produces tilings of the source projection for use in the destination region and projection.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a raster map.'), - _('Color tables (stddev)'), - _("Sets color rules based on stddev from a raster map's mean value."), - _('Manage color rules interactively'), - _('Interactive management of raster color tables.'), - _('Export color table'), - _('Exports the color table associated with a raster map.'), - _('Blend 2 color rasters'), - _('Blends color components of two raster maps by a given ratio.'), - _('Create RGB'), - _('Combines red, green and blue raster maps into a single composite raster map.'), - _('RGB to HIS'), - _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), - _('Query raster maps'), - _('Query values by coordinates'), - _('Queries raster maps on their category values and category labels.'), - _('Query colors by value'), - _('Queries colors for a raster map layer.'), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Raster buffers and distance'), - _('Buffer rasters'), - _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), - _('Concentric circles'), - _('Creates a raster map containing concentric rings around a given point.'), - _('Closest points'), - _('Locates the closest points between objects in two raster maps.'), - _('Grow by one cell'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Mask'), - _('Creates a MASK for limiting raster operation.'), - _('Raster map calculator'), - _('Simplified raster map calculator'), - _('Raster map calculator'), - _('Raster map calculator.'), - _('Neighborhood analysis'), - _('Moving window'), - _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), - _('Neighborhood points'), - _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), - _('Overlay rasters'), - _('Cross product'), - _('Creates a cross product of the category values from multiple raster map layers.'), - _('Patch raster maps'), - _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), - _('Raster series aggregation'), - _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), - _('Raster series accumulation'), - _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), - _('Statistical overlay'), - _('Calculates category or object oriented statistics (accumulator-based statistics).'), - _('Quantiles overlay'), - _('Compute category quantiles using two passes.'), - _('Solar radiance and shadows'), - _('LatLong map'), - _('Creates a latitude/longitude raster map.'), - _('Solar irradiance and irradiation'), - _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), - _('Shadows map'), - _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), - _('Sunshine hours and solar angles'), - _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), - _('Terrain analysis'), - _('Generate contour lines'), - _('Produces a vector map of specified contours from a raster map.'), - _('Cost surface'), - _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Cumulative movement costs'), - _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Least cost route or flow'), - _('Traces a flow through an elevation model or cost surface on a raster map.'), - _('Compute shaded relief'), - _('Creates shaded relief map from an elevation map (DEM). '), - _('Apply shade to raster'), - _('Drapes a color raster over an shaded relief or aspect map.'), - _('Slope and aspect'), - _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), - _('Landforms'), - _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), - _('Terrain parameters'), - _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), - _('Textural features'), - _('Generate images with textural features from a raster map.'), - _('Visibility'), - _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Horizon angle'), - _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), - _('Transform features'), - _('Clump'), - _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), - _('Grow'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Thin'), - _('Thins non-null cells that denote linear features in a raster map layer.'), - _('Hydrologic modeling'), - _('Carve stream channels'), - _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), - _('Fill lake'), - _('Fills lake at given point to given level.'), - _('Depressionless map and flowlines'), - _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), - _('Flow accumulation'), - _('Performs flow computation for massive grids.'), - _('Flow lines'), - _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), - _('Watershed analysis'), - _('Calculates hydrological parameters and RUSLE factors.'), - _('Watershed subbasins'), - _('Generates watershed subbasins raster map.'), - _('Watershed basin creation'), - _('Creates watershed basins from a drainage direction map.'), - _('Extraction of stream networks'), - _('Performs stream network extraction.'), - _('SIMWE Overland flow modeling'), - _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), - _('SIMWE Sediment flux modeling'), - _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), - _('Topographic index map'), - _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), - _('TOPMODEL simulation'), - _('Simulates TOPMODEL which is a physically based hydrologic model.'), - _('USLE K-factor'), - _('Computes USLE Soil Erodibility Factor (K).'), - _('USLE R-factor'), - _('Computes USLE R factor, Rainfall erosivity index.'), - _('Groundwater modeling'), - _('Groundwater flow'), - _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), - _('Groundwater solute transport'), - _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), - _('Landscape patch analysis'), - _('Set up sampling and analysis framework'), - _("Configuration editor for r.li.'index'"), - _('Edge density'), - _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), - _('Contrast weighted edge density'), - _('Calculates contrast weighted edge density index on a raster map'), - _('Patch area mean'), - _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), - _('Patch area range'), - _('Calculates range of patch area size on a raster map'), - _('Patch area Std Dev'), - _('Calculates standard deviation of patch area a raster map'), - _('Patch area Coeff Var'), - _('Calculates coefficient of variation of patch area on a raster map'), - _('Patch density'), - _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), - _('Patch number'), - _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), - _("Dominance's diversity"), - _("Calculates dominance's diversity index on a raster map"), - _("Shannon's diversity"), - _("Calculates Shannon's diversity index on a raster map"), - _("Simpson's diversity"), - _("Calculates Simpson's diversity index on a raster map"), - _('Richness'), - _('Calculates richness index on a raster map'), - _('Shape index'), - _('Calculates shape index on a raster map'), - _('Wildfire modeling'), - _('Rate of spread'), - _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), - _('Least-cost spread paths'), - _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), - _('Anisotropic spread simulation'), - _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), - _('Change category values and labels'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('Interactively edit category values'), - _('Edits cell values in a raster map.'), - _('Reclassify by size'), - _('Reclasses a raster map greater or less than user specified area size (in hectares).'), - _('Reclassify'), - _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), - _('Recode'), - _('Recodes categorical raster maps.'), - _('Rescale'), - _('Rescales the range of category values in a raster map layer.'), - _('Rescale with histogram'), - _('Rescales histogram equalized the range of category values in a raster map layer.'), - _('Generate random cells'), - _('Random cells'), - _('Generates random cell values with spatial dependence.'), - _('Random cells and vector points'), - _('Creates a raster map layer and vector point map containing randomly located points.'), - _('Generate surfaces'), - _('Fractal surface'), - _('Creates a fractal surface of a given fractal dimension.'), - _('Gaussian kernel density surface'), - _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), - _('Gaussian deviates surface'), - _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), - _('Plane'), - _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), - _('Random deviates surface'), - _('Produces a raster surface map of uniform random deviates with defined range.'), - _('Random surface with spatial dependence'), - _('Generates random surface(s) with spatial dependence.'), - _('Interpolate surfaces'), - _('Bilinear and bicubic from vector points'), - _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), - _('IDW from raster points'), - _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), - _('IDW from vector points'), - _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), - _('Raster contours'), - _('Generates surface raster map from rasterized contours.'), - _('Regularized spline tension'), - _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), - _('Raster series interpolation'), - _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), - _('Fill NULL cells'), - _('Fills no-data areas in raster maps using spline interpolation.'), - _('Reports and statistics'), - _('Basic raster metadata'), - _('Outputs basic information about a raster map.'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('General statistics'), - _('Generates area statistics for raster map.'), - _('Quantiles for large data sets'), - _('Compute quantiles using two passes.'), - _('Range of category values'), - _('Prints terse list of category values found in a raster map layer.'), - _('Sum area by raster map and category'), - _('Reports statistics for raster maps.'), - _('Statistics for clumped cells'), - _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), - _('Total corrected area'), - _('Prints estimation of surface area for raster map.'), - _('Univariate raster statistics'), - _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('Sample transects'), - _('Outputs the raster map layer values lying on user-defined line(s).'), - _('Sample transects (bearing/distance)'), - _('Outputs raster map layer values lying along user defined transect line(s).'), - _('Covariance/correlation'), - _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), - _('Linear regression'), - _('Calculates linear regression from two raster maps: y = a + b*x.'), - _('Multiple regression'), - _('Calculates multiple linear regression from raster maps.'), - _('Mutual category occurrences'), - _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), - _('&Vector'), - _('Develop vector map'), - _('Create new vector map'), - _('Create new empty vector map'), - _('Edit vector map (non-interactively)'), - _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), - _('Convert object types'), - _('Changes type of vector features.'), - _('Parallel lines'), - _('Creates parallel line to input vector lines.'), - _('Dissolve boundaries'), - _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), - _('Create 3D vector over raster'), - _('Converts 2D vector features to 3D by sampling of elevation raster map.'), - _('Extrude 3D vector map'), - _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), - _('Create labels'), - _('Creates paint labels for a vector map from attached attributes.'), - _('Reposition vector map'), - _('Performs an affine transformation (shift, scale and rotate) on vector map.'), - _('Rectify vector map'), - _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Support file maintenance'), - _('Updates vector map metadata.'), - _('Topology maintenance'), - _('Create or rebuild topology'), - _('Creates topology for vector map. Optionally also checks for topological errors.'), - _('Rebuild topology on all vector maps'), - _('Rebuilds topology on all vector maps in the current mapset.'), - _('Build polylines'), - _('Builds polylines from lines or boundaries.'), - _('Split lines'), - _('Splits vector lines to shorter segments.'), - _('Split polylines'), - _('Creates points/segments from input vector lines and positions.'), - _('Clean vector map'), - _('Toolset for cleaning topology of vector map.'), - _('Smooth or simplify'), - _('Performs vector based generalization.'), - _('Add centroids'), - _('Adds missing centroids to closed boundaries.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a vector map.'), - _('Manage color rules interactively'), - _('Interactive management of vector color tables.'), - _('Export color table'), - _('Exports the color table associated with a vector map.'), - _('Query vector map'), - _('Query with coordinate(s)'), - _('Queries a vector map at given locations.'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('Feature selection'), - _('Select by attributes'), - _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), - _('Select by another map'), - _('Selects features from vector map (A) by features from other vector map (B).'), - _('Map type conversions'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('Buffer vectors'), - _('Creates a buffer around vector features of given type.'), - _('Point analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Identify point clusters'), - _('Performs cluster identification.'), - _('Indices for quadrat counts of vector point lists'), - _('Indices for quadrat counts of vector point lists.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Tests for normality for vector points'), - _('Tests for normality for vector points.'), - _('Lidar analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Detect edges'), - _("Detects the object's edges from a LIDAR data set."), - _('Detect interiors'), - _('Building contour determination and Region Growing algorithm for determining the building inside'), - _('Correct and reclassify objects'), - _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), - _('Linear referencing'), - _('Create LRS'), - _('Creates a linear reference system.'), - _('Create stationing'), - _('Creates stationing from input lines, and linear reference system.'), - _('Create points/segments'), - _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), - _('Find line id and offset'), - _('Finds line id and real km+offset for given points in vector map using linear reference system.'), - _('Nearest features'), - _('Network analysis'), - _('Vector network analysis tool'), - _('Tool for interactive vector network analysis.'), - _('Network preparation'), - _('Performs network maintenance.'), - _('Allocate subnets'), - _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Split net'), - _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Shortest path'), - _('Finds shortest path on vector network.'), - _('Shortest path for sets of features'), - _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), - _('Shortest path using timetables'), - _('Finds shortest path using timetables.'), - _('Shortest path for all pairs'), - _('Computes the shortest path between all pairs of nodes in the network.'), - _('Visibility network'), - _('Performs visibility graph construction.'), - _('Bridges and articulation points'), - _('Computes bridges and articulation points in the network.'), - _('Maximum flow'), - _('Computes the maximum flow between two sets of nodes in the network.'), - _('Vertex connectivity'), - _('Computes vertex connectivity between two sets of nodes in the network.'), - _('Components'), - _('Computes strongly and weakly connected components in the network.'), - _('Centrality'), - _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), - _('Steiner tree'), - _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), - _('Minimum spanning tree'), - _('Computes minimum spanning tree for the network.'), - _('Traveling salesman analysis'), - _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), - _('Overlay vector maps'), - _('Clip vector maps'), - _('Overlay vector maps'), - _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), - _('Patch vector maps'), - _('Creates a new vector map by combining other vector maps.'), - _('Manage categories'), - _('Change or report categories'), - _('Attaches, deletes or reports vector categories to map geometry.'), - _('Reclassify'), - _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), - _('Update attributes'), - _('Update area attributes from raster'), - _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), - _('Update area attributes from vector'), - _('Count points in areas, calculate statistics from point attributes.'), - _('Update point attributes from areas'), - _('Uploads vector values at positions of vector points to the table.'), - _('Update database values from vector'), - _('Populates attribute values from vector features.'), - _('Sample raster maps at point locations'), - _('Uploads raster values at positions of vector points to the table.'), - _('Sample raster neighborhood around points'), - _('Samples a raster map at vector point locations.'), - _('Generate area for current region'), - _('Creates a vector polygon from the current region extent.'), - _('Generate areas from points'), - _('Convex hull'), - _('Produces a 2D/3D convex hull for a given vector map.'), - _('Delaunay triangles'), - _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), - _('Voronoi diagram/Thiessen polygons'), - _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), - _('Generate grid'), - _('Creates a vector map of a user-defined grid.'), - _('Generate points'), - _('Generate from database'), - _('Creates new vector (points) map from database table containing coordinates.'), - _('Generate points along lines'), - _('Creates points along input lines in new vector map with 2 layers.'), - _('Generate random points'), - _('Generates random 2D/3D vector points.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Remove outliers in point sets'), - _('Removes outliers from vector point data.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Reports and statistics'), - _('Basic vector metadata'), - _('Outputs basic information about a vector map.'), - _('Classify attribute data'), - _('Classifies attribute data, e.g. for thematic mapping'), - _('Report topology by category'), - _('Reports geometry statistics for vector maps.'), - _('Univariate attribute statistics for points'), - _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), - _('Univariate statistics for attribute columns'), - _('Calculates univariate statistics on selected table column for a GRASS vector map.'), - _('Sample transects'), - _('Vector map profiling tool'), - _('Quadrat indices'), - _('Indices for quadrat counts of vector point lists.'), - _('Test normality'), - _('Tests for normality for vector points.'), - _('&Imagery'), - _('Develop images and groups'), - _('Create/edit group'), - _('Creates, edits, and lists groups of imagery files.'), - _('Target group'), - _('Targets an imagery group to a GRASS location and mapset.'), - _('Mosaic images'), - _('Mosaics several images and extends colormap.'), - _('Manage image colors'), - _('Color balance for RGB'), - _('Performs auto-balancing of colors for RGB images.'), - _('HIS to RGB'), - _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), - _('RGB to HIS'), - _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), - _('Rectify image or raster'), - _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), - _('Histogram'), - _('Generate histogram of image'), - _('Spectral response'), - _('Displays spectral response at user specified locations in group or images.'), - _('Pan sharpening'), - _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), - _('Classify image'), - _('Clustering input for unsupervised classification'), - _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), - _('Input for supervised MLC'), - _('Generates statistics for i.maxlik from raster map.'), - _('Maximum likelihood classification (MLC)'), - _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Input for supervised SMAP'), - _('Generates statistics for i.smap from raster map.'), - _('Sequential maximum a posteriori classification (SMAP)'), - _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), - _('Object segmentation'), - _('Identifies segments (objects) from imagery data.'), - _('Filter image'), - _('Edge detection'), - _('Zero-crossing "edge detection" raster function for image processing.'), - _('Matrix/convolving filter'), - _('Performs raster map matrix filter.'), - _('Transform image'), - _('Canonical correlation'), - _('Canonical components analysis (CCA) program for image processing.'), - _('Principal components'), - _('Principal components analysis (PCA) for image processing.'), - _('Fast Fourier'), - _('Fast Fourier Transform (FFT) for image processing.'), - _('Inverse Fast Fourier'), - _('Inverse Fast Fourier Transform (IFFT) for image processing.'), - _('Satellite images tools'), - _('Aster DN to radiance/reflectance'), - _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), - _('Landsat DN to radiance/reflectance'), - _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), - _('Landsat cloud cover assessment'), - _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), - _('Modis quality control'), - _('Extracts quality control parameters from MODIS QC layers.'), - _('Atmospheric correction'), - _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), - _('Topographic correction'), - _('Computes topographic correction of reflectance.'), - _('Orthophoto tools'), - _('Manage GCPs for 3D correction'), - _('Georectifies a map and allows managing GCP for 3D correction.'), - _('Corrects scanning distortions'), - _('Corrects scanning distortions of a scanned aerial photo.'), - _('Satellite images products'), - _('Vegetation indices'), - _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), - _('Tasseled cap vegetation index'), - _('Performs Tasseled Cap (Kauth Thomas) transformation.'), - _('Albedo'), - _('Computes broad band albedo from surface reflectance.'), - _('Emissivity'), - _('Computes emissivity from NDVI, generic method for sparse land.'), - _('Biomass growth'), - _('Computes biomass growth, precursor of crop yield calculation.'), - _('Evapotranspiration calculation'), - _('Instantaneaous Net Radiation'), - _('Net radiation approximation (Bastiaanssen, 1995).'), - _('Soil heat flux'), - _('Soil heat flux approximation (Bastiaanssen, 1995).'), - _('Sensible heat flux'), - _('Computes sensible heat flux iteration SEBAL 01.'), - _('Evaporative fraction'), - _('Computes evaporative fraction and root zone soil moisture.'), - _('Actual Evapotranspiration'), - _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), - _('Temporal integration of ETa'), - _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), - _('Hargreaves methods Evapotranspiration'), - _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), - _('Penman-Monteith Evapotranspiration'), - _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), - _('Priestley-Taylor Evapotranspiration'), - _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), - _('Reports and statistics'), - _('Kappa analysis'), - _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), - _('OIF for LandSat TM'), - _('Calculates Optimum-Index-Factor table for spectral bands'), - _('3D r&aster'), - _('Develop 3D raster map'), - _('Manage 3D NULL values'), - _('Explicitly create the 3D NULL-value bitmap file.'), - _('Manage timestamp'), - _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), - _('Map type conversions'), - _('3D rasters to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('3D color tables'), - _('Creates/modifies the color table associated with a 3D raster map.'), - _('Export 3D color table'), - _('Exports the color table associated with a 3D raster map.'), - _('3D mask'), - _('Establishes the current working 3D raster mask.'), - _('3D raster map calculator'), - _('3D raster map calculator'), - _('Cross section'), - _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), - _('Groundwater modeling'), - _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), - _('Interpolate 3D raster from points'), - _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), - _('Reports and statistics'), - _('Basic 3D raster metadata'), - _('Outputs basic information about a user-specified 3D raster map layer.'), - _('3D raster statistics'), - _('Generates volume statistics for 3D raster maps.'), - _('Univariate statistics for 3D rasters'), - _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('&Database'), - _('Database information'), - _('List databases'), - _('Lists all databases for a given driver and location.'), - _('List drivers'), - _('Lists all database drivers.'), - _('List tables'), - _('Describe table'), - _('Describes a table in detail.'), - _('List columns'), - _('List all columns for a given table.'), - _('Manage databases'), - _('Connect'), - _('Prints/sets general DB connection for current mapset.'), - _('Login'), - _('Create database'), - _('Creates an empty database.'), - _('Drop database'), - _('Removes an existing database.'), - _('Drop table'), - _('Drops an attribute table.'), - _('Copy table'), - _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), - _('Drop column'), - _('Drops a column from selected attribute table.'), - _('Test'), - _('Test database driver, database must exist and set by db.connect.'), - _('Query'), - _('Query any table'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('SQL statement'), - _("Executes any SQL statement. For SELECT statements use 'db.select'."), - _('Vector database connections'), - _('New table'), - _('Creates and connects a new attribute table to a given layer of an existing vector map.'), - _('Remove table'), - _('Removes existing attribute table of a vector map.'), - _('Join table'), - _('Joins a database table to a vector map table.'), - _('Add columns'), - _('Adds one or more columns to the attribute table connected to a given vector map.'), - _('Drop column'), - _('Drops a column from the attribute table connected to a given vector map.'), - _('Rename column'), - _('Renames a column in the attribute table connected to a given vector map.'), - _('Change values'), - _('Updates a column in the attribute table connected to a vector map.'), - _('Drop row'), - _('Removes a vector feature from a vector map through attribute selection.'), - _('Reconnect vectors to database'), - _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), - _('Set vector map - database connection'), - _('Prints/sets DB connection for a vector map to attribute table.'), - _('&Temporal'), - _('Manage datasets'), - _('Connect temporal database'), - _('Prints/sets general temporal GIS database connection for current mapset.'), - _('Create'), - _('Creates a space time dataset.'), - _('Rename'), - _('Renames a space time dataset'), - _('Remove'), - _('Removes space time datasets from temporal database.'), - _('Update metadata'), - _('Modifies the metadata of a space time dataset.'), - _('Merge'), - _('Merges several space time datasets into a single space time dataset.'), - _('Temporally shift'), - _('Shifts temporally the maps of a space time dataset.'), - _('Snap maps of dataset'), - _('Snaps temporally the maps of a space time dataset.'), - _('List'), - _('Lists space time datasets and maps registered in the temporal database.'), - _('Manage maps in datasets'), - _('Register maps in datasets'), - _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), - _('Unregister maps from datasets'), - _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), - _('List raster dataset maps'), - _('Lists registered maps of a space time raster dataset.'), - _('List vector dataset maps'), - _('Lists registered maps of a space time vector dataset.'), - _('List 3D raster dataset maps'), - _('Lists registered maps of a space time raster3d dataset.'), - _('Import'), - _('Import raster dataset'), - _('Imports space time raster dataset.'), - _('Import vector dataset'), - _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), - _('Export'), - _('Export raster dataset'), - _('Exports space time raster dataset.'), - _('Export raster dataset as VTK time series'), - _('Exports space time raster dataset as VTK time series.'), - _('Export vector dataset'), - _('Exports a space time vector dataset as GRASS GIS specific archive file.'), - _('Convert raster dataset to 3D raster'), - _('Converts a space time raster dataset into a 3D raster map.'), - _('Extraction'), - _('Extract subset of raster dataset'), - _('Extracts a subset of a space time raster datasets.'), - _('Extract subset of vector dataset'), - _('Extracts a subset of a space time vector dataset.'), - _('Extract subset of 3D raster dataset'), - _('Extracts a subset of a space time 3D raster dataset.'), - _('Query vector dataset attribute data'), - _('Prints attributes of vector maps registered in a space time vector dataset.'), - _('Raster dataset color table'), - _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), - _('Raster calculations'), - _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), - _('3D raster calculations'), - _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), - _('Interpolate gaps in raster datasets'), - _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), - _('Aggregation'), - _('Neighborhood analysis in raster dataset'), - _('Performs a neighborhood analysis for each map in a space time raster dataset.'), - _('Aggregation in raster datasets'), - _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), - _('Temporal aggregation'), - _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), - _('Temporal aggregation by dataset'), - _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), - _('Sampling'), - _('Sample a space time raster dataset at point coordinates'), - _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), - _('Query raster dataset by vector points dataset'), - _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), - _('Observe specific locations in raster dataset'), - _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), - _('Temporal sampling'), - _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), - _('Reports and statistics'), - _('Space time datasets metadata'), - _('Lists information about space time datasets and maps.'), - _('Univariate raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), - _('Univariate vector dataset statistics'), - _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), - _('Univariate 3D raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), - _('Report temporal topology'), - _('Lists temporal topology of a space time dataset.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Timeline tool'), - _('Plot temporal extents.'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Attribute table manager'), - _('Launches graphical attribute table manager.'), - _('Cartographic Composer'), - _('Launch Cartographic Composer'), - _('Georectify'), - _('Manage Ground Control Points for Georectification'), - _('Graphical modeler'), - _('Launch Graphical modeler'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Map Swipe'), - _('Launch Map Swipe'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('Timeline tool'), - _('Plot temporal extents.'), - ''] -menustrings_menudata.PsMapMenuData'> = [ - _('&File'), - _('Page setup'), - _('Specify paper size, margins and orientation'), - _('Load instruction file'), - _('Load text file with mapping instructions'), - _('Export instruction file'), - _('Generate text file with mapping instructions'), - _('Export to PostScript'), - _('Generate PostScript output'), - _('Export to PDF'), - _('Generate PDF output'), - _('Launch ps.map dialog'), - _('Launch ps.map dialog'), - _('Quit'), - _('Close Cartographic Composer'), - _('&Insert'), - _('Map frame'), - _('Add or edit map frame'), - _('Raster map'), - _('Add or edit raster map'), - _('Vector map'), - _('Add or edit vector map'), - _('Map legend'), - _('Add or edit raster and vector legend'), - _('Map info'), - _('Add or edit map info'), - _('Scale bar'), - _('Add or edit scale bar'), - _('Text'), - _('Add text'), - _('Image'), - _('Add image'), - _('North Arrow'), - _('Add north arrow'), - _('Delete'), - _('Delete selected object'), - _('&Help'), - _('Help'), - _('Display the HTML man pages of Cartographic Composer'), - _('About Cartographic Composer'), - _('Display information about Cartographic Composer'), - ''] -menustrings_menudata.LayerManagerMenuData'> = [ - _('&File'), - _('Workspace'), - _('New'), - _('Create new workspace'), - _('Open'), - _('Load workspace from file'), - _('Save'), - _('Save workspace'), - _('Save as'), - _('Save workspace to file'), - _('Close'), - _('Close workspace file'), - _('Load GRC file (Tcl/Tk GUI)'), - _('Load map layers from GRC file to layer tree'), - _('Map display'), - _('Add raster'), - _('Add raster map layer to current display'), - _('Add vector'), - _('Add vector map layer to current display'), - _('Add multiple rasters or vectors'), - _('Add multiple raster or vector map layers to current display'), - _('Add RGB raster layer'), - _('Add RGB raster map layer to current display'), - _('Add web service layer'), - _('Add web service layer'), - _('New map display window'), - _('Open new map display window'), - _('Render all map displays'), - _('Re-render maps in all open map display windows'), - _('Close current map display window'), - _('Close current map display window'), - _('Close all open map display windows'), - _('Close all open map display windows'), - _('Import raster data'), - _('Simplified raster import with reprojection'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('Import of common raster formats'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('ASCII x,y,z point import and gridding'), - _('ASCII grid import'), - _('Converts a GRASS ASCII raster file to binary raster map.'), - _('ASCII polygons, lines, and point import'), - _('Creates raster maps from ASCII polygon/line/point data files.'), - _('Raw binary array import'), - _('Import a binary raster file into a GRASS raster map layer.'), - _('GRIDATB.FOR import'), - _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), - _('Matlab 2D array import'), - _('Imports a binary MAT-File(v4) to a GRASS raster.'), - _('PNG import'), - _('Imports non-georeferenced PNG format image.'), - _('SPOT NDVI import'), - _('Imports SPOT VGT NDVI data into a raster map.'), - _('SRTM HGT import'), - _('Imports SRTM HGT files into raster map.'), - _('Terra ASTER HDF import'), - _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), - _('LAS LiDAR points import'), - _('Creates a raster map from LAS LiDAR points using univariate statistics.'), - _('Unpack raster map'), - _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Import vector data'), - _('Simplified vector import with reprojection'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('Import of common vector formats'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('ASCII points or GRASS ASCII format'), - _('Creates a vector map from an ASCII points file or ASCII vector file.'), - _('ASCII points as a vector lines'), - _('Imports ASCII x,y[,z] coordinates as a series of lines.'), - _('DXF import'), - _('Converts files in DXF format to GRASS vector map format.'), - _('WFS'), - _('Imports GetFeature from a WFS server.'), - _('ESRI e00 import'), - _('Imports E00 file into a vector map.'), - _('Geonames import'), - _('Imports geonames.org country files into a vector points map.'), - _('Matlab array or Mapgen format import'), - _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), - _('LAS LiDAR points import'), - _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), - _('Unpack vector map'), - _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Import 3D raster data'), - _('ASCII 3D import'), - _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), - _('Raw binary array 3D import'), - _('Imports a binary raster file into a GRASS 3D raster map.'), - _('Vis5D import'), - _('Import database table'), - _('Common import formats'), - _('Imports attribute tables in various formats.'), - _('Export raster map'), - _('Common export formats'), - _('Exports GRASS raster maps into GDAL supported formats.'), - _('ASCII grid export'), - _('Converts a raster map layer into a GRASS ASCII text file.'), - _('ASCII x,y,z points export'), - _('Exports a raster map to a text file as x,y,z values based on cell centers.'), - _('GRIDATB.FOR export'), - _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), - _('Matlab 2D array export'), - _('Exports a GRASS raster to a binary MAT-File.'), - _('Raw binary array export'), - _('Exports a GRASS raster to a binary array.'), - _('MPEG-1 export'), - _('Converts raster map series to MPEG movie.'), - _('PNG export'), - _('Export a GRASS raster map as a non-georeferenced PNG image.'), - _('PPM export'), - _('Converts a GRASS raster map to a PPM image file.'), - _('PPM from RGB export'), - _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), - _('POV-Ray export'), - _('Converts a raster map layer into a height-field file for POV-Ray.'), - _('VRML export'), - _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), - _('VTK export'), - _('Converts raster maps into the VTK-ASCII format.'), - _('Pack raster map'), - _('Exports a raster map as GRASS GIS specific archive file'), - _('Export vector map'), - _('Common export formats'), - _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), - _('ASCII points or GRASS ASCII vector export'), - _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), - _('DXF export'), - _('Exports vector map to DXF file format.'), - _('PostGIS export'), - _('Exports a vector map layer to PostGIS feature table.'), - _('POV-Ray export'), - _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), - _('SVG export'), - _('Exports a vector map to SVG file.'), - _('VTK export'), - _('Converts a vector map to VTK ASCII output.'), - _('Pack vector map'), - _('Exports a vector map as GRASS GIS specific archive file'), - _('Export 3D raster maps'), - _('ASCII 3D export'), - _('Converts a 3D raster map layer into a ASCII text file.'), - _('Raw binary array 3D export'), - _('Exports a GRASS 3D raster map to a binary array.'), - _('Vis5D export'), - _('VTK export'), - _('Converts 3D raster maps into the VTK-ASCII format.'), - _('Export database table'), - _('Common export formats'), - _('Exports attribute tables into various formats.'), - _('Link external data'), - _('Link external raster data'), - _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), - _('Link external vector data'), - _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), - _('Output format for raster data'), - _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), - _('Output format for vector data'), - _('Defines vector output format utilizing OGR library.'), - _('Manage maps'), - _('Copy'), - _("Copies available data files in the current mapset search path to the user's current mapset."), - _('List'), - _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), - _('Rename'), - _("Renames data base element files in the user's current mapset."), - _('Delete'), - _("Removes data base element files from the user's current mapset using the search pattern."), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('3D raster to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('Georectify'), - _('Manage Ground Control Points for Georectification'), - _('Graphical modeler'), - _('Launch Graphical modeler'), - _('Run model'), - _('Run model prepared by Graphical modeler'), - _('3D image rendering'), - _('Animation tool'), - _('Launch animation tool.'), - _('Bearing/distance to coordinates'), - _('A simple utility for converting bearing and distance measurements to coordinates and vice versa. It assumes a cartesian coordinate system'), - _('Cartographic Composer'), - _('Launch Cartographic Composer'), - _('Map Swipe'), - _('Launch Map Swipe'), - _('Launch script'), - _('Launches script file.'), - _('Simple Python Editor'), - _('Launches Simple Python Editor.'), - _('Close GUI'), - _('Close graphical user interface.'), - _('Quit GRASS GIS'), - _('Close GUI and exit GRASS GIS shell.'), - _('&Settings'), - _('Computational region'), - _('Show current region'), - _('Shows the extent and resolution of the computational region.'), - _('Show region using latitude and longitude'), - _('Shows the extent and resolution of the computational region.'), - _('Show current region extent in Map Display'), - _('Shows the extent of the computational region in Map Display.'), - _('Set region'), - _('Manages the boundary definitions for the geographic region.'), - _('GRASS working environment'), - _('Mapset access'), - _('Set/unset access to other mapsets in current location'), - _('User access'), - _('Controls access to the current mapset for other users on the system. If no option given, prints current status.'), - _('Change working environment'), - _('Changes/reports current mapset. Optionally create new mapset or list available mapsets in given location.'), - _('Change location and mapset'), - _('Change current location and mapset.'), - _('Change mapset'), - _('Change current mapset.'), - _('Change working directory'), - _('Change working directory'), - _('Show settings'), - _("Outputs and modifies the user's current GRASS variable settings."), - _('Change settings'), - _("Outputs and modifies the user's current GRASS variable settings. Prints all defined GRASS variables if no option is given."), - _('Create new location'), - _('Launches location wizard to create new GRASS location.'), - _('Create new mapset'), - _('Creates new mapset in the current location, changes current mapset.'), - _('Version and copyright'), - _('Displays version and copyright information.'), - _('Map projections'), - _('Display map projection'), - _('Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).'), - _('Manage projections'), - _('Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.'), - _('Convert coordinates'), - _('Converts coordinates from one projection to another (cs2cs frontend).'), - _('Addons extensions'), - _('Install extension from addons'), - _('Installs new extension from GRASS AddOns repository.'), - _('Manage installed extension'), - _('Updates or removes installed GRASS AddOns extension(s).'), - _('Preferences'), - _('User GUI preferences (display font, commands, digitizer, etc.)'), - _('&Raster'), - _('Develop raster map'), - _('Compress/decompress'), - _('Compresses and decompresses raster maps.'), - _('Region boundaries'), - _('Sets the boundary definitions for a raster map.'), - _('Manage NULL values'), - _('Manages NULL-values of given raster map.'), - _('Quantization'), - _('Produces the quantization file for a floating-point map.'), - _('Timestamp'), - _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), - _('Resample using aggregate statistics'), - _('Resamples raster map layers to a coarser grid using aggregation.'), - _('Resample using multiple methods'), - _('Resamples raster map to a finer grid using interpolation.'), - _('Resample using nearest neighbor'), - _('GRASS raster map layer data resampling capability.'), - _('Resample using spline tension'), - _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), - _('Resample using bspline'), - _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), - _('Resample using analytic kernel'), - _('Resamples raster map layers using an analytic kernel.'), - _('Support file maintenance'), - _('Allows creation and/or modification of raster map layer support files.'), - _('Update map statistics'), - _('Update raster map statistics'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Tiling'), - _('Produces tilings of the source projection for use in the destination region and projection.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a raster map.'), - _('Color tables (stddev)'), - _("Sets color rules based on stddev from a raster map's mean value."), - _('Manage color rules interactively'), - _('Interactive management of raster color tables.'), - _('Export color table'), - _('Exports the color table associated with a raster map.'), - _('Blend 2 color rasters'), - _('Blends color components of two raster maps by a given ratio.'), - _('Create RGB'), - _('Combines red, green and blue raster maps into a single composite raster map.'), - _('RGB to HIS'), - _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), - _('Query raster maps'), - _('Query values by coordinates'), - _('Queries raster maps on their category values and category labels.'), - _('Query colors by value'), - _('Queries colors for a raster map layer.'), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Raster buffers and distance'), - _('Buffer rasters'), - _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), - _('Concentric circles'), - _('Creates a raster map containing concentric rings around a given point.'), - _('Closest points'), - _('Locates the closest points between objects in two raster maps.'), - _('Grow by one cell'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Mask'), - _('Creates a MASK for limiting raster operation.'), - _('Raster map calculator'), - _('Simplified raster map calculator'), - _('Raster map calculator'), - _('Raster map calculator.'), - _('Neighborhood analysis'), - _('Moving window'), - _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), - _('Neighborhood points'), - _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), - _('Overlay rasters'), - _('Cross product'), - _('Creates a cross product of the category values from multiple raster map layers.'), - _('Patch raster maps'), - _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), - _('Raster series aggregation'), - _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), - _('Raster series accumulation'), - _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), - _('Statistical overlay'), - _('Calculates category or object oriented statistics (accumulator-based statistics).'), - _('Quantiles overlay'), - _('Compute category quantiles using two passes.'), - _('Solar radiance and shadows'), - _('LatLong map'), - _('Creates a latitude/longitude raster map.'), - _('Solar irradiance and irradiation'), - _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), - _('Shadows map'), - _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), - _('Sunshine hours and solar angles'), - _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), - _('Terrain analysis'), - _('Generate contour lines'), - _('Produces a vector map of specified contours from a raster map.'), - _('Cost surface'), - _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Cumulative movement costs'), - _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Least cost route or flow'), - _('Traces a flow through an elevation model or cost surface on a raster map.'), - _('Compute shaded relief'), - _('Creates shaded relief map from an elevation map (DEM). '), - _('Apply shade to raster'), - _('Drapes a color raster over an shaded relief or aspect map.'), - _('Slope and aspect'), - _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), - _('Landforms'), - _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), - _('Terrain parameters'), - _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), - _('Textural features'), - _('Generate images with textural features from a raster map.'), - _('Visibility'), - _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Horizon angle'), - _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), - _('Transform features'), - _('Clump'), - _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), - _('Grow'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Thin'), - _('Thins non-null cells that denote linear features in a raster map layer.'), - _('Hydrologic modeling'), - _('Carve stream channels'), - _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), - _('Fill lake'), - _('Fills lake at given point to given level.'), - _('Depressionless map and flowlines'), - _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), - _('Flow accumulation'), - _('Performs flow computation for massive grids.'), - _('Flow lines'), - _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), - _('Watershed analysis'), - _('Calculates hydrological parameters and RUSLE factors.'), - _('Watershed subbasins'), - _('Generates watershed subbasins raster map.'), - _('Watershed basin creation'), - _('Creates watershed basins from a drainage direction map.'), - _('Extraction of stream networks'), - _('Performs stream network extraction.'), - _('SIMWE Overland flow modeling'), - _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), - _('SIMWE Sediment flux modeling'), - _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), - _('Topographic index map'), - _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), - _('TOPMODEL simulation'), - _('Simulates TOPMODEL which is a physically based hydrologic model.'), - _('USLE K-factor'), - _('Computes USLE Soil Erodibility Factor (K).'), - _('USLE R-factor'), - _('Computes USLE R factor, Rainfall erosivity index.'), - _('Groundwater modeling'), - _('Groundwater flow'), - _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), - _('Groundwater solute transport'), - _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), - _('Landscape patch analysis'), - _('Set up sampling and analysis framework'), - _("Configuration editor for r.li.'index'"), - _('Edge density'), - _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), - _('Contrast weighted edge density'), - _('Calculates contrast weighted edge density index on a raster map'), - _('Patch area mean'), - _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), - _('Patch area range'), - _('Calculates range of patch area size on a raster map'), - _('Patch area Std Dev'), - _('Calculates standard deviation of patch area a raster map'), - _('Patch area Coeff Var'), - _('Calculates coefficient of variation of patch area on a raster map'), - _('Patch density'), - _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), - _('Patch number'), - _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), - _("Dominance's diversity"), - _("Calculates dominance's diversity index on a raster map"), - _("Shannon's diversity"), - _("Calculates Shannon's diversity index on a raster map"), - _("Simpson's diversity"), - _("Calculates Simpson's diversity index on a raster map"), - _('Richness'), - _('Calculates richness index on a raster map'), - _('Shape index'), - _('Calculates shape index on a raster map'), - _('Wildfire modeling'), - _('Rate of spread'), - _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), - _('Least-cost spread paths'), - _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), - _('Anisotropic spread simulation'), - _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), - _('Change category values and labels'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('Interactively edit category values'), - _('Edits cell values in a raster map.'), - _('Reclassify by size'), - _('Reclasses a raster map greater or less than user specified area size (in hectares).'), - _('Reclassify'), - _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), - _('Recode'), - _('Recodes categorical raster maps.'), - _('Rescale'), - _('Rescales the range of category values in a raster map layer.'), - _('Rescale with histogram'), - _('Rescales histogram equalized the range of category values in a raster map layer.'), - _('Generate random cells'), - _('Random cells'), - _('Generates random cell values with spatial dependence.'), - _('Random cells and vector points'), - _('Creates a raster map layer and vector point map containing randomly located points.'), - _('Generate surfaces'), - _('Fractal surface'), - _('Creates a fractal surface of a given fractal dimension.'), - _('Gaussian kernel density surface'), - _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), - _('Gaussian deviates surface'), - _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), - _('Plane'), - _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), - _('Random deviates surface'), - _('Produces a raster surface map of uniform random deviates with defined range.'), - _('Random surface with spatial dependence'), - _('Generates random surface(s) with spatial dependence.'), - _('Interpolate surfaces'), - _('Bilinear and bicubic from vector points'), - _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), - _('IDW from raster points'), - _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), - _('IDW from vector points'), - _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), - _('Raster contours'), - _('Generates surface raster map from rasterized contours.'), - _('Regularized spline tension'), - _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), - _('Raster series interpolation'), - _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), - _('Fill NULL cells'), - _('Fills no-data areas in raster maps using spline interpolation.'), - _('Reports and statistics'), - _('Basic raster metadata'), - _('Outputs basic information about a raster map.'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('General statistics'), - _('Generates area statistics for raster map.'), - _('Quantiles for large data sets'), - _('Compute quantiles using two passes.'), - _('Range of category values'), - _('Prints terse list of category values found in a raster map layer.'), - _('Sum area by raster map and category'), - _('Reports statistics for raster maps.'), - _('Statistics for clumped cells'), - _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), - _('Total corrected area'), - _('Prints estimation of surface area for raster map.'), - _('Univariate raster statistics'), - _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('Sample transects'), - _('Outputs the raster map layer values lying on user-defined line(s).'), - _('Sample transects (bearing/distance)'), - _('Outputs raster map layer values lying along user defined transect line(s).'), - _('Covariance/correlation'), - _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), - _('Linear regression'), - _('Calculates linear regression from two raster maps: y = a + b*x.'), - _('Multiple regression'), - _('Calculates multiple linear regression from raster maps.'), - _('Mutual category occurrences'), - _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), - _('&Vector'), - _('Develop vector map'), - _('Create new vector map'), - _('Create new empty vector map'), - _('Edit vector map (non-interactively)'), - _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), - _('Convert object types'), - _('Changes type of vector features.'), - _('Parallel lines'), - _('Creates parallel line to input vector lines.'), - _('Dissolve boundaries'), - _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), - _('Create 3D vector over raster'), - _('Converts 2D vector features to 3D by sampling of elevation raster map.'), - _('Extrude 3D vector map'), - _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), - _('Create labels'), - _('Creates paint labels for a vector map from attached attributes.'), - _('Reposition vector map'), - _('Performs an affine transformation (shift, scale and rotate) on vector map.'), - _('Rectify vector map'), - _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Support file maintenance'), - _('Updates vector map metadata.'), - _('Topology maintenance'), - _('Create or rebuild topology'), - _('Creates topology for vector map. Optionally also checks for topological errors.'), - _('Rebuild topology on all vector maps'), - _('Rebuilds topology on all vector maps in the current mapset.'), - _('Build polylines'), - _('Builds polylines from lines or boundaries.'), - _('Split lines'), - _('Splits vector lines to shorter segments.'), - _('Split polylines'), - _('Creates points/segments from input vector lines and positions.'), - _('Clean vector map'), - _('Toolset for cleaning topology of vector map.'), - _('Smooth or simplify'), - _('Performs vector based generalization.'), - _('Add centroids'), - _('Adds missing centroids to closed boundaries.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a vector map.'), - _('Manage color rules interactively'), - _('Interactive management of vector color tables.'), - _('Export color table'), - _('Exports the color table associated with a vector map.'), - _('Query vector map'), - _('Query with coordinate(s)'), - _('Queries a vector map at given locations.'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('Feature selection'), - _('Select by attributes'), - _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), - _('Select by another map'), - _('Selects features from vector map (A) by features from other vector map (B).'), - _('Map type conversions'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('Buffer vectors'), - _('Creates a buffer around vector features of given type.'), - _('Point analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Identify point clusters'), - _('Performs cluster identification.'), - _('Indices for quadrat counts of vector point lists'), - _('Indices for quadrat counts of vector point lists.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Tests for normality for vector points'), - _('Tests for normality for vector points.'), - _('Lidar analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Detect edges'), - _("Detects the object's edges from a LIDAR data set."), - _('Detect interiors'), - _('Building contour determination and Region Growing algorithm for determining the building inside'), - _('Correct and reclassify objects'), - _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), - _('Linear referencing'), - _('Create LRS'), - _('Creates a linear reference system.'), - _('Create stationing'), - _('Creates stationing from input lines, and linear reference system.'), - _('Create points/segments'), - _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), - _('Find line id and offset'), - _('Finds line id and real km+offset for given points in vector map using linear reference system.'), - _('Nearest features'), - _("Finds the nearest element in vector map 'to' for elements in vector map 'from'."), - _('Network analysis'), - _('Vector network analysis tool'), - _('Tool for interactive vector network analysis.'), - _('Network preparation'), - _('Performs network maintenance.'), - _('Allocate subnets'), - _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Split net'), - _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Shortest path'), - _('Finds shortest path on vector network.'), - _('Shortest path for sets of features'), - _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), - _('Shortest path using timetables'), - _('Finds shortest path using timetables.'), - _('Shortest path for all pairs'), - _('Computes the shortest path between all pairs of nodes in the network.'), - _('Visibility network'), - _('Performs visibility graph construction.'), - _('Bridges and articulation points'), - _('Computes bridges and articulation points in the network.'), - _('Maximum flow'), - _('Computes the maximum flow between two sets of nodes in the network.'), - _('Vertex connectivity'), - _('Computes vertex connectivity between two sets of nodes in the network.'), - _('Components'), - _('Computes strongly and weakly connected components in the network.'), - _('Centrality'), - _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), - _('Steiner tree'), - _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), - _('Minimum spanning tree'), - _('Computes minimum spanning tree for the network.'), - _('Traveling salesman analysis'), - _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), - _('Overlay vector maps'), - _('Clip vector maps'), - _('Overlay vector maps'), - _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), - _('Patch vector maps'), - _('Creates a new vector map by combining other vector maps.'), - _('Manage categories'), - _('Change or report categories'), - _('Attaches, deletes or reports vector categories to map geometry.'), - _('Reclassify'), - _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), - _('Update attributes'), - _('Update area attributes from raster'), - _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), - _('Update area attributes from vector'), - _('Count points in areas, calculate statistics from point attributes.'), - _('Update point attributes from areas'), - _('Uploads vector values at positions of vector points to the table.'), - _('Update database values from vector'), - _('Populates attribute values from vector features.'), - _('Sample raster maps at point locations'), - _('Uploads raster values at positions of vector points to the table.'), - _('Sample raster neighborhood around points'), - _('Samples a raster map at vector point locations.'), - _('Generate area for current region'), - _('Creates a vector polygon from the current region extent.'), - _('Generate areas from points'), - _('Convex hull'), - _('Produces a 2D/3D convex hull for a given vector map.'), - _('Delaunay triangles'), - _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), - _('Voronoi diagram/Thiessen polygons'), - _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), - _('Generate grid'), - _('Creates a vector map of a user-defined grid.'), - _('Generate points'), - _('Generate from database'), - _('Creates new vector (points) map from database table containing coordinates.'), - _('Generate points along lines'), - _('Creates points along input lines in new vector map with 2 layers.'), - _('Generate random points'), - _('Generates random 2D/3D vector points.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Remove outliers in point sets'), - _('Removes outliers from vector point data.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Reports and statistics'), - _('Basic vector metadata'), - _('Outputs basic information about a vector map.'), - _('Classify attribute data'), - _('Classifies attribute data, e.g. for thematic mapping'), - _('Report topology by category'), - _('Reports geometry statistics for vector maps.'), - _('Univariate attribute statistics for points'), - _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), - _('Univariate statistics for attribute columns'), - _('Calculates univariate statistics on selected table column for a GRASS vector map.'), - _('Sample transects'), - _('Vector map profiling tool'), - _('Quadrat indices'), - _('Indices for quadrat counts of vector point lists.'), - _('Test normality'), - _('Tests for normality for vector points.'), - _('&Imagery'), - _('Develop images and groups'), - _('Create/edit group'), - _('Creates, edits, and lists groups of imagery files.'), - _('Target group'), - _('Targets an imagery group to a GRASS location and mapset.'), - _('Mosaic images'), - _('Mosaics several images and extends colormap.'), - _('Manage image colors'), - _('Color balance for RGB'), - _('Performs auto-balancing of colors for RGB images.'), - _('HIS to RGB'), - _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), - _('RGB to HIS'), - _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), - _('Rectify image or raster'), - _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), - _('Histogram'), - _('Generate histogram of image'), - _('Spectral response'), - _('Displays spectral response at user specified locations in group or images.'), - _('Pan sharpening'), - _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), - _('Classify image'), - _('Clustering input for unsupervised classification'), - _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), - _('Input for supervised MLC'), - _('Generates statistics for i.maxlik from raster map.'), - _('Maximum likelihood classification (MLC)'), - _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Input for supervised SMAP'), - _('Generates statistics for i.smap from raster map.'), - _('Sequential maximum a posteriori classification (SMAP)'), - _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), - _('Object segmentation'), - _('Identifies segments (objects) from imagery data.'), - _('Filter image'), - _('Edge detection'), - _('Zero-crossing "edge detection" raster function for image processing.'), - _('Matrix/convolving filter'), - _('Performs raster map matrix filter.'), - _('Transform image'), - _('Canonical correlation'), - _('Canonical components analysis (CCA) program for image processing.'), - _('Principal components'), - _('Principal components analysis (PCA) for image processing.'), - _('Fast Fourier'), - _('Fast Fourier Transform (FFT) for image processing.'), - _('Inverse Fast Fourier'), - _('Inverse Fast Fourier Transform (IFFT) for image processing.'), - _('Satellite images tools'), - _('Aster DN to radiance/reflectance'), - _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), - _('Landsat DN to radiance/reflectance'), - _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), - _('Landsat cloud cover assessment'), - _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), - _('Modis quality control'), - _('Extracts quality control parameters from MODIS QC layers.'), - _('Atmospheric correction'), - _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), - _('Topographic correction'), - _('Computes topographic correction of reflectance.'), - _('Orthophoto tools'), - _('Manage GCPs for 3D correction'), - _('Georectifies a map and allows managing GCP for 3D correction.'), - _('Corrects scanning distortions'), - _('Corrects scanning distortions of a scanned aerial photo.'), - _('Satellite images products'), - _('Vegetation indices'), - _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), - _('Tasseled cap vegetation index'), - _('Performs Tasseled Cap (Kauth Thomas) transformation.'), - _('Albedo'), - _('Computes broad band albedo from surface reflectance.'), - _('Emissivity'), - _('Computes emissivity from NDVI, generic method for sparse land.'), - _('Biomass growth'), - _('Computes biomass growth, precursor of crop yield calculation.'), - _('Evapotranspiration calculation'), - _('Instantaneaous Net Radiation'), - _('Net radiation approximation (Bastiaanssen, 1995).'), - _('Soil heat flux'), - _('Soil heat flux approximation (Bastiaanssen, 1995).'), - _('Sensible heat flux'), - _('Computes sensible heat flux iteration SEBAL 01.'), - _('Evaporative fraction'), - _('Computes evaporative fraction and root zone soil moisture.'), - _('Actual Evapotranspiration'), - _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), - _('Temporal integration of ETa'), - _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), - _('Hargreaves methods Evapotranspiration'), - _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), - _('Penman-Monteith Evapotranspiration'), - _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), - _('Priestley-Taylor Evapotranspiration'), - _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), - _('Reports and statistics'), - _('Kappa analysis'), - _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), - _('OIF for LandSat TM'), - _('Calculates Optimum-Index-Factor table for spectral bands'), - _('3D r&aster'), - _('Develop 3D raster map'), - _('Manage 3D NULL values'), - _('Explicitly create the 3D NULL-value bitmap file.'), - _('Manage timestamp'), - _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), - _('Map type conversions'), - _('3D rasters to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('3D color tables'), - _('Creates/modifies the color table associated with a 3D raster map.'), - _('Export 3D color table'), - _('Exports the color table associated with a 3D raster map.'), - _('3D mask'), - _('Establishes the current working 3D raster mask.'), - _('3D raster map calculator'), - _('3D raster map calculator'), - _('Cross section'), - _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), - _('Groundwater modeling'), - _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), - _('Interpolate 3D raster from points'), - _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), - _('Reports and statistics'), - _('Basic 3D raster metadata'), - _('Outputs basic information about a user-specified 3D raster map layer.'), - _('3D raster statistics'), - _('Generates volume statistics for 3D raster maps.'), - _('Univariate statistics for 3D rasters'), - _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('&Database'), - _('Database information'), - _('List databases'), - _('Lists all databases for a given driver and location.'), - _('List drivers'), - _('Lists all database drivers.'), - _('List tables'), - _('Lists all tables for a given database.'), - _('Describe table'), - _('Describes a table in detail.'), - _('List columns'), - _('List all columns for a given table.'), - _('Manage databases'), - _('Connect'), - _('Prints/sets general DB connection for current mapset.'), - _('Login'), - _('Sets user/password for DB driver/database.'), - _('Create database'), - _('Creates an empty database.'), - _('Drop database'), - _('Removes an existing database.'), - _('Drop table'), - _('Drops an attribute table.'), - _('Copy table'), - _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), - _('Drop column'), - _('Drops a column from selected attribute table.'), - _('Test'), - _('Test database driver, database must exist and set by db.connect.'), - _('Query'), - _('Query any table'), - _('Selects data from attribute table. Performs SQL query statement(s).'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('SQL statement'), - _("Executes any SQL statement. For SELECT statements use 'db.select'."), - _('Vector database connections'), - _('New table'), - _('Creates and connects a new attribute table to a given layer of an existing vector map.'), - _('Remove table'), - _('Removes existing attribute table of a vector map.'), - _('Join table'), - _('Joins a database table to a vector map table.'), - _('Add columns'), - _('Adds one or more columns to the attribute table connected to a given vector map.'), - _('Drop column'), - _('Drops a column from the attribute table connected to a given vector map.'), - _('Rename column'), - _('Renames a column in the attribute table connected to a given vector map.'), - _('Change values'), - _('Updates a column in the attribute table connected to a vector map.'), - _('Drop row'), - _('Removes a vector feature from a vector map through attribute selection.'), - _('Reconnect vectors to database'), - _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), - _('Set vector map - database connection'), - _('Prints/sets DB connection for a vector map to attribute table.'), - _('&Temporal'), - _('Manage datasets'), - _('Connect temporal database'), - _('Prints/sets general temporal GIS database connection for current mapset.'), - _('Create'), - _('Creates a space time dataset.'), - _('Rename'), - _('Renames a space time dataset'), - _('Remove'), - _('Removes space time datasets from temporal database.'), - _('Update metadata'), - _('Modifies the metadata of a space time dataset.'), - _('Merge'), - _('Merges several space time datasets into a single space time dataset.'), - _('Temporally shift'), - _('Shifts temporally the maps of a space time dataset.'), - _('Snap maps of dataset'), - _('Snaps temporally the maps of a space time dataset.'), - _('List'), - _('Lists space time datasets and maps registered in the temporal database.'), - _('Manage maps in datasets'), - _('Register maps in datasets'), - _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), - _('Unregister maps from datasets'), - _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), - _('List raster dataset maps'), - _('Lists registered maps of a space time raster dataset.'), - _('List vector dataset maps'), - _('Lists registered maps of a space time vector dataset.'), - _('List 3D raster dataset maps'), - _('Lists registered maps of a space time raster3d dataset.'), - _('Import'), - _('Import raster dataset'), - _('Imports space time raster dataset.'), - _('Import vector dataset'), - _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), - _('Export'), - _('Export raster dataset'), - _('Exports space time raster dataset.'), - _('Export raster dataset as VTK time series'), - _('Exports space time raster dataset as VTK time series.'), - _('Export vector dataset'), - _('Exports a space time vector dataset as GRASS GIS specific archive file.'), - _('Convert raster dataset to 3D raster'), - _('Converts a space time raster dataset into a 3D raster map.'), - _('Extraction'), - _('Extract subset of raster dataset'), - _('Extracts a subset of a space time raster datasets.'), - _('Extract subset of vector dataset'), - _('Extracts a subset of a space time vector dataset.'), - _('Extract subset of 3D raster dataset'), - _('Extracts a subset of a space time 3D raster dataset.'), - _('Query vector dataset attribute data'), - _('Prints attributes of vector maps registered in a space time vector dataset.'), - _('Raster dataset color table'), - _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), - _('Raster calculations'), - _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), - _('3D raster calculations'), - _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), - _('Interpolate gaps in raster datasets'), - _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), - _('Aggregation'), - _('Neighborhood analysis in raster dataset'), - _('Performs a neighborhood analysis for each map in a space time raster dataset.'), - _('Aggregation in raster datasets'), - _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), - _('Temporal aggregation'), - _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), - _('Temporal aggregation by dataset'), - _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), - _('Sampling'), - _('Sample a space time raster dataset at point coordinates'), - _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), - _('Query raster dataset by vector points dataset'), - _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), - _('Observe specific locations in raster dataset'), - _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), - _('Temporal sampling'), - _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), - _('Reports and statistics'), - _('Space time datasets metadata'), - _('Lists information about space time datasets and maps.'), - _('Univariate raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), - _('Univariate vector dataset statistics'), - _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), - _('Univariate 3D raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), - _('Report temporal topology'), - _('Lists temporal topology of a space time dataset.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Timeline tool'), - _('Plot temporal extents.'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('&Help'), - _('GRASS help'), - _('Display the HTML man pages of GRASS GIS'), - _('GUI help'), - _('Display the HTML man pages of GRASS GIS'), - _('About system'), - _('Prints system information'), - _('About GRASS GIS'), - _('About GRASS GIS'), - ''] -menustrings_menudata.LayerManagerModuleTree'> = [ - _('Import, export and link data'), - _('Import raster data'), - _('Simplified raster import with reprojection'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('Import of common raster formats'), - _('Imports raster data into a GRASS raster map using GDAL library.'), - _('ASCII x,y,z point import and gridding'), - _('ASCII grid import'), - _('Converts a GRASS ASCII raster file to binary raster map.'), - _('ASCII polygons, lines, and point import'), - _('Creates raster maps from ASCII polygon/line/point data files.'), - _('Raw binary array import'), - _('Import a binary raster file into a GRASS raster map layer.'), - _('GRIDATB.FOR import'), - _('Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.'), - _('Matlab 2D array import'), - _('Imports a binary MAT-File(v4) to a GRASS raster.'), - _('PNG import'), - _('Imports non-georeferenced PNG format image.'), - _('SPOT NDVI import'), - _('Imports SPOT VGT NDVI data into a raster map.'), - _('SRTM HGT import'), - _('Imports SRTM HGT files into raster map.'), - _('Terra ASTER HDF import'), - _('Georeference, rectify, and import Terra-ASTER imagery and relative DEMs using gdalwarp.'), - _('LAS LiDAR points import'), - _('Creates a raster map from LAS LiDAR points using univariate statistics.'), - _('Unpack raster map'), - _('Imports a GRASS GIS specific raster archive file (packed with r.pack) as a raster map'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Import vector data'), - _('Simplified vector import with reprojection'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('Import of common vector formats'), - _('Imports vector data into a GRASS vector map using OGR library.'), - _('ASCII points or GRASS ASCII format'), - _('Creates a vector map from an ASCII points file or ASCII vector file.'), - _('ASCII points as a vector lines'), - _('Imports ASCII x,y[,z] coordinates as a series of lines.'), - _('DXF import'), - _('Converts files in DXF format to GRASS vector map format.'), - _('WFS'), - _('Imports GetFeature from a WFS server.'), - _('ESRI e00 import'), - _('Imports E00 file into a vector map.'), - _('Geonames import'), - _('Imports geonames.org country files into a vector points map.'), - _('Matlab array or Mapgen format import'), - _('Imports Mapgen or Matlab-ASCII vector maps into GRASS.'), - _('LAS LiDAR points import'), - _('Converts LAS LiDAR point clouds to a GRASS vector map with libLAS.'), - _('Unpack vector map'), - _('Imports a GRASS GIS specific vector archive file (packed with v.pack) as a vector map'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Import 3D raster data'), - _('ASCII 3D import'), - _('Converts a 3D ASCII raster text file into a (binary) 3D raster map.'), - _('Raw binary array 3D import'), - _('Imports a binary raster file into a GRASS 3D raster map.'), - _('Vis5D import'), - _('Import database table'), - _('Common import formats'), - _('Imports attribute tables in various formats.'), - _('Export raster map'), - _('Common export formats'), - _('Exports GRASS raster maps into GDAL supported formats.'), - _('ASCII grid export'), - _('Converts a raster map layer into a GRASS ASCII text file.'), - _('ASCII x,y,z points export'), - _('Exports a raster map to a text file as x,y,z values based on cell centers.'), - _('GRIDATB.FOR export'), - _('Exports GRASS raster map to GRIDATB.FOR map file (TOPMODEL).'), - _('Matlab 2D array export'), - _('Exports a GRASS raster to a binary MAT-File.'), - _('Raw binary array export'), - _('Exports a GRASS raster to a binary array.'), - _('MPEG-1 export'), - _('Converts raster map series to MPEG movie.'), - _('PNG export'), - _('Export a GRASS raster map as a non-georeferenced PNG image.'), - _('PPM export'), - _('Converts a GRASS raster map to a PPM image file.'), - _('PPM from RGB export'), - _('Converts 3 GRASS raster layers (R,G,B) to a PPM image file.'), - _('POV-Ray export'), - _('Converts a raster map layer into a height-field file for POV-Ray.'), - _('VRML export'), - _('Exports a raster map to the Virtual Reality Modeling Language (VRML).'), - _('VTK export'), - _('Converts raster maps into the VTK-ASCII format.'), - _('Pack raster map'), - _('Exports a raster map as GRASS GIS specific archive file'), - _('Export vector map'), - _('Common export formats'), - _('Exports a vector map layer to any of the supported OGR vector formats. By default a vector map layer is exported to OGC GeoPackage format.'), - _('ASCII points or GRASS ASCII vector export'), - _("Exports a vector map to a GRASS ASCII vector representation. By default only features with category are exported. To export all features use 'layer=-1'."), - _('DXF export'), - _('Exports vector map to DXF file format.'), - _('PostGIS export'), - _('Exports a vector map layer to PostGIS feature table.'), - _('POV-Ray export'), - _('Converts GRASS x,y,z points to POV-Ray x,z,y format.'), - _('SVG export'), - _('Exports a vector map to SVG file.'), - _('VTK export'), - _('Converts a vector map to VTK ASCII output.'), - _('Pack vector map'), - _('Exports a vector map as GRASS GIS specific archive file'), - _('Export 3D raster maps'), - _('ASCII 3D export'), - _('Converts a 3D raster map layer into a ASCII text file.'), - _('Raw binary array 3D export'), - _('Exports a GRASS 3D raster map to a binary array.'), - _('Vis5D export'), - _('VTK export'), - _('Converts 3D raster maps into the VTK-ASCII format.'), - _('Export database table'), - _('Common export formats'), - _('Exports attribute tables into various formats.'), - _('Link external data'), - _('Link external raster data'), - _('Link GDAL supported raster data as a pseudo GRASS raster map layer.'), - _('Link external vector data'), - _('Creates a new pseudo-vector map as a link to an OGR-supported layer.'), - _('Output format for raster data'), - _('Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format.'), - _('Output format for vector data'), - _('Defines vector output format utilizing OGR library.'), - _('Manage maps'), - _('Copy'), - _("Copies available data files in the current mapset search path to the user's current mapset."), - _('List'), - _('Lists available GRASS data base files of the user-specified data type optionally using the search pattern.'), - _('Rename'), - _("Renames data base element files in the user's current mapset."), - _('Delete'), - _("Removes data base element files from the user's current mapset using the search pattern."), - _('Computational region'), - _('Show current region'), - _('Shows the extent and resolution of the computational region.'), - _('Show region using latitude and longitude'), - _('Shows the extent and resolution of the computational region.'), - _('Show current region extent in Map Display'), - _('Shows the extent of the computational region in Map Display.'), - _('Set region'), - _('Manages the boundary definitions for the geographic region.'), - _('&Raster'), - _('Develop raster map'), - _('Compress/decompress'), - _('Compresses and decompresses raster maps.'), - _('Region boundaries'), - _('Sets the boundary definitions for a raster map.'), - _('Manage NULL values'), - _('Manages NULL-values of given raster map.'), - _('Quantization'), - _('Produces the quantization file for a floating-point map.'), - _('Timestamp'), - _('Modifies a timestamp for a raster map. Print/add/remove a timestamp for a raster map.'), - _('Resample using aggregate statistics'), - _('Resamples raster map layers to a coarser grid using aggregation.'), - _('Resample using multiple methods'), - _('Resamples raster map to a finer grid using interpolation.'), - _('Resample using nearest neighbor'), - _('GRASS raster map layer data resampling capability.'), - _('Resample using spline tension'), - _('Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.'), - _('Resample using bspline'), - _('Performs bilinear or bicubic spline interpolation with Tykhonov regularization.'), - _('Resample using analytic kernel'), - _('Resamples raster map layers using an analytic kernel.'), - _('Support file maintenance'), - _('Allows creation and/or modification of raster map layer support files.'), - _('Update map statistics'), - _('Update raster map statistics'), - _('Reproject raster map from different GRASS location'), - _('Re-projects a raster map from given location to the current location.'), - _('Tiling'), - _('Produces tilings of the source projection for use in the destination region and projection.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a raster map.'), - _('Color tables (stddev)'), - _("Sets color rules based on stddev from a raster map's mean value."), - _('Manage color rules interactively'), - _('Interactive management of raster color tables.'), - _('Export color table'), - _('Exports the color table associated with a raster map.'), - _('Blend 2 color rasters'), - _('Blends color components of two raster maps by a given ratio.'), - _('Create RGB'), - _('Combines red, green and blue raster maps into a single composite raster map.'), - _('RGB to HIS'), - _('Generates red, green and blue (RGB) raster map layers combining hue, intensity and saturation (HIS) values from user-specified input raster map layers.'), - _('Query raster maps'), - _('Query values by coordinates'), - _('Queries raster maps on their category values and category labels.'), - _('Query colors by value'), - _('Queries colors for a raster map layer.'), - _('Map type conversions'), - _('Raster to vector'), - _('Converts a raster map into a vector map.'), - _('Raster series to 3D raster'), - _('Converts 2D raster map slices to one 3D raster volume map.'), - _('Raster 2.5D to 3D raster'), - _('Creates a 3D volume map based on 2D elevation and value raster maps.'), - _('Raster buffers and distance'), - _('Buffer rasters'), - _('Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.'), - _('Concentric circles'), - _('Creates a raster map containing concentric rings around a given point.'), - _('Closest points'), - _('Locates the closest points between objects in two raster maps.'), - _('Grow by one cell'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Mask'), - _('Creates a MASK for limiting raster operation.'), - _('Raster map calculator'), - _('Simplified raster map calculator'), - _('Raster map calculator'), - _('Raster map calculator.'), - _('Neighborhood analysis'), - _('Moving window'), - _('Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.'), - _('Neighborhood points'), - _('Neighborhood analysis tool for vector point maps. Makes each cell value a function of the attribute values assigned to the vector points or centroids around it, and stores new cell values in an output raster map.'), - _('Overlay rasters'), - _('Cross product'), - _('Creates a cross product of the category values from multiple raster map layers.'), - _('Patch raster maps'), - _('Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer.'), - _('Raster series aggregation'), - _('Makes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers.'), - _('Raster series accumulation'), - _('Makes each output cell value a accumulationfunction of the values assigned to the corresponding cells in the input raster map layers.'), - _('Statistical overlay'), - _('Calculates category or object oriented statistics (accumulator-based statistics).'), - _('Quantiles overlay'), - _('Compute category quantiles using two passes.'), - _('Solar radiance and shadows'), - _('LatLong map'), - _('Creates a latitude/longitude raster map.'), - _('Solar irradiance and irradiation'), - _('Solar irradiance and irradiation model. Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.'), - _('Shadows map'), - _('Calculates cast shadow areas from sun position and elevation raster map. Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.'), - _('Sunshine hours and solar angles'), - _("Calculates solar elevation, solar azimuth, and sun hours. Solar elevation: the angle between the direction of the geometric center of the sun's apparent disk and the (idealized) horizon. Solar azimuth: the angle from due north in clockwise direction."), - _('Terrain analysis'), - _('Generate contour lines'), - _('Produces a vector map of specified contours from a raster map.'), - _('Cost surface'), - _('Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Cumulative movement costs'), - _('Creates a raster map showing the anisotropic cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.'), - _('Least cost route or flow'), - _('Traces a flow through an elevation model or cost surface on a raster map.'), - _('Compute shaded relief'), - _('Creates shaded relief map from an elevation map (DEM). '), - _('Apply shade to raster'), - _('Drapes a color raster over an shaded relief or aspect map.'), - _('Slope and aspect'), - _('Generates raster maps of slope, aspect, curvatures and partial derivatives from an elevation raster map. Aspect is calculated counterclockwise from east.'), - _('Landforms'), - _('Calculates geomorphons (terrain forms) and associated geometry using machine vision approach.'), - _('Terrain parameters'), - _('Extracts terrain parameters from a DEM. Uses a multi-scale approach by taking fitting quadratic parameters to any size window (via least squares).'), - _('Textural features'), - _('Generate images with textural features from a raster map.'), - _('Visibility'), - _('Computes the viewshed of a point on an elevation raster map. Default format: NULL (invisible), vertical angle wrt viewpoint (visible).'), - _('Distance to features'), - _('Generates a raster map containing distances to nearest raster features.'), - _('Horizon angle'), - _("Computes horizon angle height from a digital elevation model. The module has two different modes of operation: 1. Computes the entire horizon around a single point whose coordinates are given with the 'coord' option. The horizon height (in radians). 2. Computes one or more raster maps of the horizon height in a single direction. The input for this is the angle (in degrees), which is measured counterclockwise with east=0, north=90 etc. The output is the horizon height in radians."), - _('Transform features'), - _('Clump'), - _('Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories.'), - _('Grow'), - _('Generates a raster map layer with contiguous areas grown by one cell.'), - _('Thin'), - _('Thins non-null cells that denote linear features in a raster map layer.'), - _('Hydrologic modeling'), - _('Carve stream channels'), - _('Generates stream channels. Takes vector stream data, transforms it to raster and subtracts depth from the output DEM.'), - _('Fill lake'), - _('Fills lake at given point to given level.'), - _('Depressionless map and flowlines'), - _('Filters and generates a depressionless elevation map and a flow direction map from a given elevation raster map.'), - _('Flow accumulation'), - _('Performs flow computation for massive grids.'), - _('Flow lines'), - _('Constructs flowlines. Computes flowlines, flowpath lengths, and flowaccumulation (contributing areas) from a elevation raster map.'), - _('Watershed analysis'), - _('Calculates hydrological parameters and RUSLE factors.'), - _('Watershed subbasins'), - _('Generates watershed subbasins raster map.'), - _('Watershed basin creation'), - _('Creates watershed basins from a drainage direction map.'), - _('Extraction of stream networks'), - _('Performs stream network extraction.'), - _('SIMWE Overland flow modeling'), - _('Overland flow hydrologic simulation using path sampling method (SIMWE).'), - _('SIMWE Sediment flux modeling'), - _('Sediment transport and erosion/deposition simulation using path sampling method (SIMWE).'), - _('Topographic index map'), - _('Creates a topographic index (wetness index) raster map from an elevation raster map.'), - _('TOPMODEL simulation'), - _('Simulates TOPMODEL which is a physically based hydrologic model.'), - _('USLE K-factor'), - _('Computes USLE Soil Erodibility Factor (K).'), - _('USLE R-factor'), - _('Computes USLE R factor, Rainfall erosivity index.'), - _('Groundwater modeling'), - _('Groundwater flow'), - _('Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.'), - _('Groundwater solute transport'), - _('Numerical calculation program for transient, confined and unconfined solute transport in two dimensions'), - _('Landscape patch analysis'), - _('Set up sampling and analysis framework'), - _("Configuration editor for r.li.'index'"), - _('Edge density'), - _('Calculates edge density index on a raster map, using a 4 neighbour algorithm'), - _('Contrast weighted edge density'), - _('Calculates contrast weighted edge density index on a raster map'), - _('Patch area mean'), - _('Calculates mean patch size index on a raster map, using a 4 neighbour algorithm'), - _('Patch area range'), - _('Calculates range of patch area size on a raster map'), - _('Patch area Std Dev'), - _('Calculates standard deviation of patch area a raster map'), - _('Patch area Coeff Var'), - _('Calculates coefficient of variation of patch area on a raster map'), - _('Patch density'), - _('Calculates patch density index on a raster map, using a 4 neighbour algorithm'), - _('Patch number'), - _('Calculates patch number index on a raster map, using a 4 neighbour algorithm.'), - _("Dominance's diversity"), - _("Calculates dominance's diversity index on a raster map"), - _("Shannon's diversity"), - _("Calculates Shannon's diversity index on a raster map"), - _("Simpson's diversity"), - _("Calculates Simpson's diversity index on a raster map"), - _('Richness'), - _('Calculates richness index on a raster map'), - _('Shape index'), - _('Calculates shape index on a raster map'), - _('Wildfire modeling'), - _('Rate of spread'), - _('Generates rate of spread raster maps. Generates three, or four raster map layers showing the base (perpendicular) rate of spread (ROS), the maximum (forward) ROS, the direction of the maximum ROS, and optionally the maximum potential spotting distance for fire spread simulation.'), - _('Least-cost spread paths'), - _('Recursively traces the least cost path backwards to cells from which the cumulative cost was determined.'), - _('Anisotropic spread simulation'), - _('Simulates elliptically anisotropic spread. Generates a raster map of the cumulative time of spread, given raster maps containing the rates of spread (ROS), the ROS directions and the spread origins. It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths. Usable for fire spread simulations.'), - _('Change category values and labels'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('Interactively edit category values'), - _('Edits cell values in a raster map.'), - _('Reclassify by size'), - _('Reclasses a raster map greater or less than user specified area size (in hectares).'), - _('Reclassify'), - _('Reclassify raster map based on category values. Creates a new raster map whose category values are based upon a reclassification of the categories in an existing raster map.'), - _('Recode'), - _('Recodes categorical raster maps.'), - _('Rescale'), - _('Rescales the range of category values in a raster map layer.'), - _('Rescale with histogram'), - _('Rescales histogram equalized the range of category values in a raster map layer.'), - _('Generate random cells'), - _('Random cells'), - _('Generates random cell values with spatial dependence.'), - _('Random cells and vector points'), - _('Creates a raster map layer and vector point map containing randomly located points.'), - _('Generate surfaces'), - _('Fractal surface'), - _('Creates a fractal surface of a given fractal dimension.'), - _('Gaussian kernel density surface'), - _('Generates a raster density map from vector points map. Density is computed using a moving kernel. Optionally generates a vector density map on a vector network.'), - _('Gaussian deviates surface'), - _('Generates a raster map using gaussian random number generator. Mean and standard deviation of gaussian deviates can be expressed by the user.'), - _('Plane'), - _('Creates raster plane map given dip (inclination), aspect (azimuth) and one point.'), - _('Random deviates surface'), - _('Produces a raster surface map of uniform random deviates with defined range.'), - _('Random surface with spatial dependence'), - _('Generates random surface(s) with spatial dependence.'), - _('Interpolate surfaces'), - _('Bilinear and bicubic from vector points'), - _('Performs bicubic or bilinear spline interpolation with Tykhonov regularization.'), - _('IDW from raster points'), - _('Provides surface interpolation from raster point data by Inverse Distance Squared Weighting.'), - _('IDW from vector points'), - _('Provides surface interpolation from vector point data by Inverse Distance Squared Weighting.'), - _('Raster contours'), - _('Generates surface raster map from rasterized contours.'), - _('Regularized spline tension'), - _('Performs surface interpolation from vector points map by splines. Spatial approximation and topographic analysis from given point or isoline data in vector format to floating point raster format using regularized spline with tension.'), - _('Raster series interpolation'), - _('Interpolates raster maps located (temporal or spatial) in between input raster maps at specific sampling positions.'), - _('Fill NULL cells'), - _('Fills no-data areas in raster maps using spline interpolation.'), - _('Reports and statistics'), - _('Basic raster metadata'), - _('Outputs basic information about a raster map.'), - _('Manage category information'), - _('Manages category values and labels associated with user-specified raster map layers.'), - _('General statistics'), - _('Generates area statistics for raster map.'), - _('Quantiles for large data sets'), - _('Compute quantiles using two passes.'), - _('Range of category values'), - _('Prints terse list of category values found in a raster map layer.'), - _('Sum area by raster map and category'), - _('Reports statistics for raster maps.'), - _('Statistics for clumped cells'), - _('Calculates the volume of data "clumps". Optionally produces a GRASS vector points map containing the calculated centroids of these clumps.'), - _('Total corrected area'), - _('Prints estimation of surface area for raster map.'), - _('Univariate raster statistics'), - _('Calculates univariate statistics from the non-null cells of a raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('Sample transects'), - _('Outputs the raster map layer values lying on user-defined line(s).'), - _('Sample transects (bearing/distance)'), - _('Outputs raster map layer values lying along user defined transect line(s).'), - _('Covariance/correlation'), - _('Outputs a covariance/correlation matrix for user-specified raster map layer(s).'), - _('Linear regression'), - _('Calculates linear regression from two raster maps: y = a + b*x.'), - _('Multiple regression'), - _('Calculates multiple linear regression from raster maps.'), - _('Mutual category occurrences'), - _('Tabulates the mutual occurrence (coincidence) of categories for two raster map layers.'), - _('&Vector'), - _('Develop vector map'), - _('Create new vector map'), - _('Create new empty vector map'), - _('Edit vector map (non-interactively)'), - _('Edits a vector map, allows adding, deleting and modifying selected vector features.'), - _('Convert object types'), - _('Changes type of vector features.'), - _('Parallel lines'), - _('Creates parallel line to input vector lines.'), - _('Dissolve boundaries'), - _('Dissolves boundaries between adjacent areas sharing a common category number or attribute.'), - _('Create 3D vector over raster'), - _('Converts 2D vector features to 3D by sampling of elevation raster map.'), - _('Extrude 3D vector map'), - _('Extrudes flat vector features to 3D vector features with defined height. Optionally the height can be derived from sampling of elevation raster map.'), - _('Create labels'), - _('Creates paint labels for a vector map from attached attributes.'), - _('Reposition vector map'), - _('Performs an affine transformation (shift, scale and rotate) on vector map.'), - _('Rectify vector map'), - _('Rectifies a vector by computing a coordinate transformation for each object in the vector based on the control points.'), - _('Reproject vector map from different GRASS location'), - _('Re-projects a vector map from one location to the current location.'), - _('Support file maintenance'), - _('Updates vector map metadata.'), - _('Topology maintenance'), - _('Create or rebuild topology'), - _('Creates topology for vector map. Optionally also checks for topological errors.'), - _('Rebuild topology on all vector maps'), - _('Rebuilds topology on all vector maps in the current mapset.'), - _('Build polylines'), - _('Builds polylines from lines or boundaries.'), - _('Split lines'), - _('Splits vector lines to shorter segments.'), - _('Split polylines'), - _('Creates points/segments from input vector lines and positions.'), - _('Clean vector map'), - _('Toolset for cleaning topology of vector map.'), - _('Smooth or simplify'), - _('Performs vector based generalization.'), - _('Add centroids'), - _('Adds missing centroids to closed boundaries.'), - _('Manage colors'), - _('Color tables'), - _('Creates/modifies the color table associated with a vector map.'), - _('Manage color rules interactively'), - _('Interactive management of vector color tables.'), - _('Export color table'), - _('Exports the color table associated with a vector map.'), - _('Query vector map'), - _('Query with coordinate(s)'), - _('Queries a vector map at given locations.'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('Feature selection'), - _('Select by attributes'), - _('Selects vector features from an existing vector map and creates a new vector map containing only the selected features.'), - _('Select by another map'), - _('Selects features from vector map (A) by features from other vector map (B).'), - _('Map type conversions'), - _('Vector to raster'), - _('Converts (rasterize) a vector map into a raster map.'), - _('Vector to 3D raster'), - _('Converts a vector map (only points) into a 3D raster map.'), - _('2D vector to 3D vector'), - _('Performs transformation of 2D vector features to 3D.'), - _('Buffer vectors'), - _('Creates a buffer around vector features of given type.'), - _('Point analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Identify point clusters'), - _('Performs cluster identification.'), - _('Indices for quadrat counts of vector point lists'), - _('Indices for quadrat counts of vector point lists.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Tests for normality for vector points'), - _('Tests for normality for vector points.'), - _('Lidar analysis'), - _('Identify and remove outliers'), - _('Removes outliers from vector point data.'), - _('Detect edges'), - _("Detects the object's edges from a LIDAR data set."), - _('Detect interiors'), - _('Building contour determination and Region Growing algorithm for determining the building inside'), - _('Correct and reclassify objects'), - _('Corrects the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.'), - _('Linear referencing'), - _('Create LRS'), - _('Creates a linear reference system.'), - _('Create stationing'), - _('Creates stationing from input lines, and linear reference system.'), - _('Create points/segments'), - _('Creates points/segments from input lines, linear reference system and positions read from stdin or a file.'), - _('Find line id and offset'), - _('Finds line id and real km+offset for given points in vector map using linear reference system.'), - _('Nearest features'), - _("Finds the nearest element in vector map 'to' for elements in vector map 'from'."), - _('Network analysis'), - _('Vector network analysis tool'), - _('Tool for interactive vector network analysis.'), - _('Network preparation'), - _('Performs network maintenance.'), - _('Allocate subnets'), - _('Allocates subnets for nearest centers. Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Split net'), - _('Splits subnets for nearest centers by cost isolines. Splits net to bands between cost isolines (direction from center). Center node must be opened (costs >= 0). Costs of center node are used in calculation.'), - _('Shortest path'), - _('Finds shortest path on vector network.'), - _('Shortest path for sets of features'), - _("Computes shortest distance via the network between the given sets of features. Finds the shortest paths from each 'from' point to the nearest 'to' feature and various information about this relation are uploaded to the attribute table."), - _('Shortest path using timetables'), - _('Finds shortest path using timetables.'), - _('Shortest path for all pairs'), - _('Computes the shortest path between all pairs of nodes in the network.'), - _('Visibility network'), - _('Performs visibility graph construction.'), - _('Bridges and articulation points'), - _('Computes bridges and articulation points in the network.'), - _('Maximum flow'), - _('Computes the maximum flow between two sets of nodes in the network.'), - _('Vertex connectivity'), - _('Computes vertex connectivity between two sets of nodes in the network.'), - _('Components'), - _('Computes strongly and weakly connected components in the network.'), - _('Centrality'), - _('Computes degree, centrality, betweeness, closeness and eigenvector centrality measures in the network.'), - _('Steiner tree'), - _("Creates Steiner tree for the network and given terminals. Note that 'Minimum Steiner Tree' problem is NP-hard and heuristic algorithm is used in this module so the result may be sub optimal."), - _('Minimum spanning tree'), - _('Computes minimum spanning tree for the network.'), - _('Traveling salesman analysis'), - _('Creates a cycle connecting given nodes (Traveling salesman problem). Note that TSP is NP-hard, heuristic algorithm is used by this module and created cycle may be sub optimal'), - _('Overlay vector maps'), - _('Clip vector maps'), - _('Overlay vector maps'), - _('Overlays two vector maps offering clip, intersection, difference, symmetrical difference, union operators.'), - _('Patch vector maps'), - _('Creates a new vector map by combining other vector maps.'), - _('Manage categories'), - _('Change or report categories'), - _('Attaches, deletes or reports vector categories to map geometry.'), - _('Reclassify'), - _('Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.'), - _('Update attributes'), - _('Update area attributes from raster'), - _('Calculates univariate statistics from a raster map based on a vector map and uploads statistics to new attribute columns.'), - _('Update area attributes from vector'), - _('Count points in areas, calculate statistics from point attributes.'), - _('Update point attributes from areas'), - _('Uploads vector values at positions of vector points to the table.'), - _('Update database values from vector'), - _('Populates attribute values from vector features.'), - _('Sample raster maps at point locations'), - _('Uploads raster values at positions of vector points to the table.'), - _('Sample raster neighborhood around points'), - _('Samples a raster map at vector point locations.'), - _('Generate area for current region'), - _('Creates a vector polygon from the current region extent.'), - _('Generate areas from points'), - _('Convex hull'), - _('Produces a 2D/3D convex hull for a given vector map.'), - _('Delaunay triangles'), - _('Creates a Delaunay triangulation from an input vector map containing points or centroids.'), - _('Voronoi diagram/Thiessen polygons'), - _('Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids.'), - _('Generate grid'), - _('Creates a vector map of a user-defined grid.'), - _('Generate points'), - _('Generate from database'), - _('Creates new vector (points) map from database table containing coordinates.'), - _('Generate points along lines'), - _('Creates points along input lines in new vector map with 2 layers.'), - _('Generate random points'), - _('Generates random 2D/3D vector points.'), - _('Perturb points'), - _('Random location perturbations of vector points.'), - _('Remove outliers in point sets'), - _('Removes outliers from vector point data.'), - _('Test/training point sets'), - _('Randomly partition points into test/train sets.'), - _('Reports and statistics'), - _('Basic vector metadata'), - _('Outputs basic information about a vector map.'), - _('Classify attribute data'), - _('Classifies attribute data, e.g. for thematic mapping'), - _('Report topology by category'), - _('Reports geometry statistics for vector maps.'), - _('Univariate attribute statistics for points'), - _('Calculates univariate statistics of vector map features. Variance and standard deviation is calculated only for points if specified.'), - _('Univariate statistics for attribute columns'), - _('Calculates univariate statistics on selected table column for a GRASS vector map.'), - _('Sample transects'), - _('Vector map profiling tool'), - _('Quadrat indices'), - _('Indices for quadrat counts of vector point lists.'), - _('Test normality'), - _('Tests for normality for vector points.'), - _('&Imagery'), - _('Develop images and groups'), - _('Create/edit group'), - _('Creates, edits, and lists groups of imagery files.'), - _('Target group'), - _('Targets an imagery group to a GRASS location and mapset.'), - _('Mosaic images'), - _('Mosaics several images and extends colormap.'), - _('Manage image colors'), - _('Color balance for RGB'), - _('Performs auto-balancing of colors for RGB images.'), - _('HIS to RGB'), - _('Transforms raster maps from HIS (Hue-Intensity-Saturation) color space to RGB (Red-Green-Blue) color space.'), - _('RGB to HIS'), - _('Transforms raster maps from RGB (Red-Green-Blue) color space to HIS (Hue-Intensity-Saturation) color space.'), - _('Rectify image or raster'), - _('Rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points.'), - _('Histogram'), - _('Generate histogram of image'), - _('Spectral response'), - _('Displays spectral response at user specified locations in group or images.'), - _('Pan sharpening'), - _('Image fusion algorithms to sharpen multispectral with high-res panchromatic channels'), - _('Classify image'), - _('Clustering input for unsupervised classification'), - _('Generates spectral signatures for land cover types in an image using a clustering algorithm. The resulting signature file is used as input for i.maxlik, to generate an unsupervised image classification.'), - _('Input for supervised MLC'), - _('Generates statistics for i.maxlik from raster map.'), - _('Maximum likelihood classification (MLC)'), - _('Classifies the cell spectral reflectances in imagery data. Classification is based on the spectral signature information generated by either i.cluster, g.gui.iclass, or i.gensig.'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Input for supervised SMAP'), - _('Generates statistics for i.smap from raster map.'), - _('Sequential maximum a posteriori classification (SMAP)'), - _('Performs contextual image classification using sequential maximum a posteriori (SMAP) estimation.'), - _('Object segmentation'), - _('Identifies segments (objects) from imagery data.'), - _('Filter image'), - _('Edge detection'), - _('Zero-crossing "edge detection" raster function for image processing.'), - _('Matrix/convolving filter'), - _('Performs raster map matrix filter.'), - _('Transform image'), - _('Canonical correlation'), - _('Canonical components analysis (CCA) program for image processing.'), - _('Principal components'), - _('Principal components analysis (PCA) for image processing.'), - _('Fast Fourier'), - _('Fast Fourier Transform (FFT) for image processing.'), - _('Inverse Fast Fourier'), - _('Inverse Fast Fourier Transform (IFFT) for image processing.'), - _('Satellite images tools'), - _('Aster DN to radiance/reflectance'), - _('Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.'), - _('Landsat DN to radiance/reflectance'), - _('Calculates top-of-atmosphere radiance or reflectance and temperature for Landsat MSS/TM/ETM+/OLI'), - _('Landsat cloud cover assessment'), - _('Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).'), - _('Modis quality control'), - _('Extracts quality control parameters from MODIS QC layers.'), - _('Atmospheric correction'), - _('Performs atmospheric correction using the 6S algorithm. 6S - Second Simulation of Satellite Signal in the Solar Spectrum.'), - _('Topographic correction'), - _('Computes topographic correction of reflectance.'), - _('Orthophoto tools'), - _('Manage GCPs for 3D correction'), - _('Georectifies a map and allows managing GCP for 3D correction.'), - _('Corrects scanning distortions'), - _('Corrects scanning distortions of a scanned aerial photo.'), - _('Satellite images products'), - _('Vegetation indices'), - _('Calculates different types of vegetation indices. Uses red and nir bands mostly, and some indices require additional bands.'), - _('Tasseled cap vegetation index'), - _('Performs Tasseled Cap (Kauth Thomas) transformation.'), - _('Albedo'), - _('Computes broad band albedo from surface reflectance.'), - _('Emissivity'), - _('Computes emissivity from NDVI, generic method for sparse land.'), - _('Biomass growth'), - _('Computes biomass growth, precursor of crop yield calculation.'), - _('Evapotranspiration calculation'), - _('Instantaneaous Net Radiation'), - _('Net radiation approximation (Bastiaanssen, 1995).'), - _('Soil heat flux'), - _('Soil heat flux approximation (Bastiaanssen, 1995).'), - _('Sensible heat flux'), - _('Computes sensible heat flux iteration SEBAL 01.'), - _('Evaporative fraction'), - _('Computes evaporative fraction and root zone soil moisture.'), - _('Actual Evapotranspiration'), - _('Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).'), - _('Temporal integration of ETa'), - _('Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).'), - _('Hargreaves methods Evapotranspiration'), - _('Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.'), - _('Penman-Monteith Evapotranspiration'), - _('Computes potential evapotranspiration calculation with hourly Penman-Monteith.'), - _('Priestley-Taylor Evapotranspiration'), - _('Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.'), - _('Reports and statistics'), - _('Kappa analysis'), - _('Calculates error matrix and kappa parameter for accuracy assessment of classification result.'), - _('OIF for LandSat TM'), - _('Calculates Optimum-Index-Factor table for spectral bands'), - _('3D r&aster'), - _('Develop 3D raster map'), - _('Manage 3D NULL values'), - _('Explicitly create the 3D NULL-value bitmap file.'), - _('Manage timestamp'), - _('Modifies a timestamp for a 3D raster map. Print/add/remove a timestamp for a 3D raster map.'), - _('Map type conversions'), - _('3D rasters to raster series'), - _('Converts 3D raster maps to 2D raster maps'), - _('3D color tables'), - _('Creates/modifies the color table associated with a 3D raster map.'), - _('Export 3D color table'), - _('Exports the color table associated with a 3D raster map.'), - _('3D mask'), - _('Establishes the current working 3D raster mask.'), - _('3D raster map calculator'), - _('3D raster map calculator'), - _('Cross section'), - _('Creates cross section 2D raster map from 3D raster map based on 2D elevation map'), - _('Groundwater modeling'), - _('Numerical calculation program for transient, confined groundwater flow in three dimensions.'), - _('Interpolate 3D raster from points'), - _('Interpolates point data to a 3D raster map using regularized spline with tension (RST) algorithm.'), - _('Reports and statistics'), - _('Basic 3D raster metadata'), - _('Outputs basic information about a user-specified 3D raster map layer.'), - _('3D raster statistics'), - _('Generates volume statistics for 3D raster maps.'), - _('Univariate statistics for 3D rasters'), - _('Calculates univariate statistics from the non-null cells of a 3D raster map. Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum.'), - _('&Database'), - _('Database information'), - _('List databases'), - _('Lists all databases for a given driver and location.'), - _('List drivers'), - _('Lists all database drivers.'), - _('List tables'), - _('Lists all tables for a given database.'), - _('Describe table'), - _('Describes a table in detail.'), - _('List columns'), - _('List all columns for a given table.'), - _('Manage databases'), - _('Connect'), - _('Prints/sets general DB connection for current mapset.'), - _('Login'), - _('Sets user/password for DB driver/database.'), - _('Create database'), - _('Creates an empty database.'), - _('Drop database'), - _('Removes an existing database.'), - _('Drop table'), - _('Drops an attribute table.'), - _('Copy table'), - _("Copy a table. Either 'from_table' (optionally with 'where') can be used or 'select' option, but not 'from_table' and 'select' at the same time."), - _('Drop column'), - _('Drops a column from selected attribute table.'), - _('Test'), - _('Test database driver, database must exist and set by db.connect.'), - _('Query'), - _('Query any table'), - _('Selects data from attribute table. Performs SQL query statement(s).'), - _('Query vector attribute data'), - _('Prints vector map attributes.'), - _('SQL statement'), - _("Executes any SQL statement. For SELECT statements use 'db.select'."), - _('Vector database connections'), - _('New table'), - _('Creates and connects a new attribute table to a given layer of an existing vector map.'), - _('Remove table'), - _('Removes existing attribute table of a vector map.'), - _('Join table'), - _('Joins a database table to a vector map table.'), - _('Add columns'), - _('Adds one or more columns to the attribute table connected to a given vector map.'), - _('Drop column'), - _('Drops a column from the attribute table connected to a given vector map.'), - _('Rename column'), - _('Renames a column in the attribute table connected to a given vector map.'), - _('Change values'), - _('Updates a column in the attribute table connected to a vector map.'), - _('Drop row'), - _('Removes a vector feature from a vector map through attribute selection.'), - _('Reconnect vectors to database'), - _('Reconnects attribute tables for all vector maps from the current mapset to a new database.'), - _('Set vector map - database connection'), - _('Prints/sets DB connection for a vector map to attribute table.'), - _('&Temporal'), - _('Manage datasets'), - _('Connect temporal database'), - _('Prints/sets general temporal GIS database connection for current mapset.'), - _('Create'), - _('Creates a space time dataset.'), - _('Rename'), - _('Renames a space time dataset'), - _('Remove'), - _('Removes space time datasets from temporal database.'), - _('Update metadata'), - _('Modifies the metadata of a space time dataset.'), - _('Merge'), - _('Merges several space time datasets into a single space time dataset.'), - _('Temporally shift'), - _('Shifts temporally the maps of a space time dataset.'), - _('Snap maps of dataset'), - _('Snaps temporally the maps of a space time dataset.'), - _('List'), - _('Lists space time datasets and maps registered in the temporal database.'), - _('Manage maps in datasets'), - _('Register maps in datasets'), - _('Assigns timestamps and registers raster, vector and raster3d maps in a space time dataset.'), - _('Unregister maps from datasets'), - _('Unregisters raster, vector and raster3d maps from the temporal database or a specific space time dataset.'), - _('List raster dataset maps'), - _('Lists registered maps of a space time raster dataset.'), - _('List vector dataset maps'), - _('Lists registered maps of a space time vector dataset.'), - _('List 3D raster dataset maps'), - _('Lists registered maps of a space time raster3d dataset.'), - _('Import'), - _('Import raster dataset'), - _('Imports space time raster dataset.'), - _('Import vector dataset'), - _('Imports a space time vector dataset from a GRASS GIS specific archive file.'), - _('Export'), - _('Export raster dataset'), - _('Exports space time raster dataset.'), - _('Export raster dataset as VTK time series'), - _('Exports space time raster dataset as VTK time series.'), - _('Export vector dataset'), - _('Exports a space time vector dataset as GRASS GIS specific archive file.'), - _('Convert raster dataset to 3D raster'), - _('Converts a space time raster dataset into a 3D raster map.'), - _('Extraction'), - _('Extract subset of raster dataset'), - _('Extracts a subset of a space time raster datasets.'), - _('Extract subset of vector dataset'), - _('Extracts a subset of a space time vector dataset.'), - _('Extract subset of 3D raster dataset'), - _('Extracts a subset of a space time 3D raster dataset.'), - _('Query vector dataset attribute data'), - _('Prints attributes of vector maps registered in a space time vector dataset.'), - _('Raster dataset color table'), - _('Creates/modifies the color table associated with each raster map of the space time raster dataset.'), - _('Raster calculations'), - _('Performs spatio-temporal mapcalc expressions on temporally sampled maps of space time raster datasets.'), - _('3D raster calculations'), - _('Performs r3.mapcalc expressions on maps of sampled space time 3D raster datasets.'), - _('Interpolate gaps in raster datasets'), - _('Replaces gaps in a space time raster dataset with interpolated raster maps.'), - _('Aggregation'), - _('Neighborhood analysis in raster dataset'), - _('Performs a neighborhood analysis for each map in a space time raster dataset.'), - _('Aggregation in raster datasets'), - _('Performs different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset.'), - _('Temporal aggregation'), - _('Aggregates temporally the maps of a space time raster dataset by a user defined granularity.'), - _('Temporal aggregation by dataset'), - _('Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset.'), - _('Sampling'), - _('Sample a space time raster dataset at point coordinates'), - _('Sample a space time raster dataset at specific vector point coordinates and write the output to stdout using different layouts'), - _('Query raster dataset by vector points dataset'), - _('Stores raster map values at spatial and temporal positions of vector points as vector attributes.'), - _('Observe specific locations in raster dataset'), - _('Observes specific locations in a space time raster dataset over a period of time using vector points.'), - _('Temporal sampling'), - _('Samples the input space time dataset(s) with a sample space time dataset and print the result to stdout.'), - _('Reports and statistics'), - _('Space time datasets metadata'), - _('Lists information about space time datasets and maps.'), - _('Univariate raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered raster map of a space time raster dataset.'), - _('Univariate vector dataset statistics'), - _('Calculates univariate statistics of attributes for each registered vector map of a space time vector dataset'), - _('Univariate 3D raster dataset statistics'), - _('Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.'), - _('Report temporal topology'), - _('Lists temporal topology of a space time dataset.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Timeline tool'), - _('Plot temporal extents.'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('GUI tools'), - _('Animation tool'), - _('Launch animation tool.'), - _('Attribute table manager'), - _('Launches graphical attribute table manager.'), - _('Cartographic Composer'), - _('Launch Cartographic Composer'), - _('Georectify'), - _('Manage Ground Control Points for Georectification'), - _('Graphical modeler'), - _('Launch Graphical modeler'), - _('Interactive input for supervised classification'), - _('Generates spectral signatures by allowing the user to outline training areas.'), - _('Map Swipe'), - _('Launch Map Swipe'), - _('Temporal plot tool'), - _('Plot temporal values.'), - _('Timeline tool'), - _('Plot temporal extents.'), - ''] -menustrings_menudata.PsMapMenuData'> = [ - _('&File'), - _('Page setup'), - _('Specify paper size, margins and orientation'), - _('Load instruction file'), - _('Load text file with mapping instructions'), - _('Export instruction file'), - _('Generate text file with mapping instructions'), - _('Export to PostScript'), - _('Generate PostScript output'), - _('Export to PDF'), - _('Generate PDF output'), - _('Launch ps.map dialog'), - _('Launch ps.map dialog'), - _('Quit'), - _('Close Cartographic Composer'), - _('&Insert'), - _('Map frame'), - _('Add or edit map frame'), - _('Raster map'), - _('Add or edit raster map'), - _('Vector map'), - _('Add or edit vector map'), - _('Map legend'), - _('Add or edit raster and vector legend'), - _('Map info'), - _('Add or edit map info'), - _('Scale bar'), - _('Add or edit scale bar'), - _('Text'), - _('Add text'), - _('Image'), - _('Add image'), - _('North Arrow'), - _('Add north arrow'), - _('Delete'), - _('Delete selected object'), - _('&Help'), - _('Help'), - _('Display the HTML man pages of Cartographic Composer'), - _('About Cartographic Composer'), - _('Display information about Cartographic Composer'), - ''] From 383bbe59a3d4d86fd66d5c1a926e8669dee57d33 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Mon, 17 Feb 2020 10:24:47 +0100 Subject: [PATCH 264/264] Apply suggestions from code review trivial changes (comment style) applied --- cmake/find_scripts/FindPROJ.cmake | 3 +-- lib/gis/ls_filter.c | 13 ++++++------- raster/r.in.lidar/point_binning.c | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cmake/find_scripts/FindPROJ.cmake b/cmake/find_scripts/FindPROJ.cmake index cc579ed5116..0d468f2efda 100644 --- a/cmake/find_scripts/FindPROJ.cmake +++ b/cmake/find_scripts/FindPROJ.cmake @@ -1,5 +1,5 @@ ############################################################################### -# CMake module to search for PROJ.4 library +# CMake module to search for PROJ library # # On success, the macro sets the following variables: # PROJ_FOUND = if the library found @@ -55,4 +55,3 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ FOUND_VAR PROJ_FOUND REQUIRED_VARS PROJ_LIBRARY PROJ_INCLUDE_DIR PROJ_VERSION_STRING VERSION_VAR PROJ_VERSION_STRING) - diff --git a/lib/gis/ls_filter.c b/lib/gis/ls_filter.c index 5d7d0921fd2..8f0c48a7f5b 100644 --- a/lib/gis/ls_filter.c +++ b/lib/gis/ls_filter.c @@ -156,16 +156,16 @@ static int re_filter(const char *filename, void *closure) pcre_extra* pcreExtra; int pcreExecRet; pcre* pcre_regex = closure; - // Optimize the regex + /* Optimize the regex */ pcreExtra = pcre_study(pcre_regex, 0, &pcreErrorStr); pcreExecRet = pcre_exec(pcre_regex, pcreExtra, filename, - strlen(filename), // length of string - 0, // Start looking at this point - 0, // OPTIONS + strlen(filename), /* length of string */ + 0, /* Start looking at this point */ + 0, /* OPTIONS */ NULL, - 0); // Length of subStrVec + 0); /* Length of subStrVec */ return filename[0] != '.' && pcreExecRet == 0; #endif @@ -198,7 +198,7 @@ void *G_ls_regex_filter(const char *pat, int exclude, int extended, pcre* pcre_regex; const char* pcreErrorStr; int pcreErrorOffset; - // First, the regex string must be compiled. + /* First, the regex string must be compiled */ pcre_regex = pcre_compile(pat, 0, &pcreErrorStr, &pcreErrorOffset, NULL); /* if (regcomp(regex, pat, REG_NOSUB | @@ -266,4 +266,3 @@ void G_free_ls_filter(void *regex) G_free(regex); } - diff --git a/raster/r.in.lidar/point_binning.c b/raster/r.in.lidar/point_binning.c index 1151e2b12bb..43c436bf302 100644 --- a/raster/r.in.lidar/point_binning.c +++ b/raster/r.in.lidar/point_binning.c @@ -764,7 +764,7 @@ void write_values(struct PointBinning *point_binning, double sum_z = Rast_get_d_value((DCELL*)point_binning->sum_array + offset, rtype); - /* We are not writing any categories. They are not neededsb + /* We are not writing any categories. They are not needed * and potentially it is too much trouble to do it and it is * unclear what to write. Not writing them is also a little * bit faster. */