1 # Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2 # Contributor: David Runge <dvzrv@archlinux.org>
3 # Contributor: Markus Martin <markus@archwyrm.net>
8 pkgdesc="YAML parser and emitter in C++, written around the YAML 1.2 spec"
9 url="https://github.com/jbeder/yaml-cpp"
12 depends=('gcc-libs' 'glibc')
13 provides=('libyaml-cpp.so')
14 makedepends=('cmake' 'ninja')
15 source=("https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-${pkgver}.tar.gz"
16 https://patch-diff.githubusercontent.com/raw/jbeder/yaml-cpp/pull/1037.patch)
17 sha512sums=('2de0f0ec8f003cd3c498d571cda7a796bf220517bad2dc02cba70c522dddde398f33cf1ad20da251adaacb2a07b77844111f297e99d45a7c46ebc01706bbafb5'
18 'c20d5e9393496052c3326d78555345b83a2345831d4cbfec8cf50f9576f2731ddc456148815b23dba3765b61a1a69b0c05c9618f91751dad124dbe8f7ca19609')
21 cd "${pkgname}-${pkgname}-${pkgver}"
22 patch -Np1 -i "${srcdir}"/1037.patch
26 cd "${pkgname}-${pkgname}-${pkgver}"
29 -DCMAKE_INSTALL_PREFIX=/usr \
30 -DBUILD_SHARED_LIBS=ON \
31 -DYAML_BUILD_SHARED_LIBS=ON \
32 -DCMAKE_BUILD_TYPE=Release
37 cd "${pkgname}-${pkgname}-${pkgver}"
39 build/test/yaml-cpp-tests
43 cd "${pkgname}-${pkgname}-${pkgver}"
44 DESTDIR="$pkgdir" ninja -C build install
45 install -vDm 644 {CONTRIBUTING,README}.md -t "$pkgdir/usr/share/doc/$pkgname"
46 install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
47 rm -rf "${pkgdir}"/usr/{lib,lib/pkgconfig,include}/*{gtest,gmock}*
48 rm -rf "${pkgdir}"/usr/lib/cmake/GTest