| author | Patrick Northon
<northon_patrick3@yahoo.ca> 2022-07-11 03:56:41 UTC |
| committer | Patrick Northon
<northon_patrick3@yahoo.ca> 2022-07-11 03:56:41 UTC |
| parent | ee165bfc02fa507b8ad23c296720dde1287405fb |
| .SRCINFO | +2 | -3 |
| PKGBUILD | +37 | -25 |
diff --git a/.SRCINFO b/.SRCINFO index 2b656be..582a4e0 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = range-v3-git - pkgdesc = Eric Niebler' C++ ranges library. - pkgver = 0.4.0.r34.ga50fa8c5 + pkgdesc = Experimental range library for C++11/14/17 + pkgver = 0.12.0.r11.g3d6e6f56e pkgrel = 1 url = https://github.com/ericniebler/range-v3 arch = any @@ -11,4 +11,3 @@ pkgbase = range-v3-git md5sums = SKIP pkgname = range-v3-git - diff --git a/PKGBUILD b/PKGBUILD index 20a228e..e460c47 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 }