Skip to content

Commit 27d3def

Browse files
committed
build: Use Qt top-level build facilities
1 parent eb63b1d commit 27d3def

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

depends/packages/qt.mk

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ $(package)_file_name=qtbase-$($(package)_suffix)
66
$(package)_sha256_hash=1c1b4e33137ca77881074c140d54c3c9747e845a31338cfe8680f171f0bc3a39
77
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon
88
$(package)_qt_libs=corelib network widgets gui plugins testlib
9-
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
9+
$(package)_patches = qt.pro qttools_src.pro
10+
$(package)_patches += fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
1011
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
1112
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
1213
$(package)_patches+= fix_lib_paths.patch fix_android_pch.patch
@@ -220,6 +221,8 @@ endef
220221
# 8. Adjust a regex in toolchain.prf, to accommodate Guix's usage of
221222
# CROSS_LIBRARY_PATH. See #15277.
222223
define $(package)_preprocess_cmds
224+
cp $($(package)_patch_dir)/qt.pro qt.pro && \
225+
cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
223226
patch -p1 -i $($(package)_patch_dir)/drop_lrelease_dependency.patch && \
224227
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
225228
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
@@ -249,24 +252,13 @@ endef
249252
define $(package)_config_cmds
250253
export PKG_CONFIG_SYSROOT_DIR=/ && \
251254
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
252-
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
255+
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
253256
cd qtbase && \
254-
./configure $($(package)_config_opts) && \
255-
cd .. && \
256-
$(MAKE) -C qtbase sub-src-clean && \
257-
qtbase/bin/qmake -o qttranslations/Makefile qttranslations/qttranslations.pro && \
258-
qtbase/bin/qmake -o qttranslations/translations/Makefile qttranslations/translations/translations.pro && \
259-
qtbase/bin/qmake -o qttools/src/linguist/lrelease/Makefile qttools/src/linguist/lrelease/lrelease.pro && \
260-
qtbase/bin/qmake -o qttools/src/linguist/lupdate/Makefile qttools/src/linguist/lupdate/lupdate.pro && \
261-
qtbase/bin/qmake -o qttools/src/linguist/lconvert/Makefile qttools/src/linguist/lconvert/lconvert.pro
257+
./configure -top-level $($(package)_config_opts)
262258
endef
263259

264260
define $(package)_build_cmds
265-
$(MAKE) -C qtbase/src $(addprefix sub-,$($(package)_qt_libs)) && \
266-
$(MAKE) -C qttools/src/linguist/lrelease && \
267-
$(MAKE) -C qttools/src/linguist/lupdate && \
268-
$(MAKE) -C qttools/src/linguist/lconvert && \
269-
$(MAKE) -C qttranslations
261+
$(MAKE)
270262
endef
271263

272264
define $(package)_stage_cmds

depends/patches/qt/qt.pro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Create the super cache so modules will add themselves to it.
2+
cache(, super)
3+
4+
!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build))
5+
6+
TEMPLATE = subdirs
7+
SUBDIRS = qtbase qttools qttranslations
8+
9+
qttools.depends = qtbase
10+
qttranslations.depends = qttools
11+
12+
load(qt_configure)

depends/patches/qt/qttools_src.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TEMPLATE = subdirs
2+
SUBDIRS = linguist

0 commit comments

Comments
 (0)