xfont_font-util: enable host package
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 May 2010 18:02:51 +0000 (20:02 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 6 May 2010 18:18:41 +0000 (20:18 +0200)
When compiling xfonts, host utilities like bdftopcf or ucs2any, part
of xfont_font-util are needed. Until now, xfont_font-util was
installing ugly symbolic links, assuming that these tools were
available on the development machine.

This patch enables the host package for xfont_font-util, removes the
post-install.sh script, and keeps only the useful part of this script
in a post install hook.

host-xfont_font-util will be used later by xfont packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/x11r7/xfont_font-util/post-install.sh [deleted file]
package/x11r7/xfont_font-util/xfont_font-util.mk

diff --git a/package/x11r7/xfont_font-util/post-install.sh b/package/x11r7/xfont_font-util/post-install.sh
deleted file mode 100755 (executable)
index 2cb54da..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-       STAGING_DIR=$1
-
-       # fix the fontutil pkgconfig file to cross-compile fonts after fontutil is installed
-       sed "s,^mapdir=.*,mapdir=${STAGING_DIR}/usr/share/fonts/X11/util,g" \
-               ${STAGING_DIR}/usr/lib/pkgconfig/fontutil.pc > ${STAGING_DIR}/usr/lib/pkgconfig/fontutil.pc.new
-       mv ${STAGING_DIR}/usr/lib/pkgconfig/fontutil.pc.new ${STAGING_DIR}/usr/lib/pkgconfig/fontutil.pc
-       
-       # link to the build host's ucs2any and fc-cache  
-       rm ${STAGING_DIR}/usr/bin/ucs2any 
-
-       ln -s `which ucs2any` ${STAGING_DIR}/usr/bin
-       if [ "$?" != "0" ]; then
-               echo "Error linking to the build host's ucs2any font utility."
-               echo "Make sure that you have the xorg-x11-font-utils package installed."
-               exit 1
-       fi
-
-       rm ${STAGING_DIR}/usr/bin/fc-cache
-
-       ln -s `which fc-cache` ${STAGING_DIR}/usr/bin
-       if [ "$?" != "0" ]; then
-               echo "Error linking to the build host's fc-cache font utility."
-               echo "Make sure that you have the fontconfig package installed."
-               exit 1
-       fi
-
index 3f59b17ab1ffbd90c3bcdcc90e678fc2e04f68c3..3ca51ac916c5d19048026b0b6c10a41c2cd621a2 100644 (file)
@@ -11,10 +11,15 @@ XFONT_FONT_UTIL_DEPENDENCIES = host-pkg-config
 XFONT_FONT_UTIL_INSTALL_STAGING = YES
 XFONT_FONT_UTIL_INSTALL_TARGET = NO
 
+HOST_XFONT_FONT_UTIL_DEPENDENCIES = host-pkg-config
+
 define XFONT_FONT_UTIL_POST_INSTALL_FIXES
- package/x11r7/xfont_font-util/post-install.sh $(STAGING_DIR)
+       sed "s,^mapdir=.*,mapdir=$(STAGING_DIR)/usr/share/fonts/X11/util,g" \
+               $(STAGING_DIR)/usr/lib/pkgconfig/fontutil.pc > $(STAGING_DIR)/usr/lib/pkgconfig/fontutil.pc.new
+       mv $(STAGING_DIR)/usr/lib/pkgconfig/fontutil.pc.new $(STAGING_DIR)/usr/lib/pkgconfig/fontutil.pc
 endef
 
 XFONT_FONT_UTIL_POST_INSTALL_STAGING_HOOKS += XFONT_FONT_UTIL_POST_INSTALL_FIXES
 
 $(eval $(call AUTOTARGETS,package/x11r7,xfont_font-util))
+$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-util,host))