Skip to content

Commit

Permalink
Merge pull request #7834 from cathaysia/patch-1
Browse files Browse the repository at this point in the history
add cppcoro library (header only)
  • Loading branch information
lazka authored Jan 29, 2021
2 parents 8783d9d + 536bdd6 commit 18057ce
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions mingw-w64-cppcoro/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: https://github.com/cathaysia
_realname=cppcoro
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=r390.a87e97f
pkgrel=1
pkgdesc=" A library of C++ coroutine abstractions for the coroutines TS (mingw-w64)"
arch=('any')
license=("MIT")
url="https://github.com/lewissbaker/cppcoro"
makedepends=('git')
_commit='a87e97f'
source=("${_realname}::git+https://github.com/lewissbaker/${_realname}.git#commit=${_commit}")
sha256sums=('SKIP')

pkgver() {
cd "${srcdir}/${_realname}"
printf "r%s.%s" "$(git rev-list --count "${_commit}")" "$(git rev-parse --short "${_commit}")"
}

build(){
# replace all std::experimental with std
function scan_dir(){
for file in `ls $1`
do
if [ -d $1"/"$file ]
then
scan_dir $1"/"$file
else
sed 's/std::experimental/std/g' $1"/"$file | sed 's/experimental\///g' > $1"/"$file
fi
done
}
scan_dir "${srcdir}/cppcoro/include/cppcoro/"
}
package() {
mkdir -p "${pkgdir}${MINGW_PREFIX}/"
cp -r "${srcdir}/cppcoro/include/" "${pkgdir}${MINGW_PREFIX}/include/"
}

0 comments on commit 18057ce

Please sign in to comment.