relocatable kdoctools

Ralf Habacker ralf.habacker at freenet.de
Thu Aug 24 13:20:53 UTC 2017


Am 23.08.2017 um 14:15 schrieb Harald Sitter:
> On Tue, Aug 22, 2017 at 10:47 PM, Ralf Habacker
> <ralf.habacker at freenet.de> wrote:
>> Hi,
>>
>> I'm using the following patch to cross build kdoctools for windows
>>
>> https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:KF536/mingw32-kdoctools/0001-Generate-xml-files-containing-relative-pathes-to-dtd.patch?expand=1
>>
>> It requires only a little platform specific code - may be it helps.
> Are you sure the xsl mangling is necessary? This should work out of
> the box with the code we have.
>
> What's the rationale behind the docbookl10nhelper change?
Let me give some overview, so that we have the same point of  view:

1. kdoctools generates the following files

- <build-dir>/src/customization/kde-include-common.xsl
- <build-dir>/src/customization/kde-include-man.xsl
- <build-dir>/src/customization/xsl/all-l10n.xml

2. The generated files in 1. have absolute build time pathes inside

3. cmake uses the generated files from 1. to generate kdoctools
documentation

4. kdoctools installs generated file for usage by other packages

5. on installing the package, the generated files need to have relative
pathes on windows patforms.

6. For the generated *.xsl files this should be performed by
src/CMakeLists.txt  (see "customize includes... ") by generating a
second set of files only for installation

7. all-l10n.xml is not covered by 6. because it is generated by
docbookl10nhelper

8. The docbookl10nhelper change in the above mentioned patch makes it
possible to generate two variants of all-l10n.xml, one with absolute for
internal usage and one with relative pathes (add additional relpath
parameter) for installation.

9. The above mentioned patch was my initial try to fix cross compiling
at
https://build.opensuse.org/package/show/home:rhabacker:branches:windows:mingw:win32:KF536/mingw32-kdoctools
but is incorrect in patching cmake files because i did not recognize 3.
at that time. I got a working version by not using the patch instead the
installed files has been patched, (see
https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:KF536/mingw32-kdoctools/mingw32-kdoctools.spec?expand=1
line 96ff)

10. The conclusion of 9. is that it might also be a solution on windows
to patch only all generated files after 3. and before 4.

Ralf












More information about the Kde-frameworks-devel mailing list