mesa: add recipes for version 11.2.2, 12.0.4, 13.0.1.

* all tested on x86_64, llvm 3.8.1, GLTeapot.
This commit is contained in:
Jérôme Duval
2016-11-19 16:17:08 +01:00
parent f2d4c9606a
commit 9de7ef80f2
6 changed files with 548 additions and 0 deletions

View File

@@ -0,0 +1,137 @@
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"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="ftp://ftp.freedesktop.org/pub/mesa/${portVersion}/mesa-${portVersion}.tar.xz"
CHECKSUM_SHA256="40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4"
PATCHES="mesa-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64 ?arm ?ppc"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mesa$secondaryArchSuffix = $portVersion compat >= 10.0
lib:libGL$secondaryArchSuffix
lib:libEGL$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
mesa${secondaryArchSuffix}_devel = $portVersion
devel:libGL$secondaryArchSuffix = $portVersion
devel:libEGL$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
mesa$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
llvm${secondaryArchSuffix}
python_mako
cmd:bison
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
cmd:sed
"
BUILD()
{
if [ -n "$secondaryArchSuffix" ]; then
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
fi
scons $jobArgs build=release
#scons $jobArgs build=debug
}
INSTALL()
{
mesaBuildDir=build/haiku-$effectiveTargetArchitecture
mkdir -p $libDir
mkdir -p $developLibDir
# libGL.so makes up the core of our OpenGL kit
cp $(find $mesaBuildDir -name 'libGL.so') $libDir
symlinkRelative -s $libDir/libGL.so $developLibDir
# OpenGL ES
cp $(find $mesaBuildDir -name 'libEGL.so.1') $libDir
symlinkRelative -s $libDir/libEGL.so.1 $developLibDir/libEGL.so
# Our rendering add-ons
mkdir -p $addOnsDir/opengl
cp $(find $mesaBuildDir -name 'libswpipe.so') \
"$addOnsDir/opengl/Software Pipe"
# Set some nice version info
appVersion=${portVersion//\./ }
setversion "$libDir/libGL.so" -app $appVersion -long "Haiku OpenGL kit"
setversion "$libDir/libEGL.so.1" -app $appVersion -long "Mesa EGL"
setversion "$addOnsDir/opengl/Software Pipe" -app $appVersion -long "Gallium LLVM software pipe renderer"
# OpenGL Kit
mkdir -p $includeDir/os/opengl
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
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/
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/GL $includeDir/os/opengl/GL
# Standard EGL headers
mkdir -p $includeDir/EGL
cp ./include/EGL/* $includeDir/EGL
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/EGL $includeDir/os/opengl/EGL
# devel package
packageEntries devel \
$developDir
# swpipe renderer package
packageEntries swpipe \
"$addOnsDir/opengl/Software Pipe"
}
# ===== Gallium OpenGL Add-ons ===============================================
# ----- swpipe package -------------------------------------------------------
SUMMARY_swpipe="The 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
"

View File

@@ -0,0 +1,137 @@
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"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="ftp://ftp.freedesktop.org/pub/mesa/${portVersion}/mesa-${portVersion}.tar.xz"
CHECKSUM_SHA256="5d6003da867d3f54e5000b4acdfc37e6cce5b6a4459274fdad73e24bd2f0065e"
PATCHES="mesa-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64 ?arm ?ppc"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mesa$secondaryArchSuffix = $portVersion compat >= 10.0
lib:libGL$secondaryArchSuffix
lib:libEGL$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
mesa${secondaryArchSuffix}_devel = $portVersion
devel:libGL$secondaryArchSuffix = $portVersion
devel:libEGL$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
mesa$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
llvm${secondaryArchSuffix}
python_mako
cmd:bison
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
cmd:sed
"
BUILD()
{
if [ -n "$secondaryArchSuffix" ]; then
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
fi
scons $jobArgs build=release
#scons $jobArgs build=debug
}
INSTALL()
{
mesaBuildDir=build/haiku-$effectiveTargetArchitecture
mkdir -p $libDir
mkdir -p $developLibDir
# libGL.so makes up the core of our OpenGL kit
cp $(find $mesaBuildDir -name 'libGL.so') $libDir
symlinkRelative -s $libDir/libGL.so $developLibDir
# OpenGL ES
cp $(find $mesaBuildDir -name 'libEGL.so.1') $libDir
symlinkRelative -s $libDir/libEGL.so.1 $developLibDir/libEGL.so
# Our rendering add-ons
mkdir -p $addOnsDir/opengl
cp $(find $mesaBuildDir -name 'libswpipe.so') \
"$addOnsDir/opengl/Software Pipe"
# Set some nice version info
appVersion=${portVersion//\./ }
setversion "$libDir/libGL.so" -app $appVersion -long "Haiku OpenGL kit"
setversion "$libDir/libEGL.so.1" -app $appVersion -long "Mesa EGL"
setversion "$addOnsDir/opengl/Software Pipe" -app $appVersion -long "Gallium LLVM software pipe renderer"
# OpenGL Kit
mkdir -p $includeDir/os/opengl
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
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/
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/GL $includeDir/os/opengl/GL
# Standard EGL headers
mkdir -p $includeDir/EGL
cp ./include/EGL/* $includeDir/EGL
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/EGL $includeDir/os/opengl/EGL
# devel package
packageEntries devel \
$developDir
# swpipe renderer package
packageEntries swpipe \
"$addOnsDir/opengl/Software Pipe"
}
# ===== Gallium OpenGL Add-ons ===============================================
# ----- swpipe package -------------------------------------------------------
SUMMARY_swpipe="The 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
"

View File

@@ -0,0 +1,137 @@
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"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="ftp://ftp.freedesktop.org/pub/mesa/${portVersion}/mesa-${portVersion}.tar.xz"
CHECKSUM_SHA256="71962fb2bf77d33b0ad4a565b490dbbeaf4619099c6d9722f04a73187957a731"
PATCHES="mesa-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64 ?arm ?ppc"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mesa$secondaryArchSuffix = $portVersion compat >= 10.0
lib:libGL$secondaryArchSuffix
lib:libEGL$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
mesa${secondaryArchSuffix}_devel = $portVersion
devel:libGL$secondaryArchSuffix = $portVersion
devel:libEGL$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
mesa$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
llvm${secondaryArchSuffix}
python_mako
cmd:bison
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
cmd:sed
"
BUILD()
{
if [ -n "$secondaryArchSuffix" ]; then
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
fi
scons $jobArgs build=release
#scons $jobArgs build=debug
}
INSTALL()
{
mesaBuildDir=build/haiku-$effectiveTargetArchitecture
mkdir -p $libDir
mkdir -p $developLibDir
# libGL.so makes up the core of our OpenGL kit
cp $(find $mesaBuildDir -name 'libGL.so') $libDir
symlinkRelative -s $libDir/libGL.so $developLibDir
# OpenGL ES
cp $(find $mesaBuildDir -name 'libEGL.so.1') $libDir
symlinkRelative -s $libDir/libEGL.so.1 $developLibDir/libEGL.so
# Our rendering add-ons
mkdir -p $addOnsDir/opengl
cp $(find $mesaBuildDir -name 'libswpipe.so') \
"$addOnsDir/opengl/Software Pipe"
# Set some nice version info
appVersion=${portVersion//\./ }
setversion "$libDir/libGL.so" -app $appVersion -long "Haiku OpenGL kit"
setversion "$libDir/libEGL.so.1" -app $appVersion -long "Mesa EGL"
setversion "$addOnsDir/opengl/Software Pipe" -app $appVersion -long "Gallium LLVM software pipe renderer"
# OpenGL Kit
mkdir -p $includeDir/os/opengl
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
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/
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/GL $includeDir/os/opengl/GL
# Standard EGL headers
mkdir -p $includeDir/EGL
cp ./include/EGL/* $includeDir/EGL
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/EGL $includeDir/os/opengl/EGL
# devel package
packageEntries devel \
$developDir
# swpipe renderer package
packageEntries swpipe \
"$addOnsDir/opengl/Software Pipe"
}
# ===== Gallium OpenGL Add-ons ===============================================
# ----- swpipe package -------------------------------------------------------
SUMMARY_swpipe="The 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
"

View File

@@ -0,0 +1,41 @@
From 322b34877fbeefdb0d25c04c6c43ab1d335fe666 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 19 Nov 2016 10:30:12 +0000
Subject: Haiku patch
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 30ef37c..28d7a0d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -110,7 +110,7 @@ static LLVMEnsureMultithreaded lLVMEnsureMultithreaded;
}
-static once_flag init_native_targets_once_flag;
+static once_flag init_native_targets_once_flag = ONCE_FLAG_INIT;
static void init_native_targets()
{
diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
index 89dd547..be73b29 100644
--- a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
+++ b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
@@ -105,8 +105,12 @@ hgl_winsys_convert_cs(enum pipe_format format)
static struct sw_displaytarget*
hgl_winsys_displaytarget_create(struct sw_winsys* winsys,
- unsigned textureUsage, enum pipe_format format, unsigned width,
- unsigned height, unsigned alignment, unsigned* stride)
+ unsigned tex_usage,
+ enum pipe_format format,
+ unsigned width, unsigned height,
+ unsigned alignment,
+ const void *front_private,
+ unsigned *stride)
{
struct haiku_displaytarget* haikuDisplayTarget
= CALLOC_STRUCT(haiku_displaytarget);
--
2.2.2

View File

@@ -0,0 +1,48 @@
From 60ca041bf3060a3c342f0b11498f9e0f615339ee Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 19 Nov 2016 10:30:12 +0000
Subject: Haiku patch
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 7da7f53..236be36 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -38,14 +38,13 @@
#ifndef U_DEBUG_H_
#define U_DEBUG_H_
+#include "os/os_misc.h"
#if defined(PIPE_OS_HAIKU)
/* Haiku provides debug_printf in libroot with OS.h */
#include <OS.h>
#endif
-#include "os/os_misc.h"
-
#include "pipe/p_format.h"
#include "pipe/p_defines.h"
diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
index 89dd547..be73b29 100644
--- a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
+++ b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
@@ -105,8 +105,12 @@ hgl_winsys_convert_cs(enum pipe_format format)
static struct sw_displaytarget*
hgl_winsys_displaytarget_create(struct sw_winsys* winsys,
- unsigned textureUsage, enum pipe_format format, unsigned width,
- unsigned height, unsigned alignment, unsigned* stride)
+ unsigned tex_usage,
+ enum pipe_format format,
+ unsigned width, unsigned height,
+ unsigned alignment,
+ const void *front_private,
+ unsigned *stride)
{
struct haiku_displaytarget* haikuDisplayTarget
= CALLOC_STRUCT(haiku_displaytarget);
--
2.2.2

View File

@@ -0,0 +1,48 @@
From 60ca041bf3060a3c342f0b11498f9e0f615339ee Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 19 Nov 2016 10:30:12 +0000
Subject: Haiku patch
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 7da7f53..236be36 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -38,14 +38,13 @@
#ifndef U_DEBUG_H_
#define U_DEBUG_H_
+#include "os/os_misc.h"
#if defined(PIPE_OS_HAIKU)
/* Haiku provides debug_printf in libroot with OS.h */
#include <OS.h>
#endif
-#include "os/os_misc.h"
-
#include "pipe/p_format.h"
#include "pipe/p_defines.h"
diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
index 89dd547..be73b29 100644
--- a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
+++ b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
@@ -105,8 +105,12 @@ hgl_winsys_convert_cs(enum pipe_format format)
static struct sw_displaytarget*
hgl_winsys_displaytarget_create(struct sw_winsys* winsys,
- unsigned textureUsage, enum pipe_format format, unsigned width,
- unsigned height, unsigned alignment, unsigned* stride)
+ unsigned tex_usage,
+ enum pipe_format format,
+ unsigned width, unsigned height,
+ unsigned alignment,
+ const void *front_private,
+ unsigned *stride)
{
struct haiku_displaytarget* haikuDisplayTarget
= CALLOC_STRUCT(haiku_displaytarget);
--
2.2.2