nginx-module-opentracing: enabled building on RHEL/CentOS 7.
diff --git a/contrib/src/jaeger-client-cpp/CMakeLists.txt.suppress-gcc-version-check.patch b/contrib/src/jaeger-client-cpp/CMakeLists.txt.suppress-gcc-version-check.patch new file mode 100644 index 0000000..b7b99b7 --- /dev/null +++ b/contrib/src/jaeger-client-cpp/CMakeLists.txt.suppress-gcc-version-check.patch
@@ -0,0 +1,17 @@ +--- a/CMakeLists.txt 2021-03-22 09:00:52.327615463 +0000 ++++ b/CMakeLists.txt 2021-03-22 09:01:09.287806286 +0000 +@@ -54,10 +54,10 @@ + + set(package_deps) + +-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND +- CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") +- message(FATAL_ERROR "Must use gcc >= 4.9") +-endif() ++#if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND ++# CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") ++# message(FATAL_ERROR "Must use gcc >= 4.9") ++#endif() + + #hunter_add_package(thrift) + #find_package(thrift ${hunter_config} REQUIRED)
diff --git a/contrib/src/jaeger-client-cpp/Makefile b/contrib/src/jaeger-client-cpp/Makefile index eac9cc0..f83773e 100644 --- a/contrib/src/jaeger-client-cpp/Makefile +++ b/contrib/src/jaeger-client-cpp/Makefile
@@ -13,6 +13,11 @@ jaeger-client-cpp: jaeger-client-cpp-$(JAEGER_CLIENT_CPP_VERSION).tar.gz .sum-jaeger-client-cpp $(UNPACK) $(APPLY) $(SRC)/jaeger-client-cpp/CMakeLists.txt.patch +ifeq ($(shell rpm --version 2>&1 || echo FAIL),) +ifeq ($(shell test `rpm --eval '0%{?rhel}'` -gt 0 -a `rpm --eval '0%{?rhel}'` -lt 8 && echo 1),1) + $(APPLY) $(SRC)/jaeger-client-cpp/CMakeLists.txt.suppress-gcc-version-check.patch +endif +endif $(MOVE) DEPS_jaeger-client-cpp = opentracing-cpp $(DEPS_opentracing-cpp) thrift $(DEPS_thrift)
diff --git a/rpm/SPECS/Makefile.module-opentracing b/rpm/SPECS/Makefile.module-opentracing index 0c88f02..4fbc070 100644 --- a/rpm/SPECS/Makefile.module-opentracing +++ b/rpm/SPECS/Makefile.module-opentracing
@@ -24,6 +24,10 @@ $(CONTRIB)/src/thrift/build-cmake-ThriftMacros.cmake.patch \ $(CONTRIB)/src/thrift/lib-cpp-CMakeLists.txt.patch +ifeq ($(shell test `rpm --eval '0%{?rhel}'` -gt 0 -a `rpm --eval '0%{?rhel}'` -lt 8 && echo 1),1) +MODULE_PATCHES_opentracing+= $(CONTRIB)/src/jaeger-client-cpp/CMakeLists.txt.suppress-gcc-version-check.patch +endif + MODULE_CONFARGS_opentracing= --add-dynamic-module=nginx-opentracing-$(NGINX_OPENTRACING_VERSION)/opentracing .deps-module-opentracing: @@ -49,7 +53,7 @@ BuildRequires: cmake %define _cmake_cmd %{__cmake} %endif -%if (0%{?rhel} >= 8) || (0%{?fedora} > 0) +%if (0%{?rhel} >= 7) || (0%{?fedora} > 0) BuildRequires: libstdc++-static %endif BuildRequires: yaml-cpp-devel