Skip to content

Commit

Permalink
Update R-next, R-devel patches for X11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Dec 18, 2024
1 parent dc21a88 commit 640122e
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 4 deletions.
73 changes: 71 additions & 2 deletions dockerfiles/bionic/R-devel.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 <X11/Xlib.h>
@@ -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 <X11/Xlib.h>
@@ -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)
73 changes: 71 additions & 2 deletions dockerfiles/bionic/R-next.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 <X11/Xlib.h>
@@ -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 <X11/Xlib.h>
@@ -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)

0 comments on commit 640122e

Please sign in to comment.