mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
mesa: allow building opengles
This commit is contained in:
parent
d7e0acbb74
commit
bb5b441a92
@ -22,7 +22,6 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.mesa3d.org/"
|
||||
PKG_URL="ftp://freedesktop.org/pub/mesa/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain Python:host expat glproto dri2proto presentproto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11 systemd dri3proto libxshmfence openssl"
|
||||
PKG_SECTION="graphics"
|
||||
PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API"
|
||||
PKG_LONGDESC="Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or state machine, it is being used with authorization from Silicon Graphics, Inc. However, the author makes no claim that Mesa is in any way a compatible replacement for OpenGL or associated with Silicon Graphics, Inc. Those who want a licensed implementation of OpenGL should contact a licensed vendor. While Mesa is not a licensed OpenGL implementation, it is currently being tested with the OpenGL conformance tests. For the current conformance status see the CONFORM file included in the Mesa distribution."
|
||||
@ -30,6 +29,22 @@ PKG_LONGDESC="Mesa is a 3-D graphics library with an API which is very similar t
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
if [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET="toolchain Python:host expat glproto dri2proto presentproto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11 systemd dri3proto libxshmfence openssl"
|
||||
|
||||
export DRI_DRIVER_INSTALL_DIR=$XORG_PATH_DRI
|
||||
export DRI_DRIVER_SEARCH_DIR=$XORG_PATH_DRI
|
||||
export X11_INCLUDES=
|
||||
MESA_DRI="--enable-dri --enable-dri3"
|
||||
MESA_GLX="--enable-glx --enable-driglx-direct --enable-glx-tls"
|
||||
MESA_EGL_PLATFORMS="--with-egl-platforms=x11,drm"
|
||||
else
|
||||
PKG_DEPENDS_TARGET="toolchain Python:host expat libdrm"
|
||||
MESA_DRI="--enable-dri --disable-dri3"
|
||||
MESA_GLX="--disable-glx --disable-driglx-direct --disable-glx-tls"
|
||||
MESA_EGL_PLATFORMS="--with-egl-platforms=drm"
|
||||
fi
|
||||
|
||||
# configure GPU drivers and dependencies:
|
||||
get_graphicdrivers
|
||||
|
||||
@ -54,33 +69,29 @@ for drv in $GRAPHIC_DRIVERS; do
|
||||
done
|
||||
|
||||
if [ "$OPENGLES_SUPPORT" = "yes" ]; then
|
||||
MESA_GLES="--enable-gles2"
|
||||
MESA_GLES="--disable-gles1 --enable-gles2"
|
||||
else
|
||||
MESA_GLES="--disable-gles2"
|
||||
MESA_GLES="--disable-gles1 --disable-gles2"
|
||||
fi
|
||||
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="CC_FOR_BUILD=$HOST_CC \
|
||||
CXX_FOR_BUILD=$HOST_CXX \
|
||||
CFLAGS_FOR_BUILD= \
|
||||
CXXFLAGS_FOR_BUILD= \
|
||||
LDFLAGS_FOR_BUILD= \
|
||||
X11_INCLUDES= \
|
||||
DRI_DRIVER_INSTALL_DIR=$XORG_PATH_DRI \
|
||||
DRI_DRIVER_SEARCH_DIR=$XORG_PATH_DRI \
|
||||
--disable-debug \
|
||||
--disable-mangling \
|
||||
--enable-texture-float \
|
||||
--enable-asm \
|
||||
--disable-selinux \
|
||||
--enable-opengl \
|
||||
--disable-gles1 \
|
||||
$MESA_GLES \
|
||||
--enable-dri \
|
||||
--enable-dri3 \
|
||||
--enable-glx \
|
||||
$MESA_DRI \
|
||||
$MESA_GLX \
|
||||
--disable-osmesa \
|
||||
--disable-gallium-osmesa \
|
||||
--enable-egl --with-egl-platforms=x11,drm \
|
||||
--enable-egl \
|
||||
$MESA_EGL_PLATFORMS \
|
||||
$XA_CONFIG \
|
||||
--enable-gbm \
|
||||
--disable-nine \
|
||||
@ -92,8 +103,7 @@ PKG_CONFIGURE_OPTS_TARGET="CC_FOR_BUILD=$HOST_CC \
|
||||
--enable-opencl-icd \
|
||||
--disable-gallium-tests \
|
||||
--enable-shared-glapi \
|
||||
--enable-driglx-direct \
|
||||
--enable-glx-tls \
|
||||
--enable-shader-cache \
|
||||
$MESA_GALLIUM_LLVM \
|
||||
--disable-silent-rules \
|
||||
--with-gl-lib-name=GL \
|
||||
@ -104,14 +114,18 @@ PKG_CONFIGURE_OPTS_TARGET="CC_FOR_BUILD=$HOST_CC \
|
||||
--with-sysroot=$SYSROOT_PREFIX"
|
||||
|
||||
pre_configure_target() {
|
||||
export LIBS="-lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence -lz"
|
||||
if [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
export LIBS="-lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence -lz"
|
||||
fi
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
# rename and relink for cooperate with nvidia drivers
|
||||
if [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
# rename and relink for cooperate with nvidia drivers
|
||||
rm -rf $INSTALL/usr/lib/libGL.so
|
||||
rm -rf $INSTALL/usr/lib/libGL.so.1
|
||||
ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so
|
||||
ln -sf /var/lib/libGL.so $INSTALL/usr/lib/libGL.so.1
|
||||
mv $INSTALL/usr/lib/libGL.so.1.2.0 $INSTALL/usr/lib/libGL_mesa.so.1
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user