From 5972b0b2b0aed5009d44b2cf7a981853c605b558 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 17 Jul 2017 10:34:17 +0200 Subject: [PATCH 1/2] [CTPP2] CMake should not install ctpp2c. As we are compiling `ctpp2c` in static native and install it with a simple `cp`, the default compilation of ctpp2 library should not install ctpp2c. Else we would have a wrong `ctpp2c` in the path and later compilation will fail. --- patches/ctpp2_compile_ctpp2c_static.patch | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/patches/ctpp2_compile_ctpp2c_static.patch b/patches/ctpp2_compile_ctpp2c_static.patch index 398d306e..5288b937 100644 --- a/patches/ctpp2_compile_ctpp2c_static.patch +++ b/patches/ctpp2_compile_ctpp2c_static.patch @@ -11,3 +11,27 @@ diff -u ctpp2-2.8.3/CMakeLists.txt ctpp2-2.8.3-static/CMakeLists.txt # CTPP2 Interpreter ADD_EXECUTABLE(ctpp2i tests/CTPP2Interpreter.cpp) +@@ -794,7 +795,6 @@ + DESTINATION .) + + INSTALL(TARGETS ctpp2vm +- ctpp2c + ctpp2i + ctpp2json + DESTINATION .) +@@ -806,7 +806,6 @@ + # Install Manpages + INSTALL(FILES + man/ctpp2-config.1 +- man/ctpp2c.1 + man/ctpp2i.1 + man/ctpp2json.1 + man/ctpp2vm.1 +@@ -904,7 +903,6 @@ + + # Install binaries + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ctpp2vm +- ${CMAKE_CURRENT_BINARY_DIR}/ctpp2c + ${CMAKE_CURRENT_BINARY_DIR}/ctpp2i + ${CMAKE_CURRENT_BINARY_DIR}/ctpp2json + ${CMAKE_CURRENT_BINARY_DIR}/ctpp2-config From 9a73c5796e7bc345d1ce316a723712e3878b5175 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 17 Jul 2017 11:05:53 +0200 Subject: [PATCH 2/2] [CTPP2] Always depend on ctpp2c. Even on android we are compiling the resources. So we need ctpp2c all the time. --- dependencies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.py b/dependencies.py index 606bd75c..9d47086b 100644 --- a/dependencies.py +++ b/dependencies.py @@ -292,9 +292,9 @@ class Kiwixlib(Dependency): @property def dependencies(self): - base_dependencies = ["pugixml", "libzim", "zlib", "lzma"] + base_dependencies = ["pugixml", "libzim", "zlib", "lzma", "ctpp2c"] if self.buildEnv.platform_info.build != 'android': - base_dependencies += ['ctpp2', 'ctpp2c'] + base_dependencies += ['ctpp2'] if self.buildEnv.platform_info.build != 'native': return base_dependencies + ["icu4c_cross-compile"] else: