From 7f52089eae38350db3ece167ae025c09de8eb323 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 27 Aug 2024 14:08:36 +0200 Subject: [PATCH] qt5: avoid build of qt libs as target dep Issue #5325 --- repos/gems/src/app/mixer_gui_qt/target.mk | 7 +- repos/gems/src/test/tiled_wm/target.inc | 7 +- repos/libports/lib/import/import-qt5.inc | 87 ++++++++++++ repos/libports/lib/import/import-qt5_cmake.mk | 129 +++++------------- repos/libports/lib/import/import-qt5_qmake.mk | 118 +++++----------- repos/libports/lib/mk/libQt5Core.mk | 6 - repos/libports/lib/mk/libQt5Gui.mk | 6 - repos/libports/lib/mk/libQt5Network.mk | 6 - repos/libports/lib/mk/libQt5PrintSupport.mk | 6 - repos/libports/lib/mk/libQt5Qml.mk | 6 - repos/libports/lib/mk/libQt5QmlModels.mk | 6 - .../libports/lib/mk/libQt5QmlWorkerScript.mk | 6 - repos/libports/lib/mk/libQt5Quick.mk | 6 - repos/libports/lib/mk/libQt5QuickControls2.mk | 6 - .../libports/lib/mk/libQt5QuickTemplates2.mk | 6 - repos/libports/lib/mk/libQt5QuickWidgets.mk | 6 - repos/libports/lib/mk/libQt5Sql.mk | 6 - repos/libports/lib/mk/libQt5Svg.mk | 6 - repos/libports/lib/mk/libQt5Test.mk | 6 - .../libports/lib/mk/libQt5VirtualKeyboard.mk | 6 - repos/libports/lib/mk/libQt5Widgets.mk | 6 - repos/libports/lib/mk/libQt5Xml.mk | 6 - repos/libports/lib/mk/libqgenodeviewwidget.mk | 8 +- repos/libports/lib/mk/qt5_base.mk | 12 +- repos/libports/lib/mk/qt5_cmake.mk | 4 + repos/libports/lib/mk/qt5_declarative.mk | 10 +- repos/libports/lib/mk/qt5_graphicaleffects.mk | 10 +- repos/libports/lib/mk/qt5_qmake.mk | 4 + repos/libports/lib/mk/qt5_quickcontrols.mk | 10 +- repos/libports/lib/mk/qt5_quickcontrols2.mk | 10 +- repos/libports/lib/mk/qt5_svg.mk | 10 +- repos/libports/lib/mk/qt5_virtualkeyboard.mk | 10 +- .../libports/recipes/api/qt5_base/content.mk | 7 +- .../app/qt5/examples/calculatorform/target.mk | 4 +- .../app/qt5/examples/openglwindow/target.mk | 4 +- .../src/app/qt5/examples/samegame/target.mk | 4 +- .../app/qt5/examples/testqstring/target.mk | 4 +- .../src/app/qt5/examples/tetrix/target.mk | 4 +- .../src/app/qt5/examples/textedit/target.mk | 4 +- .../src/app/qt5/examples/tooltips/target.mk | 4 +- .../qt5/examples/virtualkeyboard/target.mk | 4 +- .../src/app/qt5/qt_launchpad/target.mk | 7 +- .../qgenodeviewwidget/qgenodeviewwidget.pro | 2 +- repos/libports/src/test/qt5/qt_core/target.mk | 4 +- .../src/test/qt5/qt_core_cmake/target.mk | 4 +- .../libports/src/test/qt5/qt_quick/target.mk | 4 +- 46 files changed, 219 insertions(+), 379 deletions(-) create mode 100644 repos/libports/lib/import/import-qt5.inc delete mode 100644 repos/libports/lib/mk/libQt5Core.mk delete mode 100644 repos/libports/lib/mk/libQt5Gui.mk delete mode 100644 repos/libports/lib/mk/libQt5Network.mk delete mode 100644 repos/libports/lib/mk/libQt5PrintSupport.mk delete mode 100644 repos/libports/lib/mk/libQt5Qml.mk delete mode 100644 repos/libports/lib/mk/libQt5QmlModels.mk delete mode 100644 repos/libports/lib/mk/libQt5QmlWorkerScript.mk delete mode 100644 repos/libports/lib/mk/libQt5Quick.mk delete mode 100644 repos/libports/lib/mk/libQt5QuickControls2.mk delete mode 100644 repos/libports/lib/mk/libQt5QuickTemplates2.mk delete mode 100644 repos/libports/lib/mk/libQt5QuickWidgets.mk delete mode 100644 repos/libports/lib/mk/libQt5Sql.mk delete mode 100644 repos/libports/lib/mk/libQt5Svg.mk delete mode 100644 repos/libports/lib/mk/libQt5Test.mk delete mode 100644 repos/libports/lib/mk/libQt5VirtualKeyboard.mk delete mode 100644 repos/libports/lib/mk/libQt5Widgets.mk delete mode 100644 repos/libports/lib/mk/libQt5Xml.mk create mode 100644 repos/libports/lib/mk/qt5_cmake.mk create mode 100644 repos/libports/lib/mk/qt5_qmake.mk diff --git a/repos/gems/src/app/mixer_gui_qt/target.mk b/repos/gems/src/app/mixer_gui_qt/target.mk index f70cdff88d..33c3f07fd1 100644 --- a/repos/gems/src/app/mixer_gui_qt/target.mk +++ b/repos/gems/src/app/mixer_gui_qt/target.mk @@ -4,11 +4,10 @@ QMAKE_TARGET_BINARIES = mixer_gui_qt QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Widgets -LIBS = base libc libm mesa stdcxx qoost $(QT5_PORT_LIBS) +LIBS = qt5_qmake base libc libm mesa stdcxx qoost -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +QT5_COMPONENT_LIB_SO = QT5_GENODE_LIBS_APP += ld.lib.so -QT5_GENODE_LIBS_APP := $(filter-out qt5_component.lib.so,$(QT5_GENODE_LIBS_APP)) -qmake_prepared.tag: qmake_root/lib/ld.lib.so +qmake_prepared.tag: $(addprefix build_dependencies/lib/,$(QT5_GENODE_LIBS_APP)) diff --git a/repos/gems/src/test/tiled_wm/target.inc b/repos/gems/src/test/tiled_wm/target.inc index 890a1b2d56..258fdcad73 100644 --- a/repos/gems/src/test/tiled_wm/target.inc +++ b/repos/gems/src/test/tiled_wm/target.inc @@ -1,13 +1,12 @@ QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Widgets -LIBS = base libc libm mesa stdcxx qoost $(QT5_PORT_LIBS) +LIBS = qt5_qmake base libc libm mesa stdcxx qoost -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +QT5_COMPONENT_LIB_SO = QT5_GENODE_LIBS_APP += ld.lib.so -QT5_GENODE_LIBS_APP := $(filter-out qt5_component.lib.so,$(QT5_GENODE_LIBS_APP)) -qmake_prepared.tag: qmake_root/lib/ld.lib.so +qmake_prepared.tag: $(addprefix build_dependencies/lib/,$(QT5_GENODE_LIBS_APP)) INC_DIR += $(PRG_DIR)/.. diff --git a/repos/libports/lib/import/import-qt5.inc b/repos/libports/lib/import/import-qt5.inc new file mode 100644 index 0000000000..ae8bdd1b8d --- /dev/null +++ b/repos/libports/lib/import/import-qt5.inc @@ -0,0 +1,87 @@ +QT_TOOLS_DIR = /usr/local/genode/tool/23.05 + +ifeq ($(filter-out $(SPECS),arm),) +QT_PLATFORM = genode-arm-g++ +else ifeq ($(filter-out $(SPECS),arm_64),) +QT_PLATFORM = genode-aarch64-g++ +else ifeq ($(filter-out $(SPECS),x86_32),) +QT_PLATFORM = genode-x86_32-g++ +else ifeq ($(filter-out $(SPECS),x86_64),) +QT_PLATFORM = genode-x86_64-g++ +else +$(error Error: unsupported platform) +endif + +ifeq ($(CONTRIB_DIR),) +QT_DIR = $(call select_from_repositories,src/lib/qt5) +QT_API_DIR = $(call select_from_repositories,mkspecs)/.. +abi_symbol_path = $(wildcard $(call select_from_repositories,lib/symbols/$1)) +else +QT_PORT_DIR := $(call select_from_ports,qt5) +QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 +QT_API_DIR = $(QT_DIR)/genode/api +abi_symbol_path = $(wildcard $(addprefix $(QT_API_DIR)/lib/symbols/,$1)) +endif + +ifeq ($(VERBOSE),) +MAKE_VERBOSE="1" +else +QT6_OUTPUT_FILTER = > /dev/null +endif + +# +# Genode libraries to be linked to Qt applications and libraries +# + +QT5_COMPONENT_LIB_SO ?= qt5_component.lib.so +QT5_GENODE_LIBS_COMMON += libc.lib.so libm.lib.so stdcxx.lib.so +QT5_GENODE_LIBS_APP += $(QT5_GENODE_LIBS_COMMON) $(QT5_COMPONENT_LIB_SO) +QT5_GENODE_LIBS_SHLIB += $(QT5_GENODE_LIBS_COMMON) + +# +# common 'build_dependencies' rules +# + +build_dependencies: + $(VERBOSE)mkdir -p $@ + +build_dependencies/include: build_dependencies + $(VERBOSE)mkdir -p $@ + $(VERBOSE)ln -snf $(QT_API_DIR)/include/* $@/ + +build_dependencies/lib: build_dependencies + $(VERBOSE)mkdir -p $@ + +build_dependencies/lib/%.lib.so: build_dependencies/lib + $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.abi.so $@ + +build_dependencies/lib/%.lib.a: build_dependencies/lib + $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.lib.a $@ + +# +# rules for generating .lib.so files from port symbol files +# + +lib_name = $(notdir $(1:.lib.so=)) +abi_name = $(notdir $(1:.abi.so=)) +abi_path = build_dependencies/abi/$(call abi_name,$1)/$(call abi_name,$1).abi.so +so_path = build_dependencies/lib/$(call lib_name,$1).lib.so + +BUILD_DEPENDENCIES_QT5_SO_FILES := $(foreach L,$(QT5_PORT_LIBS),$(call so_path,$L)) +BUILD_DEPENDENCIES_QT5_ABI_FILES := $(foreach L,$(QT5_PORT_LIBS),$(call abi_path,$L)) + +$(BUILD_DEPENDENCIES_QT5_ABI_FILES): + $(VERBOSE)mkdir -p $(dir $@) + $(VERBOSE)$(MAKE) -C $(dir $@) -f $(BASE_DIR)/mk/abi.mk \ + SYMBOLS=$(call abi_symbol_path,$(call abi_name,$@)) \ + LIB=$(call abi_name,$@) \ + BUILD_BASE_DIR=$(BUILD_BASE_DIR) \ + SHELL=$(SHELL) + +$(BUILD_DEPENDENCIES_QT5_SO_FILES): $(BUILD_DEPENDENCIES_QT5_ABI_FILES) + +.PHONY: qt5_so_files + +qt5_so_files: $(BUILD_DEPENDENCIES_QT5_SO_FILES) + $(VERBOSE)for l in $(QT5_PORT_LIBS); do \ + ln -sf ../abi/$$l/$$l.abi.so build_dependencies/lib/$$l.lib.so; done diff --git a/repos/libports/lib/import/import-qt5_cmake.mk b/repos/libports/lib/import/import-qt5_cmake.mk index a16f3b8d20..ab3155367e 100644 --- a/repos/libports/lib/import/import-qt5_cmake.mk +++ b/repos/libports/lib/import/import-qt5_cmake.mk @@ -4,47 +4,16 @@ # CMAKE_LISTS_DIR: path to the CMakeLists.txt file # CMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories # QT5_PORT_LIBS: Qt5 libraries used from port (for example libQt5Core) +# QT5_COMPONENT_LIB_SO: if defined empty, disables linking with qt5_component.lib.so # -QT_TOOLS_DIR = /usr/local/genode/tool/23.05 - -ifeq ($(filter-out $(SPECS),arm),) -QT_PLATFORM = genode-arm-g++ -else ifeq ($(filter-out $(SPECS),arm_64),) -QT_PLATFORM = genode-aarch64-g++ -else ifeq ($(filter-out $(SPECS),x86_32),) -QT_PLATFORM = genode-x86_32-g++ -else ifeq ($(filter-out $(SPECS),x86_64),) -QT_PLATFORM = genode-x86_64-g++ -else -$(error Error: unsupported platform) -endif - -ifeq ($(CONTRIB_DIR),) -QT_DIR = $(call select_from_repositories,src/lib/qt5) -QT_API_DIR = $(call select_from_repositories,mkspecs)/.. -else -QT_PORT_DIR := $(call select_from_ports,qt5) -QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 -QT_API_DIR = $(QT_DIR)/genode/api -endif - -ifneq ($(VERBOSE),) -QT5_OUTPUT_FILTER = > /dev/null -endif - -# -# Genode libraries to be linked to Qt applications and libraries -# - -QT5_GENODE_LIBS_APP = libc.lib.so libm.lib.so stdcxx.lib.so qt5_component.lib.so -QT5_GENODE_LIBS_SHLIB = libc.lib.so libm.lib.so stdcxx.lib.so +include $(call select_from_repositories,lib/import/import-qt5.inc) # # flags to be passed to CMake # -GENODE_CMAKE_CFLAGS = \ +GENODE_CMAKE_CFLAGS += \ -D__FreeBSD__=12 \ -D__GENODE__ \ -ffunction-sections \ @@ -53,9 +22,9 @@ GENODE_CMAKE_CFLAGS = \ $(CC_MARCH) \ $(CC_OPT_PIC) \ $(filter-out -I.,$(INCLUDES)) \ - -I$(CURDIR)/cmake_root/include/QtCore/spec/$(QT_PLATFORM) + -I$(CURDIR)/build_dependencies/include/QtCore/spec/$(QT_PLATFORM) -GENODE_CMAKE_LFLAGS_APP = \ +GENODE_CMAKE_LFLAGS_APP += \ $(addprefix $(LD_OPT_PREFIX),$(LD_MARCH)) \ $(addprefix $(LD_OPT_PREFIX),$(LD_OPT_GC_SECTIONS)) \ $(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \ @@ -67,7 +36,7 @@ GENODE_CMAKE_LFLAGS_APP = \ -Wl,--eh-frame-hdr \ -Wl,-rpath-link=. \ -Wl,-T -Wl,$(LD_SCRIPT_DYN) \ - -L$(CURDIR)/cmake_root/lib \ + -L$(CURDIR)/build_dependencies/lib \ -Wl,--whole-archive \ -Wl,--start-group \ $(addprefix -l:,$(QT5_GENODE_LIBS_APP)) \ @@ -75,7 +44,7 @@ GENODE_CMAKE_LFLAGS_APP = \ -Wl,--end-group \ -Wl,--no-whole-archive -GENODE_CMAKE_LFLAGS_SHLIB = \ +GENODE_CMAKE_LFLAGS_SHLIB += \ $(LD_OPT_NOSTDLIB) \ -Wl,-shared \ -Wl,--eh-frame-hdr \ @@ -84,7 +53,7 @@ GENODE_CMAKE_LFLAGS_SHLIB = \ $(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \ -Wl,-T -Wl,$(LD_SCRIPT_SO) \ $(addprefix $(LD_OPT_PREFIX),--entry=0x0) \ - -L$(CURDIR)/cmake_root/lib \ + -L$(CURDIR)/build_dependencies/lib \ -Wl,--whole-archive \ -Wl,--start-group \ $(addprefix -l:,$(QT5_GENODE_LIBS_SHLIB)) \ @@ -99,61 +68,34 @@ else GENODE_CMAKE_GL_INCDIRS := $(call select_from_ports,mesa)/include endif -GENODE_CMAKE_OPENGL_LIBS = $(CURDIR)/cmake_root/lib/mesa.lib.so +GENODE_CMAKE_OPENGL_LIBS = $(CURDIR)/build_dependencies/lib/mesa.lib.so # -# prepare a directory named 'cmake_root' where CMake can find needed files +# prepare a directory named 'build_dependencies' where CMake can find needed files # -cmake_root: - $(VERBOSE)mkdir -p $@ - -cmake_root/bin: cmake_root +build_dependencies/bin: build_dependencies $(VERBOSE)mkdir -p $@ $(VERBOSE)ln -sf $(QT_TOOLS_DIR)/bin/* $@/ -cmake_root/include: cmake_root - $(VERBOSE)mkdir -p $@ - $(VERBOSE)ln -snf $(QT_API_DIR)/include/* $@/ - -cmake_root/lib: cmake_root - $(VERBOSE)mkdir -p $@ - -cmake_root/lib/cmake: cmake_root/lib +build_dependencies/lib/cmake: build_dependencies/lib $(VERBOSE)ln -snf $(QT_API_DIR)/lib/cmake $@ -cmake_root/lib/%.lib.so: cmake_root/lib - $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.abi.so $@ - -cmake_root/lib/%.lib.a: cmake_root/lib - $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.lib.a $@ - -cmake_root/mkspecs: cmake_root +build_dependencies/mkspecs: build_dependencies $(VERBOSE)ln -snf $(QT_API_DIR)/mkspecs $@ cmake_prepared.tag: \ - cmake_root/bin \ - cmake_root/include \ - cmake_root/lib/cmake \ - cmake_root/lib/libc.lib.so \ - cmake_root/lib/libm.lib.so \ - cmake_root/lib/egl.lib.so \ - cmake_root/lib/mesa.lib.so \ - cmake_root/lib/qt5_component.lib.so \ - cmake_root/lib/stdcxx.lib.so \ - cmake_root/lib/ldso_so_support.lib.a \ - cmake_root/mkspecs - -# add symlinks for Qt5 libraries listed in the 'QT5_PORT_LIBS' variable -ifeq ($(CONTRIB_DIR),) - $(VERBOSE)for qt5_lib in $(QT5_PORT_LIBS); do \ - ln -sf $(BUILD_BASE_DIR)/var/libcache/$${qt5_lib}/$${qt5_lib}.abi.so cmake_root/lib/$${qt5_lib}.lib.so; \ - done -else - $(VERBOSE)for qt5_lib in $(QT5_PORT_LIBS); do \ - ln -sf $(BUILD_BASE_DIR)/bin/$${qt5_lib}.lib.so cmake_root/lib/; \ - done -endif + build_dependencies/bin \ + build_dependencies/include \ + build_dependencies/lib/cmake \ + build_dependencies/lib/libc.lib.so \ + build_dependencies/lib/libm.lib.so \ + build_dependencies/lib/egl.lib.so \ + build_dependencies/lib/mesa.lib.so \ + build_dependencies/lib/qt5_component.lib.so \ + build_dependencies/lib/stdcxx.lib.so \ + build_dependencies/lib/ldso_so_support.lib.a \ + build_dependencies/mkspecs $(VERBOSE)touch $@ .PHONY: build_with_cmake @@ -161,15 +103,11 @@ endif # 'make' called by CMake uses '/bin/sh', which does not understand '-o pipefail' unexport .SHELLFLAGS -ifeq ($(VERBOSE),) -CMAKE_MAKE_VERBOSE="1" -endif - -build_with_cmake: cmake_prepared.tag - $(VERBOSE)CMAKE_PREFIX_PATH="$(CURDIR)/cmake_root" \ - cmake \ - --no-warn-unused-cli \ - -DCMAKE_MODULE_PATH="$(CURDIR)/cmake_root/lib/cmake/Modules" \ +build_with_cmake: cmake_prepared.tag qt5_so_files + $(VERBOSE)cmake \ + -G "Unix Makefiles" \ + -DCMAKE_PREFIX_PATH="$(CURDIR)/build_dependencies" \ + -DCMAKE_MODULE_PATH="$(CURDIR)/build_dependencies/lib/cmake/Modules" \ -DCMAKE_SYSTEM_NAME="Genode" \ -DCMAKE_AR="$(AR)" \ -DCMAKE_C_COMPILER="$(CC)" \ @@ -182,10 +120,11 @@ build_with_cmake: cmake_prepared.tag -DCMAKE_MODULE_LINKER_FLAGS="$(GENODE_CMAKE_LFLAGS_SHLIB)" \ -DCMAKE_GL_INCDIRS="$(GENODE_CMAKE_GL_INCDIRS)" \ -DCMAKE_OPENGL_LIBS="$(GENODE_CMAKE_OPENGL_LIBS)" \ + --no-warn-unused-cli \ $(CMAKE_LISTS_DIR) \ $(QT5_OUTPUT_FILTER) - $(VERBOSE)$(MAKE) VERBOSE=$(CMAKE_MAKE_VERBOSE) $(QT5_OUTPUT_FILTER) + $(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) $(QT5_OUTPUT_FILTER) # # Not every CMake project has an 'install' target, so execute @@ -193,7 +132,7 @@ build_with_cmake: cmake_prepared.tag # its path. # ifneq ($(findstring install/,$(CMAKE_TARGET_BINARIES)),) - $(VERBOSE)$(MAKE) VERBOSE=$(CMAKE_MAKE_VERBOSE) DESTDIR=install install $(QT5_OUTPUT_FILTER) + $(VERBOSE)$(MAKE) VERBOSE=$(MAKE_VERBOSE) DESTDIR=install install $(QT5_OUTPUT_FILTER) endif $(VERBOSE)for cmake_target_binary in $(CMAKE_TARGET_BINARIES); do \ @@ -205,11 +144,11 @@ endif ln -sf $(CURDIR)/$${cmake_target_binary}.debug $(PWD)/debug/; \ done -BUILD_ARTIFACTS ?= $(notdir $(CMAKE_TARGET_BINARIES)) +BUILD_ARTIFACTS += $(notdir $(CMAKE_TARGET_BINARIES)) # # build applications with CMake # TARGET ?= $(CMAKE_LISTS_DIR).cmake_target .PHONY: $(TARGET) -$(TARGET): build_with_cmake +$(TARGET): build_with_cmake $(QT5_EXTRA_TARGET_DEPS) diff --git a/repos/libports/lib/import/import-qt5_qmake.mk b/repos/libports/lib/import/import-qt5_qmake.mk index 22a3963334..8caef176e3 100644 --- a/repos/libports/lib/import/import-qt5_qmake.mk +++ b/repos/libports/lib/import/import-qt5_qmake.mk @@ -4,48 +4,18 @@ # QMAKE_PROJECT_FILE: path to the qmake project file (for applications with target.mk) # QMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories # QT5_PORT_LIBS: Qt5 libraries used from port (for example libQt5Core) +# QT5_COMPONENT_LIB_SO: if defined empty, disables linking with qt5_component.lib.so # -QT_TOOLS_DIR = /usr/local/genode/tool/23.05 -QMAKE = $(QT_TOOLS_DIR)/bin/qmake +include $(call select_from_repositories,lib/import/import-qt5.inc) -ifeq ($(filter-out $(SPECS),arm),) -QMAKE_PLATFORM = genode-arm-g++ -else ifeq ($(filter-out $(SPECS),arm_64),) -QMAKE_PLATFORM = genode-aarch64-g++ -else ifeq ($(filter-out $(SPECS),x86_32),) -QMAKE_PLATFORM = genode-x86_32-g++ -else ifeq ($(filter-out $(SPECS),x86_64),) -QMAKE_PLATFORM = genode-x86_64-g++ -else -$(error Error: unsupported platform) -endif - -ifeq ($(CONTRIB_DIR),) -QT_DIR = $(call select_from_repositories,src/lib/qt5) -QT_API_DIR = $(call select_from_repositories,mkspecs)/.. -else -QT_PORT_DIR := $(call select_from_ports,qt5) -QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 -QT_API_DIR = $(QT_DIR)/genode/api -endif - -ifneq ($(VERBOSE),) -QT5_OUTPUT_FILTER = > /dev/null -endif - -# -# Genode libraries to be linked to Qt applications and libraries -# - -QT5_GENODE_LIBS_APP = libc.lib.so libm.lib.so stdcxx.lib.so qt5_component.lib.so -QT5_GENODE_LIBS_SHLIB = libc.lib.so libm.lib.so stdcxx.lib.so +QMAKE = $(QT_TOOLS_DIR)/bin/qmake # # flags to be passed to qmake via env.sh and mkspecs/common/genode.conf # -GENODE_QMAKE_CFLAGS = \ +GENODE_QMAKE_CFLAGS += \ -D__FreeBSD__=12 \ -D__GENODE__ \ -ffunction-sections \ @@ -54,9 +24,9 @@ GENODE_QMAKE_CFLAGS = \ $(CC_MARCH) \ $(CC_OPT_PIC) \ $(filter-out -I.,$(INCLUDES)) \ - -I$(CURDIR)/qmake_root/include/QtCore/spec/$(QMAKE_PLATFORM) + -I$(CURDIR)/build_dependencies/include/QtCore/spec/$(QT_PLATFORM) -GENODE_QMAKE_LFLAGS_APP = \ +GENODE_QMAKE_LFLAGS_APP += \ $(addprefix $(LD_OPT_PREFIX),$(LD_MARCH)) \ $(addprefix $(LD_OPT_PREFIX),$(LD_OPT_GC_SECTIONS)) \ $(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \ @@ -68,14 +38,14 @@ GENODE_QMAKE_LFLAGS_APP = \ -Wl,--eh-frame-hdr \ -Wl,-rpath-link=. \ -Wl,-T -Wl,$(LD_SCRIPT_DYN) \ - -L$(CURDIR)/qmake_root/lib \ + -L$(CURDIR)/build_dependencies/lib \ -Wl,--whole-archive \ -Wl,--start-group \ $(addprefix -l:,$(QT5_GENODE_LIBS_APP)) \ -Wl,--end-group \ -Wl,--no-whole-archive -GENODE_QMAKE_LFLAGS_SHLIB = \ +GENODE_QMAKE_LFLAGS_SHLIB += \ $(LD_OPT_NOSTDLIB) \ -Wl,-shared \ -Wl,--eh-frame-hdr \ @@ -84,7 +54,7 @@ GENODE_QMAKE_LFLAGS_SHLIB = \ $(addprefix $(LD_OPT_PREFIX),$(LD_OPT_ALIGN_SANE)) \ -Wl,-T -Wl,$(LD_SCRIPT_SO) \ $(addprefix $(LD_OPT_PREFIX),--entry=0x0) \ - -L$(CURDIR)/qmake_root/lib \ + -L$(CURDIR)/build_dependencies/lib \ -Wl,--whole-archive \ -Wl,--start-group \ $(addprefix -l:,$(QT5_GENODE_LIBS_SHLIB)) \ @@ -108,8 +78,8 @@ GENODE_QMAKE_INCDIR_OPENGL := $(call select_from_ports,mesa)/include GENODE_QMAKE_INCDIR_EGL := $(call select_from_ports,mesa)/include endif -GENODE_QMAKE_LIBS_OPENGL = $(CURDIR)/qmake_root/lib/mesa.lib.so -GENODE_QMAKE_LIBS_EGL = $(CURDIR)/qmake_root/lib/egl.lib.so +GENODE_QMAKE_LIBS_OPENGL = $(CURDIR)/build_dependencies/lib/mesa.lib.so +GENODE_QMAKE_LIBS_EGL = $(CURDIR)/build_dependencies/lib/egl.lib.so # # export variables for qmake.conf @@ -135,67 +105,43 @@ env.sh: # -# prepare a directory named 'qmake_root' where qmake can find needed files +# prepare a directory named 'build_dependencies' where qmake can find needed files # -qmake_root: - $(VERBOSE)mkdir -p $@ - -qmake_root/bin: qmake_root +build_dependencies/bin: build_dependencies $(VERBOSE)mkdir -p $@ $(VERBOSE)ln -sf $(QT_TOOLS_DIR)/bin/* $@/ -qmake_root/include: qmake_root - $(VERBOSE)mkdir -p $@ - $(VERBOSE)ln -snf $(QT_API_DIR)/include/* $@/ - -qmake_root/lib: qmake_root - $(VERBOSE)mkdir -p $@ - -qmake_root/lib/%.lib.so: qmake_root/lib - $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.abi.so $@ - -qmake_root/lib/%.lib.a: qmake_root/lib - $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/var/libcache/$*/$*.lib.a $@ - -qmake_root/mkspecs: qmake_root +build_dependencies/mkspecs: build_dependencies $(VERBOSE)mkdir -p $@ $(VERBOSE)ln -sf $(QT_API_DIR)/mkspecs/* $@/ $(VERBOSE)rm -f $@/modules $(VERBOSE)mkdir $@/modules $(VERBOSE)ln -snf $(QT_API_DIR)/mkspecs/modules/* $@/modules/ - $(VERBOSE)ln -sf $(QMAKE_PLATFORM)/qconfig.pri $@/ - $(VERBOSE)ln -sf $(QMAKE_PLATFORM)/qmodule.pri $@/ + $(VERBOSE)ln -sf $(QT_PLATFORM)/qconfig.pri $@/ + $(VERBOSE)ln -sf $(QT_PLATFORM)/qmodule.pri $@/ qmake_prepared.tag: env.sh \ - qmake_root/bin \ - qmake_root/include \ - qmake_root/lib/libc.lib.so \ - qmake_root/lib/libm.lib.so \ - qmake_root/lib/egl.lib.so \ - qmake_root/lib/mesa.lib.so \ - qmake_root/lib/qt5_component.lib.so \ - qmake_root/lib/stdcxx.lib.so \ - qmake_root/lib/ldso_so_support.lib.a \ - qmake_root/mkspecs -# add symlinks for Qt5 libraries listed in the 'QT5_PORT_LIBS' variable -ifeq ($(CONTRIB_DIR),) - $(VERBOSE)for qt5_lib in $(QT5_PORT_LIBS); do \ - ln -sf $(BUILD_BASE_DIR)/var/libcache/$${qt5_lib}/$${qt5_lib}.abi.so qmake_root/lib/$${qt5_lib}.lib.so; \ - done -else - $(VERBOSE)for qt5_lib in $(QT5_PORT_LIBS); do \ - ln -sf $(BUILD_BASE_DIR)/bin/$${qt5_lib}.lib.so qmake_root/lib/; \ - done -endif + build_dependencies/bin \ + build_dependencies/include \ + build_dependencies/lib/libc.lib.so \ + build_dependencies/lib/libm.lib.so \ + build_dependencies/lib/egl.lib.so \ + build_dependencies/lib/mesa.lib.so \ + build_dependencies/lib/qt5_component.lib.so \ + build_dependencies/lib/stdcxx.lib.so \ + build_dependencies/lib/ldso_so_support.lib.a \ + build_dependencies/mkspecs $(VERBOSE)touch $@ .PHONY: build_with_qmake -build_with_qmake: qmake_prepared.tag +build_with_qmake: qmake_prepared.tag qt5_so_files $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -spec build_dependencies/mkspecs/$(QT_PLATFORM) \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ + -nocache \ $(QMAKE_PROJECT_FILE) \ "CONFIG += force_debug_info" \ $(QT5_OUTPUT_FILTER) @@ -211,11 +157,11 @@ build_with_qmake: qmake_prepared.tag ln -sf $(CURDIR)/$${qmake_target_binary}.debug $(PWD)/debug/; \ done -BUILD_ARTIFACTS ?= $(notdir $(QMAKE_TARGET_BINARIES)) +BUILD_ARTIFACTS += $(notdir $(QMAKE_TARGET_BINARIES)) # # build applications with qmake # TARGET ?= $(notdir $(QMAKE_PROJECT_FILE)).qmake_target .PHONY: $(TARGET) -$(TARGET): build_with_qmake +$(TARGET): build_with_qmake $(QT5_EXTRA_TARGET_DEPS) diff --git a/repos/libports/lib/mk/libQt5Core.mk b/repos/libports/lib/mk/libQt5Core.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Core.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5Gui.mk b/repos/libports/lib/mk/libQt5Gui.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Gui.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5Network.mk b/repos/libports/lib/mk/libQt5Network.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Network.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5PrintSupport.mk b/repos/libports/lib/mk/libQt5PrintSupport.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5PrintSupport.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5Qml.mk b/repos/libports/lib/mk/libQt5Qml.mk deleted file mode 100644 index a1e8b27d37..0000000000 --- a/repos/libports/lib/mk/libQt5Qml.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_declarative diff --git a/repos/libports/lib/mk/libQt5QmlModels.mk b/repos/libports/lib/mk/libQt5QmlModels.mk deleted file mode 100644 index a1e8b27d37..0000000000 --- a/repos/libports/lib/mk/libQt5QmlModels.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_declarative diff --git a/repos/libports/lib/mk/libQt5QmlWorkerScript.mk b/repos/libports/lib/mk/libQt5QmlWorkerScript.mk deleted file mode 100644 index a1e8b27d37..0000000000 --- a/repos/libports/lib/mk/libQt5QmlWorkerScript.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_declarative diff --git a/repos/libports/lib/mk/libQt5Quick.mk b/repos/libports/lib/mk/libQt5Quick.mk deleted file mode 100644 index a1e8b27d37..0000000000 --- a/repos/libports/lib/mk/libQt5Quick.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_declarative diff --git a/repos/libports/lib/mk/libQt5QuickControls2.mk b/repos/libports/lib/mk/libQt5QuickControls2.mk deleted file mode 100644 index 194594e954..0000000000 --- a/repos/libports/lib/mk/libQt5QuickControls2.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_quickcontrols2 diff --git a/repos/libports/lib/mk/libQt5QuickTemplates2.mk b/repos/libports/lib/mk/libQt5QuickTemplates2.mk deleted file mode 100644 index 194594e954..0000000000 --- a/repos/libports/lib/mk/libQt5QuickTemplates2.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_quickcontrols2 diff --git a/repos/libports/lib/mk/libQt5QuickWidgets.mk b/repos/libports/lib/mk/libQt5QuickWidgets.mk deleted file mode 100644 index a1e8b27d37..0000000000 --- a/repos/libports/lib/mk/libQt5QuickWidgets.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_declarative diff --git a/repos/libports/lib/mk/libQt5Sql.mk b/repos/libports/lib/mk/libQt5Sql.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Sql.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5Svg.mk b/repos/libports/lib/mk/libQt5Svg.mk deleted file mode 100644 index 8594fef171..0000000000 --- a/repos/libports/lib/mk/libQt5Svg.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_svg diff --git a/repos/libports/lib/mk/libQt5Test.mk b/repos/libports/lib/mk/libQt5Test.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Test.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5VirtualKeyboard.mk b/repos/libports/lib/mk/libQt5VirtualKeyboard.mk deleted file mode 100644 index 5dcdd8c4ab..0000000000 --- a/repos/libports/lib/mk/libQt5VirtualKeyboard.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_virtualkeyboard diff --git a/repos/libports/lib/mk/libQt5Widgets.mk b/repos/libports/lib/mk/libQt5Widgets.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Widgets.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libQt5Xml.mk b/repos/libports/lib/mk/libQt5Xml.mk deleted file mode 100644 index d8a67178fd..0000000000 --- a/repos/libports/lib/mk/libQt5Xml.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# This individual library description file is needed to get the abi -# library generated when building Qt5 packages. -# - -LIBS = qt5_base diff --git a/repos/libports/lib/mk/libqgenodeviewwidget.mk b/repos/libports/lib/mk/libqgenodeviewwidget.mk index b520df5631..879af19533 100644 --- a/repos/libports/lib/mk/libqgenodeviewwidget.mk +++ b/repos/libports/lib/mk/libqgenodeviewwidget.mk @@ -4,14 +4,12 @@ QMAKE_TARGET_BINARIES = libqgenodeviewwidget.lib.so QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Widgets -LIBS = libc libm mesa qoost stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake libc libm mesa qoost stdcxx -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - -qmake_root/include/qgenodeviewwidget: qmake_root/include +build_dependencies/include/qgenodeviewwidget: build_dependencies/include ln -snf $(call select_from_repositories,include/qgenodeviewwidget) $@ -qmake_prepared.tag: qmake_root/include/qgenodeviewwidget +qmake_prepared.tag: build_dependencies/include/qgenodeviewwidget ifeq ($(called_from_lib_mk),yes) all: build_with_qmake diff --git a/repos/libports/lib/mk/qt5_base.mk b/repos/libports/lib/mk/qt5_base.mk index 8ae96b62e2..37e85a35e2 100644 --- a/repos/libports/lib/mk/qt5_base.mk +++ b/repos/libports/lib/mk/qt5_base.mk @@ -1,6 +1,4 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - -LIBS = base libc libm stdcxx qt5_component egl mesa qoost +LIBS = qt5_qmake base ldso_so_support libc libm stdcxx qt5_component egl mesa qoost INSTALL_LIBS = lib/libQt5Core.lib.so \ lib/libQt5Gui.lib.so \ @@ -19,18 +17,18 @@ BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_libqjpeg.tar \ qt5_libqsqlite.tar -build: qmake_prepared.tag qmake_root/lib/ld.lib.so +build: qmake_prepared.tag build_dependencies/lib/ld.lib.so @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtbase/qtbase.pro \ -- \ -prefix /qt \ - -xplatform $(QMAKE_PLATFORM) \ + -xplatform $(QT_PLATFORM) \ -qpa genode \ -opensource \ -confirm-license \ @@ -58,7 +56,7 @@ build: qmake_prepared.tag qmake_root/lib/ld.lib.so $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE) ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE) ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/lib/mk/qt5_cmake.mk b/repos/libports/lib/mk/qt5_cmake.mk new file mode 100644 index 0000000000..de83d9ad99 --- /dev/null +++ b/repos/libports/lib/mk/qt5_cmake.mk @@ -0,0 +1,4 @@ +# +# This is a dummy library description file for the implicit inclusion of +# import-qt5_cmake.mk. +# diff --git a/repos/libports/lib/mk/qt5_declarative.mk b/repos/libports/lib/mk/qt5_declarative.mk index 314bd5eba5..510031dadf 100644 --- a/repos/libports/lib/mk/qt5_declarative.mk +++ b/repos/libports/lib/mk/qt5_declarative.mk @@ -1,8 +1,6 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Network libQt5Sql libQt5Test libQt5Widgets -LIBS = libc libm mesa stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake ldso_so_support libc libm mesa stdcxx INSTALL_LIBS = lib/libQt5Qml.lib.so \ lib/libQt5QmlModels.lib.so \ @@ -32,14 +30,14 @@ INSTALL_LIBS = lib/libQt5Qml.lib.so \ BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_declarative_qml.tar -build: qmake_prepared.tag +build: qmake_prepared.tag qt5_so_files @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtdeclarative/qtdeclarative.pro \ -- \ -no-feature-qml-devtools \ @@ -58,7 +56,7 @@ build: qmake_prepared.tag $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE)ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE)ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/lib/mk/qt5_graphicaleffects.mk b/repos/libports/lib/mk/qt5_graphicaleffects.mk index b16be9bc50..dd13472cbe 100644 --- a/repos/libports/lib/mk/qt5_graphicaleffects.mk +++ b/repos/libports/lib/mk/qt5_graphicaleffects.mk @@ -1,9 +1,7 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Network QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick -LIBS = libc libm mesa stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake libc libm mesa stdcxx INSTALL_LIBS = qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.lib.so \ qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.lib.so @@ -11,14 +9,14 @@ INSTALL_LIBS = qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.lib.so \ BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_graphicaleffects_qml.tar -build: qmake_prepared.tag +build: qmake_prepared.tag qt5_so_files @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtgraphicaleffects/qtgraphicaleffects.pro \ $(QT5_OUTPUT_FILTER) @@ -34,7 +32,7 @@ build: qmake_prepared.tag $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE)ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE)ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/lib/mk/qt5_qmake.mk b/repos/libports/lib/mk/qt5_qmake.mk new file mode 100644 index 0000000000..a9e0a5ae27 --- /dev/null +++ b/repos/libports/lib/mk/qt5_qmake.mk @@ -0,0 +1,4 @@ +# +# This is a dummy library description file for the implicit inclusion of +# import-qt5_qmake.mk. +# diff --git a/repos/libports/lib/mk/qt5_quickcontrols.mk b/repos/libports/lib/mk/qt5_quickcontrols.mk index 9590fe8543..c1870197a8 100644 --- a/repos/libports/lib/mk/qt5_quickcontrols.mk +++ b/repos/libports/lib/mk/qt5_quickcontrols.mk @@ -1,23 +1,21 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Network libQt5Widgets QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick -LIBS = libc libm mesa stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake libc libm mesa stdcxx INSTALL_LIBS = qml/QtQuick/Controls/libqtquickcontrolsplugin.lib.so BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_quickcontrols_qml.tar -build: qmake_prepared.tag +build: qmake_prepared.tag qt5_so_files @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtquickcontrols/qtquickcontrols.pro \ $(QT5_OUTPUT_FILTER) @@ -33,7 +31,7 @@ build: qmake_prepared.tag $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE)ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE)ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/lib/mk/qt5_quickcontrols2.mk b/repos/libports/lib/mk/qt5_quickcontrols2.mk index 4ee4666ee7..e5e041f53d 100644 --- a/repos/libports/lib/mk/qt5_quickcontrols2.mk +++ b/repos/libports/lib/mk/qt5_quickcontrols2.mk @@ -1,9 +1,7 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Network libQt5Widgets QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick -LIBS = libc libm mesa stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake libc libm mesa stdcxx INSTALL_LIBS = lib/libQt5QuickControls2.lib.so \ lib/libQt5QuickTemplates2.lib.so \ @@ -19,14 +17,14 @@ INSTALL_LIBS = lib/libQt5QuickControls2.lib.so \ BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_quickcontrols2_qml.tar -build: qmake_prepared.tag +build: qmake_prepared.tag qt5_so_files @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtquickcontrols2/qtquickcontrols2.pro \ $(QT5_OUTPUT_FILTER) @@ -42,7 +40,7 @@ build: qmake_prepared.tag $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE)ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE)ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/lib/mk/qt5_svg.mk b/repos/libports/lib/mk/qt5_svg.mk index f2e050b854..bd72747b31 100644 --- a/repos/libports/lib/mk/qt5_svg.mk +++ b/repos/libports/lib/mk/qt5_svg.mk @@ -1,8 +1,6 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Widgets -LIBS = libc libm mesa stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake libc libm mesa stdcxx INSTALL_LIBS = lib/libQt5Svg.lib.so \ plugins/imageformats/libqsvg.lib.so @@ -10,14 +8,14 @@ INSTALL_LIBS = lib/libQt5Svg.lib.so \ BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_libqsvg.tar -build: qmake_prepared.tag +build: qmake_prepared.tag qt5_so_files @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtsvg/qtsvg.pro \ $(QT5_OUTPUT_FILTER) @@ -33,7 +31,7 @@ build: qmake_prepared.tag $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE)ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE)ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/lib/mk/qt5_virtualkeyboard.mk b/repos/libports/lib/mk/qt5_virtualkeyboard.mk index 73f3651d5a..31f3632503 100644 --- a/repos/libports/lib/mk/qt5_virtualkeyboard.mk +++ b/repos/libports/lib/mk/qt5_virtualkeyboard.mk @@ -1,10 +1,8 @@ -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) - QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Network libQt5Widgets QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick QT5_PORT_LIBS += libQt5Svg -LIBS = libc libm mesa stdcxx $(QT5_PORT_LIBS) +LIBS = qt5_qmake libc libm mesa stdcxx INSTALL_LIBS = lib/libQt5VirtualKeyboard.lib.so \ plugins/platforminputcontexts/libqtvirtualkeyboardplugin.lib.so \ @@ -16,14 +14,14 @@ BUILD_ARTIFACTS = $(notdir $(INSTALL_LIBS)) \ qt5_libqtvirtualkeyboardplugin.tar \ qt5_virtualkeyboard_qml.tar -build: qmake_prepared.tag +build: qmake_prepared.tag qt5_so_files @# @# run qmake @# $(VERBOSE)source env.sh && $(QMAKE) \ - -qtconf qmake_root/mkspecs/$(QMAKE_PLATFORM)/qt.conf \ + -qtconf build_dependencies/mkspecs/$(QT_PLATFORM)/qt.conf \ $(QT_DIR)/qtvirtualkeyboard/qtvirtualkeyboard.pro \ $(QT5_OUTPUT_FILTER) @@ -39,7 +37,7 @@ build: qmake_prepared.tag $(VERBOSE)$(MAKE) INSTALL_ROOT=$(CURDIR)/install sub-src-install_subtargets $(QT5_OUTPUT_FILTER) - $(VERBOSE)ln -sf .$(CURDIR)/qmake_root install/qt + $(VERBOSE)ln -sf .$(CURDIR)/build_dependencies install/qt @# @# strip libs and create symlinks in 'bin' and 'debug' directories diff --git a/repos/libports/recipes/api/qt5_base/content.mk b/repos/libports/recipes/api/qt5_base/content.mk index 1f9c7cde70..c7c92dec86 100644 --- a/repos/libports/recipes/api/qt5_base/content.mk +++ b/repos/libports/recipes/api/qt5_base/content.mk @@ -1,5 +1,8 @@ -MIRROR_FROM_REP_DIR := lib/import/import-qt5_cmake.mk \ - lib/import/import-qt5_qmake.mk +MIRROR_FROM_REP_DIR := lib/import/import-qt5.inc \ + lib/import/import-qt5_cmake.mk \ + lib/import/import-qt5_qmake.mk \ + lib/mk/qt5_cmake.mk \ + lib/mk/qt5_qmake.mk content: $(MIRROR_FROM_REP_DIR) diff --git a/repos/libports/src/app/qt5/examples/calculatorform/target.mk b/repos/libports/src/app/qt5/examples/calculatorform/target.mk index 5436d41db5..bb56a5da3e 100644 --- a/repos/libports/src/app/qt5/examples/calculatorform/target.mk +++ b/repos/libports/src/app/qt5/examples/calculatorform/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = calculatorform QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Widgets -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/openglwindow/target.mk b/repos/libports/src/app/qt5/examples/openglwindow/target.mk index a72a1fd26e..a656fff346 100644 --- a/repos/libports/src/app/qt5/examples/openglwindow/target.mk +++ b/repos/libports/src/app/qt5/examples/openglwindow/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = openglwindow QT5_PORT_LIBS = libQt5Core libQt5Gui -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/samegame/target.mk b/repos/libports/src/app/qt5/examples/samegame/target.mk index 7e0d810ce8..16127b974a 100644 --- a/repos/libports/src/app/qt5/examples/samegame/target.mk +++ b/repos/libports/src/app/qt5/examples/samegame/target.mk @@ -5,6 +5,4 @@ QMAKE_TARGET_BINARIES = samegame QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Network QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/testqstring/target.mk b/repos/libports/src/app/qt5/examples/testqstring/target.mk index f7930623e8..a50a3b9ef2 100644 --- a/repos/libports/src/app/qt5/examples/testqstring/target.mk +++ b/repos/libports/src/app/qt5/examples/testqstring/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = tutorial1 QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Test libQt5Widgets -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/tetrix/target.mk b/repos/libports/src/app/qt5/examples/tetrix/target.mk index 5254da17e2..dfd1730c2e 100644 --- a/repos/libports/src/app/qt5/examples/tetrix/target.mk +++ b/repos/libports/src/app/qt5/examples/tetrix/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = tetrix QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5Widgets -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/textedit/target.mk b/repos/libports/src/app/qt5/examples/textedit/target.mk index 15db93e68e..700052222f 100644 --- a/repos/libports/src/app/qt5/examples/textedit/target.mk +++ b/repos/libports/src/app/qt5/examples/textedit/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = textedit QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5PrintSupport libQt5Widgets -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/tooltips/target.mk b/repos/libports/src/app/qt5/examples/tooltips/target.mk index 3756f30bac..98706954d6 100644 --- a/repos/libports/src/app/qt5/examples/tooltips/target.mk +++ b/repos/libports/src/app/qt5/examples/tooltips/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = tooltips QT5_PORT_LIBS = libQt5Core libQt5Gui libQt5PrintSupport libQt5Widgets -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/examples/virtualkeyboard/target.mk b/repos/libports/src/app/qt5/examples/virtualkeyboard/target.mk index 35b2729bf3..a91cba5e62 100644 --- a/repos/libports/src/app/qt5/examples/virtualkeyboard/target.mk +++ b/repos/libports/src/app/qt5/examples/virtualkeyboard/target.mk @@ -6,6 +6,4 @@ QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Network QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick QT5_PORT_LIBS += libQt5VirtualKeyboard -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx diff --git a/repos/libports/src/app/qt5/qt_launchpad/target.mk b/repos/libports/src/app/qt5/qt_launchpad/target.mk index efdd9ea8b1..6dba4f1bea 100644 --- a/repos/libports/src/app/qt5/qt_launchpad/target.mk +++ b/repos/libports/src/app/qt5/qt_launchpad/target.mk @@ -4,11 +4,10 @@ QMAKE_TARGET_BINARIES = qt_launchpad QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Widgets -LIBS = base libc libm mesa stdcxx launchpad $(QT5_PORT_LIBS) +LIBS = qt5_qmake base libc libm mesa stdcxx launchpad -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +QT5_COMPONENT_LIB_SO = QT5_GENODE_LIBS_APP += ld.lib.so launchpad.lib.a -QT5_GENODE_LIBS_APP := $(filter-out qt5_component.lib.so,$(QT5_GENODE_LIBS_APP)) -qmake_prepared.tag: qmake_root/lib/ld.lib.so qmake_root/lib/launchpad.lib.a +qmake_prepared.tag: $(addprefix build_dependencies/lib/,$(QT5_GENODE_LIBS_APP)) diff --git a/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.pro b/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.pro index 65e0262bca..b53e829e2d 100644 --- a/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.pro +++ b/repos/libports/src/lib/qgenodeviewwidget/qgenodeviewwidget.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += plugin c++2a QT = core gui gui_private widgets -HEADERS = qmake_root/include/qgenodeviewwidget/qgenodeviewwidget.h +HEADERS = build_dependencies/include/qgenodeviewwidget/qgenodeviewwidget.h SOURCES = qgenodeviewwidget.cpp OTHER_FILES = qgenodeviewwidget.json diff --git a/repos/libports/src/test/qt5/qt_core/target.mk b/repos/libports/src/test/qt5/qt_core/target.mk index c17d25fd28..30c33aead2 100644 --- a/repos/libports/src/test/qt5/qt_core/target.mk +++ b/repos/libports/src/test/qt5/qt_core/target.mk @@ -4,6 +4,4 @@ QMAKE_TARGET_BINARIES = test-qt_core QT5_PORT_LIBS = libQt5Core -LIBS = libc libm qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm qt5_component stdcxx diff --git a/repos/libports/src/test/qt5/qt_core_cmake/target.mk b/repos/libports/src/test/qt5/qt_core_cmake/target.mk index bb6d19bfd3..d59ebfea2f 100644 --- a/repos/libports/src/test/qt5/qt_core_cmake/target.mk +++ b/repos/libports/src/test/qt5/qt_core_cmake/target.mk @@ -4,6 +4,4 @@ CMAKE_TARGET_BINARIES = test-qt_core_cmake QT5_PORT_LIBS = libQt5Core -LIBS = libc libm qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_cmake.mk) +LIBS = qt5_cmake libc libm qt5_component stdcxx diff --git a/repos/libports/src/test/qt5/qt_quick/target.mk b/repos/libports/src/test/qt5/qt_quick/target.mk index f0624293bf..9eabf07416 100644 --- a/repos/libports/src/test/qt5/qt_quick/target.mk +++ b/repos/libports/src/test/qt5/qt_quick/target.mk @@ -5,6 +5,4 @@ QMAKE_TARGET_BINARIES = test-qt_quick QT5_PORT_LIBS += libQt5Core libQt5Gui libQt5Network QT5_PORT_LIBS += libQt5Qml libQt5QmlModels libQt5Quick -LIBS = libc libm mesa qt5_component stdcxx $(QT5_PORT_LIBS) - -include $(call select_from_repositories,lib/import/import-qt5_qmake.mk) +LIBS = qt5_qmake libc libm mesa qt5_component stdcxx