From a2fdd126e8e4c9a7e1c21bb9a88e52e29b758ee7 Mon Sep 17 00:00:00 2001 From: apexliu Date: Mon, 6 Mar 2017 17:59:58 +0800 Subject: [PATCH] temp. --- build/builder/build-external.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/builder/build-external.py b/build/builder/build-external.py index aecb5d5..5a56818 100644 --- a/build/builder/build-external.py +++ b/build/builder/build-external.py @@ -285,6 +285,8 @@ class BuilderLinux(BuilderBase): # # os.system('make install') # os.chdir(old_p) + # TODO: need modify the `config.h.cmake` and comment out HAVE_OPENSSL_CRYPTO_CTR128_ENCRYPT. + cmake_define = ' -DCMAKE_INSTALL_PREFIX={}' \ ' -D_OPENSSL_VERSION={}' \ ' -DOPENSSL_INCLUDE_DIR={}/include' \ @@ -299,7 +301,13 @@ class BuilderLinux(BuilderBase): ' -DWITH_BENCHMARKS=OFF' \ ' -DWITH_NACL=OFF' \ ' ..'.format(self.PATH_RELEASE, OPENSSL_VER, self.PATH_RELEASE, self.PATH_RELEASE) - utils.cmake(build_path, 'Release', False, cmake_define) + + # libssh always try to build shared library we do not care, but it may fail. + # so catch the except, we will check the final output file `libssh.a` ourselves. + try: + utils.cmake(build_path, 'Release', False, cmake_define) + except: + pass # because make install will fail because we can not disable ssh_shared target, # so we copy necessary files ourselves. @@ -307,7 +315,6 @@ class BuilderLinux(BuilderBase): utils.copy_file(os.path.join(self.LIBSSH_PATH_SRC, 'build', 'src'), os.path.join(self.PATH_RELEASE, 'lib'), 'libssh.a') utils.copy_ex(os.path.join(self.LIBSSH_PATH_SRC, 'include'), os.path.join(self.PATH_RELEASE, 'include'), 'libssh') - def _build_sqlite(self, file_name): if not os.path.exists(self.SQLITE_PATH_SRC): os.system('tar -zxvf "{}/{}" -C "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP))