summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-09-24 19:08:04 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-09-24 19:08:04 +0200
commiteb256d7bbb92eb0a3ba9841c3f0ed517aa2ddb31 (patch)
tree6c6061ec7a2debcb9931797e041cf1a536d3a5db /python
parentJS test suite minor fix for NodeJS (diff)
downloadice-eb256d7bbb92eb0a3ba9841c3f0ed517aa2ddb31.tar.bz2
ice-eb256d7bbb92eb0a3ba9841c3f0ed517aa2ddb31.tar.xz
ice-eb256d7bbb92eb0a3ba9841c3f0ed517aa2ddb31.zip
Fixed ICE-6811 - ElCapitan build errors
Diffstat (limited to 'python')
-rw-r--r--python/config/Make.rules18
-rw-r--r--python/config/Make.rules.Darwin27
2 files changed, 33 insertions, 12 deletions
diff --git a/python/config/Make.rules b/python/config/Make.rules
index 4fc7a40d729..74a6158951f 100644
--- a/python/config/Make.rules
+++ b/python/config/Make.rules
@@ -16,13 +16,14 @@ prefix ?= /opt/Ice-$(VERSION)
#
# The "root directory" for runpath embedded in executables. Can be set
# to change the runpath added to Ice executables. The default is
-# platform dependent.
+# platform dependent (Linux only, on OS X the embedded runpath is always
+# based on @loader_path).
#
#embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
#
# Define embedded_runpath as no if you don't want any RPATH added to
-# the executables.
+# the executables (Linux only, on OS X we always add a runpath).
#
embedded_runpath ?= yes
@@ -91,10 +92,6 @@ else
include $(top_srcdir)/../config/Make.common.rules
endif
-ifndef usr_dir_install
-RPATH_DIR = $(prefix)/$(libsubdir)
-endif
-
install_bindir = $(prefix)/$(binsubdir)
#
@@ -109,15 +106,14 @@ endif
libdir = $(top_srcdir)/python
ifndef usr_dir_install
- install_pythondir = $(prefix)/python
- install_libdir = $(prefix)/python
+ install_pythondir = $(prefix)/python
+ install_libdir = $(prefix)/python
else
#
# The install_dir script says where python wants site-packages installed.
#
-
- install_pythondir = $(shell $(PYTHON) $(top_srcdir)/config/install_dir)
- install_libdir = $(install_pythondir)
+ install_pythondir = $(shell $(PYTHON) $(top_srcdir)/config/install_dir)
+ install_libdir = $(install_pythondir)
endif
ifeq ($(UNAME),SunOS)
diff --git a/python/config/Make.rules.Darwin b/python/config/Make.rules.Darwin
index 426fe2ac12e..4bf90bafa21 100644
--- a/python/config/Make.rules.Darwin
+++ b/python/config/Make.rules.Darwin
@@ -18,4 +18,29 @@ shlibldflags += $(LDEXEFLAGS)
mksoname = $(if $(2),lib$(1).$(2).so,lib$(1).so)
mklibname = lib$(1).so
-mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name @rpath/$(2) $(3) $(4) \ No newline at end of file
+mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name @rpath/$(2) $(3) $(4)
+
+ifneq ($(STATICLIBS),yes)
+ #
+ # Set RPATH to the cpp/lib directory or Ice installation lib directory. Note that unlike Linux
+ # platforms, we always set the RPATH for source builds on OS X. This is required because we
+ # can no longer rely on DYLD_LIBRARY_PATH on El Capitan. The RPATH is updated when the library
+ # is installed (see cpp/config/Make.rules.Darwin).
+ #
+ ifdef ice_src_dist
+ RPATH_DIR = @loader_path/../../cpp/$(libsubdir)
+ else
+ RPATH_DIR = $(ice_dir)/$(libsubdir)
+ endif
+
+ #
+ # Update the RPATH to the installation lib directory when installing a library instead
+ # of relying on the RPATH set during the build (which isn't correct anymore for the
+ # installation directly layout).
+ #
+ ifdef usr_dir_install
+ installlib += ; install_name_tool -delete_rpath $(RPATH_DIR) $(1)/$(3)
+ else ifdef ice_src_dist
+ installlib += ; install_name_tool -rpath $(RPATH_DIR) @loader_path/../$(libsubdir) $(1)/$(3)
+ endif
+endif