Index: BLFS/libs/func_dependencies
===================================================================
--- BLFS/libs/func_dependencies	(revision f1fadebc7142021a5c57f2ed1a3ba704daabf535)
+++ BLFS/libs/func_dependencies	(revision ad3bf2c5255e0fc3723ab7da1a0ef636b99125ea)
@@ -63,4 +63,6 @@
   echo -en "\tGenerating $TARGET dependencies tree ..."
 
+  mkdir dependencies
+
   #---------------------
   # Create target package dependencies list
@@ -68,16 +70,31 @@
     # Skip the creation when all dependencies are circular.
     alsa-lib | cracklib | libexif | unixodbc ) ;;
+
     # Meta-packages at target level
     # KDE and Gnome-{core,full} could be made via packages.sh, but not sure yet how.
-    alsa ) # When target "alsa", use all alsa-* packages
-      mkdir dependencies
+    alsa )
       echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \
-               alsa-plugins\nalsa-lib" > dependencies/$TARGET.dep
+               alsa-plugins\nalsa-lib" > dependencies/alsa.dep
+      ;;
+    gnome-core )
+      cp ../libs/gnome-core.dep dependencies/
+      ;;
+    gnome-full )
+      cp ../libs/gnome-{core,full}.dep dependencies/
+      ;;
+    kde-core )
+      cp ../libs/kde-core.dep dependencies/
+      ;;
+    kde-full )
+      cp ../libs/kde-{core,full}.dep dependencies/
+      ;;
+    kde-koffice )
+      cp ../libs/kde-{core,full}.dep dependencies/
+      echo -e "koffice\nkde-full\nkde-core" > dependencies/kde-koffice.dep
       ;;
     xorg7 ) # At atarget level, add also x-config and x-setup
-      mkdir dependencies
       echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n \
                xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \
-               xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/$TARGET.dep
+               xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/xorg7.dep
       ;;
     * ) # Default
@@ -96,5 +113,5 @@
   case $TARGET in
     # If there is no usefull XML page, skip it.
-    alsa | arts | gnome-core | gnome-full | kde-core | kde-full | kde-koffice ) ;;
+    alsa | gnome-core | gnome-full | kde-core | kde-full | kde-koffice ) ;;
     * )
       echo -e "    $ENTRY_START$PKGXML$ENTRY_END" >> $TARGET-index.xml.tmp
@@ -179,5 +196,5 @@
       db ) # The proper version of DB is installed in LFS
         continue ;;
-      hal-requirements ) # ID value don't have their own XML package file
+      hal-requirements | hal-runtime-dependencies ) # Don't have their own XML file
         continue ;;
       perl-* | tk-perl )  DEP=perl-modules ;;
@@ -228,4 +245,8 @@
         [[ "$PKG" = "alsa-plugins" ]] && continue
         ;;
+      akode )
+        # Both are in the same page
+        [[ "$PKG" = "kdemultimedia" ]] && continue
+        ;;
     esac
 
@@ -238,4 +259,5 @@
       x-window-system | alsa ) ;; # No page for that (proper link must be created when generating the book)
       xorg7 ) ;; # This page will be dump in the xorg7.xinc file
+      gnome-core | kde-core | kde-full ) ;; # Invented packages
       * )
         # Remove the Xinclude entry if found
@@ -256,13 +278,13 @@
         alsa ) # When dependency "alsa", use all alsa-* packages
           echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \
-                   alsa-plugins\nalsa-lib" > dependencies/$DEP.dep
+                   alsa-plugins\nalsa-lib" > dependencies/alsa.dep
           ;;
         x-window-system ) # X11 alternatives
-          echo -e "x-config\nx-setup\n$X11" > dependencies/$DEP.dep
+          echo -e "x-config\nx-setup\n$X11" > dependencies/x-window-system.dep
           ;;
         xorg7 )
           echo -e "rman\nxterm2\nxorg7-driver\nxorg7-server\nluit\nxorg7-font\n \
                    xorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \
-                   xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/$DEP.dep
+                   xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/xorg7.dep
           ;;
         * ) xsltproc --stringparam dependencies $DEP_LV \
