blob: 0049070660051e0d6bc2779ef96e417b57c7a4da (
plain)
1 # Description: YAML parser and emitter in C++, written around the YAML 1.2 spec
2 # URL: https://github.com/jbeder/yaml-cpp
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: cmake
5 # Optional: ninja
6
7 name=yaml-cpp
8 version=0.7.0
9 release=1
10 source=(https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-$version/$name-$version.tar.gz
11 yaml-cpp-0.6.3-abi-breakage.patch patch-yaml-cpp-config.cmake.in)
12
13
14 build() {
15 patch -Np1 -d $name-$name-$version -i $SRC/yaml-cpp-0.6.3-abi-breakage.patch
16 sed -e 's|%%PREFIX%%|/usr|' -i $SRC/patch-yaml-cpp-config.cmake.in
17 patch -Np0 -d $name-$name-$version -i $SRC/patch-yaml-cpp-config.cmake.in
18
19 prt-get isinst ninja && PKGMK_YAMLCPP+=' -G Ninja'
20
21 cmake -S $name-$name-$version -B build $PKGMK_YAMLCPP \
22 -D CMAKE_INSTALL_PREFIX=/usr \
23 -D CMAKE_INSTALL_LIBDIR=lib \
24 -D CMAKE_BUILD_TYPE=Release \
25 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
26 -D BUILD_SHARED_LIBS=ON \
27 -D YAML_BUILD_SHARED_LIBS=ON \
28 -D YAML_CPP_BUILD_TESTS=OFF \
29 -D YAML_CPP_BUILD_TOOLS=OFF \
30 -Wno-dev
31 cmake --build build
32 DESTDIR=$PKG cmake --install build
33
34 cmake -S $name-$name-$version -B build-static $PKGMK_YAMLCPP \
35 -D CMAKE_INSTALL_PREFIX=/usr \
36 -D CMAKE_INSTALL_LIBDIR=lib \
37 -D CMAKE_BUILD_TYPE=Release \
38 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
39 -D BUILD_SHARED_LIBS=OFF \
40 -D YAML_BUILD_SHARED_LIBS=OFF \
41 -D YAML_CPP_BUILD_TESTS=OFF \
42 -D YAML_CPP_BUILD_TOOLS=OFF \
43 -Wno-dev
44 cmake --build build-static
45 DESTDIR=$PKG cmake --install build-static
46 }
|