aports/main/abseil-cpp/APKBUILD

162 lines
3.3 KiB
Text

# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=abseil-cpp
pkgver=20240722.1
pkgrel=1
pkgdesc="Abseil Common Libraries (C++) "
url="https://abseil.io/"
arch="all"
license="Apache-2.0"
depends_dev="linux-headers"
makedepends="
$depends_dev
cmake
gtest-dev
samurai
"
checkdepends="tzdata"
subpackages="$pkgname-dev"
source="https://github.com/abseil/abseil-cpp/archive/$pkgver/abseil-cpp-$pkgver.tar.gz
0002-abseil.patch
"
_libs="
atomic_hook_test_helper
bad_any_cast_impl
bad_optional_access
bad_variant_access
base
city
civil_time
cord
cord_internal
cordz_functions
cordz_handle
cordz_info
cordz_sample_token
crc32c
crc_cord_state
crc_cpu_detect
crc_internal
debugging_internal
demangle_internal
die_if_null
examine_stack
exception_safety_testing
exponential_biased
failure_signal_handler
flags_commandlineflag
flags_commandlineflag_internal
flags_config
flags_internal
flags_marshalling
flags_parse
flags_private_handle_accessor
flags_program_name
flags_reflection
flags_usage
flags_usage_internal
graphcycles_internal
hash
hash_generator_testing
hashtablez_sampler
int128
kernel_timeout_internal
leak_check
log_entry
log_flags
log_globals
log_initialize
log_internal_check_op
log_internal_conditions
log_internal_fnmatch
log_internal_format
log_internal_globals
log_internal_log_sink_set
log_internal_message
log_internal_nullguard
log_internal_proto
log_internal_test_actions
log_internal_test_helpers
log_internal_test_matchers
log_severity
log_sink
low_level_hash
malloc_internal
per_thread_sem_test_common
periodic_sampler
pow10_helper
random_distributions
random_internal_distribution_test_util
random_internal_platform
random_internal_pool_urbg
random_internal_randen
random_internal_randen_hwaes
random_internal_randen_hwaes_impl
random_internal_randen_slow
random_internal_seed_material
random_seed_gen_exception
random_seed_sequences
raw_hash_set
raw_logging_internal
scoped_mock_log
scoped_set_env
spinlock_test_common
spinlock_wait
stack_consumption
stacktrace
status
statusor
str_format_internal
strerror
string_view
strings
strings_internal
symbolize
synchronization
test_instance_tracker
throw_delegate
time
time_internal_test_util
time_zone
vlog_config_internal
"
for _lib in $_libs; do
subpackages="$subpackages $pkgname-${_lib//_/-}:abseillib"
done
build() {
cmake -B build -G Ninja \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DABSL_BUILD_TESTING=ON \
-DABSL_BUILD_TEST_HELPERS=ON \
-DABSL_USE_EXTERNAL_GOOGLETEST=ON \
-DABSL_PROPAGATE_CXX_STD=ON \
-DABSL_FIND_GOOGLETEST=ON
cmake --build build
}
check() {
ctest --test-dir build -E absl_str_format_convert_test
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
abseillib() {
pkgdesc="Abseil Common C++ library: $subpkgname"
local libname="${subpkgname#"$pkgname"-}"
amove usr/lib/libabsl_${libname//-/_}.so.*
}
sha512sums="
6062a10220d1250127e2216cea65833f10f37459331254b59df437b5061af81a9645cab39479700cf1843ef7dee51fe125241b0ecb9f715705a45dce4ffae89e abseil-cpp-20240722.1.tar.gz
ddd2a5ce3f37230c3976a8c088670951ebaeee7f1a8275ab4f699cc24dc038bf23ae37abb1c050269161dcd4343e4a75f0570867e6b16a0050af7657f2282e9d 0002-abseil.patch
"