diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-27 19:09:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-27 19:14:42 +0300 |
commit | 072540688a90017f57730dbabf4198cb7ea310f2 (patch) | |
tree | c23284a04452c06ee01227c9c9a4c02d0b9c036d /build_files/build_environment/cmake/ssl.cmake | |
parent | f693e2c64412e5214c85fcd6021b4329f0c2f034 (diff) |
Build environment: Enable SSL for Python on Linux
This involved getting SSL compiled from sources first, ensuring
it is a static library placement independent code. Configuration
is based on what Debian is using. CFlags required to have own
configuration file, which i didn't find a better place that next
to the corresponding CMake file.
It is OpenSSL btw.
It is set to Python via --with-openssl= configuration argument.
This works fine in a clean chroot, but having libssl-dev installed
might make Python to prefer system wide library, This was worked
around by using libssl_pic.a name for the library and modifying
setup.py. Would be cool to ensure system wide libraries are not
a problem, but official release builder is safe against this,
since it will catch possible non-static dependencies.
There is also a new map file which shadows bunch of Python
symbols. Without this Python's shared libraries might bring
conflicting symbols to Blender namespace at runtime.
Hopefully this doesn't break other platforms.
Diffstat (limited to 'build_files/build_environment/cmake/ssl.cmake')
-rw-r--r-- | build_files/build_environment/cmake/ssl.cmake | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/build_files/build_environment/cmake/ssl.cmake b/build_files/build_environment/cmake/ssl.cmake new file mode 100644 index 00000000000..dd1b9957cc2 --- /dev/null +++ b/build_files/build_environment/cmake/ssl.cmake @@ -0,0 +1,44 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +set(SSL_CONFIGURE_COMMAND ./Configure) +set(SSL_PATCH_CMD echo .) + +if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128) + set(SSL_OS_COMPILER "blender-x86_64") +else() + set(SSL_OS_COMPILER "blender-x86") +endif() + +ExternalProject_Add(external_ssl + URL ${SSL_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH SHA256=${SSL_HASH} + PREFIX ${BUILD_DIR}/ssl + PATCH_COMMAND ${SSL_PATCH_CMD} + CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl + --openssldir=${LIBDIR}/ssl + no-shared + no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms + --config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf + ${SSL_OS_COMPILER} + BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS} + INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install + INSTALL_DIR ${LIBDIR}/ssl +) |