Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml_cpp: Changed recipe to build v0.5.3 #7591

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions Y/yaml_cpp/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,32 @@
using BinaryBuilder, Pkg

name = "yaml_cpp"
version = v"0.7.0"
version = v"0.5.3"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-$(version).zip",
"4d5e664a7fb2d7445fc548cc8c0e1aa7b1a496540eb382d137e2cc263e6d3ef5")
GitSource("https://github.com/jbeder/yaml-cpp.git", "b57efe94e7d445713c29f863adb8c23438eaa217"),
DirectorySource("bundled"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/yaml-cpp*/

patch -p1 < ../patches/missing_boost_next_prior_include.patch

if [[ $target == *-apple-darwin* || $target == *-freebsd* ]]; then
cmake_extra_args=-DCMAKE_C_FLAGS=-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
fi

mkdir build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DYAML_BUILD_SHARED_LIBS=ON \
-DYAML_CPP_BUILD_TESTS=OFF
-DBUILD_SHARED_LIBS=ON \
-DYAML_CPP_BUILD_TOOLS=OFF \
$cmake_extra_args

make -j${nproc}
make install
Expand All @@ -32,11 +40,12 @@ platforms = expand_cxxstring_abis(supported_platforms(; experimental=true))

# The products that we will ensure are always built
products = [
LibraryProduct("libyaml-cpp", :libyaml_cpp)
LibraryProduct(["libyaml-cpp", "yaml-cpp"], :libyaml_cpp)
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
dependencies = [
BuildDependency(PackageSpec("boost_jll", v"1.76.0")),
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down
12 changes: 12 additions & 0 deletions Y/yaml_cpp/bundled/patches/missing_boost_next_prior_include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/include/yaml-cpp/node/detail/iterator.h b/include/yaml-cpp/node/detail/iterator.h
index 2c701af..08e2672 100644
--- a/include/yaml-cpp/node/detail/iterator.h
+++ b/include/yaml-cpp/node/detail/iterator.h
@@ -11,6 +11,7 @@
#include "yaml-cpp/node/ptr.h"
#include "yaml-cpp/node/detail/node_iterator.h"
#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/next_prior.hpp>
#include <boost/utility.hpp>

namespace YAML {