summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMykola Dimura2020-11-14 23:46:52 +0100
committerMykola Dimura2020-11-14 23:46:52 +0100
commitee678ec7f20bd0a4222d14276b92625cf5763181 (patch)
treee50453475ada7f389be8636ce321cbfd68765557 /PKGBUILD
parent74127653279c250f6ef1d67922e8b657b808c657 (diff)
downloadaur-mingw-w64-spdlog-git.tar.gz
Use build parameters similar to the official spdlog package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 15 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index eaa3de8a89dc..b07fb54038f1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,14 @@
# Maintainer: Mykola Dimura <mykola.dimura@gmail.com>
pkgname=mingw-w64-spdlog-git
-pkgver=1.3.0.r2057.486b693
+pkgver=1.8.1.r11.geebb921c
pkgrel=1
pkgdesc='Very fast, header only, C++ logging library'
arch=('any')
url='https://github.com/gabime/spdlog/'
license=('MIT')
-makedepends=('git' 'mingw-w64-cmake')
+makedepends=('git' 'mingw-w64-cmake' 'mingw-w64-fmt')
+provides=('mingw-w64-spdlog')
source=("${pkgname%-git}::git://github.com/gabime/spdlog.git")
sha512sums=('SKIP')
@@ -15,7 +16,7 @@ _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
pkgver() {
cd "$srcdir/${pkgname%-git}"
- echo "$(grep 'project(' CMakeLists.txt | cut -d ' ' -f3 | cut -d ')' -f1).r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}
build() {
@@ -23,7 +24,14 @@ build() {
export LDFLAGS=""
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
- ${_arch}-cmake -DSPDLOG_BUILD_TESTING=OFF -DSPDLOG_BUILD_BENCH=OFF ..
+ ${_arch}-cmake \
+ -DSPDLOG_BUILD_BENCH=OFF \
+ -DSPDLOG_FMT_EXTERNAL=ON \
+ -DSPDLOG_BUILD_SHARED=ON \
+ -DSPDLOG_BUILD_TESTS=OFF \
+ -DCMAKE_BUILD_TYPE=None \
+ -Wno-dev \
+ ..
make
popd
done
@@ -33,8 +41,8 @@ package() {
for _arch in ${_architectures}; do
cd "${srcdir}/${pkgname%-git}/build-${_arch}"
make DESTDIR="${pkgdir}" install
- #${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
- #${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
- install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" ${pkgdir}/usr/share/licenses/spdlog/LICENSE
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
+ install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
done
}