From 60b97d2276122b384336c5480127cb4147dc27cc Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 2 Oct 2013 23:02:57 +0000 Subject: [PATCH] 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. --- sys-libs/mesa/mesa-9.3.recipe | 83 +++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sys-libs/mesa/mesa-9.3.recipe diff --git a/sys-libs/mesa/mesa-9.3.recipe b/sys-libs/mesa/mesa-9.3.recipe new file mode 100644 index 000000000..8778be96a --- /dev/null +++ b/sys-libs/mesa/mesa-9.3.recipe @@ -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 + "