contrib/libfixmath/Pkgfile

27 lines
883 B
Plaintext

# Description: the math.h functions in fixed point (16.16) format
# URL: https://github.com/PetteriAimonen/libfixmath
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on:
name=libfixmath
version=2022.12.27
release=1
_commit=ddff910fc03c6e9581ed186268b508dc0f51f4b7
source=(https://github.com/PetteriAimonen/libfixmath/archive/$_commit/$name-$version.tar.gz)
build() {
cmake -S $name-$_commit -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-Wno-dev
cmake --build build
#DESTDIR=$PKG cmake --install build
mkdir -p $PKG/usr/{lib,include/libfixmath}
cp build/liblibfixmath.a $PKG/usr/lib
cp libfixmath-$_commit/libfixmath/*.h libfixmath-$_commit/libfixmath/*.hpp $PKG/usr/include/libfixmath
}