diff options
author | Danny Rawlins <monster.romster@gmail.com> | 2020-08-05 22:31:37 +1000 |
---|---|---|
committer | Danny Rawlins <monster.romster@gmail.com> | 2020-08-05 22:31:37 +1000 |
commit | 02c7df47757a14083be0f7b7dc787c6771ebe1a2 (patch) | |
tree | 2822dd0716f5dc6d7ebdfc7d08ca6650c5b1b72f | |
parent | 161cdbc1317a0db874aff7420cd7843aa4f4a296 (diff) | |
download | compat-32-02c7df47757a14083be0f7b7dc787c6771ebe1a2.tar.gz compat-32-02c7df47757a14083be0f7b7dc787c6771ebe1a2.tar.xz |
freeglut-32: gcc10 fix
-rw-r--r-- | freeglut-32/.signature | 5 | ||||
-rw-r--r-- | freeglut-32/Pkgfile | 16 | ||||
-rw-r--r-- | freeglut-32/gcc10.patch | 48 |
3 files changed, 58 insertions, 11 deletions
diff --git a/freeglut-32/.signature b/freeglut-32/.signature index 2e57d44a..40e5b744 100644 --- a/freeglut-32/.signature +++ b/freeglut-32/.signature @@ -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 diff --git a/freeglut-32/Pkgfile b/freeglut-32/Pkgfile index 13e3afae..b6aa9077 100644 --- a/freeglut-32/Pkgfile +++ b/freeglut-32/Pkgfile @@ -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 diff --git a/freeglut-32/gcc10.patch b/freeglut-32/gcc10.patch new file mode 100644 index 00000000..cb85ee11 --- /dev/null +++ b/freeglut-32/gcc10.patch @@ -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 + |