depends: Build qt package for FreeBSD hosts

This commit is contained in:
Hennadii Stepanov
2025-06-12 00:47:35 +01:00
parent 1473f69924
commit 173394d951
5 changed files with 10 additions and 3 deletions

View File

@ -33,6 +33,10 @@ To build dependencies for the current arch+OS:
pkg install bash cmake curl gmake
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
pkg install bison ninja pkgconf python3
To build dependencies for the current arch+OS:
gmake

View File

@ -9,6 +9,7 @@ qrencode_darwin_packages = qrencode
qrencode_mingw32_packages = qrencode
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
qt_freebsd_packages:=$(qt_linux_packages)
qt_darwin_packages=qt
qt_mingw32_packages=qt
ifneq ($(host),$(build))

View File

@ -7,7 +7,8 @@ $(package)_sha256_hash=$(qt_details_qtbase_sha256_hash)
ifneq ($(host),$(build))
$(package)_dependencies := native_$(package)
endif
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
$(package)_linux_dependencies := freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
$(package)_freebsd_dependencies := $($(package)_linux_dependencies)
$(package)_patches_path := $(qt_details_patches_path)
$(package)_patches := dont_hardcode_pwd.patch
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
@ -146,6 +147,7 @@ $(package)_config_opts_linux += -xcb
ifneq ($(LTO),)
$(package)_config_opts_linux += -ltcg
endif
$(package)_config_opts_freebsd := $$($(package)_config_opts_linux)
$(package)_config_opts_mingw32 := -no-dbus
$(package)_config_opts_mingw32 += -no-freetype

View File

@ -101,7 +101,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")
# Customize pkg-config behavior for finding dependencies
# of the xcb QPA platform plugin:
# 1. Restrict search paths to the depends.

View File

@ -16,7 +16,7 @@ get_target_property(qt_lib_type Qt6::Core TYPE)
function(import_plugins target)
if(qt_lib_type STREQUAL "STATIC_LIBRARY")
set(plugins Qt6::QMinimalIntegrationPlugin)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")
list(APPEND plugins Qt6::QXcbIntegrationPlugin)
elseif(WIN32)
list(APPEND plugins Qt6::QWindowsIntegrationPlugin Qt6::QModernWindowsStylePlugin)