Add migrate_usr_x11r6_lib() to aid migration from /usr/X11R6/libdir to /usr/libdir...
authorDonnie Berkholz <dberkholz@gentoo.org>
Fri, 29 Oct 2004 07:13:52 +0000 (07:13 +0000)
committerDonnie Berkholz <dberkholz@gentoo.org>
Fri, 29 Oct 2004 07:13:52 +0000 (07:13 +0000)
x11-base/xorg-x11/ChangeLog
x11-base/xorg-x11/Manifest
x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild

index ab01863fe6dbb402314536b260174e0efefe0373..9af789a4ad2e4ac7221f4be2ed8c89a1b78e3b75 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for x11-base/xorg-x11
 # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.181 2004/10/29 06:27:22 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.182 2004/10/29 07:13:52 spyderous Exp $
+
+  29 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>;
+  xorg-x11-6.8.0-r2.ebuild:
+  Add migrate_usr_x11r6_lib() to aid migration from /usr/X11R6/libdir to
+  /usr/libdir. Thanks to jstubbs for an idea. Also move update_config_files()
+  to a more appropriate place.
 
   28 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>;
   xorg-x11-6.8.0-r2.ebuild:
index b83a4582ae81e8f32dfe661bb2a19cf5e7066d4f..053ff380d002f7cbbc05c2bdb8743f062e83a58d 100644 (file)
@@ -1,8 +1,8 @@
-MD5 4f2698752e8f35262ebf1f567b418d25 ChangeLog 39102
+MD5 cbeae19bf911e2029d63cb94b8d545f6 ChangeLog 39368
 MD5 ac1137a20503dcb8f9ba2939a2a766f6 metadata.xml 230
 MD5 9215e5f10589329a5056f366aa6820e8 xorg-x11-6.7.0-r2.ebuild 38086
 MD5 59449d8b0ac475d3c5a4caa98b9238bb xorg-x11-6.8.0-r1.ebuild 41332
-MD5 b9c3c5842f77a0fe5199d94253124cce xorg-x11-6.8.0-r2.ebuild 44045
+MD5 11d0603f89f9ef5fdb49f99c44ab95c0 xorg-x11-6.8.0-r2.ebuild 44607
 MD5 a3314fbdc270d7d84ea14fd477b8d048 files/digest-xorg-x11-6.7.0-r2 904
 MD5 70facbdb85b7ef2bc9b9b702442eda7e files/digest-xorg-x11-6.8.0-r1 908
 MD5 4948d68fce0cc80c309f112474e37303 files/digest-xorg-x11-6.8.0-r2 906
index 8e417a704bae0da68f8c2bedad3d8b6d3ce64448..04fb6a045908824bc9ca1085622339bcc59154bf 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild,v 1.36 2004/10/29 06:27:22 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild,v 1.37 2004/10/29 07:13:52 spyderous Exp $
 
 # Set TDFX_RISKY to "yes" to get 16-bit, 1024x768 or higher on low-memory
 # voodoo3 cards.
@@ -850,45 +850,6 @@ setup_config_files() {
        sed -i "s:^.*Option.*"XkbRules".*$::g" ${D}/etc/X11/xorg.conf.example
 }
 
-update_config_files() {
-       # Fix any installed config files for installing fonts to /usr/share/fonts
-       # This *needs* to be after all other installation so files aren't
-       # overwritten.
-
-       if [ "${ROOT}" = "/" ]; then
-               einfo "Preparing any installed configuration files for font move..."
-               FILES="/etc/X11/xorg.conf
-                       /etc/X11/XF86Config-4
-                       /etc/X11/XF86Config
-                       /etc/X11/fs/config"
-               #       /etc/fonts/fonts.conf
-               #       /etc/fonts/local.conf
-
-               local FILE
-               for FILE in ${FILES}; do
-                       if [ -e ${FILE} ]; then
-                               # New font paths
-                               sed "s,/usr/X11R6/$(get_libdir)/X11/fonts,/usr/share/fonts,g" \
-                                       ${ROOT}${FILE} > ${IMAGE}${FILE}
-
-                               if [ "${FILE}" = "/etc/X11/xorg.conf" ] \
-                                       || [ "${FILE}" = "/etc/X11/XF86Config" ] \
-                                       || [ "${FILE}" = "/etc/X11/XF86Config-4" ]; then
-                                       # "keyboard" driver is deprecated and will be removed,
-                                       # switch to "kbd"
-                                       sed -i 's~^\([ \t]*Driver[ \t]\+\)"[kK]eyboard"~\1"kbd"~' \
-                                               ${IMAGE}${FILE}
-
-                                       # Work around upgrade problem where people have
-                                       # Option "XkbRules" "xfree86" in their config file
-                                       sed -i "s:^.*Option.*\"XkbRules\".*$::g" \
-                                               ${IMAGE}${FILE}
-                               fi
-                       fi
-               done
-       fi
-}
-
 fix_opengl_symlinks() {
        # Remove invalid symlinks
        local LINK
@@ -1067,6 +1028,55 @@ src_install() {
 
 }
 
+migrate_usr_x11r6_lib() {
+       # We need a symlink from /usr/X11R6/lib -> /usr/lib so all the packages
+       # whose files we move don't lose track of them. As such, we need
+       # _absolutely nothing_ in /usr/X11R6/lib so we can make such a symlink.
+       # Donnie Berkholz <spyderous@gentoo.org> 20 October 2004
+       mv -f ${ROOT}usr/X11R6/$(get_libdir)/* ${ROOT}usr/$(get_libdir)
+       rmdir ${ROOT}usr/X11R6/$(get_libdir)
+       ln -s ${ROOT}usr/X11R6/$(get_libdir) ${ROOT}usr/$(get_libdir)
+}
+
+update_config_files() {
+       # Fix any installed config files for installing fonts to /usr/share/fonts
+       # This *needs* to be after all other installation so files aren't
+       # overwritten.
+
+       if [ "${ROOT}" = "/" ]; then
+               einfo "Preparing any installed configuration files for font move..."
+               FILES="/etc/X11/xorg.conf
+                       /etc/X11/XF86Config-4
+                       /etc/X11/XF86Config
+                       /etc/X11/fs/config"
+               #       /etc/fonts/fonts.conf
+               #       /etc/fonts/local.conf
+
+               local FILE
+               for FILE in ${FILES}; do
+                       if [ -e ${FILE} ]; then
+                               # New font paths
+                               sed "s,/usr/X11R6/$(get_libdir)/X11/fonts,/usr/share/fonts,g" \
+                                       ${ROOT}${FILE} > ${IMAGE}${FILE}
+
+                               if [ "${FILE}" = "/etc/X11/xorg.conf" ] \
+                                       || [ "${FILE}" = "/etc/X11/XF86Config" ] \
+                                       || [ "${FILE}" = "/etc/X11/XF86Config-4" ]; then
+                                       # "keyboard" driver is deprecated and will be removed,
+                                       # switch to "kbd"
+                                       sed -i 's~^\([ \t]*Driver[ \t]\+\)"[kK]eyboard"~\1"kbd"~' \
+                                               ${IMAGE}${FILE}
+
+                                       # Work around upgrade problem where people have
+                                       # Option "XkbRules" "xfree86" in their config file
+                                       sed -i "s:^.*Option.*\"XkbRules\".*$::g" \
+                                               ${IMAGE}${FILE}
+                               fi
+                       fi
+               done
+       fi
+}
+
 clean_dynamic_libgl() {
        # clean the dynamic libGL stuff's home to ensure
        # we don't have stale libs floating around
@@ -1081,6 +1091,8 @@ clean_dynamic_libgl() {
 }
 
 pkg_preinst() {
+       # Do this before anything else, so we do all the rest inside the symlink
+       migrate_usr_x11r6_lib
 
        update_config_files
        for G_FONTDIR in ${G_FONTDIRS}; do