Menage fonts
authorhugo <hugo@364a67c3-989e-7be9-548d-dae8560ea662>
Tue, 16 Feb 2010 07:22:48 +0000 (07:22 +0000)
committerhugo <hugo@364a67c3-989e-7be9-548d-dae8560ea662>
Tue, 16 Feb 2010 07:22:48 +0000 (07:22 +0000)
stage3/cis-espgs
stage3/cis-fontconfig
stage3/packages-update
stage3/stage3-install
stage4/configure-fonts
stage4/packages-update
stage4/stage4-install

index 2e7990c..2ae788b 100755 (executable)
@@ -30,6 +30,7 @@ sed -i "s/bbox.dev$/x11.dev/" Makefile.in
     --with-fontpath=${GS_FONTS_PATH}
 make
 make install
+
 #rmdir -v /usr/lib/ghostscript/$(get_pkg_ver_base ${1}) /usr/lib/ghostscript
 ln -v -s ../ghostscript/$(get_pkg_ver_base ${1})/doc /usr/share/doc/${1}
 for INSTFILE in `ls doc`; do
@@ -38,16 +39,14 @@ for INSTFILE in `ls doc`; do
     fi
 done
 
-# Checking if X is installed...
-if [ -d /usr/X11R6 ]; then
-    # Adding our local fonts directory to local configuration file
-    sed -i -e "s!^</fontconfig>!<dir>${GS_FONTS_PATH}</dir>\n</fontconfig>!" \
-       /etc/fonts/local.conf
-    
-    # Updating fonts cache database.
-    fc-cache -f
+if ! grep "${GS_FONTS_PATH}" /etc/fonts/local.conf 1> /dev/null 2>&1; then
+    # Adding Ghostscript fonts directory to local configuration file
+    sed -i -e "s!\(</fontconfig>\)!    <dir>${GS_FONTS_PATH}</dir>\n\1!" /etc/fonts/local.conf
 fi
 
+# Updating cache database.
+fc-cache -f
+
 ldconfig
 
 exit $?
index 6d613d5..fd696a2 100755 (executable)
@@ -2,34 +2,37 @@
 set -o errexit
 
 # First argument of this script is the package name.
+# Remaining arguments are additional configure options.
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
 source ../functions
 source ../packages-list
 
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
 if [ -z "${HV_FONTS_PATH}" ]; then
     echo "Missing HV_FONTS_PATH environment variable"
     exit 1
 fi
 
 # Applying patches (if any)
-apply_patches ${1}
+apply_patches ${PACKAGE}
 
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
+cd ${LFS_TMP}/${PACKAGE}-build
+../${PACKAGE}/configure \
     --prefix=/usr \
     --sysconfdir=/etc \
-    --disable-docs
+    --localstatedir=/var \
+    --disable-docs \
+    --without-add-fonts \
+    --with-docdir=/usr/share/doc/${PACKAGE} \
+    ${CONFIGURE_OPTS}
 make
 make install
-# Manually installing documentation.
-cd ${LFS_TMP}/${1}
-install -v -m644 doc/*.3 /usr/share/man/man3
-install -v -m644 doc/*.5 /usr/share/man/man5
-install -v -m755 -d /usr/share/doc/${1}/fontconfig-devel
-install -v -m644 doc/*.{html,pdf,txt} /usr/share/doc/${1}
-install -v -m644 doc/fontconfig-devel/* /usr/share/doc/${1}/fontconfig-devel
+ldconfig
 
 mkdir -v -p ${HV_FONTS_PATH}/{TrueType,Type1}
 mkdir -v -p /etc/fonts
@@ -46,8 +49,6 @@ cat > /etc/fonts/local.conf << "EOF"
 <fontconfig>
     <dir>_HV_FONTS_PATH_/TrueType</dir>
     <dir>_HV_FONTS_PATH_/Type1</dir>
-    <dir>/usr/X11R6/lib/X11/fonts</dir>
-<dir>/usr/share/fonts/ghostscript</dir>
 </fontconfig>
 EOF
 
index d2bb945..35b5fe5 100755 (executable)
@@ -110,4 +110,7 @@ fpkg_sf    ${GIFLIB}
 fpkg       ${LCMS}    "http://www.littlecms.com"
 fpkg_sf    ${LIBMNG}
 
+fpkg_sf    ${FREETYPE}
+fpkg       ${FONTCONFIG} "http://fontconfig.org/release"
+
 exit $?
index 0c30f5f..0bf2c00 100755 (executable)
@@ -125,6 +125,9 @@ ipkg_ac    ${GIFLIB}
 ipkg_ac_nb ${LCMS}
 ipkg_cust  ${LIBMNG}   cis-libmng
 
+ipkg_ac   ${FREETYPE}
+ipkg_cust ${FONTCONFIG} cis-fontconfig
+
 echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
 
 exit $?
index be9b458..10cc869 100755 (executable)
@@ -12,4 +12,14 @@ install -v -d -m755 /usr/share/fonts
 ln -svfT ${XORG_PREFIX}/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF
 ln -svfT ${XORG_PREFIX}/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF
 
+X11_FONTS_DIR="/usr/share/fonts/X11"
+
+if ! grep "${X11_FONTS_DIR}" /etc/fonts/local.conf 1> /dev/null 2>&1; then
+    # Adding X fonts directory to local configuration file
+    sed -i -e "s!\(</fontconfig>\)!    <dir>${X11_FONTS_DIR}</dir>\n\1!" /etc/fonts/local.conf
+fi
+
+# Updating cache database.
+fc-cache -f
+
 exit $?
index 01702cc..c184a5f 100755 (executable)
@@ -17,16 +17,6 @@ export RCMD_NO_EXIT=1
 
 update_packages_init
 
-
-
-
-fpkg       ${LIBFFI} "ftp://sourceware.org/pub/libffi"
-fpkg_gnome ${GOBJECT_INSTROSPECTION}
-fpkg       ${EGGDBUS} "http://hal.freedesktop.org/releases"
-fpkg       ${POLKIT} "http://hal.freedesktop.org/releases"
-fpkg       ${CONSOLEKIT} "http://www.freedesktop.org/software/ConsoleKit/dist"
-fpkg       ${POLICYKIT} "http://hal.freedesktop.org/releases"
-
 XORG_MODULES_LIST="${XORG_APP} ${XORG_DATA} ${XORG_DRIVER} ${XORG_FONT} ${XORG_LIB} ${XORG_PROTO} ${XORG_UTIL}"
 
 BLFS_XORG_URL=http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg
@@ -40,6 +30,22 @@ for module in ${XORG_MODULES_LIST}; do
     ARCH_EXT=md5  fpkg ${module} ${BLFS_XORG_URL}
     unset ARCH_EXT
 
+    if [ "${MOD_NAME}" = "driver" ]; then
+        # Remove unwanted drivers
+        for ext in wget md5; do
+            sed -i -e '/.*xf86-video-vmware.*/d' ${LFS_PKG_DIR}/${module}.${ext}
+            sed -i -e '/.*xf86-video-newport.*/d' ${LFS_PKG_DIR}/${module}.${ext}
+            sed -i -e '/.*xf86-video-xgixp.*/d' ${LFS_PKG_DIR}/${module}.${ext}
+        done
+    fi
+    if [ "${MOD_NAME}" = "app" ]; then
+        # Remove unneeded apps
+        for ext in wget md5; do
+            sed -i -e '/.*twm-.*/d' ${LFS_PKG_DIR}/${module}.${ext}
+            sed -i -e '/.*xclock-.*/d' ${LFS_PKG_DIR}/${module}.${ext}
+        done
+    fi
+
     SUBMODS="$(grep -v '^#' ${LFS_PKG_DIR}/${module}.wget | sed 's!\.tar\.bz2$!!')"
     
     mkdir -v -p ${DEST} >> ${LFS_LOG_FILE} 2>&1
@@ -70,9 +76,15 @@ fpkg    ${XKEYBOARD_CONFIG} http://xlibs.freedesktop.org/xkbdesc
 fpkg    ${LUIT}             ${XORG_URL}/app
 fpkg    ${PIXMAN} "http://cairographics.org/releases"
 
-fpkg_gnome ${GLIB}
+fpkg       ${LIBFFI} "ftp://sourceware.org/pub/libffi"
 fpkg       ${DBUS} "http://dbus.freedesktop.org/releases/dbus"
+fpkg_gnome ${GLIB}
+fpkg_gnome ${GOBJECT_INSTROSPECTION}
 fpkg       ${DBUS_GLIB} "http://dbus.freedesktop.org/releases/dbus-glib"
+fpkg       ${EGGDBUS} "http://hal.freedesktop.org/releases"
+fpkg       ${POLKIT} "http://hal.freedesktop.org/releases"
+fpkg       ${CONSOLEKIT} "http://www.freedesktop.org/software/ConsoleKit/dist"
+fpkg       ${POLICYKIT} "http://hal.freedesktop.org/releases"
 fpkg       ${HAL} http://hal.freedesktop.org/releases
 fpkg       ${HAL_INFO} http://hal.freedesktop.org/releases
 
index 413f20e..679368b 100755 (executable)
@@ -103,14 +103,12 @@ ipkg_ac   ${DBUS_GLIB} \
     --disable-dependency-tracking \
     --libexecdir=/usr/lib/dbus-1.0/dbus-1
 ipkg_ac   ${EGGDBUS}
-
 ipkg_cust ${POLKIT} cis-polkit
 ipkg_ac_nb ${CONSOLEKIT} \
     --libexecdir=/usr/lib/ConsoleKit \
     --localstatedir=/var \
     --enable-pam-module
 ipkg_cust ${POLICYKIT} cis-policykit
-
 ipkg_cust ${HAL} cis-hal
 ipkg_ac   ${HAL_INFO}
 
@@ -119,6 +117,8 @@ ipkg_ac   ${XORG_SERVER} ${XORG_CONFIG} "\
     --with-xkb-output=/var/lib/xkb \
     --enable-install-setuid"
 
+# newport, vmware, and xgixp drivers cause Xorg -configure to hang
+# To fix this problrem, comment out these drivers in both driver-7.5-2.md5 and driver-7.5-2.wget.
 install_xorg_modules ${XORG_DRIVER} --with-xorg-module-dir=${XORG_PREFIX}/lib/X11/modules
 
 rscr once "Configuring X.org" configure-xorg