From 3b3cf0ecae4838c70b326d0a2854bb2712ad39ad Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 8 Apr 2014 10:47:04 +0300 Subject: Fix libGLEW build for OS X Change-Id: I996f88544c4cdedaf8aa047abb1888409b949800 --- external/glew/ExternalPackage_glew.mk | 1 + external/glew/UnpackedTarball_glew.mk | 5 +++++ external/glew/glew-macosx-install-name.patch.1 | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 external/glew/glew-macosx-install-name.patch.1 diff --git a/external/glew/ExternalPackage_glew.mk b/external/glew/ExternalPackage_glew.mk index 9f18cfb41f28..a110f702e8f8 100644 --- a/external/glew/ExternalPackage_glew.mk +++ b/external/glew/ExternalPackage_glew.mk @@ -12,6 +12,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,glew,glew)) $(eval $(call gb_ExternalPackage_use_external_project,glew,glew)) ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,glew,$(LIBO_LIB_FOLDER)/libGLEW.1.10.0.dylib,lib/libGLEW.1.10.0.dylib)) else ifeq ($(OS)-$(COM),WNT-GCC) else ifeq ($(COM),MSC) $(eval $(call gb_ExternalPackage_add_files,glew,$(LIBO_LIB_FOLDER), \ diff --git a/external/glew/UnpackedTarball_glew.mk b/external/glew/UnpackedTarball_glew.mk index 1043612f0095..64544b9db075 100644 --- a/external/glew/UnpackedTarball_glew.mk +++ b/external/glew/UnpackedTarball_glew.mk @@ -25,5 +25,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,glew,\ )) endif +ifeq ($(OS),MACOSX) +$(eval $(call gb_UnpackedTarball_add_patches,glew,\ + external/glew/glew-macosx-install-name.patch.1 \ +)) +endif # vim: set noet sw=4 ts=4: diff --git a/external/glew/glew-macosx-install-name.patch.1 b/external/glew/glew-macosx-install-name.patch.1 new file mode 100644 index 000000000000..75e8e7f1a178 --- /dev/null +++ b/external/glew/glew-macosx-install-name.patch.1 @@ -0,0 +1,13 @@ +-*- Mode:Diff -*- +diff -ur glew.org/build/glew.rc glew/build/glew.rc +--- glew/config/Makefile.darwin ++++ glew/config/Makefile.darwin +@@ -20,7 +20,7 @@ + LIB.DEVLNK = lib$(NAME).dylib + LIB.SHARED = lib$(NAME).$(SO_VERSION).dylib + LIB.STATIC = lib$(NAME).a +-LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR) ++LDFLAGS.SO = -dynamiclib -install_name @__________________________________________________OOO/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR) + LIB.SONAME.MX = lib$(NAME)mx.$(SO_MAJOR).dylib + LIB.DEVLNK.MX = lib$(NAME)mx.dylib + LIB.SHARED.MX = lib$(NAME)mx.$(SO_VERSION).dylib -- cgit