Patch to build Proton with minimal dependencies.
Closes #2279. Configures CMake to enable C++11, build static libaries and only build cpp bindings with minimal dependencies. Documentation, examples, tests and other language bindings are no longer built. CMake will no longer try to find commands and packages which are not required for building the target.
This commit is contained in:
@@ -3,23 +3,15 @@ $(package)_version=0.17.0
|
||||
$(package)_download_path=http://apache.cs.utah.edu/qpid/proton/$($(package)_version)
|
||||
$(package)_file_name=qpid-proton-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=6ffd26d3d0e495bfdb5d9fefc5349954e6105ea18cc4bb191161d27742c5a01a
|
||||
$(package)_dependencies=
|
||||
$(package)_patches=minimal-build.patch
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
sed -i '1i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")' proton-c/bindings/cpp/CMakeLists.txt && \
|
||||
sed -i '1i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")' examples/cpp/CMakeLists.txt && \
|
||||
sed -i '1i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")' CMakeLists.txt && \
|
||||
sed -i.old 's/qpid-proton SHARED/qpid-proton STATIC/' proton-c/CMakeLists.txt && \
|
||||
sed -i.old 's/SASL/_DO_NOT_BUILD_SASL_/' proton-c/CMakeLists.txt && \
|
||||
sed -i.old 's/qpid-proton-core SHARED/qpid-proton-core STATIC/' proton-c/CMakeLists.txt && \
|
||||
sed -i.old 's/find_package(OpenSSL)/#find_package(OpenSSL)/' proton-c/CMakeLists.txt && \
|
||||
sed -i.old 's/qpid-proton-cpp SHARED/qpid-proton-cpp STATIC/' proton-c/bindings/cpp/CMakeLists.txt && \
|
||||
sed -i.old 's/DEFAULT_GO ON/DEFAULT_GO OFF/' proton-c/bindings/CMakeLists.txt && \
|
||||
mkdir build
|
||||
patch -p1 < $($(package)_patch_dir)/minimal-build.patch && \
|
||||
mkdir -p build/proton-c/src
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
cd build; cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_INSTALL_PREFIX=/ -DSYSINSTALL_BINDINGS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_PYTHON=OFF -DBUILD_PHP=OFF -DBUILD_JAVA=OFF -DBUILD_PERL=OFF -DBUILD_RUBY=OFF -DDEFAULT_GO=OFF
|
||||
cd build; cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_INSTALL_PREFIX=/ -DSYSINSTALL_BINDINGS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_PYTHON=OFF -DBUILD_PHP=OFF -DBUILD_JAVA=OFF -DBUILD_PERL=OFF -DBUILD_RUBY=OFF -DBUILD_JAVASCRIPT=OFF -DBUILD_GO=OFF
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
|
||||
Reference in New Issue
Block a user