Patchwork [meta-oe] terminus-font: add new recipe for version 4.38

login
register
mail settings
Submitter Matthieu CRAPET
Date March 20, 2014, 11:11 a.m.
Message ID <1395313904-6600-1-git-send-email-Matthieu.Crapet@ingenico.com>
Download mbox | patch
Permalink /patch/68929/
State Accepted, archived
Headers show

Comments

Matthieu CRAPET - March 20, 2014, 11:11 a.m.
This is a dual recipe, it provides:
- console fonts (PSF v1 & v2 formats)
- X11 fonts (PCF format)

X11 font are generated when DISTRO_FEATURES contains 'x11'.
Use PACKAGECONFIG to configure.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 .../terminus-font/terminus-font_4.38.bb            | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/terminus-font/terminus-font_4.38.bb
Khem Raj - March 20, 2014, 5:34 p.m.
On Thu, Mar 20, 2014 at 4:11 AM, Matthieu Crapet
<Matthieu.Crapet@ingenico.com> wrote:
> +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"

why use ??= and not ?= here
Matthieu CRAPET - March 24, 2014, 7:38 a.m.
Hi,

Most recipes are using ??= and not ?=
What is a best way?

Matthieu

-----Message d'origine-----
De : openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] De la part de Khem Raj
Envoyé : jeudi 20 mars 2014 18:34
À : openembeded-devel
Objet : Re: [oe] [meta-oe][PATCH] terminus-font: add new recipe for version 4.38

On Thu, Mar 20, 2014 at 4:11 AM, Matthieu Crapet <Matthieu.Crapet@ingenico.com> wrote:
> +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"

why use ??= and not ?= here
--
Khem Raj - March 24, 2014, 5:15 p.m.
On Mon, Mar 24, 2014 at 12:38 AM, Matthieu CRAPET
<Matthieu.CRAPET@ingenico.com> wrote:
> Most recipes are using ??= and not ?=
> What is a best way?

?= is better fit here.
Matthieu CRAPET - March 25, 2014, 7:36 a.m.
Hi,

> ?= is better fit here.
It's because there is only one option ?

Do you want me to repost patch?
The problem is that it is already on meta-openembedded git master-next branch.

Matthieu


-----Message d'origine-----
De : openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] De la part de Khem Raj
Envoyé : lundi 24 mars 2014 18:16
À : openembeded-devel
Objet : Re: [oe] [meta-oe][PATCH] terminus-font: add new recipe for version 4.38

On Mon, Mar 24, 2014 at 12:38 AM, Matthieu CRAPET <Matthieu.CRAPET@ingenico.com> wrote:
> Most recipes are using ??= and not ?=
> What is a best way?

?= is better fit here.
--
Martin Jansa - March 25, 2014, 7:54 a.m.
On Tue, Mar 25, 2014 at 07:36:05AM +0000, Matthieu CRAPET wrote:
> Hi,
> 
> > ?= is better fit here.
> It's because there is only one option ?
> 
> Do you want me to repost patch?
> The problem is that it is already on meta-openembedded git master-next branch.

I'll amend it there (it's faster for me than replacing it with v2 from
patchwork).

So you don't need to repost it.

Thanks.

> 
> Matthieu
> 
> 
> -----Message d'origine-----
> De : openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] De la part de Khem Raj
> Envoyé : lundi 24 mars 2014 18:16
> À : openembeded-devel
> Objet : Re: [oe] [meta-oe][PATCH] terminus-font: add new recipe for version 4.38
> 
> On Mon, Mar 24, 2014 at 12:38 AM, Matthieu CRAPET <Matthieu.CRAPET@ingenico.com> wrote:
> > Most recipes are using ??= and not ?=
> > What is a best way?
> 
> ?= is better fit here.
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Matthieu CRAPET - March 25, 2014, 8:05 a.m.
Thank you!

-----Message d'origine-----
De : openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] De la part de Martin Jansa
Envoyé : mardi 25 mars 2014 08:55
À : openembedded-devel@lists.openembedded.org
Objet : Re: [oe] [meta-oe][PATCH] terminus-font: add new recipe for version 4.38

On Tue, Mar 25, 2014 at 07:36:05AM +0000, Matthieu CRAPET wrote:
> Hi,
> 
> > ?= is better fit here.
> It's because there is only one option ?
> 
> Do you want me to repost patch?
> The problem is that it is already on meta-openembedded git master-next branch.

I'll amend it there (it's faster for me than replacing it with v2 from patchwork).

So you don't need to repost it.

Thanks.

> 
> Matthieu
> 
> 
> -----Message d'origine-----
> De : openembedded-devel-bounces@lists.openembedded.org 
> [mailto:openembedded-devel-bounces@lists.openembedded.org] De la part 
> de Khem Raj Envoyé : lundi 24 mars 2014 18:16 À : openembeded-devel 
> Objet : Re: [oe] [meta-oe][PATCH] terminus-font: add new recipe for 
> version 4.38
> 
> On Mon, Mar 24, 2014 at 12:38 AM, Matthieu CRAPET <Matthieu.CRAPET@ingenico.com> wrote:
> > Most recipes are using ??= and not ?= What is a best way?
> 
> ?= is better fit here.
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-graphics/terminus-font/terminus-font_4.38.bb b/meta-oe/recipes-graphics/terminus-font/terminus-font_4.38.bb
new file mode 100644
index 0000000..eba6fd6
--- /dev/null
+++ b/meta-oe/recipes-graphics/terminus-font/terminus-font_4.38.bb
@@ -0,0 +1,45 @@ 
+SUMMARY = "Terminus fonts packages (console and X11)"
+DESCRIPTION = "Terminus Font is a clean, fixed width bitmap font, designed for \
+               long (8 and more hours per day) work with computers."
+HOMEPAGE = "http://terminus-font.sourceforge.net/"
+AUTHOR = "Dimitar Zhekov"
+SECTION = "fonts"
+
+LICENSE = "OFL-1.1"
+LIC_FILES_CHKSUM = "file://OFL.TXT;md5=9cadb26f4c5c005618c5ae74f041ec54"
+
+DEPENDS = "perl-native-runtime gzip-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "a8e792fe6e84c86ed2b6ed3e2a12ba66"
+SRC_URI[sha256sum] = "f6f4876a4dabe6a37c270c20bb9e141e38fb50e0bba200e1b9d0470e5eed97b7"
+
+inherit allarch fontcache
+
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[x11] = ""
+
+# Don't use font cache mecanism for console packages
+FONT_PACKAGES = "${@base_contains('PACKAGECONFIG', 'x11', '${PN}-pcf', '', d)}"
+
+# Hand made configure script. Don't need oe_runconf
+do_configure() {
+	chmod +x ${S}/configure
+	${S}/configure --prefix=${prefix} \
+		--psfdir=${datadir}/consolefonts \
+		--acmdir=${datadir}/consoletrans \
+		--x11dir=${datadir}/fonts/terminus
+}
+
+do_compile() {
+	oe_runmake DESTDIR=${D} psf txt ${@base_contains('PACKAGECONFIG', 'x11', 'pcf', '', d)}
+}
+
+do_install() {
+	oe_runmake DESTDIR=${D} install-psf install-acm ${@base_contains('PACKAGECONFIG', 'x11', 'install-pcf', '', d)}
+}
+
+PACKAGES += "${PN}-consolefonts ${PN}-consoletrans ${PN}-pcf"
+FILES_${PN}-consolefonts = "${datadir}/consolefonts"
+FILES_${PN}-consoletrans = "${datadir}/consoletrans"
+FILES_${PN}-pcf = "${datadir}/fonts/terminus"