Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msys2-runtime-3.3: build as msys2-runtime on i686 #5188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions msys2-runtime-3.3/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
# Contributor: Ray Donnelly <mingw.android@gmail.com>

pkgbase=msys2-runtime-3.3
pkgname=('msys2-runtime-3.3' 'msys2-runtime-3.3-devel')
if [ "$CARCH" == "i686" ]; then
pkgname=('msys2-runtime' 'msys2-runtime-devel')
else
pkgname=('msys2-runtime-3.3' 'msys2-runtime-3.3-devel')
fi
pkgver=3.3.6
pkgrel=13
pkgrel=14
pkgdesc="Cygwin POSIX emulation engine"
arch=('i686' 'x86_64')
url="https://www.cygwin.com/"
Expand Down Expand Up @@ -300,6 +304,15 @@ package_msys2-runtime-3.3() {
cp -rf "${srcdir}"/dest/usr/share "${pkgdir}"/usr/
}

package_msys2-runtime() {
pkgdesc="Posix emulation engine for Windows"
options=('!strip')
conflicts=('catgets' 'libcatgets' 'msys2-runtime-3.3')
replaces=('catgets' 'libcatgets' 'msys2-runtime-3.3')

package_msys2-runtime-3.3
Comment on lines +307 to +313
Copy link
Member

@jeremyd2019 jeremyd2019 Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I kind of expected, this didn't work:

$ pacman -Qip msys2-runtime-3.3.6-14-i686.pkg.tar.zst
Name            : msys2-runtime
Version         : 3.3.6-14
Description     : Posix emulation engine for Windows
Architecture    : i686
URL             : https://www.cygwin.com/
Licenses        : GPL
Groups          : None
Provides        : msys2-runtime=3.3.6
Depends On      : None
Optional Deps   : None
Conflicts With  : catgets  libcatgets  msys2-runtime  msys2-runtime-3.5
Replaces        : catgets  libcatgets
Compressed Size : 2.57 MiB
Installed Size  : 9.79 MiB
Packager        : Unknown Packager
Build Date      : Tue, Feb 4, 2025 1:14:50 PM
Install Script  : No
Validated By    : None
Signatures      : None

In some cases, makepkg effectively greps the function for the variable definitions, but in others it relies on their values after running the function. In the former case, it would see the definitions here, but in the latter the values set in package_msys2-runtime-3.3 would have overwritten them. It seems the former is done for making the .SRCINFO and the latter is done for making the binary packages themselves.

pkgname = msys2-runtime
        pkgdesc = Posix emulation engine for Windows
        conflicts = catgets
        conflicts = libcatgets
        conflicts = msys2-runtime-3.3
        replaces = catgets
        replaces = libcatgets
        replaces = msys2-runtime-3.3
        options = !strip

}

package_msys2-runtime-3.3-devel() {
pkgdesc="MSYS2 headers and libraries"
depends=("msys2-runtime-3.3=${pkgver}")
Expand All @@ -318,3 +331,13 @@ package_msys2-runtime-3.3-devel() {

cp -rLf "${srcdir}"/dest/usr/${CHOST}/lib "${pkgdir}"/usr/
}

package_msys2-runtime-devel() {
pkgdesc="MSYS2 headers and libraries"
depends=("msys2-runtime=${pkgver}")
options=('staticlibs' '!strip')
conflicts=('libcatgets-devel' 'msys2-runtime-3.3-devel')
replaces=('libcatgets-devel' 'msys2-runtime-3.3-devel')

package_msys2-runtime-3.3-devel
}