freedreno+meson: Add lua+libarchive+libxml from Meson WrapDB

These dependencies are required for building freedreno tools but on
platforms such as Android, these aren't included and would need to
be built from source. The easiest way to do this was using the
Meson WrapDB. Additionally, warnings were added when these deps are
missing as the decode tools will silently not be built otherwise.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25005>
This commit is contained in:
Mark Collins
2023-08-08 09:54:03 +00:00
committed by Marge Bot
parent b91f9f68f0
commit ce124328a0
5 changed files with 51 additions and 3 deletions

View File

@@ -137,6 +137,8 @@ if dep_libarchive.found()
build_by_default: with_tools.contains('freedreno'), build_by_default: with_tools.contains('freedreno'),
install: install_fd_decode_tools, install: install_fd_decode_tools,
) )
else
warning('libarchive not found, not building replay or rddecompiler')
endif endif
if dep_lua.found() and dep_libarchive.found() if dep_lua.found() and dep_libarchive.found()
@@ -197,6 +199,8 @@ if dep_lua.found() and dep_libarchive.found()
endforeach endforeach
endif endif
else
warning('lua or libarchive not found, not building cffdump')
endif endif
crashdec = executable( crashdec = executable(
@@ -289,4 +293,6 @@ if dep_libarchive.found()
build_by_default: with_tools.contains('freedreno'), build_by_default: with_tools.contains('freedreno'),
install: false, install: false,
) )
else
warning('libarchive not found, not building pgmdump')
endif endif

View File

@@ -27,14 +27,14 @@ rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path
# TODO: use multi-argument dependency() in meson 0.60 # TODO: use multi-argument dependency() in meson 0.60
foreach lua : ['lua54', 'lua53', 'lua52', 'lua'] foreach lua : ['lua54', 'lua53', 'lua52', 'lua']
dep_lua = dependency(lua, required: false, version: '>=5.2') dep_lua = dependency(lua, required: false, fallback : ['lua', 'lua_dep'], version: '>=5.2')
if dep_lua.found() if dep_lua.found()
break break
endif endif
endforeach endforeach
dep_libarchive = dependency('libarchive', required: false) dep_libarchive = dependency('libarchive', fallback : ['libarchive', 'libarchive_dep'], required: false)
dep_libxml2 = dependency('libxml-2.0', required: false) dep_libxml2 = dependency('libxml-2.0', fallback: ['libxml2', 'libxml2_dep'], required: false)
prog_gzip = find_program('gzip', required: false) prog_gzip = find_program('gzip', required: false)
install_fd_decode_tools = dep_libxml2.found() and prog_gzip.found() and \ install_fd_decode_tools = dep_libxml2.found() and prog_gzip.found() and \
@@ -62,6 +62,8 @@ if dep_libxml2.found() and with_tools.contains('freedreno')
subdir('rnn') subdir('rnn')
subdir('decode') subdir('decode')
subdir('afuc') subdir('afuc')
elif with_tools.contains('freedreno')
message('libxml2 not found, skipping tools that depend on it')
endif endif
if with_tools.contains('drm-shim') if with_tools.contains('drm-shim')

View File

@@ -0,0 +1,13 @@
[wrap-file]
directory = libarchive-3.7.1
source_url = https://github.com/libarchive/libarchive/releases/download/v3.7.1/libarchive-3.7.1.tar.xz
source_filename = libarchive-3.7.1.tar.xz
source_hash = b17403ce670ff18d8e06fea05a9ea9accf70678c88f1b9392a2e29b51127895f
patch_filename = libarchive_3.7.1-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libarchive_3.7.1-2/get_patch
patch_hash = ada92958fa10655ca0f710ecb7ec3db7751644d76001d5d36b352115399b1eef
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libarchive_3.7.1-2/libarchive-3.7.1.tar.xz
wrapdb_version = 3.7.1-2
[provide]
libarchive = libarchive_dep

13
subprojects/libxml2.wrap Normal file
View File

@@ -0,0 +1,13 @@
[wrap-file]
directory = libxml2-2.11.4
source_url = https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.4.tar.xz
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libxml2_2.11.4-1/libxml2-2.11.4.tar.xz
source_filename = libxml2-2.11.4.tar.xz
source_hash = 737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
patch_filename = libxml2_2.11.4-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libxml2_2.11.4-1/get_patch
patch_hash = 31867206881a6ec8f2338972775c9c9155aaf8c8a7d680331ae62ea231c9622e
wrapdb_version = 2.11.4-1
[provide]
libxml-2.0 = libxml2_dep

14
subprojects/lua.wrap Normal file
View File

@@ -0,0 +1,14 @@
[wrap-file]
directory = lua-5.4.6
source_url = https://www.lua.org/ftp/lua-5.4.6.tar.gz
source_filename = lua-5.4.6.tar.gz
source_hash = 7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88
patch_filename = lua_5.4.6-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/lua_5.4.6-2/get_patch
patch_hash = a218f93461b1d9ba9367506f3198815f84ee25e2e4b50894679004aee9cb46f2
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/lua_5.4.6-2/lua-5.4.6.tar.gz
wrapdb_version = 5.4.6-2
[provide]
lua-5.4 = lua_dep
lua = lua_dep