mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
mesa: Add rewritten Mesa 7.9.2 recipe for gcc2
This commit is contained in:
@@ -9,17 +9,17 @@ HOMEPAGE="http://www.mesa3d.org/"
|
||||
COPYRIGHT="1999-2013 Brian Paul All Rights Reserved."
|
||||
LICENSE="MIT"
|
||||
# remember to update SOURCE_DIR as well for the -X revision
|
||||
SRC_URI="https://github.com/kallisti5/mesa/archive/7.9.2-5.tar.gz"
|
||||
SRC_FILENAME="mesa-7.9.2-5.tar.gz"
|
||||
CHECKSUM_MD5="7e9aafbfffa04e14a57d450836d86bf1"
|
||||
REVISION="6"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
SRC_URI="https://github.com/haiku/mesa_legacy/archive/7.9.2-7.tar.gz"
|
||||
SRC_FILENAME="mesa_legacy-7.9.2-7.tar.gz"
|
||||
CHECKSUM_SHA256="6b555dcd0757fe3312325c0ac0827028a7fd0877c6140f5c30ee59be40b4b84e"
|
||||
REVISION="7"
|
||||
ARCHITECTURES="?x86_gcc2"
|
||||
if [ $effectiveTargetArchitecture != x86 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
mesa$secondaryArchSuffix = $portVersion compat >= 7.9
|
||||
@@ -45,9 +45,7 @@ BUILD_PREREQUIRES="
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
PATCHES="mesa-7.9.2.patchset"
|
||||
|
||||
SOURCE_DIR="mesa-7.9.2-5"
|
||||
SOURCE_DIR="mesa_legacy-7.9.2-7"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
@@ -73,9 +71,9 @@ INSTALL()
|
||||
|
||||
# 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/
|
||||
cp ./include/HGL/OpenGLKit.h $includeDir/os/
|
||||
cp ./include/HGL/GLView.h $includeDir/os/opengl/
|
||||
cp ./include/HGL/GLRenderer.h $includeDir/os/opengl/
|
||||
|
||||
# Standard GL headers
|
||||
mkdir -p $includeDir/GL
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
From 1c3d699120d0acdda3ad0d8a91d113c5d051b56d Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Tue, 21 Jan 2014 18:40:22 +0000
|
||||
Subject: hgl: atomic stores no longer need to be volatile
|
||||
|
||||
* Our atomics were revamped to no longer require
|
||||
volatile int pointers
|
||||
|
||||
diff --git a/include/HaikuGL/GLRenderer.h b/include/HaikuGL/GLRenderer.h
|
||||
index 7ffcc34..02a438d 100644
|
||||
--- a/include/HaikuGL/GLRenderer.h
|
||||
+++ b/include/HaikuGL/GLRenderer.h
|
||||
@@ -61,7 +61,7 @@ private:
|
||||
virtual status_t _Reserved_Renderer_3(int32, void *);
|
||||
virtual status_t _Reserved_Renderer_4(int32, void *);
|
||||
|
||||
- volatile int32 fRefCount; // How much we're still usefull?
|
||||
+ int32 fRefCount; // How much we're still usefull?
|
||||
BGLView* fView; // Never forget who is the boss!
|
||||
ulong fOptions; // Keep that tune in memory
|
||||
BGLDispatcher* fDispatcher;// Our personal GL API call dispatcher
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From fc10a0e496d3c8ea8a027b1807ad9cd7d1c4591d Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 12 Feb 2014 20:11:25 +0000
|
||||
Subject: hgl: release add-ons on GLView destruction.
|
||||
|
||||
|
||||
diff --git a/src/hgl/libgl-haiku/GLRendererRoster.cpp b/src/hgl/libgl-haiku/GLRendererRoster.cpp
|
||||
index 1712a87..3833b2c 100644
|
||||
--- a/src/hgl/libgl-haiku/GLRendererRoster.cpp
|
||||
+++ b/src/hgl/libgl-haiku/GLRendererRoster.cpp
|
||||
@@ -79,7 +79,14 @@ GLRendererRoster::GLRendererRoster(BGLView* view, ulong options)
|
||||
|
||||
GLRendererRoster::~GLRendererRoster()
|
||||
{
|
||||
-
|
||||
+ RendererMap::iterator iterator = fRenderers.begin();
|
||||
+ for (; iterator != fRenderers.end(); iterator++) {
|
||||
+ struct renderer_item item = iterator->second;
|
||||
+ image_id image = item.image;
|
||||
+ item.renderer->Release();
|
||||
+ // this will delete the renderer
|
||||
+ unload_add_on(image);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +98,7 @@ GLRendererRoster::GetRenderer(int32 id)
|
||||
return NULL;
|
||||
|
||||
struct renderer_item item = iterator->second;
|
||||
+ item.renderer->Acquire();
|
||||
return item.renderer;
|
||||
}
|
||||
|
||||
@@ -105,7 +113,7 @@ GLRendererRoster::AddDefaultPaths()
|
||||
B_SYSTEM_ADDONS_DIRECTORY,
|
||||
};
|
||||
|
||||
- for (uint32 i = fSafeMode ? 4 : 0;
|
||||
+ for (uint32 i = fSafeMode ? 3 : 0;
|
||||
i < sizeof(paths) / sizeof(paths[0]); i++) {
|
||||
BPath path;
|
||||
status_t status = find_directory(paths[i], &path, true);
|
||||
diff --git a/src/hgl/libgl-haiku/GLView.cpp b/src/hgl/libgl-haiku/GLView.cpp
|
||||
index 9ae5b5c..477b430 100644
|
||||
--- a/src/hgl/libgl-haiku/GLView.cpp
|
||||
+++ b/src/hgl/libgl-haiku/GLView.cpp
|
||||
@@ -57,8 +57,11 @@ BGLView::BGLView(BRect rect, const char* name, ulong resizingMode, ulong mode,
|
||||
BGLView::~BGLView()
|
||||
{
|
||||
delete fClipInfo;
|
||||
- if (fRenderer)
|
||||
+ if (fRenderer) {
|
||||
fRenderer->Release();
|
||||
+ fRenderer = NULL;
|
||||
+ }
|
||||
+ delete fRoster;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user