Skip to content

Commit

Permalink
Add warning to makepkg-mingw if mingw-w64-file/grep/sed are installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril Arnould committed Mar 16, 2024
1 parent 7eec4fa commit e6ef56b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pacman/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

pkgname=pacman
pkgver=6.0.2
pkgrel=13
pkgrel=14
pkgdesc="A library-based package manager with dependency support (MSYS2 port)"
arch=('i686' 'x86_64')
url="https://www.archlinux.org/pacman/"
Expand Down Expand Up @@ -81,7 +81,7 @@ sha256sums=('SKIP'
'53c0c2d42bc10f265aa41bc412a6ebc2d98177d9356b0fa9a2a130caec46ac2d'
'c12da01ede663a4924d0817a0d1bd6082b1380383cfb74cc1cea08f9d73e4902'
'a84354e88f6b0cae3a8005a944fcd88819a0860f4440501cc6f1c1f9abfe87c4'
'98198e1f0f252eae0560d271bee4b9149e127399dd0d3fd5d8d24579d9e0550f'
'6faceffbf98ef704ebd6b28399c9ad0c029a85164878bf2d0c2f6e7a8e5e13e9'
'd272176dea508bf0972dde6396ca655e900d509099d0a496bd6a138f98bb48df'
'7e2a2fc6799ed8a9dbc8b0712b162be963ed22351e4cb29b3a4d4a4d3f28d7ed'
'953b66200dbe4f5b3a9caac2ce25f1ded7918232dce2e61b4bf64f5d87892d07'
Expand Down
25 changes: 25 additions & 0 deletions pacman/makepkg-mingw
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,31 @@ fi
print_msg1 "MINGW_ARCH: ${MINGW_ARCH}"

for _mingw in ${MINGW_ARCH}; do
# Check if problematic packages are installed
case $_mingw in
'mingw32')
MINGW_PACKAGE_PREFIX='mingw-w64-i686';;
'mingw64')
MINGW_PACKAGE_PREFIX='mingw-w64-x86_64';;
'clang32')
MINGW_PACKAGE_PREFIX='mingw-w64-clang-i686';;
'clang64')
MINGW_PACKAGE_PREFIX='mingw-w64-clang-x86_64';;
'clangarm64')
MINGW_PACKAGE_PREFIX='mingw-w64-clang-aarch64';;
'ucrt64')
MINGW_PACKAGE_PREFIX='mingw-w64-ucrt-x86_64';;
esac
if test -f "/${_mingw}/bin/file.exe"; then
print_warning "${MINGW_PACKAGE_PREFIX}-file is installed, which is known to cause issues in package builds."
fi
if test -f "/${_mingw}/bin/grep.exe"; then
print_warning "${MINGW_PACKAGE_PREFIX}-grep is installed, which is known to cause issues in package builds."
fi
if test -f "/${_mingw}/bin/sed.exe"; then
print_warning "${MINGW_PACKAGE_PREFIX}-sed is installed, which is known to cause issues in package builds."
fi

print_msg2 "Building ${_mingw}..."

MSYSTEM="${_mingw^^}" \
Expand Down

0 comments on commit e6ef56b

Please sign in to comment.