Skip to content

Commit 18057ce

Browse files
authored
Merge pull request #7834 from cathaysia/patch-1
add cppcoro library (header only)
2 parents 8783d9d + 536bdd6 commit 18057ce

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

mingw-w64-cppcoro/PKGBUILD

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Maintainer: https://github.com/cathaysia
2+
_realname=cppcoro
3+
pkgbase=mingw-w64-${_realname}
4+
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
5+
pkgver=r390.a87e97f
6+
pkgrel=1
7+
pkgdesc=" A library of C++ coroutine abstractions for the coroutines TS (mingw-w64)"
8+
arch=('any')
9+
license=("MIT")
10+
url="https://github.com/lewissbaker/cppcoro"
11+
makedepends=('git')
12+
_commit='a87e97f'
13+
source=("${_realname}::git+https://github.com/lewissbaker/${_realname}.git#commit=${_commit}")
14+
sha256sums=('SKIP')
15+
16+
pkgver() {
17+
cd "${srcdir}/${_realname}"
18+
printf "r%s.%s" "$(git rev-list --count "${_commit}")" "$(git rev-parse --short "${_commit}")"
19+
}
20+
21+
build(){
22+
# replace all std::experimental with std
23+
function scan_dir(){
24+
for file in `ls $1`
25+
do
26+
if [ -d $1"/"$file ]
27+
then
28+
scan_dir $1"/"$file
29+
else
30+
sed 's/std::experimental/std/g' $1"/"$file | sed 's/experimental\///g' > $1"/"$file
31+
fi
32+
done
33+
}
34+
scan_dir "${srcdir}/cppcoro/include/cppcoro/"
35+
}
36+
package() {
37+
mkdir -p "${pkgdir}${MINGW_PREFIX}/"
38+
cp -r "${srcdir}/cppcoro/include/" "${pkgdir}${MINGW_PREFIX}/include/"
39+
}

0 commit comments

Comments
 (0)