mesa: Add new Mesa-9.3 package

* For now, we're using git as 9.3 is unreleased.
* Long term, 9.3 should contain the code containing
  the Haiku OpenGL kit.
* For now, it's pointed at my personal repo. This
  will be adjusted once the basics are in upstream
  Mesa.
This commit is contained in:
Alexander von Gluck IV
2013-10-02 23:02:57 +00:00
parent c1ed31ee9c
commit 60b97d2276

View File

@@ -0,0 +1,83 @@
SUMMARY="Multi-platform GL implementation"
DESCRIPTION="Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.
Mesa fills the role of the Haiku OpenGL kit.
"
HOMEPAGE="http://www.mesa3d.org/"
COPYRIGHT="1999-2013 Brian Paul All Rights Reserved."
LICENSE="MIT"
# We use kallisti5's personal github repo for now,
# this will become the official mesa repo in time
SRC_URI="git://github.com/kallisti5/mesa.git"
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 >= 9.3
lib:libGL$secondaryArchSuffix = $portVersion compat >= 9.3
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
libxml2_python
cmd:bison
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
cmd:sed
"
#cmd:llvm-config
SOURCE_DIR="Mesa-$portVersion"
BUILD()
{
if [ -n "$secondaryArchSuffix" ]; then
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
fi
scons $jobArgs build=release
}
INSTALL()
{
mesaBuildDir=build/haiku-$effectiveTargetArchitecture
mkdir -p $includeDir/GL
cp include/GL/gl.h $includeDir/GL/
cp include/GL/gl_mangle.h $includeDir/GL/
cp include/GL/glext.h $includeDir/GL/
# libGL.so makes up the core of our OpenGL kit
mkdir -p $libDir
cp $(find $mesaBuildDir -name 'libGL.so') $libDir
# devel package
packageEntries devel \
$developDir
# swpipe renderer package
#packageEntries swpipe \
# $addOnsDir
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
mesa${secondaryArchSuffix}_devel = $portVersion
"
REQUIRES_devel="
mesa$secondaryArchSuffix == $portVersion base
"