new package: libglvnd

This commit is contained in:
termux-pacman-bot
2023-01-22 16:36:11 +00:00
parent 1bfdec9323
commit dc466df0d3
4 changed files with 81 additions and 0 deletions

26
packages/libglvnd/LICENSE Normal file
View File

@@ -0,0 +1,26 @@
Copyright (c) 2013, NVIDIA CORPORATION.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
unaltered in all copies or substantial portions of the Materials.
Any additions, deletions, or changes to the original source files
must be clearly indicated in accompanying documentation.
If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the
work of the Khronos Group."
THE MATERIALS ARE 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
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

View File

@@ -0,0 +1,36 @@
TERMUX_PKG_HOMEPAGE=https://gitlab.freedesktop.org/glvnd/libglvnd
TERMUX_PKG_DESCRIPTION="The GL Vendor-Neutral Dispatch library"
TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.6.0
TERMUX_PKG_SRCURL=https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${TERMUX_PKG_VERSION}/libglvnd-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=efc756ffd24b24059e1c53677a9d57b4b237b00a01c54a6f1611e1e51661d70c
TERMUX_PKG_DEPENDS="libc++, libx11, libxext"
TERMUX_PKG_BUILD_DEPENDS="xorgproto"
TERMUX_PKG_BREAKS="mesa (<< 22.3.3-2)"
TERMUX_PKG_CONFLICTS="libmesa, mesa (<< 22.3.3-2), ndk-sysroot (<= 25b)"
TERMUX_PKG_REPLACES="libmesa, mesa (<< 22.3.3-2)"
TERMUX_PKG_RECOMMENDS="mesa"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Dtls=false
-Ddispatch-tls=false
"
termux_step_install_license() {
install -Dm600 -t $TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME \
$TERMUX_PKG_BUILDER_DIR/LICENSE
}
termux_step_post_make_install() {
# A bunch of programs in the wild assume that the name of OpenGL shared
# library is `libGL.so.1` and try to dlopen(3) it. In fact `sdl2` does
# this. So please do not ever remove the symlink.
ln -sf libGL.so ${TERMUX_PREFIX}/lib/libGL.so.1
ln -sf libEGL.so ${TERMUX_PREFIX}/lib/libEGL.so.1
ln -sf libGLESv1_CM.so ${TERMUX_PREFIX}/lib/libGLESv1_CM.so.1
ln -sf libGLESv2.so ${TERMUX_PREFIX}/lib/libGLESv2.so.2
ln -sf libGLX.so ${TERMUX_PREFIX}/lib/libGLX.so.0
ln -sf libOpenGL.so ${TERMUX_PREFIX}/lib/libOpenGL.so.0
patch -p1 -d $TERMUX_PREFIX/include < $TERMUX_PKG_BUILDER_DIR/egl-not-android.diff
}

View File

@@ -0,0 +1,11 @@
--- a/EGL/eglplatform.h
+++ b/EGL/eglplatform.h
@@ -88,7 +88,7 @@
typedef struct gbm_bo *EGLNativePixmapType;
typedef void *EGLNativeWindowType;
-#elif defined(__ANDROID__) || defined(ANDROID)
+#elif (defined(__ANDROID__) || defined(ANDROID)) && !defined(__TERMUX__)
struct ANativeWindow;
struct egl_native_pixmap_t;

View File

@@ -0,0 +1,8 @@
TERMUX_SUBPKG_DESCRIPTION="GLVND's OpenGL headers"
TERMUX_SUBPKG_DEPEND_ON_PARENT="no"
TERMUX_SUBPKG_BREAKS="mesa (<< 22.3.3-2), mesa-dev (<< 22.3.3-2), ndk-sysroot (<< 25b-3)"
TERMUX_SUBPKG_REPLACES="mesa (<< 22.3.3-2), mesa-dev (<< 22.3.3-2), ndk-sysroot (<< 25b-3)"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_INCLUDE="
include/
"