From e7d9a7b32d0fbbdbfd9f16863b4826fb5a1e5008 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Mon, 3 Dec 2018 08:26:55 +0100 Subject: [PATCH] libyaml: new recipe (#3427) --- dev-libs/libyaml/libyaml-0.2.1.recipe | 77 +++++++++++++++++++ .../libyaml/patches/libyaml-0.2.1.patchset | 29 +++++++ 2 files changed, 106 insertions(+) create mode 100644 dev-libs/libyaml/libyaml-0.2.1.recipe create mode 100644 dev-libs/libyaml/patches/libyaml-0.2.1.patchset diff --git a/dev-libs/libyaml/libyaml-0.2.1.recipe b/dev-libs/libyaml/libyaml-0.2.1.recipe new file mode 100644 index 000000000..92ada7292 --- /dev/null +++ b/dev-libs/libyaml/libyaml-0.2.1.recipe @@ -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 +} diff --git a/dev-libs/libyaml/patches/libyaml-0.2.1.patchset b/dev-libs/libyaml/patches/libyaml-0.2.1.patchset new file mode 100644 index 000000000..170151f8a --- /dev/null +++ b/dev-libs/libyaml/patches/libyaml-0.2.1.patchset @@ -0,0 +1,29 @@ +From d5fe8e4b8ed4b62f27d94cb45d925a735cf2b817 Mon Sep 17 00:00:00 2001 +From: begasus +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 +