Skip to content

Commit

Permalink
filesystem: More consistent behavior for MSYSTEM.
Browse files Browse the repository at this point in the history
MSYSTEM now defaults to MSYS when not specified, and there is no
different behavior anymore between empty value and MSYS, for example
/opt/bin was not being added to path when not setting MSYSTEM. This
removes the need for explicitly setting the variable, since a default
value is now implied.
  • Loading branch information
renatosilva committed May 24, 2016
1 parent d81601b commit f64a34a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 38 deletions.
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
environment:
MSYSTEM: MSYS
DEPLOY_PROVIDER: bintray
BINTRAY_ACCOUNT: alexpux
BINTRAY_REPOSITORY: msys2
Expand Down
6 changes: 3 additions & 3 deletions filesystem/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee'
'50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622'
'9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5'
'7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e'
'a435d0a14381c486df1927862227529c78cee710da9c490cd526d38cecd6276f'
'3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7'
'91dfc32adec6c2e7e5ddab2d47b7812f2ae5da42bc552fd061682fb5fbb9800d'
'dbad95826d6302294aa7cfbafdefb8ef86b12388e3ac419fc55326cc4e2fc7fe'
'91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d'
'5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63'
'ddad06e5a36dc501356d585154eabb755af20a4e26f1aa6709d6282feee41866'
'0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7'
'020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835'
'756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340'
Expand Down
7 changes: 3 additions & 4 deletions filesystem/msys2_shell.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ rem Shell types
if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams
if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams
if not defined MSYSTEM set MSYSTEM=MSYS
rem Console types
if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams
if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams
Expand All @@ -46,12 +45,12 @@ if "x%_deprecated_use_full_path%" == "xtrue" (
)

rem Setup proper title
if "%MSYSTEM%" == "MSYS" (
set CONTITLE=MSys2
) else if "%MSYSTEM%" == "MINGW32" (
if "%MSYSTEM%" == "MINGW32" (
set "CONTITLE=MinGW x32"
) else if "%MSYSTEM%" == "MINGW64" (
set "CONTITLE=MinGW x64"
) else (
set "CONTITLE=MSYS2 MSYS"
)

if "x%MSYSCON%" == "xmintty.exe" goto startmintty
Expand Down
4 changes: 3 additions & 1 deletion filesystem/msystem
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# instead. The MINGW_ prefix does not influence makepkg-mingw variables and
# is not used for the MSYS shell.

export MSYSTEM="${MSYSTEM:-MSYS}"

unset MSYSTEM_PREFIX
unset MSYSTEM_CARCH
unset MSYSTEM_CHOST
Expand Down Expand Up @@ -37,7 +39,7 @@ case "${MSYSTEM}" in
MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}"
export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX
;;
MSYS)
*)
MSYSTEM_PREFIX='/usr'
MSYSTEM_CARCH="${HOSTTYPE}"
MSYSTEM_CHOST="${MACHTYPE}"
Expand Down
49 changes: 20 additions & 29 deletions filesystem/profile
Original file line number Diff line number Diff line change
Expand Up @@ -45,35 +45,26 @@ case "${MSYS2_PATH_TYPE:-minimal}" in
esac

unset MINGW_MOUNT_POINT
if [ -n "$MSYSTEM" ]
then
source /etc/msystem
case "$MSYSTEM" in
MINGW32)
MINGW_MOUNT_POINT="${MINGW_PREFIX}"
PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig"
ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal"
MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}"
;;
MINGW64)
MINGW_MOUNT_POINT="${MINGW_PREFIX}"
PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig"
ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal"
MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}"
;;
MSYS)
PATH="${MSYS2_PATH}:/opt/bin${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig"
;;
*)
PATH="${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
;;
esac
else
PATH="${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
fi
source '/etc/msystem'
case "${MSYSTEM}" in
MINGW32)
MINGW_MOUNT_POINT="${MINGW_PREFIX}"
PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig"
ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal"
MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}"
;;
MINGW64)
MINGW_MOUNT_POINT="${MINGW_PREFIX}"
PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig"
ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal"
MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}"
;;
*)
PATH="${MSYS2_PATH}:/opt/bin${ORIGINAL_PATH:+:${ORIGINAL_PATH}}"
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig"
esac

MAYBE_FIRST_START=false
SYSCONFDIR="${SYSCONFDIR:=/etc}"
Expand Down

0 comments on commit f64a34a

Please sign in to comment.