diff options
| author | Thomas Schneider <qsx@chaotikum.eu> | 2024-04-04 15:34:24 +0200 |
|---|---|---|
| committer | Thomas Schneider <qsx@chaotikum.eu> | 2024-04-04 15:34:24 +0200 |
| commit | 9abc1268cffac8b0cc1baee934eb312fa7e6209a (patch) | |
| tree | 1c334688efcf6c1405ad9dc26c9520065f85143d | |
| parent | 29bc5ac56324c02f94cb4dd1bdd84934aa9d02d3 (diff) | |
Use bundled picojson and docopt-cpp on RHEL etc.
| -rw-r--r-- | termpaint.spec | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/termpaint.spec b/termpaint.spec index 015c9b6..8a7060c 100644 --- a/termpaint.spec +++ b/termpaint.spec @@ -17,11 +17,19 @@ BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(catch2) -BuildRequires: picojson-static -BuildRequires: pkgconfig(docopt) BuildRequires: python3-sphinx Provides: bundled(valgrind) = 3.15 +%if 0%{?rhel} +Provides: bundled(picojson) = 1.3.0-0.20170306gita944d59 +Provides: bundled(docopt-cpp) = 0.6.2-0.20200214gitc8a63d5 +%global meson_use_system "disabled" +%else +BuildRequires: picojson-static +BuildRequires: pkgconfig(docopt) +%global meson_use_system "enabled" +%endif + %description Termpaint is a low level terminal interface library for character-cell terminals in the tradition of VT1xx (like xterm, etc). It is designed to be portable and @@ -39,11 +47,15 @@ software using termpaint, as well as the documentation. %prep %forgeautosetup -rm -rf third-party/{catch.hpp,docopt,format.cc,format.h,picojson.h,linux_syscall_support.h} +rm -rf third-party/{catch.hpp,format.cc,format.h,linux_syscall_support.h} +%if %{undefined rhel} +rm -rf third-party/{picojson.h,docopt} +%endif %build -%meson -Dsystem-docopt=enabled -Dsystem-fmt=enabled -Dsystem-catch2=enabled -Dsystem-picojson=enabled \ +%meson -Dsystem-fmt=enabled -Dsystem-catch2=enabled \ + -Dsystem-picojson=%{meson_use_system} -Dsystem-docopt=%{meson_use_system} \ -Dttyrescue-fexec-blob=false -Dttyrescue-path=%{_libdir}/termpaint/ \ -Dttyrescue-install=true -Dtools-path=%{_libdir}/termpaint/ %meson_build |
