Non-standard X11 Paths

Dan Nicholson dbn.lists at gmail.com
Fri Jun 15 14:03:44 PDT 2007


On Fri, Jun 15, 2007 at 03:20:45PM -0500, Bruce Dubbs wrote:
> 
> I have no problem with having methods in the book for both /usr and some
> other location.  For me, I will continue to avoid /usr for the extensive
> applications like X11, qt, kde, etc.

Getting back to the original issue, how do you suppose we should deal with
these packages that expect to find X at a specific location (Qt and Python
in this case)? I realized that since both XFree86 and Xorg install the
libXft pkg-config file, we can use that to substitute the users's correct
path. Below has these changes.

The alternative would be to symlink /usr/X11 (or maybe /usr/X11R6) to
$X_PREFIX and call it a day.

What do you think?

--
Dan

 BOOK/general/prog/python.xml            |    5 +++++
 BOOK/introduction/welcome/changelog.xml |    4 ++++
 BOOK/x/lib/qt.xml                       |   12 ++++--------
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/BOOK/general/prog/python.xml b/BOOK/general/prog/python.xml
index 094ec02..5eb7185 100644
--- a/BOOK/general/prog/python.xml
+++ b/BOOK/general/prog/python.xml
@@ -80,6 +80,11 @@
   <sect2 role="installation">
     <title>Installation of Python</title>
 
+    <para>If you would like to build the <xref linkend="tk"/> module, ensure
+    that the X installation is found with the following substitution:</para>
+
+<screen><userinput>sed -i "s@/usr/X11R6@$(pkg-config --variable=prefix xft)@" setup.py</userinput></screen>
+
     <para>Install <application>Python</application> by running the following
     commands:</para>
 
diff --git a/BOOK/introduction/welcome/changelog.xml b/BOOK/introduction/welcome/changelog.xml
index 57cccc8..64778ed 100644
--- a/BOOK/introduction/welcome/changelog.xml
+++ b/BOOK/introduction/welcome/changelog.xml
@@ -48,6 +48,10 @@
           <para>[dnicholson] - Mutt cleanups from Alexander Patrakov and
           Ag Hatzim.</para>
         </listitem>
+        <listitem>
+          <para>[dnicholson] - Ensure that the X11 installation is found
+          when building Qt and Python.</para>
+        </listitem>
       </itemizedlist>
     </listitem>
 
diff --git a/BOOK/x/lib/qt.xml b/BOOK/x/lib/qt.xml
index 5be137c..5167037 100644
--- a/BOOK/x/lib/qt.xml
+++ b/BOOK/x/lib/qt.xml
@@ -105,14 +105,10 @@
     the <application>X Window System</application> in any prefix other than
     <filename class="directory">/usr/X11R6</filename>, then you should correct
     the <application>qmake</application> configuration files with the following
-    commands, replacing <replaceable><PREFIX></replaceable> with the
-    installation prefix of the
-    <application>X Window System</application>:</para>
-
-<screen><userinput>for file in $(grep -lr "X11R6" *)
-do
-    sed -i "s@/usr/X11R6@<replaceable><PREFIX></replaceable>@g" $file
-done</userinput></screen>
+    commands:</para>
+
+<screen><userinput>sed -i "s@/usr/X11R6@$(pkg-config --variable=prefix xft)@" \
+    mkspecs/linux*/qmake.conf</userinput></screen>
 
     <para>There are several ways to install a complicated package such as
     <application>Qt</application>. The files are not completely position
-- 
1.5.1.6



More information about the blfs-dev mailing list