diff --git a/depends/README.md b/depends/README.md index 627662e9091..288d814a164 100644 --- a/depends/README.md +++ b/depends/README.md @@ -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 diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 7802cd915ee..b6f100f28cd 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -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)) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index bd7d432897b..4daffeb1aa3 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -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 diff --git a/depends/toolchain.cmake.in b/depends/toolchain.cmake.in index b2d02214003..34984b85b1d 100644 --- a/depends/toolchain.cmake.in +++ b/depends/toolchain.cmake.in @@ -117,7 +117,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. diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 405f6281ffe..fa6b2b3918c 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -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)