new package: add package 'mesa', this is the actual 7.12 master branch of Mesa

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-11-01 22:09:08 +01:00
parent 469bed96e1
commit c4f9a12446
5 changed files with 228 additions and 0 deletions

View File

@ -32,6 +32,14 @@ get_graphicdrivers() {
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,nouveau" GALLIUM_DRIVERS="$GALLIUM_DRIVERS,nouveau"
XORG_DRIVERS="$XORG_DRIVERS nouveau" XORG_DRIVERS="$XORG_DRIVERS nouveau"
# LLVM_SUPPORT="yes" # LLVM_SUPPORT="yes"
if [ "$VDPAU" = yes ]; then
MESA_VDPAU_SUPPORT=yes
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast"
fi
# if [ "$VAAPI" = yes ]; then
# MESA_VAAPI_SUPPORT=yes
# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast"
# fi
fi fi
if [ "$drv" = "nvidia" ]; then if [ "$drv" = "nvidia" ]; then
@ -61,6 +69,14 @@ get_graphicdrivers() {
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r300" GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r300"
XORG_DRIVERS="$XORG_DRIVERS ati" XORG_DRIVERS="$XORG_DRIVERS ati"
LLVM_SUPPORT="yes" LLVM_SUPPORT="yes"
if [ "$VDPAU" = yes ]; then
MESA_VDPAU_SUPPORT=yes
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast"
fi
# if [ "$VAAPI" = yes ]; then
# MESA_VAAPI_SUPPORT=yes
# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast"
# fi
fi fi
if [ "$drv" = "r600" ]; then if [ "$drv" = "r600" ]; then
@ -68,6 +84,14 @@ get_graphicdrivers() {
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r600" GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r600"
XORG_DRIVERS="$XORG_DRIVERS ati" XORG_DRIVERS="$XORG_DRIVERS ati"
LLVM_SUPPORT="yes" LLVM_SUPPORT="yes"
if [ "$VDPAU" = yes ]; then
MESA_VDPAU_SUPPORT=yes
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast"
fi
# if [ "$VAAPI" = yes ]; then
# MESA_VAAPI_SUPPORT=yes
# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,swrast"
# fi
fi fi
if [ "$drv" = "vmware" ]; then if [ "$drv" = "vmware" ]; then

97
packages/graphics/mesa/build Executable file
View File

@ -0,0 +1,97 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
get_graphicdrivers
# dont use gold linker because of compiling issues
strip_gold
# Mesa fails to build with LTO optimization
strip_lto
if [ "$LLVM_SUPPORT" = "yes" ]; then
export LLVM_CONFIG="$SYSROOT_PREFIX/usr/bin/llvm-config"
MESA_GALLIUM_LLVM="--enable-gallium-llvm"
else
MESA_GALLIUM_LLVM="--disable-gallium-llvm"
fi
if [ "$MESA_VDPAU_SUPPORT" = "yes" ]; then
MESA_VDPAU="--enable-vdpau"
else
MESA_VDPAU="--disable-vdpau"
fi
if [ "$MESA_VAAPI_SUPPORT" = "yes" ]; then
MESA_VAAPI="--enable-va"
else
MESA_VAAPI="--disable-va"
fi
cd $PKG_BUILD
HOST_CC="$HOST_CC" \
HOST_OPT_FLAGS="$HOST_CFLAGS" \
X11_INCLUDES= \
DRI_DRIVER_INSTALL_DIR="$XORG_PATH_DRI" \
DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI" \
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--enable-shared \
--disable-debug \
--enable-texture-float \
--disable-selinux \
--enable-opengl \
--enable-glx-tls \
--enable-driglx-direct \
--disable-gles1 \
--disable-gles2 \
--disable-openvg \
--disable-xorg \
--enable-glu \
--disable-osmesa \
--disable-d3d1x \
--disable-egl \
--disable-gbm \
--disable-xvmc \
$MESA_VDPAU \
$MESA_VAAPI \
--disable-gallium-egl \
--disable-gallium-gbm \
--enable-shared-glapi \
--enable-xcb \
--enable-shared-dricore \
--disable-egl \
$MESA_GALLIUM_LLVM \
--with-gallium-drivers="$GALLIUM_DRIVERS" \
--with-dri-drivers="$DRI_DRIVERS" \
--with-x \
make
$MAKEINSTALL

42
packages/graphics/mesa/install Executable file
View File

@ -0,0 +1,42 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/lib/libGL.so.1.2 $INSTALL/usr/lib/libGL_mesa.so.1 # rename for cooperate with nvidia drivers
ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so
ln -sf /var/lib/libGL.so $INSTALL/usr/lib/libGL.so.1
cp -P $PKG_BUILD/lib/libGLU.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/lib/libglapi.so* $INSTALL/usr/lib
mkdir -p $INSTALL/usr/lib/dri
cp -P $PKG_BUILD/lib/libdricore.so $INSTALL/usr/lib/dri
cp -P $PKG_BUILD/lib/libglsl.so $INSTALL/usr/lib/dri
cp -P $PKG_BUILD/lib/*_dri.so $INSTALL/usr/lib/dri || true
cp -P $PKG_BUILD/lib/gallium/*_dri.so $INSTALL/usr/lib/dri || true
mkdir -p $INSTALL/usr/lib/vdpau
cp -P $PKG_BUILD/lib/gallium/libvdpau_*.so* $INSTALL/usr/lib/vdpau
mkdir -p $INSTALL/usr/lib/xorg/modules/drivers
cp -P $PKG_BUILD/lib/gallium/*_drv.so $INSTALL/usr/lib/xorg/modules/drivers || true

View File

@ -0,0 +1,53 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="mesa"
PKG_VERSION="a1b737d72f1fec1d967255f4f87b5208a857c87f"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"
PKG_SITE="http://www.mesa3d.org/"
PKG_URL="http://cgit.freedesktop.org/mesa/mesa/snapshot/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libXxf86vm libxcb libX11"
PKG_BUILD_DEPENDS="toolchain Python makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11"
PKG_PRIORITY="optional"
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."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
get_graphicdrivers
if [ "$LLVM_SUPPORT" = "yes" ]; then
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS llvm"
PKG_DEPENDS="$PKG_DEPENDS llvm"
fi
if [ "$MESA_VDPAU_SUPPORT" = "yes" ]; then
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libvdpau"
PKG_DEPENDS="$PKG_DEPENDS libvdpau"
fi
if [ "$MESA_VAAPI_SUPPORT" = "yes" ]; then
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libva"
PKG_DEPENDS="$PKG_DEPENDS libva"
fi

View File

@ -0,0 +1,12 @@
diff -Naur mesa-a1b737d72f1fec1d967255f4f87b5208a857c87f/configure.ac mesa-a1b737d72f1fec1d967255f4f87b5208a857c87f.patch/configure.ac
--- mesa-a1b737d72f1fec1d967255f4f87b5208a857c87f/configure.ac 2011-11-01 13:28:47.000000000 +0100
+++ mesa-a1b737d72f1fec1d967255f4f87b5208a857c87f.patch/configure.ac 2011-11-01 15:56:10.046619433 +0100
@@ -1738,7 +1738,7 @@
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version`
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed 's/-DNDEBUG\>//g'`
- LLVM_LIBS="`$LLVM_CONFIG --libs`"
+ LLVM_LIBS="-lLLVM-$LLVM_VERSION"
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"