freeglut-32: gcc10 fix
This commit is contained in:
parent
161cdbc131
commit
02c7df4775
@ -1,5 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/compat-32.pub
|
||||
RWSwxGo/zH7eXZkEz4vwghDjg0orp6Zy4cz7sBnz1K2r+ciaQEw6leb6RfgHjoCkV3Hpf+8WNmMpu0ADhSTVyJgLv1n/Rr94RwU=
|
||||
SHA256 (Pkgfile) = aba22e575861e53f44d4184ee1e04fc87042eefc9978175582998009d5b4a089
|
||||
RWSwxGo/zH7eXUj7EVc966VHDCur28nWr29EZ7m1aZHQHhwbNMhzlKcS9StmFwbXdf2zNSseOk7I34giBLgIbudPYl4HN1GYrAY=
|
||||
SHA256 (Pkgfile) = f019cb99d9fced5f4e707839205da4d47a2b3859d59b792c239307990b5975a2
|
||||
SHA256 (.footprint) = 86a5d0ab594286e1a5375ce12648f711c52f1a4d9807a02c8b4936e1563a4e8b
|
||||
SHA256 (freeglut-3.2.1.tar.gz) = d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68
|
||||
SHA256 (gcc10.patch) = ce2d11ffbffda1872dde5d50198fa5de961c22716e29fb1715648b7b818222c5
|
||||
|
@ -5,22 +5,20 @@
|
||||
|
||||
name=freeglut-32
|
||||
version=3.2.1
|
||||
release=1
|
||||
source=(https://downloads.sourceforge.net/project/freeglut/freeglut/$version/freeglut-$version.tar.gz)
|
||||
release=2
|
||||
source=(https://downloads.sourceforge.net/project/freeglut/freeglut/$version/freeglut-$version.tar.gz
|
||||
gcc10.patch)
|
||||
|
||||
build() {
|
||||
cd freeglut-$version
|
||||
patch -d freeglut-$version -p1 -i $SRC/gcc10.patch
|
||||
|
||||
install -d build
|
||||
cd build
|
||||
|
||||
cmake .. \
|
||||
cmake -Sfreeglut-$version -Bbuild -GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib32 \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
cmake --build build
|
||||
DESTDIR=$PKG cmake --install build
|
||||
|
||||
ln -s glut.pc $PKG/usr/lib32/pkgconfig/freeglut.pc
|
||||
|
||||
|
48
freeglut-32/gcc10.patch
Normal file
48
freeglut-32/gcc10.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff -urN freeglut-3.2.1.orig/src/fg_gl2.c freeglut-3.2.1/src/fg_gl2.c
|
||||
--- freeglut-3.2.1.orig/src/fg_gl2.c 2014-06-01 04:24:47.000000000 -0500
|
||||
+++ freeglut-3.2.1/src/fg_gl2.c 2020-08-04 19:54:14.348875031 -0500
|
||||
@@ -27,6 +27,20 @@
|
||||
#include "fg_internal.h"
|
||||
#include "fg_gl2.h"
|
||||
|
||||
+#ifndef GL_ES_VERSION_2_0
|
||||
+/* GLES2 has the corresponding entry points built-in, and these fgh-prefixed
|
||||
+ * names are defined in fg_gl2.h header to reference them, for any other case,
|
||||
+ * define them as function pointers here.
|
||||
+ */
|
||||
+FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||
+FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||
+FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||
+FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||
+FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||
+FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||
+FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||
+#endif
|
||||
+
|
||||
void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) {
|
||||
if (fgStructure.CurrentWindow != NULL)
|
||||
fgStructure.CurrentWindow->Window.attribute_v_coord = attrib;
|
||||
diff -urN freeglut-3.2.1.orig/src/fg_gl2.h freeglut-3.2.1/src/fg_gl2.h
|
||||
--- freeglut-3.2.1.orig/src/fg_gl2.h 2012-04-21 13:22:24.000000000 -0500
|
||||
+++ freeglut-3.2.1/src/fg_gl2.h 2020-08-04 19:54:17.075914225 -0500
|
||||
@@ -67,13 +67,13 @@
|
||||
typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
|
||||
typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
-FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||
-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||
-FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||
-FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||
-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||
-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||
-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||
+extern FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||
+extern FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||
+extern FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||
+extern FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||
+extern FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||
+extern FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||
+extern FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||
|
||||
# endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user