Bug 264199

Summary: x11-toolkits/plasma5-kdeplasma-addons: Fails to configure with PURPOSE=OFF / QTWEBENGINE=OFF: Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5Test"
Product: Ports & Packages Reporter: Clément MArtin <twisla>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Some People CC: tcberner
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: tcberner: maintainer-feedback+
tcberner: merge-quarterly+
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Proposed patch none

Description Clément MArtin 2022-05-24 08:43:46 UTC
Trying to build kde5 using poudriere, x11-toolkits/plasma5-kdeplasma-addons fails at the configure stage.

This was tested with the following options:

OPTIONS_FILE_UNSET+=PURPOSE
OPTIONS_FILE_UNSET+=QTWEBENGINE

During the configure stage, CMake is failing with the following error:

CMake Error at /usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Test" with any
  of the following names:

    Qt5TestConfig.cmake
    qt5test-config.cmake

  Add the installation prefix of "Qt5Test" to CMAKE_PREFIX_PATH or set
  "Qt5Test_DIR" to a directory containing one of the above files.  If
  "Qt5Test" provides a separate development package or SDK, be sure it has
  been installed.


After some searching, adding testlib_build to USE_QT= in the Makefile fixed the build.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-05-25 00:27:27 UTC
@Clément Thank you for your report and isolation. Are you able to provide your proposed change as a unified diff against the port Makefile?
Comment 2 Clément MArtin 2022-05-25 07:10:22 UTC
Created attachment 234190 [details]
Proposed patch

Here is a diff with the proposed change that fix the build for my case.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-05-25 19:16:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1854a7934a4f285dbc48b449e37cca784955b40b

commit 1854a7934a4f285dbc48b449e37cca784955b40b
Author:     Clément MArtin <twisla@twis.la>
AuthorDate: 2022-05-25 19:03:24 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-05-25 19:08:20 +0000

    x11-toolkits/plasma5-kdeplasma-addons: add missing testlib dependency

    - testlib got pulled in transitively, when WEBENGINE/PURPOSE is enabled.
      When both options are of, the required dependency is missing on the
      system and threfore leading to build failures.

    PR:             264199

 x11-toolkits/plasma5-kdeplasma-addons/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-05-26 06:50:04 UTC
A commit in branch 2022Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=19547602e183088c49d4d2e07d4c16cb00997856

commit 19547602e183088c49d4d2e07d4c16cb00997856
Author:     Clément MArtin <twisla@twis.la>
AuthorDate: 2022-05-25 19:03:24 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-05-26 06:48:49 +0000

    x11-toolkits/plasma5-kdeplasma-addons: add missing testlib dependency

    - testlib got pulled in transitively, when WEBENGINE/PURPOSE is enabled.
      When both options are of, the required dependency is missing on the
      system and threfore leading to build failures.

    PR:             264199
    (cherry picked from commit 1854a7934a4f285dbc48b449e37cca784955b40b)

 x11-toolkits/plasma5-kdeplasma-addons/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Tobias C. Berner freebsd_committer freebsd_triage 2022-05-26 06:50:28 UTC
Committed. Thanks.