From 0510480cea1e9981a97d1e8ae70159c6fd910a62 Mon Sep 17 00:00:00 2001 From: dragonWater <42114817+cathaysia@users.noreply.github.com> Date: Fri, 29 Jan 2021 18:24:25 +0800 Subject: [PATCH 1/3] add cppcoro library (header only) add support https://github.com/Garcia6l20/cppcoro, this can be a header only library, for mingw64, std::experence must be replace, -fcoroutines compile flags must be open. --- mingw64-w64-cppcoro/PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 mingw64-w64-cppcoro/PKGBUILD diff --git a/mingw64-w64-cppcoro/PKGBUILD b/mingw64-w64-cppcoro/PKGBUILD new file mode 100644 index 0000000000000..4f96b09271c9b --- /dev/null +++ b/mingw64-w64-cppcoro/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: https://github.com/cathaysia +_realname=cppcoro +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=r385.69e5754 +pkgrel=1 +pkgdesc=" A library of C++ coroutine abstractions for the coroutines TS (mingw-w64)" +arch=('any') +url="https://github.com/lewissbaker/cppcoro" +license=("MIT") +source=("git+https://github.com/Garcia6l20/cppcoro.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/cppcoro" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +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/" +} From 1fc1f6bc51493c74f0b796995dc449a1f8c604d1 Mon Sep 17 00:00:00 2001 From: dragonWater <42114817+cathaysia@users.noreply.github.com> Date: Fri, 29 Jan 2021 21:55:11 +0800 Subject: [PATCH 2/3] pine commit --- mingw64-w64-cppcoro/PKGBUILD | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mingw64-w64-cppcoro/PKGBUILD b/mingw64-w64-cppcoro/PKGBUILD index 4f96b09271c9b..29b3d435681f2 100644 --- a/mingw64-w64-cppcoro/PKGBUILD +++ b/mingw64-w64-cppcoro/PKGBUILD @@ -6,13 +6,16 @@ pkgver=r385.69e5754 pkgrel=1 pkgdesc=" A library of C++ coroutine abstractions for the coroutines TS (mingw-w64)" arch=('any') -url="https://github.com/lewissbaker/cppcoro" license=("MIT") -source=("git+https://github.com/Garcia6l20/cppcoro.git") +url="https://github.com/lewissbaker/cppcoro" +makedepends=('git') + +_commit='a87e97f' +source=("${_realname}::https://github.com/lewissbaker/${_realname}.git#commit=${_commit}") md5sums=('SKIP') pkgver() { - cd "${srcdir}/cppcoro" + cd "${srcdir}/${_realname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build(){ From 536bdd6b59dbd2b3b42cb0ef50b3ef8e4c331516 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 29 Jan 2021 15:13:50 +0100 Subject: [PATCH 3/3] cppcoro: fixups --- {mingw64-w64-cppcoro => mingw-w64-cppcoro}/PKGBUILD | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {mingw64-w64-cppcoro => mingw-w64-cppcoro}/PKGBUILD (78%) diff --git a/mingw64-w64-cppcoro/PKGBUILD b/mingw-w64-cppcoro/PKGBUILD similarity index 78% rename from mingw64-w64-cppcoro/PKGBUILD rename to mingw-w64-cppcoro/PKGBUILD index 29b3d435681f2..99cf9b3ab214f 100644 --- a/mingw64-w64-cppcoro/PKGBUILD +++ b/mingw-w64-cppcoro/PKGBUILD @@ -2,22 +2,22 @@ _realname=cppcoro pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=r385.69e5754 +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}::https://github.com/lewissbaker/${_realname}.git#commit=${_commit}") -md5sums=('SKIP') +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 HEAD)" "$(git rev-parse --short HEAD)" + printf "r%s.%s" "$(git rev-list --count "${_commit}")" "$(git rev-parse --short "${_commit}")" } + build(){ # replace all std::experimental with std function scan_dir(){