aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-03-02 11:33:17 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-03-02 13:38:32 -0300
commita6ff02d674ff3a33a632ca6d3901f851e0727707 (patch)
treed9e669970ae8258f1be1e01a927244a91ea6b1c9
parent4cbfe90d3147fd6d65f65405972e85944e335def (diff)
downloadaports-a6ff02d674ff3a33a632ca6d3901f851e0727707.tar.gz
aports-a6ff02d674ff3a33a632ca6d3901f851e0727707.tar.bz2
aports-a6ff02d674ff3a33a632ca6d3901f851e0727707.tar.xz
main/gtest: modernize
-rw-r--r--main/gtest/APKBUILD37
1 files changed, 14 insertions, 23 deletions
diff --git a/main/gtest/APKBUILD b/main/gtest/APKBUILD
index f4bf7a2941..62d78346ef 100644
--- a/main/gtest/APKBUILD
+++ b/main/gtest/APKBUILD
@@ -1,53 +1,44 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gtest
pkgver=1.10.0
-pkgrel=0
+pkgrel=1
pkgdesc="Google Test - C++ testing utility based on the xUnit framework (like JUnit)"
url="https://github.com/google/googletest"
arch="all"
options="!check" # googletest-death-test-test hangs
license="BSD-3-Clause"
-depends=""
-depends_dev="${pkgname}=${pkgver}-r${pkgrel} gmock=${pkgver}-r${pkgrel} cmake"
+depends_dev="${pkgname}=$pkgver-r${pkgrel} gmock=$pkgver-r${pkgrel} cmake"
makedepends="$depends_dev python3-dev"
-install=""
subpackages="$pkgname-dev gmock"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/googletest/archive/release-$pkgver.tar.gz
gtest-1.8.1-libversion.patch
gtest-1.8.1-null-pointer.patch" # https://src.fedoraproject.org/rpms/gtest/tree/master
-builddir="$srcdir"/googletest-release-${pkgver}
+builddir="$srcdir"/googletest-release-$pkgver
prepare() {
- cd "$builddir"
# fixup version as they are never correct
sed -E "s|(GOOGLETEST_VERSION) [0-9\\.]+|\\1 ${pkgver}|" -i CMakeLists.txt
}
build() {
- cd "$builddir"
- mkdir build
- cd build
-
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DBUILD_SHARED_LIBS=ON \
- -DPYTHON_EXECUTABLE=python3 \
- -Dgtest_build_tests=ON \
- ..
- make
+ cmake -B build . \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=ON \
+ -DPYTHON_EXECUTABLE=python3 \
+ -Dgtest_build_tests=ON
+ make -C build
}
check() {
- cd "$builddir"/build
- make test
+ make -C build test
}
package() {
- cd "$builddir"
-
- DESTDIR="${pkgdir}" cmake --build build --target install
- find "${pkgdir}" -name '*.pump' -print -delete
+ make -C build DESTDIR="$pkgdir" install
+ find "$pkgdir" -name '*.pump' -print -delete
}
gmock() {