|
diff --git a/packages/mesa/0007-fix-build-for-lld-17.patch b/packages/mesa/0007-fix-build-for-lld-17.patch |
|
deleted file mode 100644 |
|
index 1c7126ade..000000000 |
|
--- a/packages/mesa/0007-fix-build-for-lld-17.patch |
|
+++ /dev/null |
|
@@ -1,61 +0,0 @@ |
|
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25551 |
|
- |
|
---- a/src/gallium/targets/dri/dri.sym |
|
-+++ /dev/null |
|
-@@ -1,12 +0,0 @@ |
|
--{ |
|
-- global: |
|
-- __driDriverExtensions; |
|
-- __driDriverGetExtensions*; |
|
-- nouveau_drm_screen_create; |
|
-- radeon_drm_winsys_create; |
|
-- amdgpu_winsys_create; |
|
-- fd_drm_screen_create_renderonly; |
|
-- ac_init_shared_llvm_once; |
|
-- local: |
|
-- *; |
|
--}; |
|
---- /dev/null |
|
-+++ b/src/gallium/targets/dri/dri.sym.in |
|
-@@ -0,0 +1,11 @@ |
|
-+{ |
|
-+ global: |
|
-+ __driDriverGetExtensions*; |
|
-+ @nouveau_drm_screen_create@ |
|
-+ @radeon_drm_winsys_create@ |
|
-+ @amdgpu_winsys_create@ |
|
-+ @fd_drm_screen_create_renderonly@ |
|
-+ @ac_init_shared_llvm_once@ |
|
-+ local: |
|
-+ *; |
|
-+}; |
|
---- a/src/gallium/targets/dri/meson.build |
|
-+++ b/src/gallium/targets/dri/meson.build |
|
-@@ -28,9 +28,25 @@ gallium_dri_ld_args = [] |
|
- gallium_dri_link_depends = [] |
|
- gallium_dri_drivers = [] |
|
- |
|
-+dri_sym_config = configuration_data() |
|
-+ |
|
-+foreach d : [[with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600, 'radeon_drm_winsys_create'], |
|
-+ [with_gallium_radeonsi, 'amdgpu_winsys_create'], |
|
-+ [with_gallium_nouveau, 'nouveau_drm_screen_create'], |
|
-+ [with_gallium_freedreno, 'fd_drm_screen_create_renderonly'], |
|
-+ [with_llvm and get_option('shared-llvm').allowed(), 'ac_init_shared_llvm_once']] |
|
-+ if d[0] |
|
-+ dri_sym_config.set(d[1], d[1] + ';') |
|
-+ else |
|
-+ dri_sym_config.set(d[1], '') |
|
-+ endif |
|
-+endforeach |
|
-+ |
|
-+dri_sym = configure_file(input : 'dri.sym.in', output : 'dri.sym', configuration : dri_sym_config) |
|
-+ |
|
- if with_ld_version_script |
|
-- gallium_dri_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'dri.sym')] |
|
-- gallium_dri_link_depends += files('dri.sym') |
|
-+ gallium_dri_ld_args += ['-Wl,--version-script', join_paths(meson.current_build_dir(), 'dri.sym')] |
|
-+ gallium_dri_link_depends += dri_sym |
|
- endif |
|
- if with_ld_dynamic_list |
|
- gallium_dri_ld_args += ['-Wl,--dynamic-list', join_paths(meson.current_source_dir(), '../dri.dyn')] |
|
diff --git a/packages/mesa/build.sh b/packages/mesa/build.sh |
|
index e17f11217..4a7c61def 100644 |
|
--- a/packages/mesa/build.sh |
|
+++ b/packages/mesa/build.sh |
|
@@ -3,10 +3,10 @@ TERMUX_PKG_DESCRIPTION="An open-source implementation of the OpenGL specificatio |
|
TERMUX_PKG_LICENSE="MIT" |
|
TERMUX_PKG_LICENSE_FILE="docs/license.rst" |
|
TERMUX_PKG_MAINTAINER="@termux" |
|
-TERMUX_PKG_VERSION="23.2.1" |
|
+TERMUX_PKG_VERSION="24.0.0" |
|
TERMUX_PKG_REVISION=1 |
|
-TERMUX_PKG_SRCURL=https://archive.mesa3d.org/mesa-${TERMUX_PKG_VERSION}.tar.xz |
|
-TERMUX_PKG_SHA256=64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc |
|
+TERMUX_PKG_SRCURL=https://gitlab.freedesktop.org/mesa/mesa/-/archive/f843b14c171299e1696ca6d971ccaa496f60c3ab/mesa-f843b14c171299e1696ca6d971ccaa496f60c3ab.tar.gz |
|
+TERMUX_PKG_SHA256=fd681705c021d853d68c9747ea29e2fba597ffce1cfb6888d00bb6bc43d48e06 |
|
TERMUX_PKG_AUTO_UPDATE=true |
|
TERMUX_PKG_DEPENDS="libandroid-shmem, libc++, libdrm, libglvnd, libwayland, libx11, libxext, libxfixes, libxshmfence, libxxf86vm, ncurses, vulkan-loader, zlib, zstd" |
|
TERMUX_PKG_SUGGESTS="mesa-dev" |
|
@@ -17,28 +17,21 @@ TERMUX_PKG_REPLACES="libmesa" |
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" |
|
--cmake-prefix-path $TERMUX_PREFIX |
|
-Dcpp_rtti=false |
|
--Dgbm=enabled |
|
--Dopengl=true |
|
--Degl=enabled |
|
--Degl-native-platform=x11 |
|
--Dgles1=disabled |
|
--Dgles2=enabled |
|
--Ddri3=enabled |
|
--Dglx=dri |
|
-Dllvm=enabled |
|
+-Dvulkan-beta=true |
|
-Dshared-llvm=disabled |
|
--Dplatforms=x11,wayland |
|
--Dgallium-drivers=swrast,virgl,zink |
|
--Dosmesa=true |
|
--Dglvnd=true |
|
+-Dplatforms=android |
|
+-Dplatform-sdk-version=$(getprop ro.build.version.sdk) |
|
+-Dgallium-drivers= |
|
-Dxmlconfig=disabled |
|
+-Dandroid-stub=true |
|
+-Dzstd=false |
|
" |
|
|
|
termux_step_pre_configure() { |
|
termux_setup_cmake |
|
|
|
- CPPFLAGS+=" -D__USE_GNU" |
|
- LDFLAGS+=" -landroid-shmem" |
|
+ CPPFLAGS+=" -D__USE_GNU -D__ANDROID_API__=$(getprop ro.build.version.sdk)" |
|
|
|
_WRAPPER_BIN=$TERMUX_PKG_BUILDDIR/_wrapper/bin |
|
mkdir -p $_WRAPPER_BIN |
|
@@ -56,8 +49,8 @@ termux_step_pre_configure() { |
|
export PATH=$_WRAPPER_BIN:$PATH |
|
|
|
if [ $TERMUX_ARCH = "arm" ] || [ $TERMUX_ARCH = "aarch64" ]; then |
|
- TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=swrast,freedreno" |
|
- TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dfreedreno-kmds=msm,kgsl" |
|
+ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=freedreno" |
|
+ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dfreedreno-kmds=kgsl" |
|
elif [ $TERMUX_ARCH = "i686" ] || [ $TERMUX_ARCH = "x86_64" ]; then |
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=swrast" |
|
else |
|
@@ -89,6 +82,4 @@ termux_step_post_make_install() { |
|
done |
|
|
|
# Create symlinks |
|
- ln -sf libEGL_mesa.so ${TERMUX_PREFIX}/lib/libEGL_mesa.so.0 |
|
- ln -sf libGLX_mesa.so ${TERMUX_PREFIX}/lib/libGLX_mesa.so.0 |
|
} |
|
diff --git a/packages/mesa/the-usual.patch b/packages/mesa/the-usual.patch |
|
new file mode 100644 |
|
index 000000000..dda8e7f95 |
|
--- /dev/null |
|
+++ b/packages/mesa/the-usual.patch |
|
@@ -0,0 +1,59 @@ |
|
+diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py |
|
+index 60ee4576c60..8c617d295a8 100644 |
|
+--- a/bin/install_megadrivers.py |
|
++++ b/bin/install_megadrivers.py |
|
+@@ -23,8 +23,13 @@ |
|
+ """Script to install megadriver symlinks for meson.""" |
|
+ |
|
+ import argparse |
|
+-import os |
|
+- |
|
++import os, shutil |
|
++def link(src, dest): |
|
++ shutil.copyfile(src, dest) |
|
++def unlink(src): |
|
++ os.remove(src) |
|
++os.link = link |
|
++os.unlink = unlink |
|
+ |
|
+ def main(): |
|
+ parser = argparse.ArgumentParser() |
|
+diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build |
|
+index fbec1da957b..e46c4a2c564 100644 |
|
+--- a/src/gallium/targets/dri/meson.build |
|
++++ b/src/gallium/targets/dri/meson.build |
|
+@@ -122,20 +122,20 @@ foreach d : [[with_gallium_kmsro, [ |
|
+ endforeach |
|
+ |
|
+ # This only works on Unix-like oses, which is probably fine for dri |
|
+-prog_ln = find_program('ln', required : false) |
|
+-if prog_ln.found() |
|
+- devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir()) |
|
+- |
|
+- foreach d : gallium_dri_drivers |
|
+- custom_target( |
|
+- 'devenv_@0@'.format(d), |
|
+- input : libgallium_dri, |
|
+- output : d, |
|
+- command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'], |
|
+- build_by_default : true, |
|
+- ) |
|
+- endforeach |
|
+-endif |
|
++# prog_ln = find_program('ln', required : false) |
|
++# if prog_ln.found() |
|
++# devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir()) |
|
++# |
|
++# foreach d : gallium_dri_drivers |
|
++# custom_target( |
|
++# 'devenv_@0@'.format(d), |
|
++# input : libgallium_dri, |
|
++# output : d, |
|
++# command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'], |
|
++# build_by_default : true, |
|
++# ) |
|
++# endforeach |
|
++# endif |
|
+ |
|
+ meson.add_install_script( |
|
+ install_megadrivers_py.full_path(), |
|
diff --git a/scripts/build/configure/termux_step_configure_meson.sh b/scripts/build/configure/termux_step_configure_meson.sh |
|
index 43aa50231..91a560267 100644 |
|
--- a/scripts/build/configure/termux_step_configure_meson.sh |
|
+++ b/scripts/build/configure/termux_step_configure_meson.sh |
|
@@ -1,7 +1,7 @@ |
|
termux_step_configure_meson() { |
|
termux_setup_meson |
|
|
|
- local _meson_buildtype="minsize" |
|
+ local _meson_buildtype="release" |
|
local _meson_stripflag="--strip" |
|
if [ "$TERMUX_DEBUG_BUILD" = "true" ]; then |
|
_meson_buildtype="debug" |
|
diff --git a/scripts/build/setup/termux_setup_meson.sh b/scripts/build/setup/termux_setup_meson.sh |
|
index 43d769ed6..4a026247b 100644 |
|
--- a/scripts/build/setup/termux_setup_meson.sh |
|
+++ b/scripts/build/setup/termux_setup_meson.sh |
|
@@ -55,6 +55,7 @@ termux_setup_meson() { |
|
echo "ld = '$LD'" >> $TERMUX_MESON_CROSSFILE |
|
echo "pkgconfig = '$PKG_CONFIG'" >> $TERMUX_MESON_CROSSFILE |
|
echo "strip = '$STRIP'" >> $TERMUX_MESON_CROSSFILE |
|
+ echo "llvm-config = 'llvm-config'" >> $TERMUX_MESON_CROSSFILE |
|
|
|
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ]; then |
|
echo '' >> $TERMUX_MESON_CROSSFILE |
|
diff --git a/scripts/build/termux_step_extract_into_massagedir.sh b/scripts/build/termux_step_extract_into_massagedir.sh |
|
index 0df0b9e1e..2b4ffca10 100644 |
|
--- a/scripts/build/termux_step_extract_into_massagedir.sh |
|
+++ b/scripts/build/termux_step_extract_into_massagedir.sh |
|
@@ -4,7 +4,7 @@ termux_step_extract_into_massagedir() { |
|
# Build diff tar with what has changed during the build: |
|
cd $TERMUX_PREFIX_CLASSICAL |
|
tar -N "$TERMUX_BUILD_TS_FILE" \ |
|
- --exclude='tmp' \ |
|
+ --exclude='tmp' --exclude='__pycache__' \ |
|
-czf "$TARBALL_ORIG" . |
|
|
|
# Extract tar in order to massage it |