package init

This commit is contained in:
lyn1001 2020-08-21 14:47:56 +08:00
parent 5aeafe1bbf
commit dcf22d6c17
5 changed files with 125 additions and 0 deletions

BIN
RedCloth-4.3.2.gem Normal file

Binary file not shown.

View File

@ -0,0 +1,30 @@
From 00b55ace17ed408b1b6129e1ba6c90fd4f0a6d2c Mon Sep 17 00:00:00 2001
From: Matijs van Zuijlen <matijs@matijs.net>
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

78
rubygem-RedCloth.spec Normal file
View File

@ -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 <liyanan032@huawei.com> - 4.3.2-1
- Package init

5
rubygem-RedCloth.yaml Normal file
View File

@ -0,0 +1,5 @@
git_url: https://github.com/jgarber/redcloth.git
version_control: github
src_repo: jgarber/redcloth
tag_prefix: "^v"
seperator: "."

View File

@ -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")