| Summary: | Poor relocatability making snap building a pain | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kdoctools | Reporter: | Harald Sitter <sitter> |
| Component: | general | Assignee: | Documentation Editorial Team <kde-doc-english> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | kdelibs-bugs-null, luigi.toscano |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed In: | ||
| Sentry Crash Report: | |||
|
Description
Harald Sitter
2019-04-03 10:56:38 UTC
The windows-specific code paths of the cmake files have some (twisted, but reported to be working) logic to support relocation. Note the this is not trivial because few files require a specific path. It may be relative and the problem could be solved for snaps, but it's not possible to use a dynamic path: https://stackoverflow.com/questions/7939815/dynamically-include-other-xsl-files-in-xslt See ./src/customization/dtd/kdedbx45.dtd.cmake ./src/customization/kde-include-common.xsl.cmake ./src/customization/kde-include-man.xsl.cmake The biggest problem for me are paths that are compiled-in, the paths in the dtd/xsl files I can probably sed out for something more suitable at snap-buidtime. The binaries however are (currently) shared with regular deb builds, so it's far less trivial to get those bent into shape if they don't follow some environment variable.
I think relative paths would be fine for xsl/dtd and should work in all cases? What I was thinking about with runtime generation is to actually mimic what configure_file does currently, but at runtime.
e.g.
- install kde-include-man.xsl.tmpl
- at runtime meinproc figures out where the docbook-xml/docbook-xsl stuff lives, or fall back to compiled in paths
- open kde-include-man.xsl.tmpl
- QString.replace("@XSL_PATH@", determinedPath);
- write to $tmpdir/kde-include-man.xsl
- load the generated file with the now runtime-dependent includes
Granted I don't know much about how docbook works, so that may be a nonsensical idea.
If using relative paths would work, I think that'd be a sound solution that should work both for relocated trees as well as regular ones.
|