mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
glew: add recipe for version 1.11.0
This commit is contained in:
85
media-libs/glew/glew-1.11.0.recipe
Normal file
85
media-libs/glew/glew-1.11.0.recipe
Normal file
@@ -0,0 +1,85 @@
|
||||
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.
|
||||
"
|
||||
LICENSE="BSD (3-clause)"
|
||||
COPYRIGHT="
|
||||
2007 The Kronos Group Inc.
|
||||
2002-2007 Milan Ikits
|
||||
2002-2007 Marcelo E. Magallon
|
||||
2002 Lev Povalahev
|
||||
"
|
||||
HOMEPAGE="http://glew.sourceforge.net"
|
||||
SRC_URI="http://downloads.sourceforge.net/project/glew/glew/${portVersion}/glew-${portVersion}.tgz"
|
||||
CHECKSUM_SHA256="69bbce306ac281c4fa806a7a7d02c0596281a2d8f9d70690e98126f23ba513d6"
|
||||
REVISION="1"
|
||||
|
||||
ARCHITECTURES="x86 x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
PATCHES="glew-$portVersion.patchset"
|
||||
|
||||
PROVIDES="
|
||||
glew$secondaryArchSuffix = $portVersion
|
||||
lib:libGLEW$secondaryArchSuffix = $portVersion compat >= 1
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libGL$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
devel:libGL$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
libtool
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cp /system/data/libtool/config/config.guess config/
|
||||
make $jobArgs GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir/GL
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir/GL
|
||||
make install.bin GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir/GL
|
||||
|
||||
prepareInstalledDevelLib libGLEW
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel $developDir
|
||||
packageEntries util $binDir
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------
|
||||
PROVIDES_devel="
|
||||
glew${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libGLEW$secondaryArchSuffix = $portVersion compat >= 1
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
glew$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
# ----- util package --------------------------------------
|
||||
PROVIDES_util="
|
||||
glew${secondaryArchSuffix}_util = $portVersion
|
||||
cmd:glewinfo$secondaryArchSuffix
|
||||
cmd:visualinfo$secondaryArchSuffix
|
||||
"
|
||||
|
||||
REQUIRES_util="
|
||||
glew$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libGLEW$secondaryArchSuffix
|
||||
lib:libstdc++$secondaryArchSuffix
|
||||
"
|
||||
108
media-libs/glew/patches/glew-1.11.0.patchset
Normal file
108
media-libs/glew/patches/glew-1.11.0.patchset
Normal file
@@ -0,0 +1,108 @@
|
||||
From ce5eed384ec6502f26461579139ee72dd5fc178e 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_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;
|
||||
+}
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user