aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/freeglut/CONTROL2
-rw-r--r--ports/freeglut/fix-debug-macro.patch35
-rw-r--r--ports/freeglut/portfile.cmake1
3 files changed, 37 insertions, 1 deletions
diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL
index acda2181e..19de72cc5 100644
--- a/ports/freeglut/CONTROL
+++ b/ports/freeglut/CONTROL
@@ -1,4 +1,4 @@
Source: freeglut
-Version: 3.2.1
+Version: 3.2.1-1
Homepage: https://sourceforge.net/projects/freeglut/
Description: Open source implementation of GLUT with source and binary backwards compatibility.
diff --git a/ports/freeglut/fix-debug-macro.patch b/ports/freeglut/fix-debug-macro.patch
new file mode 100644
index 000000000..69f9e82bc
--- /dev/null
+++ b/ports/freeglut/fix-debug-macro.patch
@@ -0,0 +1,35 @@
+diff --git a/include/GL/freeglut_std.h b/include/GL/freeglut_std.h
+index a658c7c..a5efb3b 100644
+--- a/include/GL/freeglut_std.h
++++ b/include/GL/freeglut_std.h
+@@ -70,7 +70,7 @@
+
+ /* Link with Win32 static freeglut lib */
+ # if FREEGLUT_LIB_PRAGMAS
+-# ifdef NDEBUG
++# if defined(NDEBUG) || !defined(_DEBUG)
+ # pragma comment (lib, "freeglut_static.lib")
+ # else
+ # pragma comment (lib, "freeglut_staticd.lib")
+@@ -88,7 +88,7 @@
+
+ /* Link with Win32 shared freeglut lib */
+ # if FREEGLUT_LIB_PRAGMAS
+-# ifdef NDEBUG
++# if defined(NDEBUG) || !defined(_DEBUG)
+ # pragma comment (lib, "freeglut.lib")
+ # else
+ # pragma comment (lib, "freeglutd.lib")
+diff --git a/src/blackberry/fg_main_blackberry.c b/src/blackberry/fg_main_blackberry.c
+index a1b9cbb..a20c53d 100644
+--- a/src/blackberry/fg_main_blackberry.c
++++ b/src/blackberry/fg_main_blackberry.c
+@@ -31,7 +31,7 @@
+ #include "fg_internal.h"
+ #include "egl/fg_window_egl.h"
+
+-#ifdef NDEBUG
++#if defined(NDEBUG) || !defined(_DEBUG)
+ #define LOGI(...)
+ #endif
+
diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake
index 8b619c2b4..f5eca140e 100644
--- a/ports/freeglut/portfile.cmake
+++ b/ports/freeglut/portfile.cmake
@@ -11,6 +11,7 @@ vcpkg_extract_source_archive_ex(
use_targets_to_export_x11_dependency.patch
macOS_Xquartz.patch
gcc10.patch
+ fix-debug-macro.patch
)
if(NOT VCPKG_TARGET_IS_WINDOWS)