Mesa: update to Mesa-9.1.2

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-05-01 16:47:04 +02:00
parent f881aba96a
commit de254b2005
8 changed files with 130 additions and 128 deletions

View File

@ -24,9 +24,19 @@
get_graphicdrivers
export CC_FOR_BUILD="$HOST_CC"
export CXX_FOR_BUILD="$HOST_CXX"
export CFLAGS_FOR_BUILD=""
export CXXFLAGS_FOR_BUILD=""
export LDFLAGS_FOR_BUILD=""
export X11_INCLUDES=""
export DRI_DRIVER_INSTALL_DIR="$XORG_PATH_DRI"
export DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI"
if [ "$LLVM_SUPPORT" = "yes" ]; then
export LLVM_CONFIG="$SYSROOT_PREFIX/usr/bin/llvm-config"
MESA_GALLIUM_LLVM="--enable-gallium-llvm"
MESA_GALLIUM_LLVM="--enable-gallium-llvm --with-llvm-shared-libs"
else
MESA_GALLIUM_LLVM="--disable-gallium-llvm"
fi
@ -37,26 +47,13 @@ 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" \
XA_CONFIG="--disable-xa"
for drv in $GRAPHIC_DRIVERS; do
[ "$drv" = "vmware" ] && \
XA_CONFIG="--enable-xa"
[ "$drv" = "vmware" ] && XA_CONFIG="--enable-xa"
done
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
@ -66,6 +63,7 @@ done
--enable-shared \
--disable-debug \
--enable-texture-float \
--enable-asm \
--disable-selinux \
--enable-opengl \
--enable-glx-tls \
@ -73,38 +71,30 @@ done
--disable-gles1 \
--disable-gles2 \
--disable-openvg \
--disable-xorg \
--disable-glu \
--enable-dri \
--enable-glx \
--disable-osmesa \
--disable-d3d1x \
--disable-egl \
--disable-xorg \
$XA_CONFIG \
--disable-gbm \
--disable-xvmc \
$MESA_VDPAU \
$MESA_VAAPI \
--disable-opencl \
--disable-xlib-glx \
--disable-gallium-egl \
--disable-gallium-gbm \
--disable-r600-llvm-compiler \
--disable-gallium-tests \
--enable-shared-glapi \
--enable-xcb \
$XA_CONFIG \
--enable-shared-dricore \
--disable-egl \
--disable-glx-tls \
--disable-gallium-g3dvl \
$MESA_GALLIUM_LLVM \
--disable-silent-rules \
--with-gl-lib-name=GL \
--with-osmesa-lib-name=OSMesa \
--with-gallium-drivers="$GALLIUM_DRIVERS" \
--with-dri-drivers="$DRI_DRIVERS" \
--with-x \
make CC="$HOST_CC" \
CXX="$HOST_CXX" \
CFLAGS="$HOST_CFLAGS" \
CXXFLAGS="$HOST_CXXFLAGS" \
LDFLAGS="$HOST_LDFLAGS" \
-C src/glsl builtin_compiler
cp src/glsl/builtin_compiler $ROOT/$TOOLCHAIN/bin
make -C src/glsl clean
sed -e "s#\.\/builtin_compiler#$ROOT/$TOOLCHAIN/bin/builtin_compiler#g" -i src/glsl/Makefile
make

View File

@ -23,17 +23,16 @@
. 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
cp -P $PKG_BUILD/lib/libGL.so.1 $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/libdricore*.so* $INSTALL/usr/lib || true
cp -P $PKG_BUILD/lib/libglapi.so* $INSTALL/usr/lib
if [ -f $PKG_BUILD/lib/gallium/libxatracker.so ] ; then
cp -P $PKG_BUILD/lib/gallium/libxatracker.so* $INSTALL/usr/lib || true
fi
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

View File

@ -19,7 +19,7 @@
################################################################################
PKG_NAME="Mesa"
PKG_VERSION="8.0.5"
PKG_VERSION="9.1.2"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"

View File

@ -1,50 +0,0 @@
diff --git a/bin/mklib b/bin/mklib
index 9bac29e..70982d6 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -49,8 +49,8 @@ expand_archives() {
/*) ;;
*) 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 @@ expand_archives() {
make_ar_static_lib() {
OPTS=$1
shift;
- RANLIB=$1
+ _RANLIB=$1
shift;
LIBNAME=$1
shift;
@@ -87,11 +87,11 @@ make_ar_static_lib() {
rm -f ${LIBNAME}
# make static lib
- ar ${OPTS} ${LIBNAME} ${OBJECTS}
+ $AR ${OPTS} ${LIBNAME} ${OBJECTS}
# run ranlib
- if [ ${RANLIB} = 1 ] ; then
- ranlib ${LIBNAME}
+ if [ ${_RANLIB} = 1 ] ; then
+ $RANLIB ${LIBNAME}
fi
echo ${LIBNAME}
@@ -313,9 +313,9 @@ case $ARCH in
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

View File

@ -1,24 +0,0 @@
diff -Naur Mesa-8.0.4-old/src/mesa/drivers/dri/intel/intel_screen.c Mesa-8.0.4-new/src/mesa/drivers/dri/intel/intel_screen.c
--- Mesa-8.0.4-old/src/mesa/drivers/dri/intel/intel_screen.c 2012-03-22 10:10:16.000000000 -0700
+++ Mesa-8.0.4-new/src/mesa/drivers/dri/intel/intel_screen.c 2012-07-16 12:27:37.000000000 -0700
@@ -118,13 +118,15 @@
if (intel == NULL)
return;
- if (intel->gen < 4)
- INTEL_FIREVERTICES(intel);
+ if (intel != NULL) {
+ if (intel->gen < 4)
+ INTEL_FIREVERTICES(intel);
- intel->need_throttle = true;
+ intel->need_throttle = true;
- if (intel->batch.used)
- intel_batchbuffer_flush(intel);
+ if (intel->batch.used)
+ intel_batchbuffer_flush(intel);
+ }
}
static const struct __DRI2flushExtensionRec intelFlushExtension = {

View File

@ -1,12 +0,0 @@
diff -Naur mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8/configure.ac mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8.patch/configure.ac
--- mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8/configure.ac 2012-01-08 05:01:59.000000000 +0100
+++ mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8.patch/configure.ac 2012-01-08 15:21:49.167895590 +0100
@@ -1771,7 +1771,7 @@
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'`
- LLVM_LIBS="`$LLVM_CONFIG --libs`"
+ LLVM_LIBS="-lLLVM-$LLVM_VERSION"
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"

View File

@ -0,0 +1,39 @@
diff -Naur Mesa-9.1.1/configure.ac Mesa-9.1.1.patch/configure.ac
--- Mesa-9.1.1/configure.ac 2013-03-20 01:14:17.000000000 +0100
+++ Mesa-9.1.1.patch/configure.ac 2013-05-01 02:51:48.086299947 +0200
@@ -1923,7 +1923,9 @@
if test "x$with_llvm_shared_libs" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
- AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
+ if test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"; then
+ llvm_have_one_so=yes
+ fi
if test "x$llvm_have_one_so" = xyes; then
dnl LLVM was built using auto*, so there is only one shared object.
@@ -1931,8 +1933,8 @@
else
dnl If LLVM was built with CMake, there will be one shared object per
dnl component.
- AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
- AC_MSG_ERROR([Could not find llvm shared libraries:
+ if test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"; then
+ AC_MSG_ERROR([Could not find llvm shared libraries:
Please make sure you have built llvm with the --enable-shared option
and that your llvm libraries are installed in $LLVM_LIBDIR
If you have installed your llvm libraries to a different directory you
@@ -1943,11 +1945,12 @@
--enable-opencl
If you do not want to build with llvm shared libraries and instead want to
use llvm static libraries then remove these options from your configure
- invocation and reconfigure.]))
+ invocation and reconfigure.])
dnl We don't need to update LLVM_LIBS in this case because the LLVM
dnl install uses a shared object for each compoenent and we have
dnl already added all of these objects to LLVM_LIBS.
+ fi
fi
fi
fi

View File

@ -0,0 +1,60 @@
diff -up Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am.cross Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am
--- Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am.cross 2013-03-28 14:56:22.990746189 +0100
+++ Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am 2013-03-28 14:56:32.483577384 +0100
@@ -64,13 +64,13 @@ AM_CXXFLAGS = $(AM_CFLAGS)
include ../Makefile.sources
noinst_PROGRAMS = builtin_compiler
-noinst_LTLIBRARIES = libglslcore.la libglcpp.la
+noinst_LIBRARIES = libglslcore.a libglcpp.a
-libglcpp_la_SOURCES = \
+libglcpp_a_SOURCES = \
$(LIBGLCPP_GENERATED_FILES) \
$(LIBGLCPP_FILES)
-libglslcore_la_SOURCES = \
+libglslcore_a_SOURCES = \
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
$(LIBGLSL_FILES)
@@ -81,4 +81,4 @@ builtin_compiler_SOURCES = \
$(top_srcdir)/src/mesa/program/symbol_table.c \
$(BUILTIN_COMPILER_CXX_FILES) \
$(GLSL_COMPILER_CXX_FILES)
-builtin_compiler_LDADD = libglslcore.la libglcpp.la
+builtin_compiler_LDADD = libglslcore.a libglcpp.a
diff -up Mesa-9.1.1/src/glsl/Makefile.am.cross Mesa-9.1.1/src/glsl/Makefile.am
--- Mesa-9.1.1/src/glsl/Makefile.am.cross 2013-03-28 14:56:26.565682626 +0100
+++ Mesa-9.1.1/src/glsl/Makefile.am 2013-03-28 14:59:13.109723407 +0100
@@ -73,14 +73,10 @@ tests_ralloc_test_LDADD = \
$(top_builddir)/src/gtest/libgtest.la \
$(PTHREAD_LIBS)
-if CROSS_COMPILING
libglcpp_la_SOURCES = \
glcpp/glcpp-lex.c \
glcpp/glcpp-parse.c \
$(LIBGLCPP_FILES)
-else
-libglcpp_la_LIBADD = builtin_compiler/libglcpp.la
-endif
glcpp_glcpp_SOURCES = \
glcpp/glcpp.c \
@@ -89,15 +85,10 @@ glcpp_glcpp_LDADD = libglcpp.la
libglsl_la_SOURCES = builtin_function.cpp
libglsl_la_LIBADD = libglcpp.la
-if CROSS_COMPILING
libglsl_la_SOURCES += \
glsl_lexer.cpp \
glsl_parser.cpp \
$(LIBGLSL_FILES)
-else
-libglsl_la_LIBADD += \
- builtin_compiler/libglslcore.la
-endif
glsl_test_SOURCES = \
$(top_srcdir)/src/mesa/main/hash_table.c \