diff mbox series

[v2,1/7] package/dejavu: Install dejavu fonts in staging dir

Message ID 20200619145719.2352019-2-angelo@amarulasolutions.com
State Changes Requested
Headers show
Series Cups revamp | expand

Commit Message

Angelo Compagnucci June 19, 2020, 2:57 p.m. UTC
From: Michael Trimarchi <michael@amarulasolutions.com>

The dejavu font is used by cups-filters and needs to be
installed in staging directory.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/dejavu/dejavu.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Thomas Petazzoni June 20, 2020, 8:29 p.m. UTC | #1
Hello Angelo,

On Fri, 19 Jun 2020 16:57:13 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> From: Michael Trimarchi <michael@amarulasolutions.com>
> 
> The dejavu font is used by cups-filters and needs to be
> installed in staging directory.
> 
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

The question is why should we do this just for the DejaVu fonts ? And
not other font packages ?

> +define DEJAVU_INSTALL_STAGING_CMDS
> +	mkdir -p $(STAGING_DIR)/usr/share/fonts/dejavu/
> +	for i in $(DEJAVU_FONTS_INSTALL) ; do \
> +		$(INSTALL) -m 0644 $(@D)/ttf/$$i \
> +			$(STAGING_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \
> +	done
> +endef
> +
>  define DEJAVU_INSTALL_TARGET_CMDS
>  	mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/
>  	for i in $(DEJAVU_FONTS_INSTALL) ; do \

We could factorize things a bit between staging/target installation,
and perhaps use a make "foreach" loop (if that works). But really these
are minor details, the main question is: why DejaVu specifically.

Thomas
Michael Nazzareno Trimarchi June 20, 2020, 8:37 p.m. UTC | #2
Hi

On Sat, Jun 20, 2020 at 10:29 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Angelo,
>
> On Fri, 19 Jun 2020 16:57:13 +0200
> Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
>
> > From: Michael Trimarchi <michael@amarulasolutions.com>
> >
> > The dejavu font is used by cups-filters and needs to be
> > installed in staging directory.
> >
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
>
> The question is why should we do this just for the DejaVu fonts ? And
> not other font packages ?

Ok, optional can be created a patch to remove this dependency that is used
to compile tests.

Michael

>
> > +define DEJAVU_INSTALL_STAGING_CMDS
> > +     mkdir -p $(STAGING_DIR)/usr/share/fonts/dejavu/
> > +     for i in $(DEJAVU_FONTS_INSTALL) ; do \
> > +             $(INSTALL) -m 0644 $(@D)/ttf/$$i \
> > +                     $(STAGING_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \
> > +     done
> > +endef
> > +
> >  define DEJAVU_INSTALL_TARGET_CMDS
> >       mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/
> >       for i in $(DEJAVU_FONTS_INSTALL) ; do \
>
> We could factorize things a bit between staging/target installation,
> and perhaps use a make "foreach" loop (if that works). But really these
> are minor details, the main question is: why DejaVu specifically.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
diff mbox series

Patch

diff --git a/package/dejavu/dejavu.mk b/package/dejavu/dejavu.mk
index 9b57f0992e..be3d91f179 100644
--- a/package/dejavu/dejavu.mk
+++ b/package/dejavu/dejavu.mk
@@ -11,6 +11,7 @@  DEJAVU_LICENSE_FILES = LICENSE
 
 DEJAVU_FONTS_INSTALL =
 DEJAVU_FONTCONFIG_CONF_INSTALL =
+DEJAVU_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_DEJAVU_MONO),y)
 DEJAVU_FONTS_INSTALL += DejaVuSansMono*.ttf
@@ -50,6 +51,14 @@  define DEJAVU_FONTCONFIG_CONF_INSTALL_CMDS
 endef
 endif
 
+define DEJAVU_INSTALL_STAGING_CMDS
+	mkdir -p $(STAGING_DIR)/usr/share/fonts/dejavu/
+	for i in $(DEJAVU_FONTS_INSTALL) ; do \
+		$(INSTALL) -m 0644 $(@D)/ttf/$$i \
+			$(STAGING_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \
+	done
+endef
+
 define DEJAVU_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/
 	for i in $(DEJAVU_FONTS_INSTALL) ; do \