From f4111ed99d1f705b153e88bcd53eb524a5554ad6 Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Fri, 3 Jan 2025 18:00:23 -0600 Subject: [PATCH] Keep using the OS-provided tinyxml2 on EL9 and up --- rpm/xrdcl-pelican.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpm/xrdcl-pelican.spec b/rpm/xrdcl-pelican.spec index 9901cd7..dae9a87 100644 --- a/rpm/xrdcl-pelican.spec +++ b/rpm/xrdcl-pelican.spec @@ -49,6 +49,9 @@ BuildRequires: systemd BuildRequires: openssl-devel # nlohmann-json-devel is available from the OSG repos BuildRequires: nlohmann-json-devel +%if 0%{?rhel} >= 9 +BuildRequires: tinyxml2-devel >= 9 +%endif Requires: xrootd-client >= 1:%{xrootd_current_major}.%{xrootd_current_minor} Requires: xrootd-client < 1:%{xrootd_next_major}.0.0-1 @@ -67,8 +70,12 @@ Requires: xrootd-client < 1:%{xrootd_next_major}.0.0-1 . /opt/rh/gcc-toolset-11/enable %endif +%if 0%{?rhel} >= 9 +%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DXROOTD_EXTERNAL_TINYXML2=1 -DXROOTD_EXTERNAL_JSON=1 . +%else cp %{SOURCE1} cmake/tinyxml2/ %cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DXROOTD_EXTERNAL_JSON=1 . +%endif make VERBOSE=1 %{?_smp_mflags} %install