archrelease: copy trunk to extra-x86_64
[arch-packages.git] / fmt / repos / extra-x86_64 / PKGBUILD
blobd304436590c48b4c11620d8d85e0a368bca470c2
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Mihai Bişog <mihai.bisog@gmail.com>
4 pkgname=fmt
5 pkgver=8.0.1
6 pkgrel=2
7 pkgdesc='Open-source formatting library for C++'
8 arch=(x86_64)
9 url=https://fmt.dev
10 license=(BSD)
11 depends=(gcc-libs)
12 makedepends=(
13   cmake
14   doxygen
15   git
16   ninja
17   npm
18   python-pip
19   python-virtualenv
21 provides=(libfmt.so)
22 _tag=d141cdbeb0fb422a3fb7173b285fd38e0d1772dc
23 source=(git+https://github.com/fmtlib/fmt.git#tag=${_tag})
24 b2sums=(SKIP)
26 prepare() {
27   pushd fmt
28   # https://github.com/fmtlib/fmt/pull/2376
29   git cherry-pick -n c9a10631cb3a656b0a0a3ba3cf0ef7ea541df30f
30   # https://github.com/fmtlib/fmt/pull/2432
31   git cherry-pick -n 55d3c4831d67141265c9462360d20787413e692e
32   # https://github.com/fmtlib/fmt/pull/2575
33   git cherry-pick -n 6eaceb5f73f12943376c833a8433b38ff7faed10
34   popd
36   npm install less less-plugin-clean-css
37   sed "s/'lessc',/'npx', 'lessc',/" -i fmt/doc/build.py
40 pkgver() {
41   cd fmt
42   git describe --tags
45 build() {
46   cmake -S fmt -B build -G Ninja \
47     -DCMAKE_BUILD_TYPE=None \
48     -DCMAKE_INSTALL_PREFIX=/usr \
49     -DCMAKE_INSTALL_LIBDIR=/usr/lib \
50     -DBUILD_SHARED_LIBS=ON
51   cmake --build build
52   cmake --build build --target doc
55 check() {
56   cmake --build build --target test
59 package() {
60   DESTDIR="${pkgdir}" cmake --build build --target install
61   install -Dm 644 fmt/LICENSE.rst -t "${pkgdir}"/usr/share/licenses/fmt/
64 # vim: ts=2 sw=2 et: