diff --git a/dockerfiles/bionic/R-devel.patch b/dockerfiles/bionic/R-devel.patch index 1a0c232..c61c4ac 100644 --- a/dockerfiles/bionic/R-devel.patch +++ b/dockerfiles/bionic/R-devel.patch @@ -10,11 +10,80 @@ then : r_cv_icu=no @@ -49702,7 +49702,7 @@ - + printf "%s\n" "#define USE_ICU 1" >>confdefs.h - + - LIBS="${LIBS} -licuuc -licui18n" + LIBS="${LIBS} -licui18n -licuuc -licudata -lstdc++ -lm -ldl" else use_ICU=no fi +@@ -49813,7 +49813,7 @@ ac_x_includes=no + ac_x_libraries=no + # Do we need to do anything special at all? + ac_save_LIBS=$LIBS +-LIBS="-lX11 $LIBS" ++LIBS="-lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -49956,7 +49956,7 @@ if test "$ac_x_libraries" = no; then + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS +- LIBS="-lX11 $LIBS" ++ LIBS="-lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -50046,6 +50046,7 @@ else + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + ++ X_LIBS="-lxcb" + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" +@@ -50131,7 +50132,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). +- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" ++ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -50710,7 +50711,7 @@ then : + printf %s "(cached) " >&6 + else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +-LIBS="-lXt ${X_LIBS} -lX11 $LIBS" ++LIBS="-lXt ${X_LIBS} -lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -50771,7 +50772,7 @@ if test "x${use_X11}" = "xyes"; then + + printf "%s\n" "#define HAVE_X11 1" >>confdefs.h + +- X_LIBS="${X_LIBS} -lX11 -lXt" ++ X_LIBS="${X_LIBS} -lX11 -lxcb -lXt -lXau -lXdmcp -lSM -lICE -lbsd" + else + if test "x${with_x}" != "xno"; then + as_fn_error $? "--with-x=yes (default) and X11 headers/libs are not available" "$LINENO" 5 +diff --git a/src/modules/X11/Makefile.in b/src/modules/X11/Makefile.in +index 0a118d8..c6ef405 100644 +--- a/src/modules/X11/Makefile.in ++++ b/src/modules/X11/Makefile.in +@@ -20,7 +20,10 @@ ALL_CFLAGS = $(ALL_CFLAGS_LO) + ## This relies on ld re-ordering the flags, as X_PRE_LIBS does not + ## contain a -L flag but relies on that in X_LIBS. + ## This comes from AC_PATH_XTRA so we have not interfered. +-ALL_X_LIBS = $(X_PRE_LIBS) @CAIROX11_LIBS@ $(X_LIBS) $(X_EXTRA_LIBS) ++CAIRO_X_LIBS = @CAIROX11_LIBS@ ++# CAIRO_X_LIBS2 := $(patsubst -lX11,-Wl\\,--whole-archive -lX11 -Wl\\,--no-whole-archive,$(CAIRO_X_LIBS)) ++CAIRO_X_LIBS2 := $(CAIRO_X_LIBS:-lX11=-Wl,--whole-archive -lX11 -Wl,--no-whole-archive) ++ALL_X_LIBS = $(X_PRE_LIBS) $(CAIRO_X_LIBS2) $(X_LIBS) $(X_EXTRA_LIBS) + + SOURCES = devX11.c rotated.c rbitmap.c + DEPENDS = $(SOURCES:.c=.d) diff --git a/dockerfiles/bionic/R-next.patch b/dockerfiles/bionic/R-next.patch index 1a0c232..c61c4ac 100644 --- a/dockerfiles/bionic/R-next.patch +++ b/dockerfiles/bionic/R-next.patch @@ -10,11 +10,80 @@ then : r_cv_icu=no @@ -49702,7 +49702,7 @@ - + printf "%s\n" "#define USE_ICU 1" >>confdefs.h - + - LIBS="${LIBS} -licuuc -licui18n" + LIBS="${LIBS} -licui18n -licuuc -licudata -lstdc++ -lm -ldl" else use_ICU=no fi +@@ -49813,7 +49813,7 @@ ac_x_includes=no + ac_x_libraries=no + # Do we need to do anything special at all? + ac_save_LIBS=$LIBS +-LIBS="-lX11 $LIBS" ++LIBS="-lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -49956,7 +49956,7 @@ if test "$ac_x_libraries" = no; then + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS +- LIBS="-lX11 $LIBS" ++ LIBS="-lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -50046,6 +50046,7 @@ else + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + ++ X_LIBS="-lxcb" + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" +@@ -50131,7 +50132,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). +- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" ++ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -50710,7 +50711,7 @@ then : + printf %s "(cached) " >&6 + else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +-LIBS="-lXt ${X_LIBS} -lX11 $LIBS" ++LIBS="-lXt ${X_LIBS} -lX11 -lxcb -lXau -lXdmcp -lSM -lICE -lbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -50771,7 +50772,7 @@ if test "x${use_X11}" = "xyes"; then + + printf "%s\n" "#define HAVE_X11 1" >>confdefs.h + +- X_LIBS="${X_LIBS} -lX11 -lXt" ++ X_LIBS="${X_LIBS} -lX11 -lxcb -lXt -lXau -lXdmcp -lSM -lICE -lbsd" + else + if test "x${with_x}" != "xno"; then + as_fn_error $? "--with-x=yes (default) and X11 headers/libs are not available" "$LINENO" 5 +diff --git a/src/modules/X11/Makefile.in b/src/modules/X11/Makefile.in +index 0a118d8..c6ef405 100644 +--- a/src/modules/X11/Makefile.in ++++ b/src/modules/X11/Makefile.in +@@ -20,7 +20,10 @@ ALL_CFLAGS = $(ALL_CFLAGS_LO) + ## This relies on ld re-ordering the flags, as X_PRE_LIBS does not + ## contain a -L flag but relies on that in X_LIBS. + ## This comes from AC_PATH_XTRA so we have not interfered. +-ALL_X_LIBS = $(X_PRE_LIBS) @CAIROX11_LIBS@ $(X_LIBS) $(X_EXTRA_LIBS) ++CAIRO_X_LIBS = @CAIROX11_LIBS@ ++# CAIRO_X_LIBS2 := $(patsubst -lX11,-Wl\\,--whole-archive -lX11 -Wl\\,--no-whole-archive,$(CAIRO_X_LIBS)) ++CAIRO_X_LIBS2 := $(CAIRO_X_LIBS:-lX11=-Wl,--whole-archive -lX11 -Wl,--no-whole-archive) ++ALL_X_LIBS = $(X_PRE_LIBS) $(CAIRO_X_LIBS2) $(X_LIBS) $(X_EXTRA_LIBS) + + SOURCES = devX11.c rotated.c rbitmap.c + DEPENDS = $(SOURCES:.c=.d)