summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 76c9524437dbe4331dfabb9716d85beb074b8633 (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
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Aleksandar Trifunović <akstrfn at gmail dot com>

_name=abseil-cpp
pkgname=abseil-cpp11
pkgver=20220623.1
pkgrel=2
pkgdesc='Common C++ libraries (legacy for C++11)'
arch=(aarch64 x86_64)
url='https://abseil.io'
license=(Apache)
depends=(gcc-libs)
makedepends=(cmake gtest)
source=("https://github.com/abseil/abseil-cpp/archive/$pkgver/$_name-$pkgver.tar.gz")
sha256sums=('91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8')

build() {
  cd $_name-$pkgver
  cmake -B build \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/$pkgname \
    -DCMAKE_INSTALL_LIBDIR=lib/$pkgname \
    -DCMAKE_SKIP_INSTALL_RPATH=OFF \
    -DCMAKE_INSTALL_RPATH=/usr/lib/$pkgname \
    -DCMAKE_CXX_STANDARD=11 \
    -DBUILD_SHARED_LIBS=ON \
    -DABSL_USE_EXTERNAL_GOOGLETEST=ON \
    -DABSL_FIND_GOOGLETEST=ON
  cmake --build build
}

package() {
  cd $_name-$pkgver
  DESTDIR="$pkgdir" cmake --install build
}