From 8e2921fd5a3125b7ce2487bb449b2e6db40cc3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 25 Aug 2014 16:07:51 +0200 Subject: [PATCH] Use load macro introduced in RPM 4.12. --- load.inc | 30 ------------------------------ ruby.spec | 14 +++++++------- 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 load.inc diff --git a/load.inc b/load.inc deleted file mode 100644 index bf9c07e..0000000 --- a/load.inc +++ /dev/null @@ -1,30 +0,0 @@ -%{lua: - -function source_macros(file) - local macro = nil - - for line in io.lines(file) do - if not macro and line:match("^%%") then - macro = line:match("^%%(.*)$") - line = nil - end - - if macro then - if line and macro:match("^.-%s*\\%s*$") then - macro = macro .. '\n' .. line - end - - if not macro:match("^.-%s*\\%s*$") then - rpm.define(macro) - macro = nil - end - end - end -end - -} - -# Include the constants defined in macros files. Could be dropped as soon as -# RPM supports the %%load macro (RPM 4.12+ probably). -# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html -%define load() %{lua:source_macros(rpm.expand("%1"))} diff --git a/ruby.spec b/ruby.spec index 89bcc0d..a524fc7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -86,13 +86,10 @@ Source8: rubygems.attr Source9: rubygems.req Source10: rubygems.prov -# %%load function should be supported in RPM 4.12+. -# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html -Source100: load.inc -%include %{SOURCE100} - -%{load %{SOURCE4}} -%{load %{SOURCE5}} +# The load directive is supported since RPM 4.12, i.e. F21+. The build process +# fails on older Fedoras. +%{?load:%{SOURCE4}} +%{?load:%{SOURCE5}} # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -875,6 +872,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Aug 25 2014 Vít Ondruch - 2.1.2-24 +- Use load macro introduced in RPM 4.12. + * Mon Aug 18 2014 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild