aboutsummaryrefslogtreecommitdiffstats
path: root/testing/motif/13-fix_hardcoded_x11rgb_path.patch
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2014-06-21 14:40:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-06-23 06:41:47 +0000
commit96d9a81946ebca7dcaa1a8ae9712ee477a156606 (patch)
tree88ef61a0abbd1c78ae5f5314997e1420e23cefe8 /testing/motif/13-fix_hardcoded_x11rgb_path.patch
parentd28d72a16f7697a518150bf27feb26ac317bce28 (diff)
downloadaports-96d9a81946ebca7dcaa1a8ae9712ee477a156606.tar.bz2
aports-96d9a81946ebca7dcaa1a8ae9712ee477a156606.tar.xz
Add motif
Manually sending, since git send-email is being recalcitrant. This will allow me to package nedit and a number of other things. From 3077415e704bee5da76d1000e66bb8e25c0248cf Mon Sep 17 00:00:00 2001 From: Isaac Dunham <ibid.ag@gmail.com> Date: Thu, 19 Jun 2014 05:41:45 +0000 Subject: [PATCH] Add Motif. Motif is an X intrinsics based toolkit which was once widely used. This version is built with Xft support, but not PNG, JPEG, or Xprint. The patches are snarfed from Debian; not all are needed.
Diffstat (limited to 'testing/motif/13-fix_hardcoded_x11rgb_path.patch')
-rw-r--r--testing/motif/13-fix_hardcoded_x11rgb_path.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/motif/13-fix_hardcoded_x11rgb_path.patch b/testing/motif/13-fix_hardcoded_x11rgb_path.patch
new file mode 100644
index 0000000000..6d532859d7
--- /dev/null
+++ b/testing/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
+