diff --git a/sys-libs/mesa/mesa-9.1.1.recipe b/sys-libs/mesa/mesa-9.1.1.recipe index 9e18d55ac..400a824d9 100644 --- a/sys-libs/mesa/mesa-9.1.1.recipe +++ b/sys-libs/mesa/mesa-9.1.1.recipe @@ -1,29 +1,103 @@ -############################################################### -# THIS IS NOT FOR GENERAL USE! -# This builds a buildpackage for the Haiku build system to link -# the OpenGL kit!! -############################################################### +# NOTE: This recipe doesn't generate packages for general use: +# * mesa_devel: Is a service package for the Haiku build system. It contains the +# Mesa libraries and headers, which are built into the Haiku system package. +# * mesa: Is an empty package which we keep as a dependency for the Haiku system +# package, mainly to keep the copyright info. -DESCRIPTION="Mesa3D is a multi-platform GL implementation" -HOMEPAGE="http://www.freedesktop.org/" +SUMMARY="Multi-platform GL implementation" +DESCRIPTION="Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. + +A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. + +Mesa ties into several other open-source projects: the Direct Rendering Infrastructure and X.org to provide OpenGL support to users of X on Linux, FreeBSD and other operating systems." +HOMEPAGE="http://www.mesa3d.org/" +COPYRIGHT="1999-2012 Brian Paul All Rights Reserved." +LICENSE="MIT" SRC_URI="ftp://freedesktop.org/pub/mesa/9.1.1/MesaLib-9.1.1.tar.bz2" -REVISION="1" -STATUS_HAIKU="unstable" -DEPEND="scons, llvm >= 3.2" CHECKSUM_MD5="6ea2bdc3b7ecfb4257b39814b4182580" -MESSAGE="This port only builds with gcc4. Not for general use." +REVISION="1" +ARCHITECTURES="x86" +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 + " +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 + " +# TODO: Add LLVM, so llvmpipe can be built! + +SOURCE_DIR="Mesa-$portVersion" + BUILD() { - export DEBUG=0 - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - echo "This generates a Mesa3D build package for Haiku... not for general use" - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - cd Mesa-9.1.1 - scons debug=$DEBUG - cd .. - sh $(haikuporter -t)/sys-libs/mesa/buildpackage.sh 9.1.1 ./Mesa-9.1.1 - echo "There should be a Mesa OptionalBuild package in your home if everything went well!" + if [ -n "$secondaryArchSuffix" ]; then + export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture" + fi + scons $jobArgs build=release } -LICENSE="MIT" -COPYRIGHT="1999-2012 Brian Paul All Rights Reserved." +INSTALL() +{ + mesaBuildDir=build/haiku-$effectiveTargetArchitecture + + mkdir -p $includeDir + cp -r include/* $includeDir + + mkdir -p $developLibDir + cp $(find $mesaBuildDir -name '*\.a') $developLibDir + strip --strip-debug $developLibDir/* + + mesaPrivateHeaders=$includeDir/mesa_private + for header in $(find src -name '*\.h' | sed "s,^src/,,"); do + mkdir -p $mesaPrivateHeaders/$(dirname $header) + cp src/$header $mesaPrivateHeaders/$header + done + + # devel package + packageEntries devel \ + $developDir +} + +# ----- devel package ------------------------------------------------------- + +PROVIDES_devel=" + mesa${secondaryArchSuffix}_devel = $portVersion + devel:libgalahad$secondaryArchSuffix = $portVersion + devel:libgallium$secondaryArchSuffix = $portVersion + devel:libglapi$secondaryArchSuffix = $portVersion + devel:libglsl$secondaryArchSuffix = $portVersion + devel:libi915$secondaryArchSuffix = $portVersion + devel:libi915sw$secondaryArchSuffix = $portVersion + devel:libidentity$secondaryArchSuffix = $portVersion + devel:libmesa$secondaryArchSuffix = $portVersion + devel:librbug$secondaryArchSuffix = $portVersion + devel:libsoftpipe$secondaryArchSuffix = $portVersion + devel:libst_vega$secondaryArchSuffix = $portVersion + devel:libsvga$secondaryArchSuffix = $portVersion + devel:libtrace$secondaryArchSuffix = $portVersion + devel:libws_null$secondaryArchSuffix = $portVersion + devel:libws_wrapper$secondaryArchSuffix = $portVersion + " + +REQUIRES_devel=" + mesa$secondaryArchSuffix == $portVersion base + "