msys2-runtime-3.5: build for cygwin

This commit is contained in:
Christoph Reiter 2025-06-16 08:12:54 +02:00
parent 95fc0f0cee
commit 18a033d6e1

View File

@ -4,7 +4,7 @@
pkgbase=msys2-runtime-3.5
pkgname=('msys2-runtime-3.5' 'msys2-runtime-3.5-devel')
pkgver=3.5.7
pkgrel=6
pkgrel=7
pkgdesc="Cygwin POSIX emulation engine"
arch=('x86_64')
url="https://www.cygwin.com/"
@ -258,10 +258,11 @@ build() {
(cd "${srcdir}/msys2-runtime/winsup" && ./autogen.sh)
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
"${srcdir}"/msys2-runtime/configure \
--with-msys2-runtime-commit="$(cat "${srcdir}/msys2-runtime.commit")" \
--prefix=/usr \
--build=${CHOST} \
--build=${CYGWIN_CHOST} \
--sysconfdir=/etc \
"${extra_config[@]}"
LC_ALL=C make
@ -302,13 +303,14 @@ package_msys2-runtime-3.5-devel() {
# strip breaks the split debug info. msys2/msys2-pacman#52
options=('!strip')
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
mkdir -p "${pkgdir}"/usr/bin
cp -f "${srcdir}"/dest/usr/bin/msys-2.0.dbg "${pkgdir}"/usr/bin/
cp -rLf "${srcdir}"/dest/usr/${CHOST}/include "${pkgdir}"/usr/
cp -rLf "${srcdir}"/dest/usr/${CYGWIN_CHOST}/include "${pkgdir}"/usr/
rm -f "${pkgdir}"/usr/include/iconv.h
rm -f "${pkgdir}"/usr/include/unctrl.h
# provided by libtirpc
rm -fr "${pkgdir}"/usr/include/rpc/
cp -rLf "${srcdir}"/dest/usr/${CHOST}/lib "${pkgdir}"/usr/
cp -rLf "${srcdir}"/dest/usr/${CYGWIN_CHOST}/lib "${pkgdir}"/usr/
}