git: 4c2c034e2148 - 2021Q4 - x11-toolkits/qt5-declarative: fix testlib-build-failures

From: Tobias C. Berner <tcberner_at_FreeBSD.org>
Date: Fri, 17 Dec 2021 14:29:47 UTC
The branch 2021Q4 has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4c2c034e2148bcdb088b0618115efd406ea186ce

commit 4c2c034e2148bcdb088b0618115efd406ea186ce
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2021-12-17 12:01:36 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2021-12-17 13:13:47 +0000

    x11-toolkits/qt5-declarative: fix testlib-build-failures
    
    Since Qt5 testlib tries to be a build-dependency only when
    needed, and since we build the QML bits without installing
    the corresponding test-tools, declarative had the following
    problem:
    - without testlib installed, would build fine
    - with testlib installed, would assume the QML test bits
      are available, and then fail in the build.
    
    This is basically our split-up-packaging without subpackages
    shooting us in the foot; fix the build by removing one more
    place where testlib leads to the building-of-tests. (The existing
    patch files/patch-src_src.pro does something similar)
    
    PR:             257102 260433
    Reported by:    Frank Reisert, Philipp Ost
    
    (cherry picked from commit 9224581a101ea6aa9cfc84002ec344d49b1ee259)
---
 x11-toolkits/qt5-declarative/Makefile                          |  2 +-
 .../qt5-declarative/files/patch-src_imports_imports.pro        | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/x11-toolkits/qt5-declarative/Makefile b/x11-toolkits/qt5-declarative/Makefile
index 870c24bfe5ab..afad220bb9a6 100644
--- a/x11-toolkits/qt5-declarative/Makefile
+++ b/x11-toolkits/qt5-declarative/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	declarative
 DISTVERSION=	${QT5_VERSION}
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	x11-toolkits
 PKGNAMEPREFIX=	qt5-
 
diff --git a/x11-toolkits/qt5-declarative/files/patch-src_imports_imports.pro b/x11-toolkits/qt5-declarative/files/patch-src_imports_imports.pro
new file mode 100644
index 000000000000..339fd43b4524
--- /dev/null
+++ b/x11-toolkits/qt5-declarative/files/patch-src_imports_imports.pro
@@ -0,0 +1,10 @@
+--- src/imports/imports.pro.orig	2021-12-17 11:51:57 UTC
++++ src/imports/imports.pro
+@@ -24,7 +24,6 @@ qtHaveModule(quick) {
+ 
+     qtConfig(quick-shadereffect): SUBDIRS += wavefrontmesh
+ 
+-    qtHaveModule(testlib): SUBDIRS += testlib
+     qtConfig(systemsemaphore): SUBDIRS += sharedimage
+     qtConfig(quick-particles): \
+         SUBDIRS += particles