diff --git a/packages/x11/lib/libX11/patches/10-host_cc.diff b/packages/x11/lib/libX11/patches/10_host_cc.diff
similarity index 77%
rename from packages/x11/lib/libX11/patches/10-host_cc.diff
rename to packages/x11/lib/libX11/patches/10_host_cc.diff
index 9426da95d3..809ceab946 100644
--- a/packages/x11/lib/libX11/patches/10-host_cc.diff
+++ b/packages/x11/lib/libX11/patches/10_host_cc.diff
@@ -1,6 +1,6 @@
-diff -Naur libX11-1.2/src/util/Makefile.in libX11-1.2.patch/src/util/Makefile.in
---- libX11-1.2/src/util/Makefile.in 2009-02-17 16:11:02.000000000 +0100
-+++ libX11-1.2.patch/src/util/Makefile.in 2009-02-17 18:18:52.000000000 +0100
+diff -Naur libX11-1.2.1.orig/src/util/Makefile.in libX11-1.2.1/src/util/Makefile.in
+--- libX11-1.2.1.orig/src/util/Makefile.in 2009-04-08 19:00:52.000000000 +0200
++++ libX11-1.2.1/src/util/Makefile.in 2009-04-08 19:03:07.000000000 +0200
@@ -51,17 +51,17 @@
makekeys_OBJECTS = makekeys-makekeys.$(OBJEXT)
makekeys_LDADD = $(LDADD)
@@ -9,14 +9,14 @@ diff -Naur libX11-1.2/src/util/Makefile.in libX11-1.2.patch/src/util/Makefile.in
- $(LDFLAGS) -o $@
+ --mode=link host-gcc $(makekeys_CFLAGS) $(HOST_CFLAGS) $(AM_LDFLAGS) \
+ $(HOST_LDFLAGS) -o $@
- DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/src -I$(top_builddir)/include/X11@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
+COMPILE = $(HOST_CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-+ $(HOST_CPPFLAGS) $(AM_CFLAGS) $(HOST_CFLAGS)
++ $(CPPFLAGS) $(AM_CFLAGS) $(HOST_CFLAGS)
+CCLD = $(HOST_CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
diff --git a/packages/x11/lib/libX11/patches/20_libX11_remove-xdmcp.diff b/packages/x11/lib/libX11/patches/20_libX11_remove-xdmcp.diff
index d58aa8a436..cbecc3e2c3 100644
--- a/packages/x11/lib/libX11/patches/20_libX11_remove-xdmcp.diff
+++ b/packages/x11/lib/libX11/patches/20_libX11_remove-xdmcp.diff
@@ -1,171 +1,119 @@
-diff -Naur libX11-1.1.99.2.orig/configure libX11-1.1.99.2/configure
---- libX11-1.1.99.2.orig/configure 2008-11-09 15:36:00.000000000 +0100
-+++ libX11-1.1.99.2/configure 2008-11-09 15:34:54.000000000 +0100
-@@ -12371,6 +12371,7 @@
+diff -Naur libX11-1.2.1.orig/configure libX11-1.2.1/configure
+--- libX11-1.2.1.orig/configure 2009-04-08 19:00:52.000000000 +0200
++++ libX11-1.2.1/configure 2009-04-08 23:31:35.000000000 +0200
+@@ -20784,90 +20784,10 @@
case "$ac_cv_use_xcb" in
no)
X11_REQUIRES="xau xcmiscproto bigreqsproto"
+- X11_EXTRA_DEPS="xau xdmcp"
+ X11_EXTRA_DEPS="xau"
pkg_failed=no
- { echo "$as_me:$LINENO: checking for XDMCP" >&5
-@@ -12430,58 +12431,18 @@
- # Put the nasty error message in config.log where it belongs
- echo "$XDMCP_PKG_ERRORS" >&5
+-{ echo "$as_me:$LINENO: checking for XDMCP" >&5
+-echo $ECHO_N "checking for XDMCP... $ECHO_C" >&6; }
-- { { echo "$as_me:$LINENO: error: Package requirements (xdmcp) were not met:
+-if test -n "$PKG_CONFIG"; then
+- if test -n "$PKG_CONFIG" && \
+- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5
+- ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; then
+- pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null`
+-else
+- pkg_failed=yes
+-fi
+-else
+- pkg_failed=untried
+-fi
+-if test -n "$PKG_CONFIG"; then
+- if test -n "$PKG_CONFIG" && \
+- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5
+- ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; then
+- pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null`
+-else
+- pkg_failed=yes
+-fi
+-else
+- pkg_failed=untried
+-fi
-
--$XDMCP_PKG_ERRORS
+-if test $pkg_failed = yes; then
+- XDMCP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xdmcp"`
+- # Put the nasty error message in config.log where it belongs
+- echo "$XDMCP_PKG_ERRORS" 1>&5
-
+- { { echo "$as_me:$LINENO: error: Package requirements (xdmcp) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
--Alternatively, you may set the environment variables XDMCP_CFLAGS
--and XDMCP_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
--" >&5
--echo "$as_me: error: Package requirements (xdmcp) were not met:
--
--$XDMCP_PKG_ERRORS
--
+-Alternatively you may set the XDMCP_CFLAGS and XDMCP_LIBS environment variables
+-to avoid the need to call pkg-config. See the pkg-config man page for
+-more details." >&5
+-echo "$as_me: error: Package requirements (xdmcp) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
--Alternatively, you may set the environment variables XDMCP_CFLAGS
--and XDMCP_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
--" >&2;}
+-Alternatively you may set the XDMCP_CFLAGS and XDMCP_LIBS environment variables
+-to avoid the need to call pkg-config. See the pkg-config man page for
+-more details." >&2;}
- { (exit 1); exit 1; }; }
-+ { echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6; }
-+ { echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6; }
- elif test $pkg_failed = untried; then
+-elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
--Alternatively, you may set the environment variables XDMCP_CFLAGS
--and XDMCP_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
+-Alternatively you may set the XDMCP_CFLAGS and XDMCP_LIBS environment variables
+-to avoid the need to call pkg-config. See the pkg-config man page for
+-more details.
-
--To get pkg-config, see .
+-To get pkg-config, see .
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
--Alternatively, you may set the environment variables XDMCP_CFLAGS
--and XDMCP_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
+-Alternatively you may set the XDMCP_CFLAGS and XDMCP_LIBS environment variables
+-to avoid the need to call pkg-config. See the pkg-config man page for
+-more details.
-
--To get pkg-config, see .
+-To get pkg-config, see .
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-+ { echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6; }
- else
- XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS
- XDMCP_LIBS=$pkg_cv_XDMCP_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
- echo "${ECHO_T}yes" >&6; }
+-else
+- XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS
+- XDMCP_LIBS=$pkg_cv_XDMCP_LIBS
+- { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
- :
-fi
{ echo "$as_me:$LINENO: checking for XdmcpWrap in -lXdmcp" >&5
echo $ECHO_N "checking for XdmcpWrap in -lXdmcp... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then
-@@ -12544,11 +12505,84 @@
- { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5
- echo "${ECHO_T}$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; }
- if test $ac_cv_lib_Xdmcp_XdmcpWrap = yes; then
-+
-+ { echo "$as_me:$LINENO: checking for XdmcpWrap in -lXdmcp" >&5
-+echo $ECHO_N "checking for XdmcpWrap in -lXdmcp... $ECHO_C" >&6; }
-+if test "${ac_cv_lib_Xdmcp_XdmcpWrap+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lXdmcp $XDMCP_LIBS $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
+diff -Naur libX11-1.2.1.orig/src/ConnDis.c libX11-1.2.1/src/ConnDis.c
+--- libX11-1.2.1.orig/src/ConnDis.c 2009-04-08 19:00:52.000000000 +0200
++++ libX11-1.2.1/src/ConnDis.c 2009-04-08 23:32:30.000000000 +0200
+@@ -39,7 +39,9 @@
+ #include
+ #include
+ #include
++#ifdef HASXDMAUTH
+ #include
+#endif
-+char XdmcpWrap ();
-+int
-+main ()
-+{
-+return XdmcpWrap ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-+ (eval "$ac_link") 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && {
-+ test -z "$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ } && test -s conftest$ac_exeext &&
-+ $as_test_x conftest$ac_exeext; then
-+ ac_cv_lib_Xdmcp_XdmcpWrap=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_cv_lib_Xdmcp_XdmcpWrap=no
-+fi
-+
-+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5
-+echo "${ECHO_T}$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; }
-+if test $ac_cv_lib_Xdmcp_XdmcpWrap = yes; then
- xdmauth="yes"
- else
- xdmauth="no"
- fi
-
-+ X11_EXTRA_DEPS="$X11_EXTRA_DEPS xdmcp"
-+
-+else
-+
-+ XDMCP_CFLAGS=
-+ XDMCP_LIBS=
-+
-+fi
-+
-+fi
-
- cat >>confdefs.h <<\_ACEOF
- #define USE_XCB 0
-diff -Naur libX11-1.1.99.2.orig/configure.ac libX11-1.1.99.2/configure.ac
---- libX11-1.1.99.2.orig/configure.ac 2008-11-09 15:33:41.000000000 +0100
-+++ libX11-1.1.99.2/configure.ac 2008-11-09 15:33:56.000000000 +0100
-@@ -48,8 +48,18 @@
+ #include
+ #include
+ #include
+diff -Naur libX11-1.2.1/configure.ac libX11-1.2.1.patch/configure.ac
+--- libX11-1.2.1/configure.ac 2009-04-08 00:18:30.000000000 +0200
++++ libX11-1.2.1.patch/configure.ac 2009-04-09 02:19:55.224211885 +0200
+@@ -49,9 +49,18 @@
case "$ac_cv_use_xcb" in
no)
X11_REQUIRES="xau xcmiscproto bigreqsproto"
+- X11_EXTRA_DEPS="xau xdmcp"
- PKG_CHECK_MODULES(XDMCP, xdmcp)
- AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$XDMCP_LIBS])
+ X11_EXTRA_DEPS="xau"
@@ -183,28 +131,3 @@ diff -Naur libX11-1.1.99.2.orig/configure.ac libX11-1.1.99.2/configure.ac
AC_DEFINE(USE_XCB, 0, [Use XCB for low-level protocol implementation])
;;
*)
-diff -Naur libX11-1.1.99.2.orig/src/ConnDis.c libX11-1.1.99.2/src/ConnDis.c
---- libX11-1.1.99.2.orig/src/ConnDis.c 2008-11-09 15:33:41.000000000 +0100
-+++ libX11-1.1.99.2/src/ConnDis.c 2008-11-09 15:33:56.000000000 +0100
-@@ -39,7 +39,9 @@
- #include
- #include
- #include
-+#ifdef HASXDMAUTH
- #include
-+#endif
- #include
- #include
- #include
-diff -Naur libX11-1.1.99.2.orig/x11.pc.in libX11-1.1.99.2/x11.pc.in
---- libX11-1.1.99.2.orig/x11.pc.in 2008-11-09 15:33:41.000000000 +0100
-+++ libX11-1.1.99.2/x11.pc.in 2008-11-09 15:33:56.000000000 +0100
-@@ -9,7 +9,7 @@
- Description: X Library
- Version: @PACKAGE_VERSION@
- Requires: xproto @XKBPROTO_REQUIRES@
--Requires.private: xau xdmcp @X11_EXTRA_DEPS@
-+Requires.private: @X11_EXTRA_DEPS@
- Cflags: -I${includedir} @XTHREAD_CFLAGS@
- Libs: -L${libdir} -lX11
- Libs.private: @XTHREADLIB@
diff --git a/packages/x11/lib/libX11/url b/packages/x11/lib/libX11/url
index e644759272..c5389964f8 100644
--- a/packages/x11/lib/libX11/url
+++ b/packages/x11/lib/libX11/url
@@ -1 +1 @@
-http://xorg.freedesktop.org/archive/individual/lib/libX11-1.2.tar.bz2
+http://xorg.freedesktop.org/archive/individual/lib/libX11-1.2.1.tar.bz2