# Description: C bindings for sfml.
# URL: https://www.sfml-dev.org/download/csfml/
# Maintainer: unmaintained
# Depends on: sfml

name=csfml
version=2.5.2
release=1
source=(https://github.com/SFML/CSFML/archive/$version/$name-$version.tar.gz)

build() {
	cmake -S CSFML-$version -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-D CMAKE_BUILD_TYPE=Release \
		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
		-D SFML_BUILD_DOC=false \
		-Wno-dev

	cmake --build build
	DESTDIR=$PKG cmake --install build

	rm -fr $PKG/usr/share/CSFML
	rm -fr $PKG/usr/share/doc
}
