Unbundled libyaml, it is identical with upstream 0.2.2

This commit is contained in:
Jitka Plesnikova 2019-06-12 09:13:18 +02:00
parent 5cb7ce2c91
commit 01c74834f9
2 changed files with 27 additions and 6 deletions

View File

@ -0,0 +1,12 @@
diff -up YAML-LibYAML-0.79/LibYAML/Makefile.PL.orig YAML-LibYAML-0.79/LibYAML/Makefile.PL
--- YAML-LibYAML-0.79/LibYAML/Makefile.PL.orig 2019-06-11 21:35:34.000000000 +0200
+++ YAML-LibYAML-0.79/LibYAML/Makefile.PL 2019-06-12 08:53:09.437296055 +0200
@@ -25,7 +25,7 @@ WriteMakefile(
# CCFLAGS => '-pedantic -Wall',
# CCFLAGS => '-Wall',
DEFINE => $DEFINE,
- LIBS => [''], # e.g., '-lm'
+ LIBS => ['-lyaml'], # e.g., '-lm'
INC => '-I.',
OBJECT => $obj_files,
ABSTRACT_FROM => 'lib/YAML/XS/LibYAML.pm',

View File

@ -13,17 +13,21 @@ Summary: Perl YAML Serialization using XS and libyaml
License: GPL+ or Artistic License: GPL+ or Artistic
URL: https://metacpan.org/release/YAML-LibYAML URL: https://metacpan.org/release/YAML-LibYAML
Source0: https://cpan.metacpan.org/modules/by-module/YAML/YAML-LibYAML-%{version}.tar.gz Source0: https://cpan.metacpan.org/modules/by-module/YAML/YAML-LibYAML-%{version}.tar.gz
Patch0: YAML-LibYAML-0.79-Unbundled-libyaml.patch
# Build # Build
BuildRequires: coreutils BuildRequires: coreutils
BuildRequires: findutils BuildRequires: findutils
BuildRequires: gcc BuildRequires: gcc
BuildRequires: make BuildRequires: make
BuildRequires: libyaml >= 0.2.2
BuildRequires: libyaml-devel >= 0.2.2
BuildRequires: perl-devel BuildRequires: perl-devel
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: perl(Config) BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: sed
# Module # Module
BuildRequires: perl(B::Deparse) BuildRequires: perl(B::Deparse)
@ -63,12 +67,7 @@ BuildRequires: perl(Path::Class)
# Dependencies # Dependencies
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(B::Deparse) Requires: perl(B::Deparse)
Requires: libyaml >= 0.2.2
# libyaml is tweaked and bundled
# https://github.com/ingydotnet/yaml-libyaml-pm/issues/49
# version number determined by comparing commits in upstream repo:
# https://github.com/yaml/libyaml/
Provides: bundled(libyaml) = 0.2.2
# Avoid provides for perl shared objects # Avoid provides for perl shared objects
%{?perl_default_filter} %{?perl_default_filter}
@ -80,6 +79,15 @@ bound to Python and was later bound to Ruby.
%prep %prep
%setup -q -n YAML-LibYAML-%{version} %setup -q -n YAML-LibYAML-%{version}
# Unbundled libyaml, the source files are the same as in libyaml-0.2.2
# It was determined by comparing commits in upstream repo:
# https://github.com/yaml/libyaml/
%patch0 -p1 -b .orig
for file in api.c dumper.c emitter.c loader.c parser.c reader.c scanner.c \
writer.c yaml.h yaml_private.h; do
rm LibYAML/$file
sed -i -e "/^LibYAML\/$file/d" MANIFEST
done
%build %build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1
@ -108,6 +116,7 @@ make test
- Support aliasing scalars resolved as null or booleans - Support aliasing scalars resolved as null or booleans
- Add YAML::XS::LibYAML::libyaml_version() - Add YAML::XS::LibYAML::libyaml_version()
- Support standard !!int/!!float tags instead of dying - Support standard !!int/!!float tags instead of dying
- Unbundled libyaml, it is identical with upstream 0.2.2
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.78-2 * Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.78-2
- Perl 5.30 rebuild - Perl 5.30 rebuild