ingydotnet / yaml-libyaml-pm

Perl Binding to libyaml
http://search.cpan.org/dist/YAML-LibYAML/
33 stars 37 forks source link

ability to use system-wide libyaml (when the bundled one is gone) #78

Open real-dam opened 6 years ago

real-dam commented 6 years ago

In Debian we are currently applying the following patch to YAML-LibYAML. We thought you might be interested in it too.

Description: ability to use system-wide libyaml
 Link with libyaml when USE_SYSTEM_LIBYAML is present in the environment.
 .
 This probably needs more work like moving bundled libyaml in a subdirectory
 and recurse in it only if needed, but this patch is useful for Debian as it
 is, because it allows us to strip the bindled libyaml from the sources and
 link with the system-wide libyaml.
 .
 The open_ended=0 setting is there to prevent libyaml from appending document
 end marker ('...') when dumping. It is optional according to the spec and its
 presense breaks a couple of tests.
Author: Damyan Ivanov <dmn@debian.org>
Bug: https://github.com/ingydotnet/yaml-libyaml-pm/issues/49
Bug-Debian: https://bugs.debian.org/664224

The patch is tracked in our Git repository at https://anonscm.debian.org/cgit/pkg-perl/packages/libyaml-libyaml-perl.git/plain/debian/patches/system-libyaml.patch

Thanks for considering, Damyan Ivanov, Debian Perl Group

perlpunk commented 6 years ago

Thanks! I guess we can add the environment variable. Works here. Moving the libyaml files into it's own directory is also I good idea.

The patch for open_ended looks ok. There is a new libyaml release in the works, that would make that patch unnecessary, but that could take a while. Cc @ingydotnet