From 4c622482c472d624ba62aa5a301dd7994390520b Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 3 Feb 2025 11:59:52 +0100 Subject: [PATCH] bash: build for cygwin * the only difference should be the target tripplet printed by "--version" * configure is the same except WOE32 is set to yes, but from what I see this isn't used * remove cross compile cache, doesn't look used --- bash/0002-bash-4.3-msysize.patch | 444 +------------------------------ bash/PKGBUILD | 11 +- 2 files changed, 14 insertions(+), 441 deletions(-) diff --git a/bash/0002-bash-4.3-msysize.patch b/bash/0002-bash-4.3-msysize.patch index 64de3cadb2a..fc17bf07444 100644 --- a/bash/0002-bash-4.3-msysize.patch +++ b/bash/0002-bash-4.3-msysize.patch @@ -1,437 +1,11 @@ -diff --git a/MANIFEST b/MANIFEST -index a45b3cf..7172f3d 100644 ---- a/MANIFEST -+++ b/MANIFEST -@@ -211,6 +211,7 @@ builtins/bashgetopt.c f - builtins/common.h f - builtins/bashgetopt.h f - #cross-build/cygwin32.cache f -+#cross-build/msys32.cache f - cross-build/x86-beos.cache f - cross-build/opennt.cache f - cross-build/qnx.cache f -diff --git a/configure.ac b/configure.ac -index 50a6e20..f770177 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -76,7 +76,7 @@ m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir - # These need additional investigation - sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF - *-aix*) opt_bash_malloc=no ;; # AIX machines --*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment -+*-cygwin*|msys*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment - # These lack a working sbrk(2) - aarch64-freebsd*) opt_bash_malloc=no ;; - riscv*-freebsd*) opt_bash_malloc=no ;; -@@ -462,6 +462,9 @@ if test "x$cross_compiling" = "xyes"; then - *-cygwin*) - cross_cache=${srcdir}/cross-build/cygwin32.cache - ;; -+ *-msys*) -+ cross_cache=${srcdir}/cross-build/msys32.cache -+ ;; - *-mingw*) - cross_cache=${srcdir}/cross-build/cygwin32.cache - ;; -@@ -602,7 +605,7 @@ if test $opt_readline = yes; then - # section for OS versions that don't allow unresolved symbols - # to be compiled into dynamic libraries. - case "$host_os" in -- cygwin*) TILDE_LIB= ;; -+ cygwin*|msys*) TILDE_LIB= ;; - esac - else - RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' -@@ -1180,7 +1183,7 @@ freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; - *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; - *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; - powerux*) LOCAL_LIBS="-lgen" ;; --cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; -+cygwin*|msys*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; - *openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; - esac -diff --git a/cross-build/msys32.cache b/cross-build/msys32.cache -new file mode 100644 -index 0000000..7d9f257 ---- /dev/null -+++ b/cross-build/msys32.cache -@@ -0,0 +1,251 @@ -+# This file is a shell script that caches the results of configure -+# tests run on this system so they can be shared between configure -+# scripts and configure runs, see configure's option --config-cache. -+# It is not useful on other systems. If it contains results you don't -+# want to keep, you may remove or edit it. -+# -+# config.status only pays attention to the cache file if you give it -+# the --recheck option to rerun configure. -+# -+# `ac_cv_env_foo' variables (set or unset) will be overriden when -+# loading this file, other *unset* `ac_cv_foo' will be assigned the -+# following values. -+ -+ac_cv_build=${ac_cv_build='i686-pc-msys'} -+ac_cv_build_alias=${ac_cv_build_alias='i686-pc-msys'} -+ac_cv_c_bigendian=${ac_cv_c_bigendian='no'} -+ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'} -+ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu='yes'} -+ac_cv_c_const=${ac_cv_c_const='yes'} -+ac_cv_c_inline=${ac_cv_c_inline='inline'} -+ac_cv_c_long_double=${ac_cv_c_long_double='yes'} -+ac_cv_c_stringize=${ac_cv_c_stringize='yes'} -+ac_cv_decl_sys_siglist=${ac_cv_decl_sys_siglist='no'} -+ac_cv_exeext=${ac_cv_exeext='.exe'} -+ac_cv_func___setostype=${ac_cv_func___setostype='no'} -+ac_cv_func__doprnt=${ac_cv_func__doprnt='no'} -+ac_cv_func_alloca_works=${ac_cv_func_alloca_works='yes'} -+ac_cv_func_asprintf=${ac_cv_func_asprintf='no'} -+ac_cv_func_bcopy=${ac_cv_func_bcopy='yes'} -+ac_cv_func_bindtextdomain=${ac_cv_func_bindtextdomain='no'} -+ac_cv_func_bzero=${ac_cv_func_bzero='yes'} -+ac_cv_func_confstr=${ac_cv_func_confstr='no'} -+ac_cv_func_dlclose=${ac_cv_func_dlclose='yes'} -+ac_cv_func_dlopen=${ac_cv_func_dlopen='yes'} -+ac_cv_func_dlsym=${ac_cv_func_dlsym='yes'} -+ac_cv_func_dup2=${ac_cv_func_dup2='yes'} -+ac_cv_func_fnmatch=${ac_cv_func_fnmatch='no'} -+ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo='no'} -+ac_cv_func_getcwd=${ac_cv_func_getcwd='yes'} -+ac_cv_func_getdtablesize=${ac_cv_func_getdtablesize='yes'} -+ac_cv_func_getgroups=${ac_cv_func_getgroups='yes'} -+ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname='yes'} -+ac_cv_func_gethostname=${ac_cv_func_gethostname='yes'} -+ac_cv_func_getpagesize=${ac_cv_func_getpagesize='yes'} -+ac_cv_func_getpeername=${ac_cv_func_getpeername='yes'} -+ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'} -+ac_cv_func_getrlimit=${ac_cv_func_getrlimit='yes'} -+ac_cv_func_getrusage=${ac_cv_func_getrusage='yes'} -+ac_cv_func_getservbyname=${ac_cv_func_getservbyname='yes'} -+ac_cv_func_gettext=${ac_cv_func_gettext='no'} -+ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday='yes'} -+ac_cv_func_inet_aton=${ac_cv_func_inet_aton='yes'} -+ac_cv_func_isascii=${ac_cv_func_isascii='yes'} -+ac_cv_func_isblank=${ac_cv_func_isblank='no'} -+ac_cv_func_isgraph=${ac_cv_func_isgraph='yes'} -+ac_cv_func_isprint=${ac_cv_func_isprint='yes'} -+ac_cv_func_isspace=${ac_cv_func_isspace='yes'} -+ac_cv_func_isxdigit=${ac_cv_func_isxdigit='yes'} -+ac_cv_func_killpg=${ac_cv_func_killpg='yes'} -+ac_cv_func_lstat=${ac_cv_func_lstat='yes'} -+ac_cv_func_memmove=${ac_cv_func_memmove='yes'} -+ac_cv_func_mkfifo=${ac_cv_func_mkfifo='yes'} -+ac_cv_func_pathconf=${ac_cv_func_pathconf='yes'} -+ac_cv_func_putenv=${ac_cv_func_putenv='yes'} -+ac_cv_func_readlink=${ac_cv_func_readlink='yes'} -+ac_cv_func_rename=${ac_cv_func_rename='yes'} -+ac_cv_func_sbrk=${ac_cv_func_sbrk='yes'} -+ac_cv_func_select=${ac_cv_func_select='yes'} -+ac_cv_func_setdtablesize=${ac_cv_func_setdtablesize='yes'} -+ac_cv_func_setenv=${ac_cv_func_setenv='yes'} -+ac_cv_func_setlinebuf=${ac_cv_func_setlinebuf='no'} -+ac_cv_func_setlocale=${ac_cv_func_setlocale='yes'} -+ac_cv_func_setvbuf=${ac_cv_func_setvbuf='yes'} -+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'} -+ac_cv_func_siginterrupt=${ac_cv_func_siginterrupt='no'} -+ac_cv_func_snprintf=${ac_cv_func_snprintf='yes'} -+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp='yes'} -+ac_cv_func_strchr=${ac_cv_func_strchr='yes'} -+ac_cv_func_strcoll_works=${ac_cv_func_strcoll_works='yes'} -+ac_cv_func_strerror=${ac_cv_func_strerror='yes'} -+ac_cv_func_strpbrk=${ac_cv_func_strpbrk='yes'} -+ac_cv_func_strtod=${ac_cv_func_strtod='yes'} -+ac_cv_func_strtoimax=${ac_cv_func_strtoimax='no'} -+ac_cv_func_strtol=${ac_cv_func_strtol='yes'} -+ac_cv_func_strtoll=${ac_cv_func_strtoll='no'} -+ac_cv_func_strtoul=${ac_cv_func_strtoul='yes'} -+ac_cv_func_strtoull=${ac_cv_func_strtoull='no'} -+ac_cv_func_strtoumax=${ac_cv_func_strtoumax='no'} -+ac_cv_func_sysconf=${ac_cv_func_sysconf='yes'} -+ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr='yes'} -+ac_cv_func_tcgetpgrp=${ac_cv_func_tcgetpgrp='yes'} -+ac_cv_func_textdomain=${ac_cv_func_textdomain='no'} -+ac_cv_func_times=${ac_cv_func_times='yes'} -+ac_cv_func_ttyname=${ac_cv_func_ttyname='yes'} -+ac_cv_func_tzset=${ac_cv_func_tzset='yes'} -+ac_cv_func_ulimit=${ac_cv_func_ulimit='no'} -+ac_cv_func_uname=${ac_cv_func_uname='yes'} -+ac_cv_func_vasprintf=${ac_cv_func_vasprintf='no'} -+ac_cv_func_vprintf=${ac_cv_func_vprintf='yes'} -+ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf='yes'} -+ac_cv_func_wait3=${ac_cv_func_wait3='yes'} -+ac_cv_func_waitpid=${ac_cv_func_waitpid='yes'} -+ac_cv_have_decl_confstr=${ac_cv_have_decl_confstr='no'} -+ac_cv_have_decl_printf=${ac_cv_have_decl_printf='yes'} -+ac_cv_have_decl_sbrk=${ac_cv_have_decl_sbrk='yes'} -+ac_cv_have_decl_strsignal=${ac_cv_have_decl_strsignal='yes'} -+ac_cv_have_decl_strtold=${ac_cv_have_decl_strtold='no'} -+ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h='yes'} -+ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h='yes'} -+ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h='yes'} -+ac_cv_header_grp_h=${ac_cv_header_grp_h='yes'} -+ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h='no'} -+ac_cv_header_libintl_h=${ac_cv_header_libintl_h='yes'} -+ac_cv_header_limits_h=${ac_cv_header_limits_h='yes'} -+ac_cv_header_locale_h=${ac_cv_header_locale_h='yes'} -+ac_cv_header_memory_h=${ac_cv_header_memory_h='yes'} -+ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h='no'} -+ac_cv_header_netdb_h=${ac_cv_header_netdb_h='yes'} -+ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h='yes'} -+ac_cv_header_stat_broken=${ac_cv_header_stat_broken='no'} -+ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h='yes'} -+ac_cv_header_stdc=${ac_cv_header_stdc='yes'} -+ac_cv_header_stddef_h=${ac_cv_header_stddef_h='yes'} -+ac_cv_header_stdint_h=${ac_cv_header_stdint_h='no'} -+ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h='yes'} -+ac_cv_header_string_h=${ac_cv_header_string_h='yes'} -+ac_cv_header_strings_h=${ac_cv_header_strings_h='yes'} -+ac_cv_header_sys_file_h=${ac_cv_header_sys_file_h='yes'} -+ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h='yes'} -+ac_cv_header_sys_pte_h=${ac_cv_header_sys_pte_h='no'} -+ac_cv_header_sys_ptem_h=${ac_cv_header_sys_ptem_h='no'} -+ac_cv_header_sys_resource_h=${ac_cv_header_sys_resource_h='yes'} -+ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h='yes'} -+ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h='yes'} -+ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h='yes'} -+ac_cv_header_sys_stream_h=${ac_cv_header_sys_stream_h='no'} -+ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h='yes'} -+ac_cv_header_sys_times_h=${ac_cv_header_sys_times_h='yes'} -+ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h='yes'} -+ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h='yes'} -+ac_cv_header_termcap_h=${ac_cv_header_termcap_h='yes'} -+ac_cv_header_termio_h=${ac_cv_header_termio_h='yes'} -+ac_cv_header_termios_h=${ac_cv_header_termios_h='yes'} -+ac_cv_header_time=${ac_cv_header_time='yes'} -+ac_cv_header_unistd_h=${ac_cv_header_unistd_h='yes'} -+ac_cv_header_varargs_h=${ac_cv_header_varargs_h='yes'} -+ac_cv_host=${ac_cv_host='i686-pc-msys'} -+ac_cv_host_alias=${ac_cv_host_alias='i686-pc-msys'} -+ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir='no'} -+ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen='no'} -+ac_cv_lib_intl_bindtextdomain=${ac_cv_lib_intl_bindtextdomain='yes'} -+ac_cv_lib_termcap_tgetent=${ac_cv_lib_termcap_tgetent='yes'} -+ac_cv_member_struct_stat_st_blocks=${ac_cv_member_struct_stat_st_blocks='yes'} -+ac_cv_member_struct_termio_c_line=${ac_cv_member_struct_termio_c_line='yes'} -+ac_cv_member_struct_termios_c_line=${ac_cv_member_struct_termios_c_line='yes'} -+ac_cv_objext=${ac_cv_objext='o'} -+ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} -+ac_cv_prog_AR=${ac_cv_prog_AR='ar'} -+ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'} -+ac_cv_prog_YACC=${ac_cv_prog_YACC='bison -y'} -+ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC='gcc'} -+ac_cv_prog_ac_ct_RANLIB=${ac_cv_prog_ac_ct_RANLIB='ranlib'} -+ac_cv_prog_cc_g=${ac_cv_prog_cc_g='yes'} -+ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=''} -+ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional='no'} -+ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'} -+ac_cv_sizeof_char=${ac_cv_sizeof_char='1'} -+ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'} -+ac_cv_sizeof_double=${ac_cv_sizeof_double='8'} -+ac_cv_sizeof_int=${ac_cv_sizeof_int='4'} -+ac_cv_sizeof_long=${ac_cv_sizeof_long='4'} -+ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='8'} -+ac_cv_sizeof_short=${ac_cv_sizeof_short='2'} -+ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits='no'} -+ac_cv_sys_interpreter=${ac_cv_sys_interpreter='yes'} -+ac_cv_sys_large_files=${ac_cv_sys_large_files='no'} -+ac_cv_sys_largefile_CC=${ac_cv_sys_largefile_CC='no'} -+ac_cv_sys_posix_termios=${ac_cv_sys_posix_termios='yes'} -+ac_cv_sys_tiocgwinsz_in_termios_h=${ac_cv_sys_tiocgwinsz_in_termios_h='yes'} -+ac_cv_type_bits16_t=${ac_cv_type_bits16_t='no'} -+ac_cv_type_bits32_t=${ac_cv_type_bits32_t='no'} -+ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'} -+ac_cv_type_char=${ac_cv_type_char='yes'} -+ac_cv_type_char_p=${ac_cv_type_char_p='yes'} -+ac_cv_type_double=${ac_cv_type_double='yes'} -+ac_cv_type_getgroups=${ac_cv_type_getgroups='gid_t'} -+ac_cv_type_int=${ac_cv_type_int='yes'} -+ac_cv_type_long=${ac_cv_type_long='yes'} -+ac_cv_type_long_long=${ac_cv_type_long_long='yes'} -+ac_cv_type_mode_t=${ac_cv_type_mode_t='yes'} -+ac_cv_type_off_t=${ac_cv_type_off_t='yes'} -+ac_cv_type_pid_t=${ac_cv_type_pid_t='yes'} -+ac_cv_type_ptrdiff_t=${ac_cv_type_ptrdiff_t='yes'} -+ac_cv_type_short=${ac_cv_type_short='yes'} -+ac_cv_type_signal=${ac_cv_type_signal='void'} -+ac_cv_type_size_t=${ac_cv_type_size_t='yes'} -+ac_cv_type_ssize_t=${ac_cv_type_ssize_t='yes'} -+ac_cv_type_time_t=${ac_cv_type_time_t='yes'} -+ac_cv_type_u_bits16_t=${ac_cv_type_u_bits16_t='no'} -+ac_cv_type_u_bits32_t=${ac_cv_type_u_bits32_t='no'} -+ac_cv_type_u_int=${ac_cv_type_u_int='yes'} -+ac_cv_type_u_long=${ac_cv_type_u_long='yes'} -+ac_cv_type_uid_t=${ac_cv_type_uid_t='yes'} -+ac_cv_working_alloca_h=${ac_cv_working_alloca_h='no'} -+ -+bash_cv_decl_strtoimax=${bash_cv_decl_strtoimax='no'} -+bash_cv_decl_strtol=${bash_cv_decl_strtol='yes'} -+bash_cv_decl_strtoll=${bash_cv_decl_strtoll='no'} -+bash_cv_decl_strtoul=${bash_cv_decl_strtoul='yes'} -+bash_cv_decl_strtoull=${bash_cv_decl_strtoull='no'} -+bash_cv_decl_strtoumax=${bash_cv_decl_strtoumax='no'} -+bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'} -+bash_cv_dev_fd=${bash_cv_dev_fd='absent'} -+bash_cv_dev_stdin=${bash_cv_dev_stdin='absent'} -+bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno='no'} -+bash_cv_dirent_has_dino=${bash_cv_dirent_has_dino='yes'} -+bash_cv_dup2_broken=${bash_cv_dup2_broken='no'} -+bash_cv_fionread_in_ioctl=${bash_cv_fionread_in_ioctl='no'} -+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='present'} -+bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'} -+bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'} -+bash_cv_getpw_declared=${bash_cv_getpw_declared='yes'} -+bash_cv_have_strsignal=${bash_cv_have_strsignal='yes'} -+bash_cv_job_control_missing=${bash_cv_job_control_missing='present'} -+bash_cv_mail_dir=${bash_cv_mail_dir='unknown'} -+bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'} -+bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'} -+bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'} -+bash_cv_printf_a_format=${bash_cv_printf_a_format='no'} -+bash_cv_signal_vintage=${bash_cv_signal_vintage='posix'} -+bash_cv_speed_t_in_sys_types=${bash_cv_speed_t_in_sys_types='no'} -+bash_cv_struct_timeval=${bash_cv_struct_timeval='yes'} -+bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header='termios_h'} -+bash_cv_sys_errlist=${bash_cv_sys_errlist='no'} -+bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='present'} -+bash_cv_sys_siglist=${bash_cv_sys_siglist='no'} -+bash_cv_termcap_lib=${bash_cv_termcap_lib='libtermcap'} -+bash_cv_tiocstat_in_ioctl=${bash_cv_tiocstat_in_ioctl='no'} -+bash_cv_type_clock_t=${bash_cv_type_clock_t='yes'} -+bash_cv_type_intmax_t=${bash_cv_type_intmax_t='no'} -+bash_cv_type_long_long=${bash_cv_type_long_long='long long'} -+bash_cv_type_quad_t=${bash_cv_type_quad_t='no'} -+bash_cv_type_rlimit=${bash_cv_type_rlimit='rlim_t'} -+bash_cv_type_sigset_t=${bash_cv_type_sigset_t='yes'} -+bash_cv_type_socklen_t=${bash_cv_type_socklen_t='no'} -+bash_cv_type_uintmax_t=${bash_cv_type_uintmax_t='no'} -+bash_cv_type_unsigned_long_long=${bash_cv_type_unsigned_long_long='unsigned long long'} -+bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'} -+bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'} -+bash_cv_unusable_rtsigs=${bash_cv_unusable_rtsigs='no'} -+bash_cv_void_sighandler=${bash_cv_void_sighandler='yes'} -diff --git a/examples/complete/bash_completion b/examples/complete/bash_completion -index b0cf4a8..1362eaa 100644 ---- a/examples/complete/bash_completion -+++ b/examples/complete/bash_completion -@@ -48,6 +48,7 @@ readonly BASH_COMPLETION BASH_COMPLETION_DIR - UNAME=$( uname -s ) - # strip OS type and version under Cygwin (e.g. CYGWIN_NT-5.1 => Cygwin) - UNAME=${UNAME/CYGWIN_*/Cygwin} -+UNAME=${UNAME/MSYS_*/Msys} - RELEASE=$( uname -r ) - - # features supported by bash 2.05 and higher -@@ -817,7 +818,7 @@ complete -F _insmod $filenames insmod modprobe modinfo - # - [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \ - -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \ -- -o $UNAME = OpenBSD ] && -+ -o $UNAME = Msys -o $UNAME = OpenBSD ] && - _man() - { - local cur prev sect manpath UNAME -@@ -837,8 +838,9 @@ _man() - UNAME=$( uname -s ) - # strip OS type and version under Cygwin - UNAME=${UNAME/CYGWIN_*/Cygwin} -+ UNAME=${UNAME/MSYS_*/Msys} - if [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = FreeBSD \ -- -o $UNAME = Cygwin ]; then -+ -o $UNAME = Cygwin -o $UNAME = Msys ]; then - manpath=$( manpath 2>/dev/null || command man --path ) - else - manpath=$MANPATH -@@ -873,7 +875,7 @@ _man() - } - [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \ - -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \ -- -o $UNAME = OpenBSD ] && \ -+ -o $UNAME = Msys -o $UNAME = OpenBSD ] && \ - complete -F _man $filenames man apropos whatis - - # renice(8) completion -@@ -4264,7 +4266,7 @@ _gcc() - fi - } && - complete $filenames -F _gcc gcc g++ c++ g77 gcj gpc --[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Cygwin ] && \ -+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Cygwin -o $UNAME = Msys ] && \ - [ -n "${have:-}" ] && complete $filenames -F _gcc cc - - # Linux cardctl(8) completion -diff --git a/support/config.rpath b/support/config.rpath -index fc5913d..54df920 100755 ---- a/support/config.rpath -+++ b/support/config.rpath -@@ -57,7 +57,7 @@ else - aix*) - wl='-Wl,' - ;; -- mingw* | cygwin* | pw32* | os2* | cegcc*) -+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) - ;; - hpux9* | hpux10* | hpux11*) - wl='-Wl,' -@@ -149,7 +149,7 @@ hardcode_direct=no - hardcode_minus_L=no - - case "$host_os" in -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. -@@ -198,7 +198,7 @@ if test "$with_gnu_ld" = yes; then - ld_shlibs=no - fi - ;; -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' -@@ -348,7 +348,7 @@ else - ;; - bsdi[45]*) - ;; -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is -@@ -533,7 +533,7 @@ case "$host_os" in - bsdi[45]*) - library_names_spec='$libname$shrext' - ;; -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - shrext=.dll - library_names_spec='$libname.dll.a $libname.lib' - ;; -diff --git a/support/shobj-conf b/support/shobj-conf -index cd7634d..6bd693c 100755 ---- a/support/shobj-conf -+++ b/support/shobj-conf -@@ -484,6 +484,23 @@ cygwin*) +--- bash-5.2/support/shobj-conf.orig 2021-12-03 16:54:46.000000000 +0100 ++++ bash-5.2/support/shobj-conf 2025-02-03 11:44:17.045563800 +0100 +@@ -479,7 +479,7 @@ + cygwin*) + SHOBJ_LD='$(CC)' + SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' +- SHLIB_LIBPREF='cyg' ++ SHLIB_LIBPREF='msys-' + SHLIB_LIBSUFF='dll' SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' SHLIB_LIBS='$(TERMCAP_LIB)' - -+ SHLIB_DOT= -+ # For official cygwin releases, DLLVERSION will be defined in the -+ # environment of configure, and will be incremented any time the API -+ # changes in a non-backwards compatible manner. Otherwise, it is just -+ # SHLIB_MAJOR. -+ if [ -n "$DLLVERSION" ] ; then -+ SHLIB_DLLVERSION="$DLLVERSION" -+ fi -+ ;; -+msys*) -+ SHOBJ_LD='$(CC)' -+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' -+ SHLIB_LIBPREF='msys-' -+ SHLIB_LIBSUFF='dll' -+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' -+ SHLIB_LIBS='$(TERMCAP_LIB)' -+ - SHLIB_DOT= - # For official cygwin releases, DLLVERSION will be defined in the - # environment of configure, and will be incremented any time the API diff --git a/bash/PKGBUILD b/bash/PKGBUILD index c0b44c9ccfa..3f61a0c3f2f 100644 --- a/bash/PKGBUILD +++ b/bash/PKGBUILD @@ -6,7 +6,7 @@ pkgname=('bash' 'bash-devel') _basever=5.2 _patchlevel=037 #prepare for some patches pkgver=${_basever}.${_patchlevel} -pkgrel=1 +pkgrel=2 pkgdesc="The GNU Bourne Again shell" arch=('i686' 'x86_64') license=('GPL') @@ -36,9 +36,6 @@ prepare() { tar -xzvf ${srcdir}/${pkgbase}-${_basever}.tar.gz || true cd ${srcdir}/${pkgname}-${_basever} - # Remove patch-created file. - [[ -f cross-build/msys32.cache ]] && rm -rf cross-build/msys32.cache - for (( p=1; p<=$((10#${_patchlevel})); p++ )); do msg "applying patch bash${_basever//./}-$(printf "%03d" $p)" patch -p0 -i $srcdir/bash${_basever//./}-$(printf "%03d" $p) @@ -56,7 +53,9 @@ prepare() { build() { cd ${srcdir}/${pkgname}-$_basever - ./configure --build=${CHOST} \ + export MSYSTEM=CYGWIN + local CYGWIN_CHOST="${CHOST/-msys/-cygwin}" + ./configure --build=${CYGWIN_CHOST} \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ @@ -129,7 +128,7 @@ package_bash-devel() { sha256sums=('a139c166df7ff4471c5e0733051642ee5556c1cc8a4a78f145583c5c81ab32fb' 'SKIP' '948b8b5401dcb4e5eb577cfa6543e740e2e3bd0690939d8e77d078d75d110097' - '6ca7633a87db7caf1d2d1a96779681c365d0ad2c11b2ea758e772f4ebff2a62f' + '16584e119db9418030912171f89aecae319858ecd357d3e56c95eba83667dae7' 'c55c24110fbe90a2000411239e6399c1baed2843a61220b4e8a7a036f4a7436a' '500c75c64593a70276585345a55c807226c0cc220d08b7cccece2ab005b3bcea' 'cbae1aa81d56eba4e916bdaf2b2983731d6e2537dd8d606a3b378e49bcb81e79'