macstrop icon indicating copy to clipboard operation
macstrop copied to clipboard

KDE4 portgroup installs CMake config files with incorrect include path

Open barracuda156 opened this issue 11 months ago • 3 comments

Looks like KDE4 PG here, unlike the mainstream one, installs CMake config files into /opt/local/lib/cmake/KDE4, which is an extra level deep. However, the path written into the config turns out to be:

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

In result, kdelibs4 cannot find strigi:

-- Found the KDE4 kconfig_compiler preprocessor: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_kde_kdelibs4/kdelibs4/work/build/bin/./kconfig_compiler.shell
-- Found automoc4: /opt/local/bin/automoc4
CMake Error at /opt/local/lib/cmake/KDE4/Strigi/StrigiConfig.cmake:13 (message):
  File or directory /opt/local/lib/include referenced by variable
  STRIGI_INCLUDE_DIR does not exist !
Call Stack (most recent call first):
  /opt/local/lib/cmake/KDE4/Strigi/StrigiConfig.cmake:51 (set_and_check)
  cmake/modules/FindStrigi.cmake:32 (find_package)
  CMakeLists.txt:84 (find_package)

Of course, the correct path should be /opt/local/include, not /opt/local/lib/include.

barracuda156 avatar Jan 01 '25 21:01 barracuda156

And likewise with grantlee:

-- Looking for include files sys/types.h, sys/mman.h
2025-01-02 05:10:37.243 sw_vers[4352:903] CFPreferences: user home directory at file://localhost/opt/local/var/macports/home/ is unavailable. User domains will be volatile.
-- Looking for include files sys/types.h, sys/mman.h - found
-- Found Qt-Version 4.8.7 (using /opt/local/libexec/qt4/bin/qmake)
CMake Error at /opt/local/lib/cmake/KDE4/grantlee/GrantleeTargets.cmake:102 (message):
  The imported target "grantlee_core" references the file

     "/opt/local/lib/lib/libgrantlee_core.0.5.1.dylib"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/opt/local/lib/cmake/KDE4/grantlee/GrantleeTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /opt/local/lib/cmake/KDE4/grantlee/GrantleeConfig.cmake:65 (include)
  kdeui/tests/proxymodeltestsuite/CMakeLists.txt:50 (find_package)


-- Configuring incomplete, errors occurred!

barracuda156 avatar Jan 01 '25 21:01 barracuda156

@RJVB Could you please take a look? Locally I can just edit already installed configs, of course, but it will leave pre-built ports broken for anyone else.

barracuda156 avatar Jan 01 '25 21:01 barracuda156

On Wednesday January 01 2025 13:17:33 Sergey Fedorov wrote:

@RJVB Could you please take a look?

Mine:

set kde4.include_prefix KDE4
set kde4.include_dirs   ${prefix}/include/${kde4.include_prefix}
set kde4.legacy_prefix  ${prefix}/libexec/kde4-legacy
set kde4.cmake_module_dir \
                        ${prefix}/lib/cmake/${kde4.include_prefix}

mainstream:

set kde4.include_prefix KDE4
set kde4.include_dirs   ${prefix}/include/${kde4.include_prefix}
set kde4.cmake_module_dir \
                        ${prefix}/lib/cmake/${kde4.include_prefix}

I'm working on syncing my and the mainstream KDE4 PGs and I'm still getting the strigi CMake modules installed into lib/cmake/KDE4 .

It's possible that the Strigi and Grantlee CMake modules aren't written properly and need to be in $prefix/lib/cmake . Last time I rebuilt kdelibs4 was with the strigi cmake modules still in that location but not for grantlee so I don't know what's going on there.

I pushed the changes to the PG, a custom port:strigi and a port:grantlee that will now hopefully do the right thing (TM).

RJVB avatar Jan 01 '25 23:01 RJVB