This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8d5b289b10 GH-43158: [Packaging] Use bundled nlohmann/json on 
AlmaLinux 8/CentOS Stream 8 (#43159)
8d5b289b10 is described below

commit 8d5b289b100e068b47739d8fee0efdead9f1c574
Author: Sutou Kouhei <k...@clear-code.com>
AuthorDate: Sat Jul 6 11:35:57 2024 +0900

    GH-43158: [Packaging] Use bundled nlohmann/json on AlmaLinux 8/CentOS 
Stream 8 (#43159)
    
    ### Rationale for this change
    
    Because json-devel on them don't provide nlohmann/json_fwd.h that is 
required by google-cloud-cpp.
    
    The upstream issue:
    https://github.com/googleapis/google-cloud-cpp/issues/14438
    
    ### What changes are included in this PR?
    
    Use bundled nlohmann/json instead.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #43158
    
    Authored-by: Sutou Kouhei <k...@clear-code.com>
    Signed-off-by: Sutou Kouhei <k...@clear-code.com>
---
 dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in 
b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
index d5e6c3a332..8d47407c03 100644
--- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
+++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
@@ -63,6 +63,7 @@
 %define gcc_package gcc
 %endif
 
+%define use_bundled_nlohmann_json (%{_rhel} == 8)
 %define use_flight (%{_rhel} >= 8 || %{_amzn} >= 2023)
 %define use_gandiva (%{_rhel} >= 8 || %{_amzn} >= 2023)
 %define use_gcs (%{_rhel} >= 8)
@@ -117,7 +118,7 @@ BuildRequires:      glog-devel
 BuildRequires: grpc-devel
 BuildRequires: grpc-plugins
 %endif
-%if %{use_gcs}
+%if %{use_gcs} && !%{use_bundled_nlohmann_json}
 BuildRequires: json-devel
 %endif
 BuildRequires: libzstd-devel
@@ -194,6 +195,9 @@ cd cpp
   -DCMAKE_BUILD_TYPE=$cpp_build_type \
   -DPARQUET_BUILD_EXECUTABLES=ON \
   -DPARQUET_REQUIRE_ENCRYPTION=ON \
+%if %{use_bundled_nlohmann_json}
+  -Dnlohmann_json_SOURCE=BUNDLED \
+%endif
   -G"Unix Makefiles"
 %arrow_cmake_build
 cd -
@@ -280,7 +284,7 @@ Requires:   %{name}%{so_version}-libs = 
%{version}-%{release}
 Requires:      brotli-devel
 Requires:      bzip2-devel
 Requires:      curl-devel
-%if %{use_gcs}
+%if %{use_gcs} && !%{use_bundled_nlohmann_json}
 Requires:      json-devel
 %endif
 Requires:      libzstd-devel

Reply via email to