Commit: 9fe53bd4a1ac0eaa63fcf1ebd151fe4db0411b49
Author: Ankit Meel
Date:   Tue Feb 23 08:34:33 2021 +0530
Branches: master
https://developer.blender.org/rB9fe53bd4a1ac0eaa63fcf1ebd151fe4db0411b49

Build Environment/macOS/Python: link against zlib statically

rBc70eb30240f8b5d5a8f2ac509f0eb585936142b5 added patch to use static
zlib on Linux. But also added flags to use the zlib in LIBDIR for
Python on macOS. That causes some shared libraries (binascii for one)
to link against libz.1.dylib which will not be there on users' systems.
Reuse the said patch for macOS also to avoid rpath issues.

Fix T85648.
Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D10479

===================================================================

M       build_files/build_environment/cmake/python.cmake
R100    build_files/build_environment/patches/python_linux.diff 
build_files/build_environment/patches/python_unix.diff

===================================================================

diff --git a/build_files/build_environment/cmake/python.cmake 
b/build_files/build_environment/cmake/python.cmake
index 5731a0e0ae8..fa1498dda82 100644
--- a/build_files/build_environment/cmake/python.cmake
+++ b/build_files/build_environment/cmake/python.cmake
@@ -77,9 +77,9 @@ else()
   else()
     set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
     set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
-    set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d 
${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
   endif()
-
+  # Link against zlib statically (Unix). Avoid rpath issues (macOS).
+  set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d 
${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_unix.diff)
   set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
   set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include 
-I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
   set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib 
-L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
diff --git a/build_files/build_environment/patches/python_linux.diff 
b/build_files/build_environment/patches/python_unix.diff
similarity index 100%
rename from build_files/build_environment/patches/python_linux.diff
rename to build_files/build_environment/patches/python_unix.diff

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to