2022-06-02 12:50:33 +00:00
|
|
|
package=qt
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_version=6.6.0
|
|
|
|
$(package)_download_path=https://download.qt.io/official_releases/qt/6.6/$($(package)_version)/submodules
|
2022-12-21 15:15:22 +00:00
|
|
|
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
|
2022-06-02 12:50:33 +00:00
|
|
|
$(package)_file_name=qtbase-$($(package)_suffix)
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_sha256_hash=039d53312acb5897a9054bd38c9ccbdab72500b71fdccdb3f4f0844b0dd39e0e
|
2022-12-21 15:15:22 +00:00
|
|
|
$(package)_darwin_dependencies=native_cctools native_qt openssl
|
2023-07-02 16:07:04 +00:00
|
|
|
$(package)_mingw32_dependencies=openssl native_qt
|
2023-06-28 10:18:44 +00:00
|
|
|
$(package)_linux_dependencies=openssl native_qt freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm libxcb_util_cursor dbus
|
2022-06-02 12:50:33 +00:00
|
|
|
$(package)_patches += fast_fixed_dtoa_no_optimize.patch
|
|
|
|
$(package)_patches += guix_cross_lib_path.patch
|
2022-12-27 11:55:49 +00:00
|
|
|
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
|
|
|
|
$(package)_patches += qtmultimedia-fixes.patch
|
|
|
|
$(package)_patches += rcc_hardcode_timestamp.patch
|
|
|
|
$(package)_patches += root_CMakeLists.txt
|
2023-01-03 12:48:32 +00:00
|
|
|
$(package)_patches += v4l2.patch
|
2022-12-27 11:55:49 +00:00
|
|
|
$(package)_patches += windows_func_fix.patch
|
2023-05-26 15:04:19 +00:00
|
|
|
$(package)_patches += revert_f99ee441.patch
|
2023-06-28 10:50:32 +00:00
|
|
|
$(package)_patches += xcb-util-image-fix.patch
|
|
|
|
$(package)_patches += libxau-fix.patch
|
2023-07-19 12:55:48 +00:00
|
|
|
$(package)_patches += toolchain.cmake
|
2023-10-09 22:35:50 +00:00
|
|
|
$(package)_patches += xkb-1.6.0.patch
|
2023-10-19 22:43:44 +00:00
|
|
|
$(package)_patches += CVE-2023-45872-qtsvg-6.6.0.diff
|
2023-05-06 11:48:11 +00:00
|
|
|
#$(package)_patches += fix-static-fontconfig-static-linking.patch
|
2023-05-24 16:03:00 +00:00
|
|
|
|
2022-06-02 12:50:33 +00:00
|
|
|
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_qttools_sha256_hash=4e9feebc142bbb6e453e1dc3277e09ec45c8ef081b5ee2a029e6684b5905ba99
|
2022-06-02 12:50:33 +00:00
|
|
|
|
|
|
|
$(package)_qtsvg_file_name=qtsvg-$($(package)_suffix)
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_qtsvg_sha256_hash=33da25fef51102f564624a7ea3e57cb4a0a31b7b44783d1af5749ac36d3c72de
|
2022-06-02 12:50:33 +00:00
|
|
|
|
|
|
|
$(package)_qtwebsockets_file_name=qtwebsockets-$($(package)_suffix)
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_qtwebsockets_sha256_hash=2e05b15c0c6e82c484cf3a4a39a3e3e484a6c8f72bc31ee5cf615d52d07df30e
|
2022-06-02 12:50:33 +00:00
|
|
|
|
2022-12-21 15:15:22 +00:00
|
|
|
$(package)_qtmultimedia_file_name=qtmultimedia-$($(package)_suffix)
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_qtmultimedia_sha256_hash=ba4b236ca3ec118841b7f5ba87797e24a8c5cbef9ba973fe219fbfc310d38782
|
2022-12-21 15:15:22 +00:00
|
|
|
|
|
|
|
$(package)_qtshadertools_file_name=qtshadertools-$($(package)_suffix)
|
2023-10-10 09:58:07 +00:00
|
|
|
$(package)_qtshadertools_sha256_hash=3690327dc550144b8102be2bb7f6dc995ccbe3584041094ad021a83737ef9875
|
2022-06-02 12:50:33 +00:00
|
|
|
|
|
|
|
$(package)_extra_sources += $($(package)_qttools_file_name)
|
|
|
|
$(package)_extra_sources += $($(package)_qtsvg_file_name)
|
|
|
|
$(package)_extra_sources += $($(package)_qtwebsockets_file_name)
|
2022-12-21 15:15:22 +00:00
|
|
|
$(package)_extra_sources += $($(package)_qtmultimedia_file_name)
|
|
|
|
$(package)_extra_sources += $($(package)_qtshadertools_file_name)
|
2022-06-02 12:50:33 +00:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
2023-07-19 12:55:48 +00:00
|
|
|
$(package)_config_opts += -DQT_HOST_PATH=$(build_prefix)/qt-host
|
|
|
|
$(package)_config_opts += -DCMAKE_LIBRARY_PATH=/home/user/.guix-profile/lib
|
|
|
|
$(package)_config_opts += -DBUILD_SHARED_LIBS=OFF
|
|
|
|
$(package)_config_opts += -DCMAKE_INSTALL_PREFIX=$(host_prefix)
|
|
|
|
$(package)_config_opts += -DINSTALL_LIBEXECDIR=$(build_prefix)/bin
|
|
|
|
$(package)_config_opts += -DQT_BUILD_EXAMPLES=FALSE
|
|
|
|
$(package)_config_opts += -DQT_BUILD_TESTS=FALSE
|
|
|
|
$(package)_config_opts += -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
|
|
|
|
|
|
|
|
$(package)_config_opts += -DINPUT_cups=no
|
|
|
|
$(package)_config_opts += -DINPUT_egl=no
|
|
|
|
$(package)_config_opts += -DINPUT_eglfs=no
|
|
|
|
$(package)_config_opts += -DINPUT_evdev=no
|
|
|
|
$(package)_config_opts += -DINPUT_gif=no
|
|
|
|
$(package)_config_opts += -DINPUT_glib=no
|
|
|
|
$(package)_config_opts += -DINPUT_icu=no
|
|
|
|
$(package)_config_opts += -DINPUT_ico=no
|
|
|
|
$(package)_config_opts += -DINPUT_kms=no
|
|
|
|
$(package)_config_opts += -DINPUT_linuxfb=no
|
|
|
|
$(package)_config_opts += -DINPUT_libudev=no
|
|
|
|
$(package)_config_opts += -DINPUT_mtdev=no
|
|
|
|
$(package)_config_opts += -DINPUT_openssl=linked
|
|
|
|
$(package)_config_opts += -DINPUT_openvg=no
|
|
|
|
$(package)_config_opts += -DINPUT_reduce_relocations=no
|
|
|
|
$(package)_config_opts += -DINPUT_schannel=no
|
|
|
|
$(package)_config_opts += -DINPUT_sctp=no
|
|
|
|
$(package)_config_opts += -DINPUT_securetransport=no
|
|
|
|
$(package)_config_opts += -DINPUT_system_proxies=no
|
|
|
|
$(package)_config_opts += -DINPUT_use_gold_linker_alias=no
|
|
|
|
$(package)_config_opts += -DINPUT_zstd=no
|
|
|
|
$(package)_config_opts += -DINPUT_pkg_config=yes
|
|
|
|
$(package)_config_opts += -DINPUT_libpng=qt
|
|
|
|
$(package)_config_opts += -DINPUT_pcre=qt
|
|
|
|
$(package)_config_opts += -DINPUT_harfbuzz=qt
|
|
|
|
$(package)_config_opts += -DINPUT_system_zlib=no
|
|
|
|
$(package)_config_opts += -DINPUT_colordialog=no
|
|
|
|
$(package)_config_opts += -DINPUT_dial=no
|
|
|
|
$(package)_config_opts += -DINPUT_fontcombobox=no
|
|
|
|
$(package)_config_opts += -DINPUT_image_heuristic_mask=no
|
|
|
|
$(package)_config_opts += -DINPUT_keysequenceedit=no
|
|
|
|
$(package)_config_opts += -DINPUT_lcdnumber=no
|
|
|
|
$(package)_config_opts += -DINPUT_networkdiskcache=no
|
|
|
|
$(package)_config_opts += -DINPUT_pdf=no
|
|
|
|
$(package)_config_opts += -DINPUT_printdialog=no
|
|
|
|
$(package)_config_opts += -DINPUT_printer=no
|
|
|
|
$(package)_config_opts += -DINPUT_printpreviewdialog=no
|
|
|
|
$(package)_config_opts += -DINPUT_printpreviewwidget=no
|
|
|
|
$(package)_config_opts += -DINPUT_printsupport=no
|
|
|
|
$(package)_config_opts += -DINPUT_sessionmanager=no
|
|
|
|
$(package)_config_opts += -DINPUT_sql=no
|
|
|
|
$(package)_config_opts += -DINPUT_syntaxhighlighter=no
|
|
|
|
$(package)_config_opts += -DINPUT_textmarkdownwriter=no
|
|
|
|
$(package)_config_opts += -DINPUT_textodfwriter=no
|
|
|
|
$(package)_config_opts += -DINPUT_topleveldomain=no
|
|
|
|
$(package)_config_opts += -DINPUT_undocommand=no
|
|
|
|
$(package)_config_opts += -DINPUT_undogroup=no
|
|
|
|
$(package)_config_opts += -DINPUT_undostack=no
|
|
|
|
$(package)_config_opts += -DINPUT_undoview=no
|
|
|
|
$(package)_config_opts += -DINPUT_vnc=no
|
|
|
|
|
|
|
|
$(package)_config_opts_linux += -DQT_QMAKE_TARGET_MKSPEC=linux-g++
|
|
|
|
$(package)_config_opts_linux += -DINPUT_xcb=yes
|
|
|
|
$(package)_config_opts_linux += -DINPUT_xcb_xlib=no
|
|
|
|
$(package)_config_opts_linux += -DINPUT_xlib=no
|
|
|
|
$(package)_config_opts_linux += -DINPUT_freetype=system
|
|
|
|
$(package)_config_opts_linux += -DINPUT_fontconfig=yes
|
|
|
|
$(package)_config_opts_linux += -DINPUT_opengl=no
|
|
|
|
$(package)_config_opts_linux += -DINPUT_vulkan=no
|
|
|
|
$(package)_config_opts_linux += -DINPUT_backtrace=no
|
|
|
|
$(package)_config_opts_linux += -DINPUT_dbus=linked
|
|
|
|
$(package)_config_opts_linux += -DBUILD_WITH_PCH=OFF
|
|
|
|
|
|
|
|
$(package)_config_opts_mingw32 += -DQT_QMAKE_TARGET_MKSPEC=win32-g++
|
|
|
|
$(package)_config_opts_mingw32 += -DINPUT_opengl=no
|
|
|
|
$(package)_config_opts_mingw32 += -DINPUT_dbus=no
|
|
|
|
$(package)_config_opts_mingw32 += -DINPUT_freetype=no
|
|
|
|
$(package)_config_opts_mingw32 += -DINPUT_wmf=yes
|
|
|
|
$(package)_config_opts_mingw32 += -DBUILD_WITH_PCH=ON
|
|
|
|
|
|
|
|
$(package)_config_opts_darwin += -DQT_QMAKE_TARGET_MKSPEC=macx-clang
|
|
|
|
$(package)_config_opts_darwin += -DINPUT_dbus=no
|
|
|
|
$(package)_config_opts_darwin += -DINPUT_freetype=no
|
|
|
|
$(package)_config_opts_darwin += -DINPUT_ffmpeg=no
|
|
|
|
$(package)_config_opts_darwin += -DQMAKE_MACOSX_DEPLOYMENT_TARGET=11.0
|
|
|
|
$(package)_config_opts_darwin += -DBUILD_WITH_PCH=OFF
|
|
|
|
$(package)_config_opts_darwin += '-DQT_QMAKE_DEVICE_OPTIONS=MAC_SDK_PATH=$(host_prefix)/native/SDK;MAC_SDK_VERSION=$(OSX_SDK_VERSION);CROSS_COMPILE=$(host)-;MAC_TARGET=$(host);XCODE_VERSION=$(XCODE_VERSION)'
|
|
|
|
|
|
|
|
$(package)_config_opts += -G Ninja
|
2022-06-02 12:50:33 +00:00
|
|
|
|
|
|
|
$(package)_openssl_flags_$(host_os)="-lssl -lcrypto -lpthread -ldl"
|
|
|
|
$(package)_openssl_flags_mingw32="-lssl -lcrypto -lws2_32"
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_fetch_cmds
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtsvg_file_name),$($(package)_qtsvg_file_name),$($(package)_qtsvg_sha256_hash)) && \
|
2022-12-21 15:15:22 +00:00
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtwebsockets_file_name),$($(package)_qtwebsockets_file_name),$($(package)_qtwebsockets_sha256_hash)) && \
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtmultimedia_file_name),$($(package)_qtmultimedia_file_name),$($(package)_qtmultimedia_sha256_hash)) && \
|
|
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtshadertools_file_name),$($(package)_qtshadertools_file_name),$($(package)_qtshadertools_sha256_hash))
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_extract_cmds
|
|
|
|
mkdir -p $($(package)_extract_dir) && \
|
|
|
|
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
echo "$($(package)_qtsvg_sha256_hash) $($(package)_source_dir)/$($(package)_qtsvg_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
echo "$($(package)_qtwebsockets_sha256_hash) $($(package)_source_dir)/$($(package)_qtwebsockets_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
2022-12-21 15:15:22 +00:00
|
|
|
echo "$($(package)_qtmultimedia_sha256_hash) $($(package)_source_dir)/$($(package)_qtmultimedia_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
echo "$($(package)_qtshadertools_sha256_hash) $($(package)_source_dir)/$($(package)_qtshadertools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
2022-06-02 12:50:33 +00:00
|
|
|
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
|
|
mkdir qtbase && \
|
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
|
|
|
|
mkdir qttools && \
|
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \
|
|
|
|
mkdir qtsvg && \
|
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtsvg_file_name) -C qtsvg && \
|
|
|
|
mkdir qtwebsockets && \
|
2022-12-21 15:15:22 +00:00
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtwebsockets_file_name) -C qtwebsockets && \
|
|
|
|
mkdir qtmultimedia && \
|
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtmultimedia_file_name) -C qtmultimedia && \
|
|
|
|
mkdir qtshadertools && \
|
|
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtshadertools_file_name) -C qtshadertools
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_preprocess_cmds
|
2022-12-21 15:15:22 +00:00
|
|
|
cp $($(package)_patch_dir)/root_CMakeLists.txt CMakeLists.txt && \
|
2022-06-02 12:50:33 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
|
2022-12-21 15:15:22 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/windows_func_fix.patch && \
|
2023-07-19 12:55:48 +00:00
|
|
|
mv $($(package)_patch_dir)/toolchain.cmake . && \
|
|
|
|
sed -i -e 's|@cmake_system_name@|$($(host_os)_cmake_system)|' \
|
|
|
|
-e 's|@target@|$(host)|' \
|
|
|
|
-e 's|@host_prefix@|$(host_prefix)|' \
|
|
|
|
-e 's|@cmake_c_flags@|$(darwin_CC_)|' \
|
|
|
|
-e 's|@cmake_cxx_flags@|$(darwin_CXX_)|' \
|
2023-07-19 19:20:18 +00:00
|
|
|
-e 's|@wmf_libs@|$(WMF_LIBS)|' \
|
2023-07-19 12:55:48 +00:00
|
|
|
toolchain.cmake && \
|
2023-05-24 16:03:00 +00:00
|
|
|
cd qtbase && \
|
2023-05-26 15:04:19 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/revert_f99ee441.patch && \
|
2023-06-28 10:50:32 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/xcb-util-image-fix.patch && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/libxau-fix.patch && \
|
2023-10-09 22:35:50 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/xkb-1.6.0.patch && \
|
2023-05-24 16:03:00 +00:00
|
|
|
cd ../qtmultimedia && \
|
2022-12-27 11:55:49 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/qtmultimedia-fixes.patch && \
|
2023-10-19 22:43:44 +00:00
|
|
|
patch -p1 -i $($(package)_patch_dir)/v4l2.patch && \
|
|
|
|
cd ../qtsvg && \
|
|
|
|
patch -p1 -i $($(package)_patch_dir)/CVE-2023-45872-qtsvg-6.6.0.diff
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_config_cmds
|
|
|
|
export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
|
|
|
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
|
|
|
|
export QT_MAC_SDK_NO_VERSION_CHECK=1 && \
|
2023-07-19 12:55:48 +00:00
|
|
|
env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH cmake $($(package)_config_opts)
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
2023-03-30 09:48:09 +00:00
|
|
|
export LD_LIBRARY_PATH="${build_prefix}/lib/:$(QT_LIBS_LIBS)" && \
|
2023-05-27 19:26:43 +00:00
|
|
|
env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH cmake --build . --parallel
|
2022-12-21 15:15:22 +00:00
|
|
|
endef
|
2022-06-02 12:50:33 +00:00
|
|
|
|
2022-12-21 15:15:22 +00:00
|
|
|
define $(package)_stage_cmds
|
|
|
|
DESTDIR=$($(package)_staging_dir) cmake --install .
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|