mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
GLEW: bump version, recipe cleanup (#1766)
This commit is contained in:
@@ -1,26 +1,22 @@
|
|||||||
SUMMARY="The OpenGL Extension Wrangler Library"
|
SUMMARY="The OpenGL Extension Wrangler Library"
|
||||||
DESCRIPTION="
|
DESCRIPTION="The OpenGL Extension Wrangler Library (GLEW) is a cross-platform \
|
||||||
The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source \
|
open-source C/C++ extension loading library. GLEW provides efficient run-time \
|
||||||
C/C++ extension loading library. GLEW provides efficient run-time mechanisms \
|
mechanisms for determining which OpenGL extensions are supported on the target \
|
||||||
for determining which OpenGL extensions are supported on the target platform.
|
platform."
|
||||||
"
|
HOMEPAGE="http://glew.sourceforge.net/"
|
||||||
LICENSE="BSD (3-clause)"
|
COPYRIGHT="2007 The Kronos Group Inc.
|
||||||
COPYRIGHT="
|
|
||||||
2007 The Kronos Group Inc.
|
|
||||||
2002-2007 Milan Ikits
|
2002-2007 Milan Ikits
|
||||||
2002-2007 Marcelo E. Magallon
|
2002-2007 Marcelo E. Magallon
|
||||||
2002 Lev Povalahev
|
2002 Lev Povalahev"
|
||||||
"
|
LICENSE="BSD (3-clause)"
|
||||||
HOMEPAGE="http://glew.sourceforge.net"
|
|
||||||
SOURCE_URI="http://downloads.sourceforge.net/project/glew/glew/${portVersion}/glew-${portVersion}.tgz"
|
|
||||||
CHECKSUM_SHA256="aa25dc48ed84b0b64b8d41cdd42c8f40f149c37fa2ffa39cd97f42c78d128bc7"
|
|
||||||
REVISION="5"
|
REVISION="5"
|
||||||
|
SOURCE_URI="http://downloads.sourceforge.net/project/glew/glew/${portVersion}/glew-${portVersion}.tgz"
|
||||||
|
CHECKSUM_SHA256="04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95"
|
||||||
|
PATCHES="glew-$portVersion.patchset"
|
||||||
|
|
||||||
ARCHITECTURES="x86 x86_gcc2 x86_64"
|
ARCHITECTURES="x86 x86_gcc2 x86_64"
|
||||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||||
|
|
||||||
PATCHES="glew-$portVersion.patchset"
|
|
||||||
|
|
||||||
PROVIDES="
|
PROVIDES="
|
||||||
glew$secondaryArchSuffix = $portVersion
|
glew$secondaryArchSuffix = $portVersion
|
||||||
lib:libglew$secondaryArchSuffix = $portVersion compat >= 1
|
lib:libglew$secondaryArchSuffix = $portVersion compat >= 1
|
||||||
|
|||||||
81
media-libs/glew/glew-2.1.0.recipe
Normal file
81
media-libs/glew/glew-2.1.0.recipe
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
SUMMARY="The OpenGL Extension Wrangler Library"
|
||||||
|
DESCRIPTION="The OpenGL Extension Wrangler Library (GLEW) is a cross-platform \
|
||||||
|
open-source C/C++ extension loading library. GLEW provides efficient run-time \
|
||||||
|
mechanisms for determining which OpenGL extensions are supported on the target \
|
||||||
|
platform."
|
||||||
|
HOMEPAGE="http://glew.sourceforge.net/"
|
||||||
|
COPYRIGHT="2007 The Kronos Group Inc.
|
||||||
|
2002-2007 Milan Ikits
|
||||||
|
2002-2007 Marcelo E. Magallon
|
||||||
|
2002 Lev Povalahev
|
||||||
|
1999-2007 Brian Paul"
|
||||||
|
LICENSE="BSD (3-clause)"
|
||||||
|
REVISION="1"
|
||||||
|
SOURCE_URI="http://downloads.sourceforge.net/project/glew/glew/${portVersion}/glew-${portVersion}.tgz"
|
||||||
|
CHECKSUM_SHA256="04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95"
|
||||||
|
PATCHES="glew-$portVersion.patchset"
|
||||||
|
|
||||||
|
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||||
|
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||||
|
|
||||||
|
|
||||||
|
PROVIDES="
|
||||||
|
glew$secondaryArchSuffix = $portVersion
|
||||||
|
cmd:glewinfo = $portVersion
|
||||||
|
cmd:visualinfo = $portVersion
|
||||||
|
lib:libglew$secondaryArchSuffix = $portVersion compat >= 2
|
||||||
|
"
|
||||||
|
REQUIRES="
|
||||||
|
haiku$secondaryArchSuffix
|
||||||
|
lib:libgl$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
PROVIDES_devel="
|
||||||
|
glew${secondaryArchSuffix}_devel = $portVersion
|
||||||
|
devel:libglew$secondaryArchSuffix = $portVersion compat >= 2
|
||||||
|
"
|
||||||
|
REQUIRES_devel="
|
||||||
|
glew$secondaryArchSuffix == $portVersion base
|
||||||
|
devel:libGL$secondaryArchSuffix
|
||||||
|
devel:libGLU$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
PROVIDES_util="
|
||||||
|
glew${secondaryArchSuffix}_util = $portVersion
|
||||||
|
cmd:glewinfo$secondaryArchSuffix
|
||||||
|
cmd:visualinfo$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
REQUIRES_util="
|
||||||
|
glew$secondaryArchSuffix == $portVersion base
|
||||||
|
haiku$secondaryArchSuffix
|
||||||
|
lib:libGL$secondaryArchSuffix
|
||||||
|
lib:libglew$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
BUILD_REQUIRES="
|
||||||
|
devel:libgl$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
BUILD_PREREQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}_devel
|
||||||
|
cmd:gcc$secondaryArchSuffix
|
||||||
|
cmd:g++$secondaryArchSuffix
|
||||||
|
cmd:ld$secondaryArchSuffix
|
||||||
|
cmd:libtoolize$secondaryArchSuffix
|
||||||
|
cmd:make
|
||||||
|
"
|
||||||
|
|
||||||
|
BUILD()
|
||||||
|
{
|
||||||
|
make $jobArgs GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir/GL
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTALL()
|
||||||
|
{
|
||||||
|
make install.all GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir/GL
|
||||||
|
|
||||||
|
prepareInstalledDevelLib libGLEW
|
||||||
|
fixPkgconfig
|
||||||
|
|
||||||
|
packageEntries devel $developDir
|
||||||
|
packageEntries util $binDir
|
||||||
|
}
|
||||||
121
media-libs/glew/patches/glew-2.1.0.patchset
Normal file
121
media-libs/glew/patches/glew-2.1.0.patchset
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
From 5cf1b0b434baf6594f44f172c00f1721d6fcc190 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Duval <jerome.duval@gmail.com>
|
||||||
|
Date: Wed, 20 Aug 2014 16:50:24 +0000
|
||||||
|
Subject: updated Haiku patch
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/glewinfo.c b/src/glewinfo.c
|
||||||
|
index 882654d..e6e3456 100644
|
||||||
|
--- a/src/glewinfo.c
|
||||||
|
+++ b/src/glewinfo.c
|
||||||
|
@@ -16373,7 +16373,7 @@ int main (int argc, char** argv)
|
||||||
|
#elif defined(GLEW_EGL)
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
fprintf(f, "Reporting capabilities of pixelformat %d\n", params.pixelformat);
|
||||||
|
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||||
|
+#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
||||||
|
fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n",
|
||||||
|
params.display == NULL ? getenv("DISPLAY") : params.display, params.visual);
|
||||||
|
#endif
|
||||||
|
diff --git a/src/glewinfo_haiku.cpp b/src/glewinfo_haiku.cpp
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..3d32d00
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/glewinfo_haiku.cpp
|
||||||
|
@@ -0,0 +1,93 @@
|
||||||
|
+/*
|
||||||
|
+ * glewinfo Haiku glue code
|
||||||
|
+ * Copyright 2013 Kacper Kasper <kacperkasper@gmail.com>
|
||||||
|
+ * All rights reserved. Distributed under the terms of the MIT license.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include <Application.h>
|
||||||
|
+#include <Window.h>
|
||||||
|
+#include <GLView.h>
|
||||||
|
+
|
||||||
|
+class GLEWInfoView : public BGLView {
|
||||||
|
+public:
|
||||||
|
+ GLEWInfoView(BRect frame, uint32 type);
|
||||||
|
+ virtual void AttachedToWindow(void);
|
||||||
|
+
|
||||||
|
+ void ContextInit() { LockGL(); }
|
||||||
|
+ void ContextDestroy() { UnlockGL(); }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+GLEWInfoView::GLEWInfoView(BRect frame, uint32 type)
|
||||||
|
+ : BGLView(frame, "GLEWInfoView", B_FOLLOW_ALL_SIDES, 0, type)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void GLEWInfoView::AttachedToWindow(void)
|
||||||
|
+{
|
||||||
|
+ LockGL();
|
||||||
|
+ BGLView::AttachedToWindow();
|
||||||
|
+ UnlockGL();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+class GLEWInfoWindow : public BWindow {
|
||||||
|
+public:
|
||||||
|
+ GLEWInfoWindow(BRect frame, uint32 type);
|
||||||
|
+ virtual bool QuitRequested();
|
||||||
|
+
|
||||||
|
+private:
|
||||||
|
+ GLEWInfoView *view;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+GLEWInfoWindow::GLEWInfoWindow(BRect frame, uint32 type)
|
||||||
|
+ : BWindow(frame, "GLEWInfoWindow", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE)
|
||||||
|
+{
|
||||||
|
+ AddChild(view = new GLEWInfoView(Bounds(), type));
|
||||||
|
+ view->ContextInit();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool GLEWInfoWindow::QuitRequested()
|
||||||
|
+{
|
||||||
|
+ view->ContextDestroy();
|
||||||
|
+
|
||||||
|
+ view->RemoveSelf();
|
||||||
|
+
|
||||||
|
+ delete view;
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+class GLEWInfoApp : public BApplication
|
||||||
|
+{
|
||||||
|
+public:
|
||||||
|
+ GLEWInfoApp();
|
||||||
|
+ ~GLEWInfoApp();
|
||||||
|
+
|
||||||
|
+private:
|
||||||
|
+ GLEWInfoWindow *window;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+GLEWInfoApp::GLEWInfoApp()
|
||||||
|
+ : BApplication("application/x-vnd.glew-GLEWInfo")
|
||||||
|
+{
|
||||||
|
+ BRect rect = BRect(0, 0, 1, 1);
|
||||||
|
+ window = new GLEWInfoWindow(rect, BGL_RGB | BGL_DOUBLE);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+GLEWInfoApp::~GLEWInfoApp()
|
||||||
|
+{
|
||||||
|
+ window->Quit();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+GLEWInfoApp *app;
|
||||||
|
+
|
||||||
|
+extern "C" GLboolean glewCreateContext ()
|
||||||
|
+{
|
||||||
|
+ app = new GLEWInfoApp();
|
||||||
|
+
|
||||||
|
+ return GL_FALSE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+extern "C" void glewDestroyContext ()
|
||||||
|
+{
|
||||||
|
+ delete app;
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.14.2
|
||||||
|
|
||||||
Reference in New Issue
Block a user