| 1 |
package=native_qt |
| 2 |
$(package)_version=6.9.0 |
| 3 |
$(package)_download_path=https://download.qt.io/official_releases/qt/6.9/$($(package)_version)/submodules |
| 4 |
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz |
| 5 |
$(package)_file_name=qtbase-$($(package)_suffix) |
| 6 |
$(package)_sha256_hash=c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c |
| 7 |
$(package)_linux_dependencies=native_wayland |
| 8 |
$(package)_qt_libs=corelib network widgets gui plugins testlib |
| 9 |
$(package)_patches = fast_fixed_dtoa_no_optimize.patch |
| 10 |
$(package)_patches += guix_cross_lib_path.patch |
| 11 |
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch |
| 12 |
$(package)_patches += rcc_hardcode_timestamp.patch |
| 13 |
$(package)_patches += root_CMakeLists.txt |
| 14 |
|
| 15 |
$(package)_qttools_file_name=qttools-$($(package)_suffix) |
| 16 |
$(package)_qttools_sha256_hash=fa645589cc3f939022401a926825972a44277dead8ec8607d9f2662e6529c9a4 |
| 17 |
|
| 18 |
$(package)_qtsvg_file_name=qtsvg-$($(package)_suffix) |
| 19 |
$(package)_qtsvg_sha256_hash=ec359d930c95935ea48af58b100c2f5d0d275968ec8ca1e0e76629b7159215fc |
| 20 |
|
| 21 |
$(package)_qtmultimedia_file_name=qtmultimedia-$($(package)_suffix) |
| 22 |
$(package)_qtmultimedia_sha256_hash=995c3b194f3de3e1929280639642f7661d94aa57523c459dbbf2f71dbdcaa18c |
| 23 |
|
| 24 |
$(package)_qtshadertools_file_name=qtshadertools-$($(package)_suffix) |
| 25 |
$(package)_qtshadertools_sha256_hash=916c40281ac3dee23b163f6ca73fb5bdeee344838b9a922b6f36269642d6f4bb |
| 26 |
|
| 27 |
$(package)_qtwayland_file_name=qtwayland-$($(package)_suffix) |
| 28 |
$(package)_qtwayland_sha256_hash=503416fcb04db503bd130e6a49c45e3e546f091e83406f774a0c703130c91805 |
| 29 |
|
| 30 |
$(package)_extra_sources += $($(package)_qttools_file_name) |
| 31 |
$(package)_extra_sources += $($(package)_qtsvg_file_name) |
| 32 |
$(package)_extra_sources += $($(package)_qtmultimedia_file_name) |
| 33 |
$(package)_extra_sources += $($(package)_qtshadertools_file_name) |
| 34 |
$(package)_extra_sources += $($(package)_qtwayland_file_name) |
| 35 |
|
| 36 |
define $(package)_set_vars |
| 37 |
$(package)_config_opts_release = -release |
| 38 |
$(package)_config_opts_debug = -debug |
| 39 |
$(package)_config_opts_debug += -optimized-tools |
| 40 |
$(package)_config_opts += -libexecdir $(build_prefix)/qt-host/bin |
| 41 |
$(package)_config_opts += -c++std c++17 |
| 42 |
$(package)_config_opts += -confirm-license |
| 43 |
$(package)_config_opts += -opensource |
| 44 |
$(package)_config_opts += -pkg-config |
| 45 |
$(package)_config_opts += -prefix $(build_prefix)/qt-host |
| 46 |
$(package)_config_opts += -static |
| 47 |
$(package)_config_opts += -platform linux-g++ -xplatform linux-g++ |
| 48 |
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx))) |
| 49 |
$(package)_config_opts_x86_64 = -xplatform linux-clang-libc++ |
| 50 |
endif |
| 51 |
|
| 52 |
$(package)_config_opts += -no-cups |
| 53 |
$(package)_config_opts += -no-egl |
| 54 |
$(package)_config_opts += -no-eglfs |
| 55 |
$(package)_config_opts += -no-evdev |
| 56 |
$(package)_config_opts += -no-feature-androiddeployqt |
| 57 |
$(package)_config_opts += -no-feature-colordialog |
| 58 |
$(package)_config_opts += -no-feature-dial |
| 59 |
$(package)_config_opts += -no-feature-fontcombobox |
| 60 |
$(package)_config_opts += -no-feature-fontconfig |
| 61 |
$(package)_config_opts += -no-feature-freetype |
| 62 |
$(package)_config_opts += -no-feature-harfbuzz |
| 63 |
$(package)_config_opts += -no-feature-http |
| 64 |
$(package)_config_opts += -no-feature-image_heuristic_mask |
| 65 |
$(package)_config_opts += -no-feature-keysequenceedit |
| 66 |
$(package)_config_opts += -no-feature-lcdnumber |
| 67 |
$(package)_config_opts += -no-feature-networkdiskcache |
| 68 |
$(package)_config_opts += -no-feature-pdf |
| 69 |
$(package)_config_opts += -no-feature-png |
| 70 |
$(package)_config_opts += -no-feature-printdialog |
| 71 |
$(package)_config_opts += -no-feature-printer |
| 72 |
$(package)_config_opts += -no-feature-printpreviewdialog |
| 73 |
$(package)_config_opts += -no-feature-printpreviewwidget |
| 74 |
$(package)_config_opts += -no-feature-qmake |
| 75 |
$(package)_config_opts += -no-feature-sessionmanager |
| 76 |
$(package)_config_opts += -no-feature-spatialaudio |
| 77 |
$(package)_config_opts += -no-feature-sql |
| 78 |
$(package)_config_opts += -no-feature-syntaxhighlighter |
| 79 |
$(package)_config_opts += -no-feature-testlib |
| 80 |
$(package)_config_opts += -no-feature-textmarkdownwriter |
| 81 |
$(package)_config_opts += -no-feature-textodfwriter |
| 82 |
$(package)_config_opts += -no-feature-topleveldomain |
| 83 |
$(package)_config_opts += -no-feature-undocommand |
| 84 |
$(package)_config_opts += -no-feature-undogroup |
| 85 |
$(package)_config_opts += -no-feature-undostack |
| 86 |
$(package)_config_opts += -no-feature-undoview |
| 87 |
$(package)_config_opts += -no-feature-vnc |
| 88 |
$(package)_config_opts += -no-feature-vulkan |
| 89 |
$(package)_config_opts += -no-feature-widgets |
| 90 |
$(package)_config_opts += -no-feature-xkbcommon |
| 91 |
$(package)_config_opts += -no-feature-xlib |
| 92 |
$(package)_config_opts += -no-gif |
| 93 |
$(package)_config_opts += -no-glib |
| 94 |
$(package)_config_opts += -no-ico |
| 95 |
$(package)_config_opts += -no-icu |
| 96 |
$(package)_config_opts += -no-kms |
| 97 |
$(package)_config_opts += -no-libjpeg |
| 98 |
$(package)_config_opts += -no-libudev |
| 99 |
$(package)_config_opts += -no-linuxfb |
| 100 |
$(package)_config_opts += -nomake examples |
| 101 |
$(package)_config_opts += -nomake tests |
| 102 |
$(package)_config_opts += -no-mtdev |
| 103 |
$(package)_config_opts += -no-opengl |
| 104 |
$(package)_config_opts += -no-openssl |
| 105 |
$(package)_config_opts += -no-openvg |
| 106 |
$(package)_config_opts += -no-pch |
| 107 |
$(package)_config_opts += -no-reduce-relocations |
| 108 |
$(package)_config_opts += -no-sbom |
| 109 |
$(package)_config_opts += -no-schannel |
| 110 |
$(package)_config_opts += -no-sctp |
| 111 |
$(package)_config_opts += -no-securetransport |
| 112 |
$(package)_config_opts += -no-system-proxies |
| 113 |
$(package)_config_opts += -no-use-gold-linker |
| 114 |
$(package)_config_opts += -no-xcb-xlib |
| 115 |
$(package)_config_opts += -no-zstd |
| 116 |
|
| 117 |
ifneq ($(LTO),) |
| 118 |
$(package)_config_opts += -ltcg |
| 119 |
endif |
| 120 |
|
| 121 |
$(package)_config_env := CC="$$($(package)_cc)" |
| 122 |
$(package)_config_env += CXX="$$($(package)_cxx)" |
| 123 |
endef |
| 124 |
|
| 125 |
define $(package)_fetch_cmds |
| 126 |
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ |
| 127 |
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \ |
| 128 |
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtsvg_file_name),$($(package)_qtsvg_file_name),$($(package)_qtsvg_sha256_hash)) && \ |
| 129 |
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtmultimedia_file_name),$($(package)_qtmultimedia_file_name),$($(package)_qtmultimedia_sha256_hash)) && \ |
| 130 |
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtshadertools_file_name),$($(package)_qtshadertools_file_name),$($(package)_qtshadertools_sha256_hash)) && \ |
| 131 |
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtwayland_file_name),$($(package)_qtwayland_file_name),$($(package)_qtwayland_sha256_hash)) |
| 132 |
endef |
| 133 |
|
| 134 |
define $(package)_extract_cmds |
| 135 |
mkdir -p $($(package)_extract_dir) && \ |
| 136 |
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 137 |
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 138 |
echo "$($(package)_qtsvg_sha256_hash) $($(package)_source_dir)/$($(package)_qtsvg_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 139 |
echo "$($(package)_qtmultimedia_sha256_hash) $($(package)_source_dir)/$($(package)_qtmultimedia_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 140 |
echo "$($(package)_qtshadertools_sha256_hash) $($(package)_source_dir)/$($(package)_qtshadertools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 141 |
echo "$($(package)_qtwayland_sha256_hash) $($(package)_source_dir)/$($(package)_qtwayland_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 142 |
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ |
| 143 |
mkdir qtbase && \ |
| 144 |
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ |
| 145 |
mkdir qttools && \ |
| 146 |
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \ |
| 147 |
mkdir qtsvg && \ |
| 148 |
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtsvg_file_name) -C qtsvg && \ |
| 149 |
mkdir qtmultimedia && \ |
| 150 |
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtmultimedia_file_name) -C qtmultimedia && \ |
| 151 |
mkdir qtshadertools && \ |
| 152 |
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtshadertools_file_name) -C qtshadertools && \ |
| 153 |
mkdir qtwayland && \ |
| 154 |
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtwayland_file_name) -C qtwayland |
| 155 |
endef |
| 156 |
|
| 157 |
define $(package)_preprocess_cmds |
| 158 |
cp $($(package)_patch_dir)/root_CMakeLists.txt CMakeLists.txt && \ |
| 159 |
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ |
| 160 |
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ |
| 161 |
patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ |
| 162 |
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch |
| 163 |
endef |
| 164 |
|
| 165 |
define $(package)_config_cmds |
| 166 |
export PKG_CONFIG_SYSROOT_DIR=/ && \ |
| 167 |
export PKG_CONFIG_LIBDIR=$(build_prefix)/lib/pkgconfig && \ |
| 168 |
export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ |
| 169 |
unset CMAKE_PREFIX_PATH && \ |
| 170 |
cd qtbase && \ |
| 171 |
./configure -top-level $($(package)_config_opts) |
| 172 |
endef |
| 173 |
|
| 174 |
define $(package)_build_cmds |
| 175 |
export LD_LIBRARY_PATH=${build_prefix}/lib/ && \ |
| 176 |
unset CMAKE_PREFIX_PATH && \ |
| 177 |
cmake --build . --parallel |
| 178 |
endef |
| 179 |
|
| 180 |
define $(package)_stage_cmds |
| 181 |
DESTDIR=$($(package)_staging_dir) cmake --install . |
| 182 |
endef |