summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aecc6b3e34e2bd2e3a6c33f2361ab59a12726b72 (plain)
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
37
38
39
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: acxz <akashpatel2008 at yahoo dot com>
_base=matplotlib-cpp
pkgname="${_base}"-git
pkgver=r177.ef0383f
pkgrel=2
pkgdesc="Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib"
arch=('i686' 'x86_64')
url="https://github.com/lava/${_base}"
license=(MIT)
depends=(python-matplotlib)
makedepends=(cmake git)
provides=(${_base})
conflicts=(${_base})
source=(git+${url}.git)
sha512sums=('SKIP')

pkgver() {
  cd "${_base}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
  cmake \
    -S "${_base}" \
    -B build \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=TRUE \
    -DCMAKE_CXX_STANDARD=17 \
    -DCMAKE_CXX_COMPILER=g++ \
    -Wno-dev
  cmake --build build --target all
}

package() {
  DESTDIR="${pkgdir}" cmake --build build --target install
  install -Dm 644 "${_base}"/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}