Signed-off-by: Florian Bäuerle <[email protected]>
---
 rules/xorg-font-ttf-lohit-punjabi.make | 45 +++++++++++++++-----------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/rules/xorg-font-ttf-lohit-punjabi.make 
b/rules/xorg-font-ttf-lohit-punjabi.make
index 0c18a7afa..e059052c3 100644
--- a/rules/xorg-font-ttf-lohit-punjabi.make
+++ b/rules/xorg-font-ttf-lohit-punjabi.make
@@ -1,6 +1,7 @@
 # -*-makefile-*-
 #
 # Copyright (C) 2015 by Michael Olbrich <[email protected]>
+#           (C) 2018 by Florian Bäuerle <[email protected]>
 #
 # See CREDITS for details about who has contributed to this project.
 #
@@ -27,15 +28,8 @@ XORG_FONT_TTF_LOHIT_PUNJABI_LICENSE  := OFL-1.1
 XORG_FONT_TTF_LOHIT_PUNJABI_LICENSE_FILES := \
        file://OFL.txt;md5=e56537d157e0ee370c0d8468da33e245
 
-ifdef PTXCONF_XORG_FONT_TTF_LOHIT_PUNJABI
-$(STATEDIR)/xorg-fonts.targetinstall.post: 
$(STATEDIR)/xorg-font-ttf-lohit-punjabi.targetinstall
-endif
-
-# ----------------------------------------------------------------------------
-# Prepare
-# ----------------------------------------------------------------------------
-
-XORG_FONT_TTF_LOHIT_PUNJABI_CONF_TOOL  := NO
+XORG_FONT_TTF_LOHIT_PUNJABI_FONTDIR    := 
$(XORG_FONTDIR)/truetype/lohit-punjabi
+XORG_FONT_TTF_LOHIT_PUNJABI_FONTPKGDIR := 
$(XORG_FONT_TTF_LOHIT_PUNJABI_PKGDIR)$(XORG_FONT_TTF_LOHIT_PUNJABI_FONTDIR)
 
 # ----------------------------------------------------------------------------
 # Compile
@@ -51,6 +45,18 @@ $(STATEDIR)/xorg-font-ttf-lohit-punjabi.compile:
 
 $(STATEDIR)/xorg-font-ttf-lohit-punjabi.install:
        @$(call targetinfo)
+
+       @rm -rf $(XORG_FONT_TTF_LOHIT_PUNJABI_PKGDIR)
+       @mkdir -p $(XORG_FONT_TTF_LOHIT_PUNJABI_FONTPKGDIR)
+       @find $(XORG_FONT_TTF_LOHIT_PUNJABI_DIR) \
+               -name "*.ttf" \
+               | \
+               while read file; do \
+               install -m 644 $${file} 
$(XORG_FONT_TTF_LOHIT_PUNJABI_FONTPKGDIR); \
+       done
+       @mkfontscale $(XORG_FONT_TTF_LOHIT_PUNJABI_FONTPKGDIR)
+       @mkfontdir $(XORG_FONT_TTF_LOHIT_PUNJABI_FONTPKGDIR)
+
        @$(call touch)
 
 # ----------------------------------------------------------------------------
@@ -60,15 +66,6 @@ $(STATEDIR)/xorg-font-ttf-lohit-punjabi.install:
 $(STATEDIR)/xorg-font-ttf-lohit-punjabi.targetinstall:
        @$(call targetinfo)
 
-       @mkdir -p $(XORG_FONTS_DIR_INSTALL)/truetype
-
-       @find $(XORG_FONT_TTF_LOHIT_PUNJABI_DIR) \
-               -name "*.ttf" \
-               | \
-               while read file; do \
-               install -m 644 $${file} $(XORG_FONTS_DIR_INSTALL)/truetype; \
-       done
-
        @$(call install_init,  xorg-font-ttf-lohit-punjabi)
        @$(call install_fixup, xorg-font-ttf-lohit-punjabi,PRIORITY,optional)
        @$(call install_fixup, xorg-font-ttf-lohit-punjabi,SECTION,base)
@@ -79,6 +76,18 @@ $(STATEDIR)/xorg-font-ttf-lohit-punjabi.targetinstall:
                $(XORG_FONT_TTF_LOHIT_PUNJABI_DIR)/66-lohit-punjabi.conf, \
                /etc/fonts/conf.d/66-lohit-punjabi.conf)
 
+       @$(call install_tree, xorg-font-ttf-lohit-punjabi, 0, 0, -, 
$(XORG_FONT_TTF_LOHIT_PUNJABI_FONTDIR))
+
+ifdef PTXCONF_XORG_FONTS_QT4_LINKS
+       @cd $(XORG_FONT_TTF_LOHIT_PUNJABI_PKGDIR) && \
+       find . -type f -name "*.ttf" | while read file; do \
+               name=$$(basename $$file); \
+               $(call install_link, xorg-font-ttf-lohit-punjabi, \
+                       ../../..$(XORG_FONT_TTF_LOHIT_PUNJABI_FONTDIR)/$$name, \
+                       /usr/lib/fonts/$$name); \
+       done
+endif
+
        @$(call install_finish, xorg-font-ttf-lohit-punjabi)
        @$(call touch)
 
-- 
2.18.0


_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to