From 81c257f3a2dda29d023dccf447d6e1ed96bdc735 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 16 May 2023 16:47:17 -0400 Subject: [PATCH] Avoid unwanted test dependencies in RHEL builds This is based on changes already in c9s: https://gitlab.com/redhat/centos-stream/rpms/rubygem-kramdown/-/commit/1d42a4d403b73daf0028bbbca3b24a0d8fb2505b https://gitlab.com/redhat/centos-stream/rpms/rubygem-kramdown/-/commit/915fc2c333c81c5a068f913005f3b309b25b9ee4 https://gitlab.com/redhat/centos-stream/rpms/rubygem-kramdown/-/commit/54ab583cd27606a0cb2232eff9a32999ee8017ac --- rubygem-kramdown.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rubygem-kramdown.spec b/rubygem-kramdown.spec index 11b755f..b25027f 100644 --- a/rubygem-kramdown.spec +++ b/rubygem-kramdown.spec @@ -16,6 +16,7 @@ BuildRequires: rubygem(minitest) >= 5 BuildRequires: rubygem(rexml) BuildRequires: rubygem(rouge) >= 3.26.0 BuildRequires: rubygem(test-unit) +%if ! 0%{?rhel} BuildRequires: rubygem(stringex) # Recommends: rubygem(stringex) # Some additional dependency for check @@ -28,6 +29,7 @@ BuildRequires: tex(amsthm.sty) BuildRequires: tex(amsfonts.sty) BuildRequires: tex(utf8x.def) BuildRequires: tex-ec +%endif Requires: ruby(release) Requires: ruby(rubygems) BuildArch: noarch @@ -80,6 +82,15 @@ LANG=C.UTF-8 pushd .%{gem_instdir} +%if 0%{?rhel} +# Avoid unwanted stringex dependency +sed -i test/testcases/block/04_header/with_auto_ids.options \ + -e '\@transliterated_header_ids@s|true|false|' +sed -i \ + test/testcases/block/04_header/with_auto_ids.* \ + -e '\@[Tr]ransliterated@d' +%endif + %if 0 # This is a comment F-38: