summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-08 10:47:04 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-08 10:50:08 +0300
commit3b3cf0ecae4838c70b326d0a2854bb2712ad39ad (patch)
treeb253b10741555b0e361138ff3c87d4c96202ac55 /external
parentcab4831d02c9933f3d12313f54f2fb4073611bb5 (diff)
Fix libGLEW build for OS X
Change-Id: I996f88544c4cdedaf8aa047abb1888409b949800
Diffstat (limited to 'external')
-rw-r--r--external/glew/ExternalPackage_glew.mk1
-rw-r--r--external/glew/UnpackedTarball_glew.mk5
-rw-r--r--external/glew/glew-macosx-install-name.patch.113
3 files changed, 19 insertions, 0 deletions
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