M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
@@ -0,0 +1,20 @@
DEPENDS += "mesa-dri-glsl-native"
#file://uclibc.patch \
#file://mesa_fix_for_x32.patch \
SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
file://crossfix.patch \
file://crossfix-mklib.patch \
"
S = "${WORKDIR}/Mesa-${PV}"
SRC_URI[md5sum] = "d546f988adfdf986cff45b1efa2d8a46"
SRC_URI[sha256sum] = "02ed19f4f5f6535dda03a9932a81438aa78ea723ebba1f39a3d49a70a4e1d07e"
do_configure_prepend() {
#check for python not python2, because python-native does not stage python2 binary/link
sed -i 's/AC_CHECK_PROGS(\[PYTHON2\], \[python2 python\])/AC_CHECK_PROGS(\[PYTHON2\], \[python python\])/g' ${S}/configure.ac
# We need builtin_compiler built for buildhost arch instead of target (is provided by mesa-dri-glsl-native)"
sed -i "s#\./builtin_compiler#${STAGING_BINDIR_NATIVE}/glsl/builtin_compiler#g" ${S}/src/glsl/Makefile
}
@@ -0,0 +1,54 @@
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \
a system for rendering interactive 3D graphics. \
A variety of device drivers allows Mesa to be used in many different environments \
ranging from software emulation to complete hardware acceleration for modern GPUs. \
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
INC_PR = "r13"
PE = "2"
PROTO_DEPS = "xf86driproto glproto"
LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes libxml2-native"
DEPENDS = "makedepend-native python-native ${PROTO_DEPS} ${LIB_DEPS}"
PROVIDES = "virtual/libgl"
# for mesa-dri and mesa-xlib
FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
inherit autotools pkgconfig
EXTRA_OECONF = "--enable-glu \
--disable-glw \
--disable-glut \
--enable-glx-tls"
# Multiple virtual/gl providers being built breaks staging
EXCLUDE_FROM_WORLD = "1"
# ie mesa-dri could be empty and mesa-dri-dev RDEPENDS on it
ALLOW_EMPTY_${PN} = "1"
PACKAGES =+ "libegl libegl-dev libegl-dbg libglu libglu-dev libosmesa libosmesa-dev libgl libgl-dev"
FILES_libegl = "${libdir}/libEGL.so.* ${libdir}/egl/*.so"
FILES_libgl = "${libdir}/libGL.so.*"
FILES_libglu = "${libdir}/libGLU.so.*"
FILES_libosmesa = "${libdir}/libOSMesa.so.*"
FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL"
FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL"
FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h"
FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h"
FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
FILES_libegl-dbg += "${libdir}/egl/.debug/*"
@@ -0,0 +1,27 @@
DESCRIPTION = "gl shader language specific build from mesa-dri"
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://glsl_parser.cpp;beginline=3;endline=33;md5=d078f1cddc2fc355719c090482254bd9"
DEPENDS = "makedepend-native"
SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2"
SRC_URI[md5sum] = "d546f988adfdf986cff45b1efa2d8a46"
SRC_URI[sha256sum] = "02ed19f4f5f6535dda03a9932a81438aa78ea723ebba1f39a3d49a70a4e1d07e"
S = "${WORKDIR}/Mesa-${PV}/src/glsl/"
inherit native
# use default config for native build
do_configure_prepend() {
ln -s ${S}/../../configs/default ${S}/../../configs/current
}
do_install() {
install -d ${D}/${bindir}/glsl
install -m 755 ${S}/builtin_compiler ${D}/${bindir}/glsl/builtin_compiler
install -m 755 ${S}/glsl_compiler ${D}/${bindir}/glsl/glsl_compiler
}
@@ -0,0 +1,26 @@
PROTO_DEPS += "dri2proto"
LIB_DEPS += "libdrm expat"
# most of our targets do not have DRI so will use mesa-xlib
DEFAULT_PREFERENCE = "-1"
DRIDRIVERS = "swrast"
DRIDRIVERS_append_x86 = ",i915,i965"
DRIDRIVERS_append_x86-64 = ",i915,i965"
CXXFLAGS += "-I${STAGING_INCDIR}/c++"
CXXFLAGS += "-I${STAGING_INCDIR}/c++/${TARGET_SYS}"
EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium --without-gallium-drivers --with-dri-drivers=${DRIDRIVERS}"
python populate_packages_prepend() {
import os.path
dri_drivers_root = os.path.join(d.getVar('libdir', 1), "dri")
do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='')
}
PACKAGES_DYNAMIC = "mesa-dri-driver-*"
FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
@@ -0,0 +1,4 @@
include mesa-common.inc
include mesa-${PV}.inc
include mesa-dri.inc
PR = "${INC_PR}.1"
@@ -0,0 +1,9 @@
include mesa-common.inc
include mesa-git.inc
include mesa-dri.inc
# this needs to be lower than -1 because all mesa-dri have -1 and git version has highest PV, but shouldn't be default
DEFAULT_PREFERENCE = "-2"
PR = "${INC_PR}.0"
@@ -0,0 +1,21 @@
DEPENDS += "mesa-dri-glsl-native"
SRCREV = "983fa4ad523535debf2e94cf6ac1fd4c5630c0d2"
PV = "7.11+gitr${SRCPV}"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
FILESEXTRAPATHS_prepend := "${THISDIR}/mesa-git:"
#file://uclibc.patch \
SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \
file://crossfix.patch \
"
S = "${WORKDIR}/git"
do_configure_prepend() {
#check for python not python2, because python-native does not stage python2 binary/link
sed -i 's/AC_CHECK_PROGS(\[PYTHON2\], \[python2 python\])/AC_CHECK_PROGS(\[PYTHON2\], \[python python\])/g' ${S}/configure.ac
# We need builtin_compiler built for buildhost arch instead of target (is provided by mesa-dri-glsl-native)"
sed -i "s#\./builtin_compiler#${STAGING_BINDIR_NATIVE}/glsl/builtin_compiler#g" ${S}/src/glsl/Makefile
}
@@ -0,0 +1,5 @@
include mesa-common.inc
include mesa-${PV}.inc
include mesa-xlib.inc
PR = "${INC_PR}.2"
@@ -0,0 +1,71 @@
This patch is ported from WindRiver linux and to fix cross compile failure.
And original commits are:
commit 8d5ccc8113e1b51b0529a00c18a4aba956247e1b
commit 5c4212084b871a0c0fb7d174280ec9a634637deb
Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
--- Mesa-7.10.2/bin/mklib.orig 2011-09-28 16:15:34.170000074 +0800
+++ Mesa-7.10.2/bin/mklib 2011-09-28 16:15:42.370000073 +0800
@@ -49,8 +49,8 @@
/*) ;;
*) FILE="$ORIG_DIR/$FILE" ;;
esac
- MEMBERS=`ar t $FILE`
- ar x $FILE
+ MEMBERS=`${AR} t $FILE`
+ ${AR} x $FILE
for MEMBER in $MEMBERS ; do
NEWFILES="$NEWFILES $DIR/$MEMBER"
done
@@ -77,7 +77,7 @@
make_ar_static_lib() {
OPTS=$1
shift;
- RANLIB=$1
+ USE_RANLIB=$1
shift;
LIBNAME=$1
shift;
@@ -87,11 +87,11 @@
rm -f ${LIBNAME}
# make static lib
- ar ${OPTS} ${LIBNAME} ${OBJECTS}
+ ${AR} ${OPTS} ${LIBNAME} ${OBJECTS}
# run ranlib
- if [ ${RANLIB} = 1 ] ; then
- ranlib ${LIBNAME}
+ if [ ${USE_RANLIB} = 1 ] ; then
+ ${RANLIB} ${LIBNAME}
fi
echo ${LIBNAME}
@@ -313,9 +313,9 @@
if [ "x$LINK" = "x" ] ; then
# -linker was not specified so set default link command now
if [ $CPLUSPLUS = 1 ] ; then
- LINK=g++
+ LINK=$CXX
else
- LINK=gcc
+ LINK=$CC
fi
fi
@@ -531,9 +531,9 @@
if [ "x$LINK" = "x" ] ; then
# -linker was not specified so set default link command now
if [ $CPLUSPLUS = 1 ] ; then
- LINK=g++
+ LINK=${CXX}
else
- LINK=gcc
+ LINK=${CC}
fi
fi
@@ -0,0 +1,18 @@
Upstream-Status: Pending
Index: Mesa-7.5/bin/mklib
===================================================================
--- Mesa-7.5.orig/bin/mklib 2009-08-12 13:01:34.000000000 +0100
+++ Mesa-7.5/bin/mklib 2009-08-12 13:04:19.000000000 +0100
@@ -234,9 +234,9 @@
if [ "x$LINK" = "x" ] ; then
# -linker was not specified so set default link command now
if [ $CPLUSPLUS = 1 ] ; then
- LINK=g++
+ LINK=$CXX
else
- LINK=gcc
+ LINK=$CC
fi
fi