Switch qbs build to cmake and away from hackish qmake with different workarounds. This is the next attempt to fix the build
OK? Feedback. Local build would be helpful for me. Rafael diff --git a/devel/qbs/Makefile b/devel/qbs/Makefile index 26c222f4559..c5781a2c833 100644 --- a/devel/qbs/Makefile +++ b/devel/qbs/Makefile @@ -1,9 +1,11 @@ # $OpenBSD: Makefile,v 1.17 2021/12/06 07:46:44 rsadowski Exp $ COMMENT = declarative cross-platform build tool + V = 1.20.0 DISTNAME = qbs-src-${V} PKGNAME = qbs-${V} +REVISION = 0 SHARED_LIBS = qbscore 8.0 SHARED_LIBS += qbsqtprofilesetup 4.0 @@ -12,40 +14,25 @@ CATEGORIES = devel HOMEPAGE = https://doc.qt.io/qbs/ +MAINTAINER = Rafael Sadowski <rsadow...@openbsd.org> + # LGPLv3 or GPLv2+ PERMIT_PACKAGE = Yes -WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5Script -WANTLIB += Qt5Widgets Qt5Xml c m +WANTLIB += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5Gui Qt5Network +WANTLIB += Qt5Script Qt5Widgets Qt5Xml c m MASTER_SITES = https://download.qt.io/official_releases/qbs/${V}/ -MODULES = devel/qmake x11/qt5 - -MODQMAKE_PROJECTS = qbs.pro - -MODQMAKE_ARGS = CONFIG+=qbs_enable_unit_tests=1 \ - CONFIG+=qbs_enable_project_file_updates +MODULES = x11/qt5 \ + devel/cmake BUILD_DEPENDS = x11/qt5/qtdeclarative RUN_DEPENDS = x11/qt5/qtdeclarative + LIB_DEPENDS = x11/qt5/qtbase \ x11/qt5/qtscript -TEST_DEPENDS = ${BUILD_PKGPATH} - -MAKE_ENV = LD_LIBRARY_PATH=${WRKBUILD}/lib -TEST_ENV = LD_LIBRARY_PATH=${WRKBUILD}/lib - -do-test: - cd ${WRKBUILD}/bin/; \ - for t in tst_*; do \ - ${SETENV} ${ALL_TEST_ENV} ./$$t; \ - done - -pre-fake: - ${INSTALL_DATA_DIR} ${PREFIX}/include/qbs/tools - ${INSTALL_DATA} ${WRKSRC}/src/lib/corelib/tools/*.h \ - ${PREFIX}/include/qbs/tools/ +CONFIGURE_ENV += QT_DIR=/usr/local/lib/qt5/cmake .include <bsd.port.mk> diff --git a/devel/qbs/patches/patch-cmake_QbsBuildConfig_cmake b/devel/qbs/patches/patch-cmake_QbsBuildConfig_cmake new file mode 100644 index 00000000000..0498f91302f --- /dev/null +++ b/devel/qbs/patches/patch-cmake_QbsBuildConfig_cmake @@ -0,0 +1,15 @@ +$OpenBSD$ + +Do not install tests + +Index: cmake/QbsBuildConfig.cmake +--- cmake/QbsBuildConfig.cmake.orig ++++ cmake/QbsBuildConfig.cmake +@@ -249,6 +249,6 @@ function(add_qbs_test test_name) + INSTALL_RPATH "${QBS_APP_RPATH}" + MACOSX_RPATH ${QBS_MACOSX_RPATH} + ) +- install(TARGETS ${target_name} RUNTIME DESTINATION ${QBS_APP_INSTALL_DIR}) ++ #install(TARGETS ${target_name} RUNTIME DESTINATION ${QBS_APP_INSTALL_DIR}) + add_test(NAME ${target_name} COMMAND ${target_name}) + endfunction() diff --git a/devel/qbs/pkg/PLIST b/devel/qbs/pkg/PLIST index c8b44c6a43b..6f7e47a304c 100644 --- a/devel/qbs/pkg/PLIST +++ b/devel/qbs/pkg/PLIST @@ -7,6 +7,8 @@ @bin bin/qbs-setup-android @bin bin/qbs-setup-qt @bin bin/qbs-setup-toolchains +@bin bin/qbs_benchmarker +@bin bin/qbs_fuzzy-test include/qbs/ include/qbs/api/ include/qbs/api/jobs.h @@ -28,66 +30,27 @@ include/qbs/logging/ilogsink.h include/qbs/qbs.h include/qbs/qbs_version.pri include/qbs/tools/ -include/qbs/tools/applecodesignutils.h include/qbs/tools/architectures.h -include/qbs/tools/buildgraphlocker.h include/qbs/tools/buildoptions.h -include/qbs/tools/clangclinfo.h include/qbs/tools/cleanoptions.h include/qbs/tools/codelocation.h include/qbs/tools/commandechomode.h -include/qbs/tools/dynamictypecheck.h include/qbs/tools/error.h -include/qbs/tools/executablefinder.h -include/qbs/tools/fileinfo.h -include/qbs/tools/filesaver.h -include/qbs/tools/filetime.h include/qbs/tools/generateoptions.h -include/qbs/tools/hostosinfo.h -include/qbs/tools/id.h include/qbs/tools/installoptions.h -include/qbs/tools/iosutils.h include/qbs/tools/joblimits.h -include/qbs/tools/jsliterals.h -include/qbs/tools/jsonhelper.h -include/qbs/tools/launcherinterface.h -include/qbs/tools/launcherpackets.h -include/qbs/tools/launchersocket.h -include/qbs/tools/msvcinfo.h -include/qbs/tools/pathutils.h -include/qbs/tools/persistence.h include/qbs/tools/preferences.h include/qbs/tools/processresult.h -include/qbs/tools/processresult_p.h -include/qbs/tools/processutils.h include/qbs/tools/profile.h -include/qbs/tools/profiling.h -include/qbs/tools/progressobserver.h include/qbs/tools/projectgeneratormanager.h include/qbs/tools/qbs_export.h -include/qbs/tools/qbsassert.h -include/qbs/tools/qbspluginmanager.h -include/qbs/tools/qbsprocess.h -include/qbs/tools/qttools.h -include/qbs/tools/scannerpluginmanager.h -include/qbs/tools/scripttools.h -include/qbs/tools/set.h include/qbs/tools/settings.h -include/qbs/tools/settingscreator.h include/qbs/tools/settingsmodel.h include/qbs/tools/settingsrepresentation.h include/qbs/tools/setupprojectparameters.h -include/qbs/tools/shellutils.h -include/qbs/tools/stlutils.h -include/qbs/tools/stringconstants.h -include/qbs/tools/stringutils.h include/qbs/tools/toolchains.h include/qbs/tools/version.h -include/qbs/tools/visualstudioversioninfo.h -include/qbs/tools/vsenvironmentdetector.h -include/qbs/tools/weakpointer.h include/qbs/use_installed_corelib.pri -lib/libqbscore.prl @lib lib/libqbscore.so.${LIBqbscore_VERSION} lib/qbs/ lib/qbs/plugins/ @@ -101,7 +64,6 @@ lib/qbs/plugins/ libexec/qbs/ libexec/qbs/dmgbuild @bin libexec/qbs/qbs_processlauncher -@man man/man1/qbs.1 share/qbs/ share/qbs/examples/ share/qbs/examples/app-and-lib/ @@ -699,3 +661,6 @@ share/qbs/python/mac_alias/alias.py share/qbs/python/mac_alias/bookmark.py share/qbs/python/mac_alias/osx.py share/qbs/python/mac_alias/utils.py +share/qbs/qml-type-descriptions/ +share/qbs/qml-type-descriptions/qbs-bundle.json +share/qbs/qml-type-descriptions/qbs.qmltypes