Signed-off-by: Florian Bäuerle <[email protected]>
---
 rules/xorg-font-ttf-noto.make | 47 ++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 15 deletions(-)

diff --git a/rules/xorg-font-ttf-noto.make b/rules/xorg-font-ttf-noto.make
index 044d4196d..23e8df78a 100644
--- a/rules/xorg-font-ttf-noto.make
+++ b/rules/xorg-font-ttf-noto.make
@@ -1,6 +1,7 @@
 # -*-makefile-*-
 #
 # Copyright (C) 2015 by Michael Olbrich <[email protected]>
+#              2018 by Florian Bäuerle <[email protected]>
 #
 # See CREDITS for details about who has contributed to this project.
 #
@@ -25,15 +26,8 @@ XORG_FONT_TTF_NOTO_SOURCE    := 
$(SRCDIR)/$(XORG_FONT_TTF_NOTO).$(XORG_FONT_TTF_NOT
 XORG_FONT_TTF_NOTO_DIR         := $(BUILDDIR)/$(XORG_FONT_TTF_NOTO)
 XORG_FONT_TTF_NOTO_LICENSE     := OFL-1.1
 
-ifdef PTXCONF_XORG_FONT_TTF_NOTO
-$(STATEDIR)/xorg-fonts.targetinstall.post: 
$(STATEDIR)/xorg-font-ttf-noto.targetinstall
-endif
-
-# ----------------------------------------------------------------------------
-# Prepare
-# ----------------------------------------------------------------------------
-
-XORG_FONT_TTF_NOTO_CONF_TOOL   := NO
+XORG_FONT_TTF_NOTO_FONTDIR             := $(XORG_FONTDIR)/truetype/noto
+XORG_FONT_TTF_NOTO_FONTPKGDIR  := 
$(XORG_FONT_TTF_NOTO_PKGDIR)$(XORG_FONT_TTF_NOTO_FONTDIR)
 
 # ----------------------------------------------------------------------------
 # Compile
@@ -49,6 +43,18 @@ $(STATEDIR)/xorg-font-ttf-noto.compile:
 
 $(STATEDIR)/xorg-font-ttf-noto.install:
        @$(call targetinfo)
+
+       @rm -rf $(XORG_FONT_TTF_NOTO_PKGDIR)
+       @mkdir -p $(XORG_FONT_TTF_NOTO_FONTPKGDIR)
+       @find $(XORG_FONT_TTF_NOTO_DIR)/{unhinted,hinted} \
+               -name "*.ttf" \
+               | \
+               while read file; do \
+               install -m 644 $${file} $(XORG_FONT_TTF_NOTO_FONTPKGDIR); \
+       done
+       @mkfontscale $(XORG_FONT_TTF_NOTO_FONTPKGDIR)
+       @mkfontdir $(XORG_FONT_TTF_NOTO_FONTPKGDIR)
+
        @$(call touch)
 
 # ----------------------------------------------------------------------------
@@ -58,14 +64,25 @@ $(STATEDIR)/xorg-font-ttf-noto.install:
 $(STATEDIR)/xorg-font-ttf-noto.targetinstall:
        @$(call targetinfo)
 
-       @mkdir -p $(XORG_FONTS_DIR_INSTALL)/truetype
+       @$(call install_init, xorg-font-ttf-noto)
+       @$(call install_fixup, xorg-font-ttf-noto,PRIORITY,optional)
+       @$(call install_fixup, xorg-font-ttf-noto,SECTION,base)
+       @$(call install_fixup, xorg-font-ttf-noto,AUTHOR,"Florian Bäuerle 
<[email protected]>")
+       @$(call install_fixup, xorg-font-ttf-noto,DESCRIPTION,missing)
 
-       @find $(XORG_FONT_TTF_NOTO_DIR)/{unhinted,hinted} \
-               -name "*.ttf" \
-               | \
-               while read file; do \
-               install -m 644 $${file} $(XORG_FONTS_DIR_INSTALL)/truetype; \
+       @$(call install_tree, xorg-font-ttf-noto, 0, 0, -, 
$(XORG_FONT_TTF_NOTO_FONTDIR))
+
+ifdef PTXCONF_XORG_FONTS_QT4_LINKS
+       @cd $(XORG_FONT_TTF_NOTO_PKGDIR) && \
+       find . -type f -name "*.ttf" | while read file; do \
+               name=$$(basename $$file); \
+               $(call install_link, xorg-font-ttf-noto, \
+                       ../../..$(XORG_FONT_TTF_NOTO_FONTDIR)/$$name, \
+                       /usr/lib/fonts/$$name); \
        done
+endif
+
+       @$(call install_finish, xorg-font-ttf-noto)
 
        @$(call touch)
 
-- 
2.18.0


_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to