Bug 452111 - dbus package could not be build with html documentation
Summary: dbus package could not be build with html documentation
Status: REPORTED
Alias: None
Product: Craft
Classification: Unmaintained
Component: Blueprints (show other bugs)
Version: master
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-31 14:16 UTC by Ralf Habacker
Modified: 2022-04-04 12:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2022-03-31 14:16:51 UTC
SUMMARY

STEPS TO REPRODUCE
1.  install craft following the howto at https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Windows#Installing_Craft
2. open dbus.py (see https://invent.kde.org/packaging/craft-blueprints-kde/-/blob/master/libs/dbus/dbus.py#L97) in editor 

in 
     
 def setTargets(self):

comment out 
        #self.targetConfigurePath["master"] = "cmake"

and set 
        self.defaultTarget = "master"

in 
def setDependencies(self):

add 
        self.runtimeDependencies["data/docbook-dtd"] = None
        self.runtimeDependencies["data/docbook-xsl"] = None

in
      class PackageCMake(CMakePackageBase):
           def __init__(self, **args):
            ...
set
           -DDBUS_ENABLE_XML_DOCS=ON 


3. run  craft dbus

OBSERVED RESULT
The build fails with 

-- Could NOT find DocBookXSL (missing: DocBookXSL_DIR)
CMake Error at doc/CMakeLists.txt:141 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "xmldoc".
...


EXPECTED RESULT
The build show not fail

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Ralf Habacker 2022-03-31 14:17:57 UTC
(In reply to Ralf Habacker from comment #0)
> 3. run  craft dbus

This should be changed to 

craft --no-cache dbus

to avoid installing the binary package.
Comment 2 Ralf Habacker 2022-04-04 12:56:00 UTC
The reason for this error is that the cmake variable `CMAKE_INSTALL_DATAROOTDIR` used at https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/cmake/modules/FindDocBookXSL.cmake#L40 and the following lines points to the default `share` directory, but the xsl stylesheets are installed in `bin/data`.