Skip to content

Commit 173394d

Browse files
committed
depends: Build qt package for FreeBSD hosts
1 parent 1473f69 commit 173394d

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

depends/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ To build dependencies for the current arch+OS:
3333

3434
pkg install bash cmake curl gmake
3535

36+
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
37+
38+
pkg install bison ninja pkgconf python3
39+
3640
To build dependencies for the current arch+OS:
3741

3842
gmake

depends/packages/packages.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ qrencode_darwin_packages = qrencode
99
qrencode_mingw32_packages = qrencode
1010

1111
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
12+
qt_freebsd_packages:=$(qt_linux_packages)
1213
qt_darwin_packages=qt
1314
qt_mingw32_packages=qt
1415
ifneq ($(host),$(build))

depends/packages/qt.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ $(package)_sha256_hash=$(qt_details_qtbase_sha256_hash)
77
ifneq ($(host),$(build))
88
$(package)_dependencies := native_$(package)
99
endif
10-
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
10+
$(package)_linux_dependencies := freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
11+
$(package)_freebsd_dependencies := $($(package)_linux_dependencies)
1112
$(package)_patches_path := $(qt_details_patches_path)
1213
$(package)_patches := dont_hardcode_pwd.patch
1314
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
@@ -146,6 +147,7 @@ $(package)_config_opts_linux += -xcb
146147
ifneq ($(LTO),)
147148
$(package)_config_opts_linux += -ltcg
148149
endif
150+
$(package)_config_opts_freebsd := $$($(package)_config_opts_linux)
149151

150152
$(package)_config_opts_mingw32 := -no-dbus
151153
$(package)_config_opts_mingw32 += -no-freetype

depends/toolchain.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
101101
endif()
102102

103103

104-
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
104+
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")
105105
# Customize pkg-config behavior for finding dependencies
106106
# of the xcb QPA platform plugin:
107107
# 1. Restrict search paths to the depends.

src/qt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ get_target_property(qt_lib_type Qt6::Core TYPE)
1616
function(import_plugins target)
1717
if(qt_lib_type STREQUAL "STATIC_LIBRARY")
1818
set(plugins Qt6::QMinimalIntegrationPlugin)
19-
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
19+
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")
2020
list(APPEND plugins Qt6::QXcbIntegrationPlugin)
2121
elseif(WIN32)
2222
list(APPEND plugins Qt6::QWindowsIntegrationPlugin Qt6::QModernWindowsStylePlugin)

0 commit comments

Comments
 (0)