summaryrefslogtreecommitdiff
path: root/repo/motif/13-fix_hardcoded_x11rgb_path.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/motif/13-fix_hardcoded_x11rgb_path.patch
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/motif/13-fix_hardcoded_x11rgb_path.patch')
-rw-r--r--repo/motif/13-fix_hardcoded_x11rgb_path.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/repo/motif/13-fix_hardcoded_x11rgb_path.patch b/repo/motif/13-fix_hardcoded_x11rgb_path.patch
new file mode 100644
index 0000000..6d53285
--- /dev/null
+++ b/repo/motif/13-fix_hardcoded_x11rgb_path.patch
@@ -0,0 +1,54 @@
+Description: Fix hardcoded path to /usr/lib/X11/rgb.txt in lib/Xm/ColorS.c
+ LibXm is hardcoded to read rgb.txt from /usr/lib/X11 but this file, provided
+ by x11-common in Debian, is located in /etc/X11 and /usr/share/X11 via symlink.
+ .
+ This patch fixes this by allowing the directory in which rgb.txt resides to be
+ customized by the --with-x11rgbdir=DIR configure option.
+Author: Graham Inggs <graham@nerve.org.za>
+Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=1585
+Last-Update: 2013-03-12
+--- a/configure.ac
++++ b/configure.ac
+@@ -189,6 +189,10 @@
+ XMBINDDIR_FALLBACK="$xmbinddir"
+ AC_SUBST(XMBINDDIR_FALLBACK)
+
++AC_ARG_WITH(x11rgbdir, [ --with-x11rgbdir=DIR rgb.txt is located in DIR], x11rgbdir=$withval, x11rgbdir="/usr/lib/X11")
++X11RGBPATH="$x11rgbdir/rgb.txt"
++AC_SUBST(X11RGBPATH)
++
+ RM="rm -f"
+ AC_SUBST(RM)
+
+--- a/lib/Xm/ColorS.c
++++ b/lib/Xm/ColorS.c
+@@ -123,6 +123,10 @@
+ * STATIC DECLARATIONS
+ ************************************************************/
+
++#ifndef X11RGBPATH
++#define X11RGBPATH "/usr/lib/X11/rgb.txt"
++#endif
++
+ static XtResource resources[] =
+ {
+ {
+@@ -146,7 +150,7 @@
+ {
+ XmNrgbFile, XmCString, XmRString,
+ sizeof(String), XtOffsetOf(XmColorSelectorRec, cs.rgb_file),
+- XmRString, (XtPointer) "/usr/lib/X11/rgb.txt"
++ XmRString, (XtPointer) X11RGBPATH
+ },
+ #endif
+ {
+--- a/lib/Xm/Makefile.am
++++ b/lib/Xm/Makefile.am
+@@ -8,6 +8,7 @@
+ INCLUDES = -I.. -I$(srcdir)/.. -DXMBINDDIR_FALLBACK=\"@XMBINDDIR_FALLBACK@\" \
+ -DINCDIR=\"@INCDIR@\" \
+ -DLIBDIR=\"@LIBDIR@\" \
++ -DX11RGBPATH=\"@X11RGBPATH@\" \
+ ${X_CFLAGS}
+ xmdir = $(includedir)/Xm
+