From 63e9bf5280a3733a390ec2cd8aaa3afb8a6e55ab Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Sun, 28 Mar 2021 08:39:46 +0000 Subject: [PATCH] graphics/anttweakbar: Add patches to fix several build failures Reported by: fallout --- graphics/anttweakbar/Makefile | 2 +- graphics/anttweakbar/files/patch-LoadOGLCore.h | 16 ++++++++++++++++ graphics/anttweakbar/files/patch-TwPrecomp.h | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 graphics/anttweakbar/files/patch-LoadOGLCore.h create mode 100644 graphics/anttweakbar/files/patch-TwPrecomp.h diff --git a/graphics/anttweakbar/Makefile b/graphics/anttweakbar/Makefile index 1bb4d8dfe2d6..cf0453bfb469 100644 --- a/graphics/anttweakbar/Makefile +++ b/graphics/anttweakbar/Makefile @@ -20,7 +20,7 @@ USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/AntTweakBar WRKSRC_SUBDIR= src -DOS2UNIX_FILES= Makefile +DOS2UNIX_FILES= Makefile LoadOGLCore.h TwPrecomp.h LDFLAGS+= -L${LOCALBASE}/lib -lX11 diff --git a/graphics/anttweakbar/files/patch-LoadOGLCore.h b/graphics/anttweakbar/files/patch-LoadOGLCore.h new file mode 100644 index 000000000000..9d348a0e2a37 --- /dev/null +++ b/graphics/anttweakbar/files/patch-LoadOGLCore.h @@ -0,0 +1,16 @@ +- typedefs cause error: typedef redefinition with different types ('ptrdiff_t' (aka 'int') vs 'khronos_intptr_t' (aka 'long')) + +--- LoadOGLCore.h.orig 2021-03-28 08:30:01 UTC ++++ LoadOGLCore.h +@@ -152,9 +152,11 @@ ANT_GL_CORE_DECL(void, glPointParameterfv, (GLenum pna + ANT_GL_CORE_DECL(void, glPointParameteri, (GLenum pname, GLint param)) + ANT_GL_CORE_DECL(void, glPointParameteriv, (GLenum pname, const GLint *params)) + // GL 1.5 ++#if !defined(__FreeBSD__) + #ifndef ANT_OSX + typedef ptrdiff_t GLintptr; + typedef ptrdiff_t GLsizeiptr; ++#endif + #endif + ANT_GL_CORE_DECL(void, glGenQueries, (GLsizei n, GLuint *ids)) + ANT_GL_CORE_DECL(void, glDeleteQueries, (GLsizei n, const GLuint *ids)) diff --git a/graphics/anttweakbar/files/patch-TwPrecomp.h b/graphics/anttweakbar/files/patch-TwPrecomp.h new file mode 100644 index 000000000000..e2c7fb84de8e --- /dev/null +++ b/graphics/anttweakbar/files/patch-TwPrecomp.h @@ -0,0 +1,16 @@ +- error: " has been replaced by " + +--- TwPrecomp.h.orig 2021-03-28 08:35:14 UTC ++++ TwPrecomp.h +@@ -51,7 +51,11 @@ + # include + # include + # include ++#if !defined(__FreeBSD__) + # include ++#else ++# include ++#endif + # undef _WIN32 + # undef WIN32 + # undef _WIN64