aboutsummaryrefslogtreecommitdiffstats
path: root/community/fmt/APKBUILD
blob: a305fe9dc5453b7dd379130075a918911269d85a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=fmt
pkgver=7.1.2
pkgrel=0
pkgdesc="Open-source formatting library for C++"
url="https://fmt.dev/latest/index.html"
arch="all"
license="MIT"
makedepends="cmake doxygen python3"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/fmtlib/fmt/releases/download/$pkgver/fmt-$pkgver.zip"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		$CMAKE_CROSSOPTS .
	make
}

check() {
	cmake --build . --target test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="72e3ce2f38a0ddba7b68127141620bfa17816ba870907c2b24284fe2fabd35df253f60fa6768c93239d7050b39fa2828e18e7c5f1db9c08d85dd86ee0101d59d  fmt-7.1.2.zip"