Skip to content

Commit

Permalink
Merge pull request msys2#19323 from oscarfv/update-asio
Browse files Browse the repository at this point in the history
asio: update to 1.28.1, don't build standalone library
  • Loading branch information
podsvirov authored Dec 12, 2023
2 parents b976a7c + 64bda16 commit 7978a04
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions mingw-w64-asio/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_realname=asio
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.24.0
pkgver=1.28.1
pkgrel=1
pkgdesc='Cross-platform C++ library for ASynchronous network I/O (mingw-w64)'
url='https://think-async.com/Asio/'
Expand All @@ -12,21 +12,30 @@ mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
license=('spdx:BSL-1.0')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
#"${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-autotools"
#"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-openssl")
_realver=${pkgver//./-}
_realpath=${_realname}-${_realname}-${_realver}
source=("${_realpath}.tar.gz::https://github.com/chriskohlhoff/${_realname}/archive/${_realname}-${_realver}.tar.gz")
sha256sums=('cbcaaba0f66722787b1a7c33afe1befb3a012b5af3ad7da7ff0f6b8c9b7a8a5b')
_realver=${pkgver}
_realpath=${_realname}-${_realver}
source=("${_realpath}.tar.gz::https://sourceforge.net/projects/asio/files/asio/${pkgver}%20%28Stable%29/asio-${pkgver}.tar.gz/download")
sha256sums=('eef0eddce419827876f4929c6d7523e010528031e5289ec57914e89fb9ab9d8d')

prepare() {
cd ${srcdir}/${_realpath}/${_realname}/
# see `build' function
return 0

cd ${srcdir}/${_realpath}

autoreconf -fiv
}

build() {
cd ${srcdir}/${_realpath}/${_realname}/
# At this time asio fails to compile. Anyways, asio is supposed to
# be used as a header-only library, with a specific procedure
# (mentioned on the documentation) for when the user wants separate
# compilation.
return 0

cd ${srcdir}/${_realpath}

CPPFLAGS+=" -D_WIN32_WINNT=0x601" \
./configure \
Expand All @@ -40,13 +49,18 @@ build() {
}

check() {
cd ${srcdir}/${_realpath}/${_realname}/
make check
cd ${srcdir}/${_realpath}
# make check
}

package() {
cd ${srcdir}/${_realpath}/${_realname}/
make DESTDIR=${pkgdir} install
cd ${srcdir}/${_realpath}
# make DESTDIR=${pkgdir} install

dest="${pkgdir}${MINGW_PREFIX}"
mkdir -p $dest
rm include/Makefile*
cp -R include $dest

install -Dm 644 COPYING LICENSE_1_0.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}"
}

0 comments on commit 7978a04

Please sign in to comment.