summaryrefslogtreecommitdiffstats
path: root/package/x11r7/xfont_font-util
diff options
context:
space:
mode:
Diffstat (limited to 'package/x11r7/xfont_font-util')
-rw-r--r--package/x11r7/xfont_font-util/Config.in6
-rwxr-xr-xpackage/x11r7/xfont_font-util/post-install.sh28
-rw-r--r--package/x11r7/xfont_font-util/xfont_font-util.mk80
3 files changed, 114 insertions, 0 deletions
diff --git a/package/x11r7/xfont_font-util/Config.in b/package/x11r7/xfont_font-util/Config.in
new file mode 100644
index 000000000..c23e7fa93
--- /dev/null
+++ b/package/x11r7/xfont_font-util/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_XFONT_FONT_UTIL
+ bool "font-util"
+ default n
+ help
+ font-util 1.0.1
+ No description available
diff --git a/package/x11r7/xfont_font-util/post-install.sh b/package/x11r7/xfont_font-util/post-install.sh
new file mode 100755
index 000000000..c4888e20d
--- /dev/null
+++ b/package/x11r7/xfont_font-util/post-install.sh
@@ -0,0 +1,28 @@
+#!/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/lib/X11/fonts/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
+
diff --git a/package/x11r7/xfont_font-util/xfont_font-util.mk b/package/x11r7/xfont_font-util/xfont_font-util.mk
new file mode 100644
index 000000000..fcf2a1ee5
--- /dev/null
+++ b/package/x11r7/xfont_font-util/xfont_font-util.mk
@@ -0,0 +1,80 @@
+################################################################################
+#
+# font-util -- No description available
+#
+################################################################################
+
+XFONT_FONT_UTIL_VERSION = 1.0.1
+XFONT_FONT_UTIL_NAME = font-util-$(XFONT_FONT_UTIL_VERSION)
+XFONT_FONT_UTIL_SOURCE = font-util-$(XFONT_FONT_UTIL_VERSION).tar.bz2
+XFONT_FONT_UTIL_SITE = http://xorg.freedesktop.org/releases/individual/font
+XFONT_FONT_UTIL_AUTORECONF = NO
+XFONT_FONT_UTIL_DIR=$(BUILD_DIR)/$(XFONT_FONT_UTIL_NAME)
+XFONT_FONT_UTIL_CAT:=$(BZCAT)
+
+$(DL_DIR)/$(XFONT_FONT_UTIL_SOURCE):
+ $(WGET) -P $(DL_DIR) $(XFONT_FONT_UTIL_SITE)/$(XFONT_FONT_UTIL_SOURCE)
+
+xfont_font-util-source: $(DL_DIR)/$(XFONT_FONT_UTIL_SOURCE)
+
+$(XFONT_FONT_UTIL_DIR)/.unpacked: $(DL_DIR)/$(XFONT_FONT_UTIL_SOURCE)
+ $(XFONT_FONT_UTIL_CAT) $(DL_DIR)/$(XFONT_FONT_UTIL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(XFONT_FONT_UTIL_DIR) package/x11r7/xfont_font-util/ \*.patch
+ $(CONFIG_UPDATE) $(XFONT_FONT_UTIL_DIR)
+ touch $@
+
+$(XFONT_FONT_UTIL_DIR)/.configured: $(XFONT_FONT_UTIL_DIR)/.unpacked
+ (cd $(XFONT_FONT_UTIL_DIR) && rm -rf config.cache)
+ (cd $(XFONT_FONT_UTIL_DIR) && \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --includedir=/usr/include \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ )
+ touch $@
+
+$(XFONT_FONT_UTIL_DIR)/.compiled: $(XFONT_FONT_UTIL_DIR)/.configured
+ $(MAKE) -C $(XFONT_FONT_UTIL_DIR)
+ touch $@
+
+$(XFONT_FONT_UTIL_DIR)/.installed: $(XFONT_FONT_UTIL_DIR)/.compiled
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(XFONT_FONT_UTIL_DIR) install
+ touch $@
+
+$(XFONT_FONT_UTIL_DIR)/.hacked: $(XFONT_FONT_UTIL_DIR)/.installed
+ ( package/x11r7/xfont_font-util/post-install.sh $(STAGING_DIR) )
+ touch $@
+
+xfont_font-util: uclibc pkgconfig $(XFONT_FONT_UTIL_DIR)/.hacked
+
+xfont_font-util-unpacked: $(XFONT_FONT_UTIL_DIR)/.unpacked
+
+xfont_font-util-clean:
+ -$(MAKE) -C $(XFONT_FONT_UTIL_DIR) clean
+
+xfont_font-util-dirclean:
+ rm -rf $(XFONT_FONT_UTIL_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_XFONT_FONT_UTIL)),y)
+TARGETS+=xfont_font-util
+endif
+