libyaml: new recipe (#3427)

This commit is contained in:
Schrijvers Luc
2018-12-03 08:26:55 +01:00
committed by Jérôme Duval
parent 043c3cac5d
commit e7d9a7b32d
2 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
SUMMARY="A C library for parsing and emitting YAML"
DESCRIPTION="LibYAML covers presenting and parsing processes. Thus LibYAML \
defines the following two processors:
* Parser, which takes an input stream of bytes and produces a sequence of \
parsing events.
* Emitter, which takes a sequence of events and produces a stream of bytes."
HOMEPAGE="https://pyyaml.org/wiki/LibYAML"
COPYRIGHT="2017-2018 Ingy döt Net
2006-2016 Kirill Simonov"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://pyyaml.org/download/libyaml/yaml-$portVersion.tar.gz"
CHECKSUM_SHA256="78281145641a080fb32d6e7a87b9c0664d611dcb4d542e90baf731f51cbb59cd"
SOURCE_DIR="yaml-$portVersion"
PATCHES="libyaml-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="2.0.5"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libyaml$secondaryArchSuffix = $portVersion
lib:libyaml_0$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libyaml${secondaryArchSuffix}_devel = $portVersion
devel:libyaml$secondaryArchSuffix = $libVersionCompat
devel:libyaml_0$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libyaml$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage libyaml$secondaryArchSuffix \
"$libDir"/libyaml-0.so.$libVersion
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm -f "$libDir"/*.la
prepareInstalledDevelLibs libyaml libyaml-0
fixPkgconfig
# devel package
packageEntries devel \
"$developDir"
}
TEST()
{
make check
}

View File

@@ -0,0 +1,29 @@
From d5fe8e4b8ed4b62f27d94cb45d925a735cf2b817 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 1 Dec 2018 14:50:06 +0100
Subject: fix gcc2 parse error
diff --git a/tests/run-dumper.c b/tests/run-dumper.c
index 302b9b9..346db0f 100644
--- a/tests/run-dumper.c
+++ b/tests/run-dumper.c
@@ -80,6 +80,7 @@ int compare_nodes(yaml_document_t *document1, int index1,
yaml_document_t *document2, int index2, int level)
{
if (level++ > 1000) return 0;
+ {
yaml_node_t *node1 = yaml_document_get_node(document1, index1);
yaml_node_t *node2 = yaml_document_get_node(document2, index2);
int k;
@@ -124,6 +125,7 @@ int compare_nodes(yaml_document_t *document1, int index1,
break;
}
return 1;
+ }
}
int compare_documents(yaml_document_t *document1, yaml_document_t *document2)
--
2.19.1