# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Mihai Bişog <mihai.bisog@gmail.com>
pkgname=fmt
pkgver=10.2.0
pkgrel=1
pkgdesc='Open-source formatting library for C++'
arch=('armv7h' 'aarch64')
url=https://fmt.dev
license=(MIT)
depends=(gcc-libs)
makedepends=(
cmake
git
ninja
npm
python-six
python-wheel
)
provides=(libfmt.so)
_tag=67c0c0c09cf74d407d71a29c194761981614df3e
source=(
git+https://github.com/fmtlib/fmt.git#tag=${_tag}
fmt-no-pip-no-virtualenv.patch
fmt-10.0.0-sphinx.patch
)
b2sums=('SKIP'
'0bc421afdc4c2527525ce2e21740c9f72e05431394fb4710c1a8fa6d3bb2ee20d0630e2a76ddbac3c0ba27c1ab08f0c8e27d060def1370721b1c94246cbbf0ff'
'4eabdf38317e22e6b650b91821f1fab50bb3641e4f9a63847cb9b823becd3a4106fe47df37c8dc886f5fe1d1d3e529136c867459105df07c359582214d6fa01f')
prepare() {
cd fmt
patch -Np1 -i ../fmt-no-pip-no-virtualenv.patch
patch -Np1 -i ../fmt-10.0.0-sphinx.patch
}
pkgver() {
cd fmt
git describe --tags
}
build() {
cmake -S fmt -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DBUILD_SHARED_LIBS=ON
cmake --build build
}
package() {
DESTDIR="${pkgdir}" cmake --build build --target install
install -Dm 644 fmt/LICENSE -t "${pkgdir}"/usr/share/licenses/fmt/
}
# vim: ts=2 sw=2 et: