Skip to content

build: prepare for FHS, where GISBASE is not the absolute truth #5630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nilason
Copy link
Contributor

@nilason nilason commented May 9, 2025

GISBASE is used as a means to retrieve paths to various resources in source code. With FHS (#3661) this is no longer possible. This adds a number of new environment variables to address this.

Currently this is addressed with following workaround:

grass/CMakeLists.txt

Lines 176 to 194 in 5e998d3

if(WITH_FHS)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_DEMODIR}
${RUNTIME_GISBASE}/demolocation SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_FONTSDIR} ${RUNTIME_GISBASE}/fonts
SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/colors
${RUNTIME_GISBASE}/etc/colors SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/colors.desc
${RUNTIME_GISBASE}/etc/colors.desc SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/element_list
${RUNTIME_GISBASE}/etc/element_list SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/renamed_options
${RUNTIME_GISBASE}/etc/renamed_options SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/VERSIONNUMBER
${RUNTIME_GISBASE}/etc/VERSIONNUMBER SYMBOLIC)
file(MAKE_DIRECTORY "${GISBASE}/gui/wxpython")
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_GUIDIR}/wxpython/xml
${RUNTIME_GISBASE}/gui/wxpython/xml SYMBOLIC)
endif()

This is work in progress.

@nilason nilason added this to the 8.5.0 milestone May 9, 2025
@nilason nilason self-assigned this May 9, 2025
@github-actions github-actions bot added GUI wxGUI related vector Related to vector data processing raster Related to raster data processing Python Related code is in Python C Related code is in C translation Message translation related database Related to database management libraries module docs general display CMake labels May 9, 2025
@nilason nilason force-pushed the fix_cmake_share_dir branch from 5acbd05 to 518072c Compare May 19, 2025 14:44
@@ -17,6 +17,7 @@ default: cmd $(CAPFILE)
endif

$(CAPFILE): $(BIN)/$(PGM)$(EXE)
GISRC=junk GISBASE=$(RUN_GISBASE) \
GISRC=junk GISBASE=$(RUN_GISBASE) GRASS_SHARE_DIR=$(RUN_GISBASE) \
GRASS_LOCALEDIR=$(RUN_GISBASE)/locale \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why GRASS_LOCALEDIR and GRASS_SHARE_DIR?

@nilason nilason force-pushed the fix_cmake_share_dir branch from a999682 to 91955b8 Compare May 21, 2025 15:58
@nilason nilason force-pushed the fix_cmake_share_dir branch from 91955b8 to d852aef Compare May 21, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C CMake database Related to database management display docs general GUI wxGUI related libraries module Python Related code is in Python raster Related to raster data processing translation Message translation related vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants