mesa: Update to 21.3.7
This commit is contained in:
parent
90390b6fae
commit
b4bc050f41
@ -1,83 +0,0 @@
|
||||
The Mesa 3D Graphics Library
|
||||
|
||||
Disclaimer
|
||||
|
||||
Mesa is a 3-D graphics library with an API which is very similar to
|
||||
that of [1]OpenGL.* To the extent that Mesa utilizes the OpenGL command
|
||||
syntax or state machine, it is being used with authorization from
|
||||
[2]Silicon Graphics, Inc.(SGI). However, the author does not possess an
|
||||
OpenGL license from SGI, and makes no claim that Mesa is in any way a
|
||||
compatible replacement for OpenGL or associated with SGI. Those who
|
||||
want a licensed implementation of OpenGL should contact a licensed
|
||||
vendor.
|
||||
|
||||
Please do not refer to the library as MesaGL (for legal reasons). It's
|
||||
just Mesa or The Mesa 3-D graphics library.
|
||||
|
||||
* OpenGL is a trademark of [3]Silicon Graphics Incorporated.
|
||||
|
||||
License / Copyright Information
|
||||
|
||||
The Mesa distribution consists of several components. Different
|
||||
copyrights and licenses apply to different components. For example, the
|
||||
GLX client code uses the SGI Free Software License B, and some of the
|
||||
Mesa device drivers are copyrighted by their authors. See below for a
|
||||
list of Mesa's main components and the license for each.
|
||||
|
||||
The core Mesa library is licensed according to the terms of the MIT
|
||||
license. This allows integration with the XFree86, Xorg and DRI
|
||||
projects.
|
||||
|
||||
The default Mesa license is as follows:
|
||||
|
||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
Attention, Contributors
|
||||
|
||||
When contributing to the Mesa project you must agree to the licensing
|
||||
terms of the component to which you're contributing. The following
|
||||
section lists the primary components of the Mesa distribution and their
|
||||
respective licenses.
|
||||
|
||||
Mesa Component Licenses
|
||||
|
||||
Component Location License
|
||||
------------------------------------------------------------------
|
||||
Main Mesa code src/mesa/ MIT
|
||||
|
||||
Device drivers src/mesa/drivers/* MIT, generally
|
||||
|
||||
Gallium code src/gallium/ MIT
|
||||
|
||||
Ext headers include/GL/glext.h Khronos
|
||||
include/GL/glxext.h
|
||||
|
||||
GLX client code src/glx/ SGI Free Software License B
|
||||
|
||||
C11 thread include/c11/threads*.h Boost (permissive) emulation
|
||||
|
||||
In general, consult the source files for license terms.
|
||||
|
||||
References
|
||||
|
||||
1. https://www.opengl.org/
|
||||
2. https://www.sgi.com/
|
||||
3. https://www.sgi.com/
|
@ -1,40 +1,33 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.mesa3d.org
|
||||
TERMUX_PKG_DESCRIPTION="An open-source implementation of the OpenGL specification"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_LICENSE_FILE="docs/license.rst"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
## Use 17.3.x branch because 18.x.x requires 'pthread_barrier_t'.
|
||||
TERMUX_PKG_VERSION=17.3.9
|
||||
TERMUX_PKG_REVISION=35
|
||||
TERMUX_PKG_SRCURL=https://mesa.freedesktop.org/archive/older-versions/${TERMUX_PKG_VERSION:0:2}.x/mesa-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=c5beb5fc05f0e0c294fefe1a393ee118cb67e27a4dca417d77c297f7d4b6e479
|
||||
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libexpat, libdrm, libx11, libxdamage, libxext, libxml2, libxshmfence, zlib"
|
||||
TERMUX_PKG_VERSION=21.3.7
|
||||
TERMUX_PKG_SRCURL=https://archive.mesa3d.org/mesa-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=b4fa9db7aa61bf209ef0b40bef83080999d86ad98df8b8b4fada7c128a1efc3d
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libc++, libx11, libxext, zlib"
|
||||
TERMUX_PKG_BUILD_DEPENDS="xorgproto"
|
||||
TERMUX_PKG_CONFLICTS="libmesa"
|
||||
TERMUX_PKG_REPLACES="libmesa"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--disable-static
|
||||
--disable-asm
|
||||
--disable-gbm
|
||||
--disable-egl
|
||||
--disable-gles1
|
||||
--disable-gles2
|
||||
--disable-dri
|
||||
--disable-dri3
|
||||
--disable-llvm
|
||||
--enable-glx=xlib
|
||||
--with-platforms=x11
|
||||
--without-dri-drivers
|
||||
--without-gallium-drivers
|
||||
ac_cv_header_xlocale_h=no
|
||||
-Dgbm=disabled
|
||||
-Degl=disabled
|
||||
-Dgles1=disabled
|
||||
-Dgles2=disabled
|
||||
-Ddri3=disabled
|
||||
-Dllvm=disabled
|
||||
-Dglx=xlib
|
||||
-Dplatforms=x11
|
||||
-Ddri-drivers=
|
||||
-Dgallium-drivers=
|
||||
-Dvulkan-drivers=
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export LIBS="-landroid-shmem -latomic"
|
||||
aclocal
|
||||
automake
|
||||
autoconf
|
||||
CPPFLAGS+=" -D__USE_GNU"
|
||||
LDFLAGS+=" -landroid-shmem"
|
||||
}
|
||||
|
||||
termux_step_post_massage() {
|
||||
@ -43,7 +36,3 @@ termux_step_post_massage() {
|
||||
ln -sf libGL.so libGL.so.1
|
||||
fi
|
||||
}
|
||||
|
||||
termux_step_install_license() {
|
||||
install -Dm600 -t $TERMUX_PREFIX/share/doc/mesa $TERMUX_PKG_BUILDER_DIR/LICENSE
|
||||
}
|
||||
|
14
x11-packages/mesa/libtool.m4.patch
vendored
14
x11-packages/mesa/libtool.m4.patch
vendored
@ -1,14 +0,0 @@
|
||||
diff -uNr mesa-17.3.9/m4/libtool.m4 mesa-17.3.9.mod/m4/libtool.m4
|
||||
--- mesa-17.3.9/m4/libtool.m4 2018-04-18 11:44:05.000000000 +0300
|
||||
+++ mesa-17.3.9.mod/m4/libtool.m4 2021-11-06 20:20:39.088856120 +0200
|
||||
@@ -6405,8 +6405,8 @@
|
||||
# Check if GNU C++ uses GNU ld as the underlying linker, since the
|
||||
# archiving commands below assume that GNU ld is being used.
|
||||
if test yes = "$with_gnu_ld"; then
|
||||
- _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
|
||||
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
|
||||
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
|
||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
|
11
x11-packages/mesa/meson.build.patch
Normal file
11
x11-packages/mesa/meson.build.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -1377,7 +1377,7 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
-foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h', 'cet.h', 'pthread_np.h']
|
||||
+foreach h : ['linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h', 'cet.h', 'pthread_np.h']
|
||||
if cc.check_header(h)
|
||||
pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
|
||||
endif
|
@ -1,191 +0,0 @@
|
||||
diff -uNr mesa-17.3.9/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c mesa-17.3.9.mod/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
|
||||
--- mesa-17.3.9/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c 2018-04-18 11:44:00.000000000 +0300
|
||||
+++ mesa-17.3.9.mod/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c 2020-01-04 23:30:19.874977603 +0200
|
||||
@@ -46,9 +46,84 @@
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <sys/ipc.h>
|
||||
-#include <sys/shm.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
|
||||
+#include <linux/shm.h>
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+#ifndef shmid_ds
|
||||
+# define shmid_ds shmid64_ds
|
||||
+#endif
|
||||
+
|
||||
+static void * (*android_shmat)(int shmid, const void *shmaddr, int shmflg) = NULL;
|
||||
+static int (*android_shmdt)(const void *shmaddr) = NULL;
|
||||
+static int (*android_shmget)(key_t key, size_t size, int shmflg) = NULL;
|
||||
+static int (*android_shmctl)(int shmid, int cmd, struct shmid_ds *buf) = NULL;
|
||||
+
|
||||
+static void * shmat(int shmid, const void *shmaddr, int shmflg) {
|
||||
+ if (!android_shmat) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmat = dlsym(handle, "shmat");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmat(shmid, shmaddr, shmflg);
|
||||
+}
|
||||
+
|
||||
+static int shmdt(const void *shmaddr) {
|
||||
+ if (!android_shmdt) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmdt = dlsym(handle, "shmdt");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmdt(shmaddr);
|
||||
+}
|
||||
+
|
||||
+static int shmget(key_t key, size_t size, int shmflg) {
|
||||
+ if (!android_shmget) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmget = dlsym(handle, "shmget");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmget(key, size, shmflg);
|
||||
+}
|
||||
+
|
||||
+static int shmctl(int shmid, int cmd, struct shmid_ds *buf) {
|
||||
+ if (!android_shmctl) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmctl = dlsym(handle, "shmctl");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmctl(shmid, cmd, buf);
|
||||
+}
|
||||
+
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(xlib_no_shm, "XLIB_NO_SHM", FALSE)
|
||||
|
||||
/**
|
||||
diff -uNr mesa-17.3.9/src/mesa/drivers/x11/glxheader.h mesa-17.3.9.mod/src/mesa/drivers/x11/glxheader.h
|
||||
--- mesa-17.3.9/src/mesa/drivers/x11/glxheader.h 2018-04-18 11:44:00.000000000 +0300
|
||||
+++ mesa-17.3.9.mod/src/mesa/drivers/x11/glxheader.h 2020-01-04 23:38:48.043159877 +0200
|
||||
@@ -34,7 +34,6 @@
|
||||
# include <X11/Xutil.h>
|
||||
# ifdef USE_XSHM /* was SHM */
|
||||
# include <sys/ipc.h>
|
||||
-# include <sys/shm.h>
|
||||
# include <X11/extensions/XShm.h>
|
||||
# endif
|
||||
# include <GL/glx.h>
|
||||
diff -uNr mesa-17.3.9/src/mesa/drivers/x11/xm_buffer.c mesa-17.3.9.mod/src/mesa/drivers/x11/xm_buffer.c
|
||||
--- mesa-17.3.9/src/mesa/drivers/x11/xm_buffer.c 2018-04-18 11:44:00.000000000 +0300
|
||||
+++ mesa-17.3.9.mod/src/mesa/drivers/x11/xm_buffer.c 2020-01-04 23:29:44.585678356 +0200
|
||||
@@ -37,11 +37,86 @@
|
||||
#include "main/renderbuffer.h"
|
||||
#include "swrast/s_renderbuffer.h"
|
||||
|
||||
-
|
||||
#define XMESA_RENDERBUFFER 0x1234
|
||||
|
||||
|
||||
#if defined(USE_XSHM)
|
||||
+#include <linux/shm.h>
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+#ifndef shmid_ds
|
||||
+# define shmid_ds shmid64_ds
|
||||
+#endif
|
||||
+
|
||||
+static void * (*android_shmat)(int shmid, const void *shmaddr, int shmflg) = NULL;
|
||||
+static int (*android_shmdt)(const void *shmaddr) = NULL;
|
||||
+static int (*android_shmget)(key_t key, size_t size, int shmflg) = NULL;
|
||||
+static int (*android_shmctl)(int shmid, int cmd, struct shmid_ds *buf) = NULL;
|
||||
+
|
||||
+static void * shmat(int shmid, const void *shmaddr, int shmflg) {
|
||||
+ if (!android_shmat) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmat = dlsym(handle, "shmat");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmat(shmid, shmaddr, shmflg);
|
||||
+}
|
||||
+
|
||||
+static int shmdt(const void *shmaddr) {
|
||||
+ if (!android_shmdt) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmdt = dlsym(handle, "shmdt");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmdt(shmaddr);
|
||||
+}
|
||||
+
|
||||
+static int shmget(key_t key, size_t size, int shmflg) {
|
||||
+ if (!android_shmget) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmget = dlsym(handle, "shmget");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmget(key, size, shmflg);
|
||||
+}
|
||||
+
|
||||
+static int shmctl(int shmid, int cmd, struct shmid_ds *buf) {
|
||||
+ if (!android_shmctl) {
|
||||
+ void *handle = dlopen("@TERMUX_PREFIX@/lib/libandroid-shmem.so", RTLD_LOCAL | RTLD_LAZY);
|
||||
+
|
||||
+ if (!handle) {
|
||||
+ abort();
|
||||
+ }
|
||||
+
|
||||
+ android_shmctl = dlsym(handle, "shmctl");
|
||||
+
|
||||
+ dlclose(handle);
|
||||
+ }
|
||||
+
|
||||
+ return android_shmctl(shmid, cmd, buf);
|
||||
+}
|
||||
+
|
||||
static volatile int mesaXErrorFlag = 0;
|
||||
|
||||
/**
|
Loading…
Reference in New Issue
Block a user