git: 226198376680 - main - cad/freecad: fix build without webengine

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sat, 19 Aug 2023 16:04:51 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22619837668024cb867280aaba152113207c4d9e

commit 22619837668024cb867280aaba152113207c4d9e
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-08-19 16:04:08 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-08-19 16:04:08 +0000

    cad/freecad: fix build without webengine
    
    CMake Error at /usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
      Could not find a package configuration file provided by
      "Qt5WebEngineWidgets" with any of the following names:
    
        Qt5WebEngineWidgetsConfig.cmake
        qt5webenginewidgets-config.cmake
    
      Add the installation prefix of "Qt5WebEngineWidgets" to CMAKE_PREFIX_PATH
      or set "Qt5WebEngineWidgets_DIR" to a directory containing one of the above
      files.  If "Qt5WebEngineWidgets" provides a separate development package or
      SDK, be sure it has been installed.
    Call Stack (most recent call first):
      cMake/FreeCAD_Helpers/SetupQt.cmake:31 (find_package)
      CMakeLists.txt:78 (include)
---
 cad/freecad/Makefile  |  4 ++-
 cad/freecad/pkg-plist | 68 +++++++++++++++++++++++++--------------------------
 2 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/cad/freecad/Makefile b/cad/freecad/Makefile
index 7051fac59702..79a5819bb591 100644
--- a/cad/freecad/Makefile
+++ b/cad/freecad/Makefile
@@ -98,9 +98,11 @@ COLLADA_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pycollada>0:graphics/py-pycollada@${
 .include <bsd.port.options.mk>
 
 .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386
+PLIST_SUB=	WEBENGINE=""
 USE_QT+=	webengine
 .else
-USE_QT+=	webkit
+CMAKE_ARGS+=	-DBUILD_WEB:BOOL=OFF
+PLIST_SUB=	WEBENGINE="@comment "
 .endif
 
 post-patch:
diff --git a/cad/freecad/pkg-plist b/cad/freecad/pkg-plist
index 1b865df2c071..c38d012c3761 100644
--- a/cad/freecad/pkg-plist
+++ b/cad/freecad/pkg-plist
@@ -1379,14 +1379,14 @@ FreeCAD/Mod/Spreadsheet/Init.py
 FreeCAD/Mod/Spreadsheet/InitGui.py
 FreeCAD/Mod/Spreadsheet/TestSpreadsheet.py
 FreeCAD/Mod/Spreadsheet/importXLSX.py
-FreeCAD/Mod/Start/Init.py
-FreeCAD/Mod/Start/InitGui.py
-FreeCAD/Mod/Start/StartPage/StartPage.py
-FreeCAD/Mod/Start/StartPage/TranslationTexts.py
-FreeCAD/Mod/Start/StartPage/__init__.py
-FreeCAD/Mod/Start/TestStart/TestStartPage.py
-FreeCAD/Mod/Start/TestStart/__init__.py
-FreeCAD/Mod/Start/TestStartGui.py
+%%WEBENGINE%%FreeCAD/Mod/Start/Init.py
+%%WEBENGINE%%FreeCAD/Mod/Start/InitGui.py
+%%WEBENGINE%%FreeCAD/Mod/Start/StartPage/StartPage.py
+%%WEBENGINE%%FreeCAD/Mod/Start/StartPage/TranslationTexts.py
+%%WEBENGINE%%FreeCAD/Mod/Start/StartPage/__init__.py
+%%WEBENGINE%%FreeCAD/Mod/Start/TestStart/TestStartPage.py
+%%WEBENGINE%%FreeCAD/Mod/Start/TestStart/__init__.py
+%%WEBENGINE%%FreeCAD/Mod/Start/TestStartGui.py
 FreeCAD/Mod/Surface/Init.py
 FreeCAD/Mod/Surface/InitGui.py
 FreeCAD/Mod/Surface/SurfaceTests/TestBlendCurve.py
@@ -1451,9 +1451,9 @@ FreeCAD/Mod/Tux/NavigationIndicatorGui.py
 FreeCAD/Mod/Tux/PersistentToolbars.py
 FreeCAD/Mod/Tux/PersistentToolbarsGui.py
 FreeCAD/Mod/Tux/Tux_rc.py
-FreeCAD/Mod/Web/Init.py
-FreeCAD/Mod/Web/InitGui.py
-FreeCAD/Mod/Web/TestWebGui.py
+%%WEBENGINE%%FreeCAD/Mod/Web/Init.py
+%%WEBENGINE%%FreeCAD/Mod/Web/InitGui.py
+%%WEBENGINE%%FreeCAD/Mod/Web/TestWebGui.py
 FreeCAD/bin/FreeCAD
 FreeCAD/bin/FreeCADCmd
 FreeCAD/include/E57Format/E57Export.h
@@ -1528,14 +1528,14 @@ FreeCAD/lib/Sketcher.so
 FreeCAD/lib/SketcherGui.so
 FreeCAD/lib/Spreadsheet.so
 FreeCAD/lib/SpreadsheetGui.so
-FreeCAD/lib/Start.so
-FreeCAD/lib/StartGui.so
+%%WEBENGINE%%FreeCAD/lib/Start.so
+%%WEBENGINE%%FreeCAD/lib/StartGui.so
 FreeCAD/lib/Surface.so
 FreeCAD/lib/SurfaceGui.so
 FreeCAD/lib/TechDraw.so
 FreeCAD/lib/TechDrawGui.so
-FreeCAD/lib/Web.so
-FreeCAD/lib/WebGui.so
+%%WEBENGINE%%FreeCAD/lib/Web.so
+%%WEBENGINE%%FreeCAD/lib/WebGui.so
 FreeCAD/lib/_PartDesign.so
 FreeCAD/lib/area.so
 FreeCAD/lib/cmake/GTest/GTestConfig.cmake
@@ -1881,24 +1881,24 @@ FreeCAD/share/Mod/Robot/Lib/Kuka/testprog.src
 FreeCAD/share/Mod/Robot/Resources/icons/RobotWorkbench.svg
 FreeCAD/share/Mod/Sketcher/Resources/icons/SketcherWorkbench.svg
 FreeCAD/share/Mod/Spreadsheet/Resources/icons/SpreadsheetWorkbench.svg
-FreeCAD/share/Mod/Start/Resources/icons/StartWorkbench.svg
-FreeCAD/share/Mod/Start/StartPage/EnableDownload.py
-FreeCAD/share/Mod/Start/StartPage/LoadCustom.py
-FreeCAD/share/Mod/Start/StartPage/LoadExample.py
-FreeCAD/share/Mod/Start/StartPage/LoadMRU.py
-FreeCAD/share/Mod/Start/StartPage/LoadNew.py
-FreeCAD/share/Mod/Start/StartPage/OpenSettings.py
-FreeCAD/share/Mod/Start/StartPage/StartPage.css
-FreeCAD/share/Mod/Start/StartPage/StartPage.html
-FreeCAD/share/Mod/Start/StartPage/StartPage.js
-FreeCAD/share/Mod/Start/StartPage/images/developerhub.png
-FreeCAD/share/Mod/Start/StartPage/images/freecad.png
-FreeCAD/share/Mod/Start/StartPage/images/installed.png
-FreeCAD/share/Mod/Start/StartPage/images/manual.png
-FreeCAD/share/Mod/Start/StartPage/images/new_file_thumbnail.svg
-FreeCAD/share/Mod/Start/StartPage/images/poweruserhub.png
-FreeCAD/share/Mod/Start/StartPage/images/settings.png
-FreeCAD/share/Mod/Start/StartPage/images/userhub.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/Resources/icons/StartWorkbench.svg
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/EnableDownload.py
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/LoadCustom.py
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/LoadExample.py
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/LoadMRU.py
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/LoadNew.py
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/OpenSettings.py
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/StartPage.css
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/StartPage.html
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/StartPage.js
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/developerhub.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/freecad.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/installed.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/manual.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/new_file_thumbnail.svg
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/poweruserhub.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/settings.png
+%%WEBENGINE%%FreeCAD/share/Mod/Start/StartPage/images/userhub.png
 FreeCAD/share/Mod/Surface/Resources/icons/Surface_Workbench.svg
 FreeCAD/share/Mod/TechDraw/LineGroup/LineGroup.csv
 FreeCAD/share/Mod/TechDraw/PAT/FCPAT.pat
@@ -2143,7 +2143,7 @@ FreeCAD/share/Mod/TechDraw/Templates/zh_CN/landscape/A4_Landscape_CN_NO_CLIP.svg
 FreeCAD/share/Mod/TechDraw/Templates/zh_CN/portrait/A3_Portrait_CN_CLIP.svg
 FreeCAD/share/Mod/TechDraw/Templates/zh_CN/portrait/A4_Portrait_CN_CLIP.svg
 FreeCAD/share/Mod/Test/Resources/icons/TestWorkbench.svg
-FreeCAD/share/Mod/Web/Resources/icons/WebWorkbench.svg
+%%WEBENGINE%%FreeCAD/share/Mod/Web/Resources/icons/WebWorkbench.svg
 @comment FreeCAD/share/doc/FreeCAD/LICENSE.html
 @comment FreeCAD/share/doc/FreeCAD/ThirdPartyLibraries.html
 FreeCAD/share/examples/ArchDetail.FCStd