mesa: Add Mesa 10.0.1 for x86

* Drop 10.0.0 as it didn't include the OpenGL
  kit headers and wasn't used yet
This commit is contained in:
Alexander von Gluck IV
2013-12-23 01:38:17 +00:00
parent c60ef3bce2
commit 7d325a720c
2 changed files with 374 additions and 8 deletions

View File

@@ -0,0 +1,152 @@
SUMMARY="Multi-platform GL implementation"
DESCRIPTION="Mesa is an open-source implementation of the OpenGL specification.
The OpenGL specification documents a system for rendering interactive 3D graphics.
Mesa fills the role of the Haiku OpenGL kit providing 3D rendering to Haiku applications.
"
HOMEPAGE="http://www.mesa3d.org/"
COPYRIGHT="1999-2013 Brian Paul All Rights Reserved."
LICENSE="MIT"
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/10.0.1/MesaLib-10.0.1.tar.bz2"
CHECKSUM_MD5="0a72ca5b36046a658bf6038326ff32ed"
REVISION="1"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mesa$secondaryArchSuffix = $portVersion compat >= 10.0
lib:libGL$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
PATCHES="mesa-10.0.1.patchset"
# We're locked to LLVM 3.2 as 3.3 is broken at the moment on Haiku.
# Mesa should build with any newer LLVM version however.
# As LLVM is only linked into the swpipe renderer (and not libGL)
# changing LLVM versions shouldn't introduce any abi issues.
BUILD_PREREQUIRES="
libxml2_python
llvm == 3.2
cmd:bison
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
cmd:sed
"
SOURCE_DIR="Mesa-$portVersion"
BUILD()
{
if [ -n "$secondaryArchSuffix" ]; then
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
fi
scons $jobArgs build=release
#scons $jobArgs build=debug
}
INSTALL()
{
mesaBuildDir=build/haiku-$effectiveTargetArchitecture
# libGL.so makes up the core of our OpenGL kit
mkdir -p $libDir
cp $(find $mesaBuildDir -name 'libGL.so') $libDir
# Our rendering add-ons
mkdir -p $addOnsDir/opengl
cp $(find $mesaBuildDir -name 'libswrast.so') \
"$addOnsDir/opengl/Software Rasterizer"
cp $(find $mesaBuildDir -name 'libswpipe.so') \
"$addOnsDir/opengl/Software Pipe"
# OpenGL Kit
mkdir -p $includeDir/os/opengl/GL
cp ./include/HaikuGL/OpenGLKit.h $includeDir/os/
cp ./include/HaikuGL/GLView.h $includeDir/os/opengl/
cp ./include/HaikuGL/GLRenderer.h $includeDir/os/opengl/
# Standard GL headers
cp ./include/GL/gl.h $includeDir/os/opengl/GL/
cp ./include/GL/gl_mangle.h $includeDir/os/opengl/GL/
cp ./include/GL/glext.h $includeDir/os/opengl/GL/
# Symlink GL in kit to system GL directory
cd $includeDir
ln -snf os/opengl/GL GL
# devel package
packageEntries devel \
$developDir
# swpipe renderer package
packageEntries swpipe \
"$addOnsDir/opengl/Software Pipe"
# swrast renderer package
packageEntries swrast \
"$addOnsDir/opengl/Software Rasterizer"
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
mesa${secondaryArchSuffix}_devel = $portVersion
devel:libGL$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
mesa$secondaryArchSuffix == $portVersion base
"
# ===== Mesa OpenGL Add-ons ==================================================
# ----- swrast package -------------------------------------------------------
SUMMARY_swrast="Mesa software rasterization renderer"
DESCRIPTION_swrast="This 3D BGLRenderer add-on provides Mesa software
rasterization on Haiku systems. Software rasterization performs all
3D rendering on the systems CPU and doesn't require any specialized
hardware. Software rasterization is generally considered a fallback
3D rendering method as performance is limited.
"
PROVIDES_swrast="
mesa${secondaryArchSuffix}_swrast = $portVersion
"
REQUIRED_swrast="
mesa$secondaryArchSuffix == $portVersion base
"
# ===== Gallium OpenGL Add-ons ===============================================
# ----- swpipe package -------------------------------------------------------
SUMMARY_swpipe="Mesa LLVM enhanced Gallium software pipe renderer"
DESCRIPTION_swpipe="This 3D BGLRenderer add-on provides Gallium LLVM
enhanced software rendering. Software pipe rendering performs all
3D rendering on the systems CPU and doesn't require any specialized
hardware. The usage of LLVM over traditional rasterization gives this
renderer a boost in performance.
Gallium software pipe rendering is in an extremely early state as of
this version of Mesa, and may not function as expected.
"
PROVIDES_swpipe="
mesa${secondaryArchSuffix}_swpipe = $portVersion
"
REQUIRED_swpipe="
mesa$secondaryArchSuffix == $portVersion base
"