summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPatrick Northon2022-07-10 23:56:41 -0400
committerPatrick Northon2022-07-10 23:56:41 -0400
commit753a43aa75749639b1bbbc2b4dfc92958ff358f9 (patch)
tree99de6187cf9eb1ffcdb98e02412cb161aa294af6 /PKGBUILD
parentee165bfc02fa507b8ad23c296720dde1287405fb (diff)
downloadaur-range-v3-git.tar.gz
Revamp and tests added.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD62
1 files changed, 37 insertions, 25 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 20a228ef8992..e460c473b1b3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,56 @@
-# Maintainer: Theodoros Theodoridis <theodoridisgr@gmail.com>
+# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
+# Contributor: Theodoros Theodoridis <theodoridisgr@gmail.com>
-pkgname=range-v3-git
-pkgver=0.4.0.r34.ga50fa8c5
+_pkgname='range-v3'
+pkgname=${_pkgname}-git
+pkgver=0.12.0.r11.g3d6e6f56e
pkgrel=1
-pkgdesc="Eric Niebler' C++ ranges library."
+pkgdesc='Experimental range library for C++11/14/17'
arch=('any')
url='https://github.com/ericniebler/range-v3'
license=('custom')
makedepends=('git' 'cmake')
-source=("git+https://github.com/ericniebler/range-v3.git")
+source=("git+https://github.com/ericniebler/${_pkgname}.git")
md5sums=('SKIP')
-pkgver() {
- cd range-v3
- git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
-}
+_dir="${_pkgname}"
+
+_flags=(
+ -Wno-dev
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DRANGE_V3_EXAMPLES=OFF
+ -DRANGE_V3_PERF=OFF
+ -DRANGES_ENABLE_WERROR=OFF
+ -DRANGES_NATIVE=OFF
+ -DRANGES_CXX_STD=20
+)
-prepare() {
- cd "${srcdir}/range-v3"
- rm -rf build && mkdir build
+pkgver() {
+ cd "${_dir}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd "${srcdir}/range-v3"
+ cmake -S "${_dir}" -B 'build' \
+ "${_flags[@]}" \
+ -DRANGE_V3_TESTS=OFF \
+ -DRANGE_V3_HEADER_CHECKS=OFF
+ cmake --build 'build'
+}
- cd build
- cmake .. \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DRANGE_V3_TESTS=OFF \
- -DRANGE_V3_HEADER_CHECKS=OFF \
- -DRANGE_V3_EXAMPLES=OFF \
- -DRANGE_V3_PERF=OFF
- make
+check() {
+ cmake -S "${_dir}" -B 'build' \
+ "${_flags[@]}" \
+ -DRANGE_V3_TESTS=ON \
+ -DRANGE_V3_HEADER_CHECKS=ON
+ cmake --build 'build'
+ cmake --build 'build' --target test
}
package() {
- cd "${srcdir}/range-v3"
+ DESTDIR="${pkgdir}" cmake --install 'build'
+
+ cd "${_dir}"
# install custom license
install -Dm644 "LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-
- cd build
- make DESTDIR="${pkgdir}/" install
}