blob: 498626a89a9d1d23c63e905cf1aacb0a05e70698 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Christian Heusel <gromit@archlinux.org>
# Contributor: Aleksandar Trifunović <akstrfn at gmail dot com>
_android_arch=armv7a-eabi
pkgname=android-${_android_arch}-abseil-cpp
pkgver=20240722.0
pkgrel=1
arch=('any')
pkgdesc="Collection of C++ library code designed to augment the C++ standard library (Android ${_android_arch})"
url='https://abseil.io'
license=('Apache-2.0')
depends=('android-ndk')
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/abseil/abseil-cpp/archive/${pkgver}/abseil-cpp-${pkgver}.tar.gz")
md5sums=('740fb8f35ebdf82740c294bde408b9c0')
build() {
cd "${srcdir}/abseil-cpp-${pkgver}"
source android-env ${_android_arch}
android-${_android_arch}-cmake \
-S . \
-B build-shared \
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_TESTING=OFF \
-DABSL_BUILD_TESTING=OFF \
-DABSL_BUILD_TEST_HELPERS=OFF \
-DBUILD_SHARED_LIBS=ON
make -C build-shared $MAKEFLAGS
android-${_android_arch}-cmake \
-S . \
-B build-static \
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_TESTING=OFF \
-DABSL_BUILD_TESTING=OFF \
-DABSL_BUILD_TEST_HELPERS=OFF \
-DBUILD_SHARED_LIBS=OFF
make -C build-static $MAKEFLAGS
}
package() {
cd "${srcdir}/abseil-cpp-${pkgver}"
source android-env ${_android_arch}
make -C build-shared DESTDIR="${pkgdir}" install
make -C build-static DESTDIR="${pkgdir}" install
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a || true
}
|