diff --git a/etc/config.cache b/etc/config.cache
index de8c994..47b6101 100644
--- a/etc/config.cache
+++ b/etc/config.cache
@@ -30,6 +30,13 @@ bash_cv_ulimit_maxfds=yes
 bash_cv_under_sys_siglist=yes
 bash_cv_unusable_rtsigs=no
 
+# glib
+glib_cv_stack_grows=yes
+glib_cv_uscore=yes
+ac_cv_func_posix_getpwuid_r=yes
+ac_cv_func_posix_getgrgid_r=yes
+glib_cv_eventfd=no
+
 # gnulib
 ac_cv_func___fseterr=yes
 gl_cv_func_cbrtl_ieee=yes
diff --git a/patches/bash-4.4-rc2.local.patch b/patches/bash-4.4-rc2.local.patch
deleted file mode 100644
index 6b8a97e..0000000
--- a/patches/bash-4.4-rc2.local.patch
+++ /dev/null
@@ -1,118 +0,0 @@
---- bash-4.4-rc2/configure.orig	2016-08-05 22:29:55.000000000 +0200
-+++ bash-4.4-rc2/configure	2016-12-17 21:32:44.745849000 +0100
-@@ -2869,6 +2869,7 @@
- *-opennt*|*-interix*)	opt_bash_malloc=no ;;	# Interix, now owned by Microsoft
- *-nsk*)		opt_bash_malloc=no ;;	# HP NonStop
- *-haiku*)	opt_bash_malloc=no ;;	# Haiku OS
-+*-midipix*)	opt_bash_malloc=no ;;	# Midipix
- esac
- 
- # memory scrambling on free()
-@@ -5156,13 +5157,13 @@
- if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
-   bash_cv_termcap_lib=libcurses
- else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
--$as_echo_n "checking for tgetent in -lncurses... " >&6; }
--if ${ac_cv_lib_ncurses_tgetent+:} false; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
-+$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
-+if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lncurses  $LIBS"
-+LIBS="-lncursesw  $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-@@ -5182,18 +5183,18 @@
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_ncurses_tgetent=yes
-+  ac_cv_lib_ncursesw_tgetent=yes
- else
--  ac_cv_lib_ncurses_tgetent=no
-+  ac_cv_lib_ncursesw_tgetent=no
- fi
- rm -f core conftest.err conftest.$ac_objext \
-     conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
--$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
--if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
--  bash_cv_termcap_lib=libncurses
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
-+$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
-+if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
-+  bash_cv_termcap_lib=libncursesw
- else
-   bash_cv_termcap_lib=gnutermcap
- fi
-@@ -5224,8 +5225,8 @@
- elif test $bash_cv_termcap_lib = libtinfo; then
- TERMCAP_LIB=-ltinfo
- TERMCAP_DEP=
--elif test $bash_cv_termcap_lib = libncurses; then
--TERMCAP_LIB=-lncurses
-+elif test $bash_cv_termcap_lib = libncursesw; then
-+TERMCAP_LIB=-lncursesw
- TERMCAP_DEP=
- elif test $bash_cv_termcap_lib = libc; then
- TERMCAP_LIB=
-@@ -15811,13 +15812,13 @@
- if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
-   bash_cv_termcap_lib=libcurses
- else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
--$as_echo_n "checking for tgetent in -lncurses... " >&6; }
--if ${ac_cv_lib_ncurses_tgetent+:} false; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
-+$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
-+if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lncurses  $LIBS"
-+LIBS="-lncursesw  $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-@@ -15837,18 +15838,18 @@
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_ncurses_tgetent=yes
-+  ac_cv_lib_ncursesw_tgetent=yes
- else
--  ac_cv_lib_ncurses_tgetent=no
-+  ac_cv_lib_ncursesw_tgetent=no
- fi
- rm -f core conftest.err conftest.$ac_objext \
-     conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
--$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
--if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
--  bash_cv_termcap_lib=libncurses
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
-+$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
-+if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
-+  bash_cv_termcap_lib=libncursesw
- else
-   bash_cv_termcap_lib=gnutermcap
- fi
-@@ -15879,8 +15880,8 @@
- elif test $bash_cv_termcap_lib = libtinfo; then
- TERMCAP_LIB=-ltinfo
- TERMCAP_DEP=
--elif test $bash_cv_termcap_lib = libncurses; then
--TERMCAP_LIB=-lncurses
-+elif test $bash_cv_termcap_lib = libncursesw; then
-+TERMCAP_LIB=-lncursesw
- TERMCAP_DEP=
- elif test $bash_cv_termcap_lib = libc; then
- TERMCAP_LIB=
diff --git a/patches/bash-4.4.local.patch b/patches/bash-4.4.local.patch
new file mode 100644
index 0000000..1413037
--- /dev/null
+++ b/patches/bash-4.4.local.patch
@@ -0,0 +1,118 @@
+--- bash-4.4/configure.orig	2016-08-05 22:29:55.000000000 +0200
++++ bash-4.4/configure	2016-12-17 21:32:44.745849000 +0100
+@@ -2869,6 +2869,7 @@
+ *-opennt*|*-interix*)	opt_bash_malloc=no ;;	# Interix, now owned by Microsoft
+ *-nsk*)		opt_bash_malloc=no ;;	# HP NonStop
+ *-haiku*)	opt_bash_malloc=no ;;	# Haiku OS
++*-midipix*)	opt_bash_malloc=no ;;	# Midipix
+ esac
+ 
+ # memory scrambling on free()
+@@ -5157,13 +5158,13 @@
+ if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
+   bash_cv_termcap_lib=libcurses
+ else
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
+-$as_echo_n "checking for tgetent in -lncurses... " >&6; }
+-if ${ac_cv_lib_ncurses_tgetent+:} false; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
++$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
++if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lncurses  $LIBS"
++LIBS="-lncursesw  $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -5183,18 +5184,18 @@
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+-  ac_cv_lib_ncurses_tgetent=yes
++  ac_cv_lib_ncursesw_tgetent=yes
+ else
+-  ac_cv_lib_ncurses_tgetent=no
++  ac_cv_lib_ncursesw_tgetent=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
+-$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
+-if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
+-  bash_cv_termcap_lib=libncurses
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
++$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
++if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
++  bash_cv_termcap_lib=libncursesw
+ else
+   bash_cv_termcap_lib=gnutermcap
+ fi
+@@ -5225,8 +5226,8 @@
+ elif test $bash_cv_termcap_lib = libtinfo; then
+ TERMCAP_LIB=-ltinfo
+ TERMCAP_DEP=
+-elif test $bash_cv_termcap_lib = libncurses; then
+-TERMCAP_LIB=-lncurses
++elif test $bash_cv_termcap_lib = libncursesw; then
++TERMCAP_LIB=-lncursesw
+ TERMCAP_DEP=
+ elif test $bash_cv_termcap_lib = libc; then
+ TERMCAP_LIB=
+@@ -15850,13 +15851,13 @@
+ if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
+   bash_cv_termcap_lib=libcurses
+ else
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
+-$as_echo_n "checking for tgetent in -lncurses... " >&6; }
+-if ${ac_cv_lib_ncurses_tgetent+:} false; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
++$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
++if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lncurses  $LIBS"
++LIBS="-lncursesw  $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -15876,18 +15877,18 @@
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+-  ac_cv_lib_ncurses_tgetent=yes
++  ac_cv_lib_ncursesw_tgetent=yes
+ else
+-  ac_cv_lib_ncurses_tgetent=no
++  ac_cv_lib_ncursesw_tgetent=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
+-$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
+-if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
+-  bash_cv_termcap_lib=libncurses
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
++$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
++if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
++  bash_cv_termcap_lib=libncursesw
+ else
+   bash_cv_termcap_lib=gnutermcap
+ fi
+@@ -15918,8 +15919,8 @@
+ elif test $bash_cv_termcap_lib = libtinfo; then
+ TERMCAP_LIB=-ltinfo
+ TERMCAP_DEP=
+-elif test $bash_cv_termcap_lib = libncurses; then
+-TERMCAP_LIB=-lncurses
++elif test $bash_cv_termcap_lib = libncursesw; then
++TERMCAP_LIB=-lncursesw
+ TERMCAP_DEP=
+ elif test $bash_cv_termcap_lib = libc; then
+ TERMCAP_LIB=
diff --git a/patches/coreutils-8.26.local.patch b/patches/coreutils-8.26.local.patch
deleted file mode 100644
index e68f87b..0000000
--- a/patches/coreutils-8.26.local.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- coreutils-8.26/configure.orig	2016-11-30 19:12:35.000000000 +0100
-+++ coreutils-8.26/configure	2016-12-17 21:40:01.397534600 +0100
-@@ -67855,3 +67855,11 @@
- $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
- fi
- 
-+# bypass dependency on help2man
-+if [ x"$cross_compiling" = xyes ]; then
-+	mkdir -p man;
-+	for f in $srcdir/src/*.c; do src=$(basename $f); doc="${src%.*}"; echo $doc; touch man/$doc.1; done
-+	for f in dir sha1sum sha224sum sha256sum sha384sum sha512sum vdir; do touch man/$f.1; done
-+
-+	sed -i -e 's/@cross_compiling@/'$cross_compiling'/g' Makefile || exit 2
-+fi
---- coreutils-8.26/src/fs.h.orig	2016-11-30 14:59:20.000000000 +0100
-+++ coreutils-8.26/src/fs.h	2016-12-17 21:40:01.400534600 +0100
-@@ -2,7 +2,7 @@
-    Please send additions to bug-coreutils@gnu.org and meskes@debian.org.
-    This file is generated automatically from ./src/stat.c. */
- 
--#if defined __linux__
-+#if defined __linux__ || defined __midipix__
- # define S_MAGIC_ACFS 0x61636673
- # define S_MAGIC_ADFS 0xADF5
- # define S_MAGIC_AFFS 0xADFF
---- coreutils-8.26/Makefile.in.orig	2016-11-30 19:34:55.000000000 +0100
-+++ coreutils-8.26/Makefile.in	2016-12-18 00:35:47.375117500 +0100
-@@ -3439,7 +3439,7 @@
- INET_PTON_LIB = @INET_PTON_LIB@
- INSTALL = $(cu_install_program) -c
- INSTALL_DATA = @INSTALL_DATA@
--INSTALL_PROGRAM = @INSTALL_PROGRAM@
-+INSTALL_PROGRAM = install
- INSTALL_SCRIPT = @INSTALL_SCRIPT@
- INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
- INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
-@@ -5018,12 +5018,14 @@
-     $(bin_SCRIPTS) \
-     $(EXTRA_PROGRAMS)
- 
-+CROSS_COMPILE = @cross_compiling@
-+
- pm = progs-makefile
- pr = progs-readme
- @CROSS_COMPILING_FALSE@cu_install_program = src/ginstall
- 
- # Use the just-built 'ginstall', when not cross-compiling.
--@CROSS_COMPILING_TRUE@cu_install_program = @INSTALL_PROGRAM@
-+@CROSS_COMPILING_TRUE@cu_install_program = install
- info_TEXINFOS = doc/coreutils.texi
- doc_coreutils_TEXINFOS = \
-   doc/perm.texi \
-@@ -14636,6 +14638,7 @@
- 				$$argv$(EXEEXT))			\
- 	&& : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
- 	&& export SOURCE_DATE_EPOCH && $(run_help2man)			\
-+		     --no-discard-stderr				\
- 		     --source='$(PACKAGE_STRING)'			\
- 		     --include=$(srcdir)/man/$$name.x			\
- 		     --output=$$t/$$name.1				\
-@@ -14649,6 +14652,7 @@
- 	  && chmod a-w $@-t						\
- 	  && mv $@-t $@
- .PHONY: check-root
-+
- check-root:
- 	$(MAKE) check TESTS='$(root_tests)' SUBDIRS=.
- 
diff --git a/patches/coreutils-8.27.local.patch b/patches/coreutils-8.27.local.patch
new file mode 100644
index 0000000..5ba9ac7
--- /dev/null
+++ b/patches/coreutils-8.27.local.patch
@@ -0,0 +1,74 @@
+diff -ru coreutils-8.27.orig/configure coreutils-8.27/configure
+--- coreutils-8.27.orig/configure	2017-03-09 06:00:50.000000000 +0100
++++ coreutils-8.27/configure	2017-08-11 19:04:46.135115372 +0200
+@@ -68318,3 +68318,12 @@
+ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ fi
+ 
++# bypass dependency on help2man
++if [ x"$cross_compiling" = xyes ]; then
++	mkdir -p man;
++	for f in $srcdir/src/*.c; do src=$(basename $f); doc="${src%.*}"; echo $doc; touch man/$doc.1; done
++	for f in dir sha1sum sha224sum sha256sum sha384sum sha512sum vdir; do touch man/$f.1; done
++
++	sed -i -e 's/@cross_compiling@/'$cross_compiling'/g' Makefile || exit 2
++fi
++
+diff -ru coreutils-8.27.orig/Makefile.in coreutils-8.27/Makefile.in
+--- coreutils-8.27.orig/Makefile.in	2017-03-09 06:24:51.000000000 +0100
++++ coreutils-8.27/Makefile.in	2017-08-11 19:09:39.000000000 +0200
+@@ -3454,7 +3454,7 @@
+ INET_PTON_LIB = @INET_PTON_LIB@
+ INSTALL = $(cu_install_program) -c
+ INSTALL_DATA = @INSTALL_DATA@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_PROGRAM = install
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+@@ -5040,12 +5040,14 @@
+     $(bin_SCRIPTS) \
+     $(EXTRA_PROGRAMS)
+ 
++CROSS_COMPILE = @cross_compiling@
++
+ pm = progs-makefile
+ pr = progs-readme
+ @CROSS_COMPILING_FALSE@cu_install_program = src/ginstall
+ 
+ # Use the just-built 'ginstall', when not cross-compiling.
+-@CROSS_COMPILING_TRUE@cu_install_program = @INSTALL@
++@CROSS_COMPILING_TRUE@cu_install_program = install
+ info_TEXINFOS = doc/coreutils.texi
+ doc_coreutils_TEXINFOS = \
+   doc/perm.texi \
+@@ -14773,7 +14775,8 @@
+ 				$$argv$(EXEEXT))			\
+ 	&& : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
+ 	&& export SOURCE_DATE_EPOCH && $(run_help2man)			\
+-		     --source='$(PACKAGE_STRING)'			\
++		     --no-discard-stderr				\
++                    --source='$(PACKAGE_STRING)'			\
+ 		     --include=$(srcdir)/man/$$name.x			\
+ 		     --output=$$t/$$name.1				\
+ 		     --info-page='\(aq(coreutils) '$$name' invocation\(aq' \
+@@ -14786,6 +14789,7 @@
+ 	  && chmod a-w $@-t						\
+ 	  && mv $@-t $@
+ .PHONY: check-root
++
+ check-root:
+ 	$(MAKE) check TESTS='$(root_tests)' SUBDIRS=.
+ 
+diff -ru coreutils-8.27.orig/src/fs.h coreutils-8.27/src/fs.h
+--- coreutils-8.27.orig/src/fs.h	2017-03-09 05:44:05.000000000 +0100
++++ coreutils-8.27/src/fs.h	2017-08-11 19:05:05.283026746 +0200
+@@ -2,7 +2,7 @@
+    Please send additions to bug-coreutils@gnu.org and meskes@debian.org.
+    This file is generated automatically from ./src/stat.c. */
+ 
+-#if defined __linux__
++#if defined __linux__ || defined __midipix__
+ # define S_MAGIC_ACFS 0x61636673
+ # define S_MAGIC_ADFS 0xADF5
+ # define S_MAGIC_AFFS 0xADFF
diff --git a/patches/glib-2.46.2.local.patch b/patches/glib-2.46.2.local.patch
index 8153cb8..6b6809c 100644
--- a/patches/glib-2.46.2.local.patch
+++ b/patches/glib-2.46.2.local.patch
@@ -1,162 +1,3 @@
---- glib-2.46.2/configure.orig	2015-11-06 22:28:54.000000000 +0000
-+++ glib-2.46.2/configure	2016-03-06 18:55:06.490493143 +0000
-@@ -21737,33 +21737,7 @@
- if ${glib_cv_stack_grows+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
--
--        if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--	volatile int *a = 0, *b = 0;
--	void f (int i) { volatile int x = 5; if (i == 0) b = &x; else f (i - 1); }
--	int main () { volatile int y = 7; a = &y; f (100); return b > a ? 0 : 1; }
--
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
-   glib_cv_stack_grows=yes
--
--else
--  glib_cv_stack_grows=no
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_stack_grows" >&5
- $as_echo "$glib_cv_stack_grows" >&6; }
-@@ -25142,37 +25116,7 @@
- if ${glib_cv_uscore+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
--
--		if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--#include <dlfcn.h>
--                int glib_underscore_test (void) { return 42; }
--		int main() {
--		  void *f1 = (void*)0, *f2 = (void*)0, *handle;
--		  handle = dlopen ((void*)0, 0);
--		  if (handle) {
--		    f1 = dlsym (handle, "glib_underscore_test");
--		    f2 = dlsym (handle, "_glib_underscore_test");
--		  } return (!f2 || f1);
--		}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
-   glib_cv_uscore=yes
--else
--  glib_cv_uscore=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--		rm -f plugin.c plugin.$ac_objext plugin.lo
--
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_uscore" >&5
- $as_echo "$glib_cv_uscore" >&6; }
-@@ -26503,37 +26447,7 @@
- if ${ac_cv_func_posix_getpwuid_r+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
--  if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <errno.h>
--#include <pwd.h>
--int main () {
--    char buffer[10000];
--    struct passwd pwd, *pwptr = &pwd;
--    int error;
--    errno = 0;
--    error = getpwuid_r (0, &pwd, buffer,
--                        sizeof (buffer), &pwptr);
--   return (error < 0 && errno == ENOSYS)
--	   || error == ENOSYS;
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_posix_getpwuid_r=yes
--else
--  ac_cv_func_posix_getpwuid_r=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_posix_getpwuid_r" >&5
- $as_echo "$ac_cv_func_posix_getpwuid_r" >&6; }
-@@ -26594,37 +26508,7 @@
- if ${ac_cv_func_posix_getgrgid_r+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
--  if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <errno.h>
--#include <grp.h>
--int main () {
--    char buffer[10000];
--    struct group grp, *grpptr = &grp;
--    int error;
--    errno = 0;
--    error = getgrgid_r (0, &grp, buffer,
--                        sizeof (buffer), &grpptr);
--   return (error < 0 && errno == ENOSYS)
--	   || error == ENOSYS;
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_posix_getgrgid_r=yes
--else
--  ac_cv_func_posix_getgrgid_r=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_posix_getgrgid_r" >&5
- $as_echo "$ac_cv_func_posix_getgrgid_r" >&6; }
-@@ -27053,7 +26937,7 @@
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
--  glib_cv_eventfd=yes
-+  glib_cv_eventfd=no
- else
-   glib_cv_eventfd=no
- fi
 --- glib-2.46.2/gio/inotify/Makefile.in.orig	2015-11-06 23:28:59.000000000 +0100
 +++ glib-2.46.2/gio/inotify/Makefile.in	2016-09-07 05:20:16.670049836 +0200
 @@ -180,7 +180,7 @@
diff --git a/vars/build.vars b/vars/build.vars
index 0cd992b..67d74c2 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -304,13 +304,13 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}";
 : ${PKG_LIBFFI_URL:=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_VERSION}.tar.gz};
 : ${PKG_LIBFFI_CFLAGS_CONFIGURE_EXTRA:=-D_WIN64};
 : ${PKG_LIBFFI_CONFIGURE_ARGS_EXTRA:=--program-prefix=};
-: ${PKG_GDBM_SHA256SUM:=d97b2166ee867fd6ca5c022efee80702d6f30dd66af0e03ed092285c3af9bcea};
-: ${PKG_GDBM_VERSION:=1.12};
+: ${PKG_GDBM_SHA256SUM:=9d252cbd7d793f7b12bcceaddda98d257c14f4d1890d851c386c37207000a253};
+: ${PKG_GDBM_VERSION:=1.13};
 : ${PKG_GDBM_URL:=ftp://ftp.gnu.org/gnu/gdbm/gdbm-${PKG_GDBM_VERSION}.tar.gz};
 : ${PKG_GEOIP_URLS_GIT:="geoip-api-c=https://github.com/maxmind/geoip-api-c@master"};
 : ${PKG_GEOIP_SUBDIR:=geoip-api-c};
-: ${PKG_PCRE_SHA256SUM:=ccdf7e788769838f8285b3ee672ed573358202305ee361cfec7a4a4fb005bbc7};
-: ${PKG_PCRE_VERSION:=8.39};
+: ${PKG_PCRE_SHA256SUM:=244838e1f1d14f7e2fa7681b857b3a8566b74215f28133f14a8f5e59241b682c};
+: ${PKG_PCRE_VERSION:=8.41};
 : ${PKG_PCRE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PKG_PCRE_VERSION}.tar.gz};
 : ${PKG_GLIB_SHA256SUM:=5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db};
 : ${PKG_GLIB_VERSION:=2.46.2};
@@ -526,8 +526,8 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
 : ${PKG_APK_TOOLS_BUILD_DIR:=apk-tools-${PKG_APK_TOOLS_VERSION}};
 : ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_NATIVE}:CROSS_COMPILE=${TARGET}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_NATIVE}:PKG_CONFIG=${TARGET}-pkg-config};
 : ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk};
-: ${PKG_BASH_SHA256SUM:=199ec0166d50a765eec74dc258b006b06cf6b59901d7ff40510c82aae37ad994};
-: ${PKG_BASH_VERSION:=4.4-rc2};
+: ${PKG_BASH_SHA256SUM:=d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb};
+: ${PKG_BASH_VERSION:=4.4};
 : ${PKG_BASH_URL:=https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}.tar.gz};
 : ${PKG_BASH_CONFIGURE_ARGS_EXTRA:="--without-bash-malloc --with-curses"};
 : ${PKG_BC_SHA256SUM:=7ee4abbcfac03d8a6e1a8a3440558a3d239d6b858585063e745c760957725ecc};
@@ -557,8 +557,8 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
 : ${PKG_CLANG_HOST_URL:=http://releases.llvm.org/${PKG_CLANG_HOST_VERSION}/cfe-${PKG_CLANG_HOST_VERSION}.src.tar.xz};
 : ${PKG_CLANG_HOST_BUILD_TYPE:=host};
 : ${PKG_CLANG_HOST_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX}};
-: ${PKG_COREUTILS_SHA256SUM:=155e94d748f8e2bc327c66e0cbebdb8d6ab265d2f37c3c928f7bf6c3beba9a8e};
-: ${PKG_COREUTILS_VERSION:=8.26};
+: ${PKG_COREUTILS_SHA256SUM:=8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b};
+: ${PKG_COREUTILS_VERSION:=8.27};
 : ${PKG_COREUTILS_URL:=https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_COREUTILS_VERSION}.tar.xz};
 : ${PKG_COREUTILS_MAKEFLAGS_BUILD_EXTRA:=V=99};
 : ${PKG_CPARSER_URLS_GIT:="cparser=http://pp.info.uni-karlsruhe.de/git/cparser.git@master bcparser=${GITROOT}/compilers/bcparser@main"};
@@ -577,11 +577,11 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
 : ${PKG_DASH_URL:=https://bintray.com/termux/upstream/download_file?file_path=dash-${PKG_DASH_VERSION}.tar.gz};
 : ${PKG_DASH_INSTALL_FILES:=@dash=bin/sh};
 : ${PKG_DASH_SUBDIR:=dash-${PKG_DASH_VERSION}};
-: ${PKG_DATAMASH_SHA256SUM:=a9e5acc86af4dd64c7ac7f6554718b40271aa67f7ff6e9819bdd919a25904bb0};
-: ${PKG_DATAMASH_VERSION:=1.1.0};
+: ${PKG_DATAMASH_SHA256SUM:=420819b3d7372ee3ce704add847cff7d08c4f8176c1d48735d4a632410bb801b};
+: ${PKG_DATAMASH_VERSION:=1.1.1};
 : ${PKG_DATAMASH_URL:=https://ftp.gnu.org/gnu/datamash/datamash-${PKG_DATAMASH_VERSION}.tar.gz};
-: ${PKG_DIFFUTILS_SHA256SUM:=dad398ccd5b9faca6b0ab219a036453f62a602a56203ac659b43e889bec35533};
-: ${PKG_DIFFUTILS_VERSION:=3.5};
+: ${PKG_DIFFUTILS_SHA256SUM:=d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6};
+: ${PKG_DIFFUTILS_VERSION:=3.6};
 : ${PKG_DIFFUTILS_URL:=https://ftp.gnu.org/gnu/diffutils/diffutils-${PKG_DIFFUTILS_VERSION}.tar.xz};
 : ${PKG_DOS2UNIX_SHA256SUM:=307e0363c19384467bd9a15e1cfea482ca3e3089d76c7a02b969022fff32583a};
 : ${PKG_DOS2UNIX_VERSION:=7.3.5-beta3};
@@ -610,8 +610,8 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
 : ${PKG_GAWK_SHA256SUM:=53e184e2d0f90def9207860531802456322be091c7b48f23fdc79cda65adc266};
 : ${PKG_GAWK_VERSION:=4.1.4};
 : ${PKG_GAWK_URL:=https://ftp.gnu.org/gnu/gawk/gawk-${PKG_GAWK_VERSION}.tar.xz};
-: ${PKG_GIT_SHA256SUM:=85440b4c01e5a7a600a6dcb7ed99695430cd5bc2ed9978471d1c9a7c86abd024};
-: ${PKG_GIT_VERSION:=2.11.0-rc3};
+: ${PKG_GIT_SHA256SUM:=ccc366d5d674fb755fd98d219c23f2b4e5da8a49d8582a6314813b280d75536b};
+: ${PKG_GIT_VERSION:=2.14.1};
 : ${PKG_GIT_URL:=https://github.com/git/git/archive/v${PKG_GIT_VERSION}.tar.gz};
 : ${PKG_GIT_BUILD_DIR:=git-${PKG_GIT_VERSION}};
 : ${PKG_GIT_ENV_VARS_EXTRA:="ac_cv_fread_reads_directories=1:ac_cv_snprintf_returns_bogus=0"};
@@ -845,8 +845,8 @@ fi;
 : ${PKG_WEECHAT_CONFIGURE_ARGS_EXTRA:="--disable-python --disable-python3 --disable-ruby --disable-tcl"};
 : ${PKG_WEECHAT_ENV_VARS_EXTRA:="CURL_CONFIG=${PREFIX_NATIVE}/bin/curl-config:PKG_CONFIG=${PREFIX}/bin/${TARGET}-pkg-config"};
 : ${PKG_WEECHAT_LDFLAGS_BUILD_EXTRA:=-L${PREFIX_NATIVE}/lib};
-: ${PKG_WGET_SHA256SUM:=b5b55b75726c04c06fe253daec9329a6f1a3c0c1878e3ea76ebfebc139ea9cc1};
-: ${PKG_WGET_VERSION:=1.18};
+: ${PKG_WGET_SHA256SUM:=0c950b9671881222a4d385b013c9604e98a8025d1988529dfca0e93617744cd2};
+: ${PKG_WGET_VERSION:=1.19.1};
 : ${PKG_WGET_URL:=https://ftp.gnu.org/gnu/wget/wget-${PKG_WGET_VERSION}.tar.xz};
 : ${PKG_WGET_CONFIGURE_ARGS_EXTRA:=--with-ssl=openssl};
 : ${PKG_WHICH_SHA256SUM:=f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad};