From 10f2d76c62b2361329830b1f1d99e6226e7754c5 Mon Sep 17 00:00:00 2001 From: Valentin Sarthou Date: Fri, 15 Mar 2019 15:52:49 +0100 Subject: [PATCH 1/2] Write files in binary format in parse_xml.py Issue: On Windows platforms, when writing files with python in text-mode, LF characters get converted to CRLF. This behavior leads to incorrect code generation in the steps following parse_xml.py Fix: Replace file access mode by 'wb' to avoid any platform-dependent behavior regarding newlines. --- auto/bin/parse_xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto/bin/parse_xml.py b/auto/bin/parse_xml.py index ff5567f..8c9e7e8 100755 --- a/auto/bin/parse_xml.py +++ b/auto/bin/parse_xml.py @@ -147,13 +147,13 @@ if __name__ == '__main__': if len(options.core): for i in api[2].keys(): - f = open('%s/%s'%(options.core, i), 'w') + f = open('%s/%s'%(options.core, i), 'wb') writeExtension(f, i, api[2][i], api[0], api[1]) f.close() if len(options.extensions): for i in api[3].keys(): - f = open('%s/%s'%(options.extensions, i), 'w') + f = open('%s/%s'%(options.extensions, i), 'wb') writeExtension(f, i, api[3][i], api[0], api[1]) f.close() From f5feecd46eb129290333934261ad3c886d04e84d Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 2 Feb 2019 23:36:35 +1000 Subject: [PATCH 2/2] Extend glew.pc output to mention GL linking (-framework on OSX) --- Makefile | 1 + glew.pc.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a54b92a..16dd008 100644 --- a/Makefile +++ b/Makefile @@ -149,6 +149,7 @@ glew.pc: glew.pc.in -e "s|@version@|$(GLEW_VERSION)|g" \ -e "s|@cflags@||g" \ -e "s|@libname@|$(NAME)|g" \ + -e "s|@libgl@|$(LDFLAGS.GL)|g" \ -e "s|@requireslib@|$(LIBGLU)|g" \ < $< > $@ diff --git a/glew.pc.in b/glew.pc.in index 6d3d070..a892540 100644 --- a/glew.pc.in +++ b/glew.pc.in @@ -7,5 +7,5 @@ Name: glew Description: The OpenGL Extension Wrangler library Version: @version@ Cflags: -I${includedir} @cflags@ -Libs: -L${libdir} -l@libname@ +Libs: -L${libdir} -l@libname@ @libgl@ Requires: @requireslib@