aboutsummaryrefslogblamecommitdiffstats
path: root/community/fmt/APKBUILD
blob: d852b917f81fd4fe94ce5ef9cae8ee7d02f0cd63 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                          
           
            
        


                                                
             
                                   
                                       
                                                                                








                                                                                          
                                         
                                               
                                  










                                      
                                                                                                                                                            
# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=fmt
pkgver=7.1.0
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="9006cc93c78fcd9372aa65905f471ca19670a648b36b9422c6a6f812acce73f7434be89815a986ebe797ad5ee069b8d55b2ae5e51311674b1b8a9cf9b1343ad8  fmt-7.1.0.zip"