diff --git a/RedCloth-4.3.2.gem b/RedCloth-4.3.2.gem new file mode 100644 index 0000000000000000000000000000000000000000..3f501c886d3e256a59774efaf4258905a9abff90 Binary files /dev/null and b/RedCloth-4.3.2.gem differ diff --git a/rubygem-RedCloth-4.3.2-Replace-deprecated-YAML-load_documents.patch b/rubygem-RedCloth-4.3.2-Replace-deprecated-YAML-load_documents.patch new file mode 100644 index 0000000000000000000000000000000000000000..f390afd582689c79c07a68d4f986055d41846e30 --- /dev/null +++ b/rubygem-RedCloth-4.3.2-Replace-deprecated-YAML-load_documents.patch @@ -0,0 +1,30 @@ +From 00b55ace17ed408b1b6129e1ba6c90fd4f0a6d2c Mon Sep 17 00:00:00 2001 +From: Matijs van Zuijlen +Date: Tue, 29 Aug 2017 08:08:36 +0200 +Subject: [PATCH] Replace deprecated YAML.load_documents + +The .load_documents method is deprecated and seems to have been removed +entirely in the upcoming Ruby 2.5. +--- + spec/spec_helper.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb +index af6279a..74a5cae 100644 +--- a/spec/spec_helper.rb ++++ b/spec/spec_helper.rb +@@ -26,11 +26,11 @@ def fixtures + Dir[File.join(File.dirname(__FILE__), *%w[fixtures *.yml])].each do |testfile| + testgroup = File.basename(testfile, '.yml') + num = 0 +- YAML::load_documents(File.open(testfile)) do |doc| ++ YAML::load_stream(File.open(testfile)) do |doc| + name = doc['name'] || num + @fixtures["#{testgroup} #{name}"] = doc + num += 1 + end + end + @fixtures +-end +\ No newline at end of file ++end diff --git a/rubygem-RedCloth.spec b/rubygem-RedCloth.spec new file mode 100644 index 0000000000000000000000000000000000000000..2df3cea57026cb9be64ca0047acffdee2676e5f0 --- /dev/null +++ b/rubygem-RedCloth.spec @@ -0,0 +1,78 @@ +%global gem_name RedCloth +Name: rubygem-%{gem_name} +Version: 4.3.2 +Release: 1 +Summary: Textile parser for Ruby +License: MIT +URL: http://redcloth.org +Source0: https://rubygems.org/gems/RedCloth-%{version}.gem +Patch0: rubygem-redcloth-4.2.9-unsigned-char-fix.patch +Patch1: rubygem-RedCloth-4.3.2-Replace-deprecated-YAML-load_documents.patch +BuildRequires: ruby(release) rubygems-devel rubygem(rspec) < 3 ruby-devel gcc +%description +Textile parser for Ruby. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +%description doc +Documentation for %{name}. + +%prep +gem unpack %{SOURCE0} +%setup -q -D -T -n %{gem_name}-%{version} +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +%patch0 -p1 +%patch1 -p1 + +%build +gem build %{gem_name}.gemspec +%gem_install +pushd .%{gem_instdir}/ext/redcloth_scan +mkdir ext +ln -sf .. ext/redcloth_scan +popd + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ +mkdir -p %{buildroot}%{gem_extdir_mri} +cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/ +rm -rf %{buildroot}%{gem_instdir}/ext/ +mkdir -p %{buildroot}%{_bindir} +cp -pa .%{_bindir}/* \ + %{buildroot}%{_bindir}/ +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +%check +pushd .%{gem_instdir} +rspec2 -I$(dirs +1)%{gem_extdir_mri} spec +popd + +%files +%dir %{gem_instdir} +%{_bindir}/redcloth +%{gem_extdir_mri} +%exclude %{gem_instdir}/.* +%license %{gem_instdir}/COPYING +%{gem_instdir}/bin +%exclude %{gem_instdir}/redcloth.gemspec +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/README.rdoc +%{gem_instdir}/Rakefile +%doc %{gem_instdir}/doc +%{gem_instdir}/spec +%{gem_instdir}/tasks + +%changelog +* Wed Aug 12 2020 yanan li - 4.3.2-1 +- Package init diff --git a/rubygem-RedCloth.yaml b/rubygem-RedCloth.yaml new file mode 100644 index 0000000000000000000000000000000000000000..64009a6bb6933e0c3941b72ec2837ba0455e359c --- /dev/null +++ b/rubygem-RedCloth.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/jgarber/redcloth.git +version_control: github +src_repo: jgarber/redcloth +tag_prefix: "^v" +seperator: "." diff --git a/rubygem-redcloth-4.2.9-unsigned-char-fix.patch b/rubygem-redcloth-4.2.9-unsigned-char-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..ee8a536c9d421ea1085181546c31997473a13889 --- /dev/null +++ b/rubygem-redcloth-4.2.9-unsigned-char-fix.patch @@ -0,0 +1,12 @@ +diff --git a/ext/redcloth_scan/extconf.rb b/ext/redcloth_scan/extconf.rb +index 506d4a3..edd46c4 100644 +--- a/ext/redcloth_scan/extconf.rb ++++ b/ext/redcloth_scan/extconf.rb +@@ -1,6 +1,6 @@ + require 'mkmf' + CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags'] +-$CFLAGS << ' -O0 -Wall ' if CONFIG['CC'] =~ /gcc/ ++$CFLAGS << ' -O0 -Wall -fsigned-char' if CONFIG['CC'] =~ /gcc/ + dir_config("redcloth_scan") + have_library("c", "main") + create_makefile("redcloth_scan")