Skip to contentSkip to conversation

package/harfbuzz: fix build without cairo-svg

PATCH New James Hilliard 4 participants 8 messages Jun 23, 2019 – Jun 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Fixes:
http://autobuild.buildroot.org/results/f6c0b85fa476e0f52cc06f0133d2e4f9920f7556
test-ot-color.cc:40:10: fatal error: cairo-svg.h: No such file or directory
40 | #include <cairo-svg.h>

      |          ^~~~~~~~~~~~~
---
 ...airo-svg-dependency-to-test-ot-color.patch | 38 +++++++++++++++++++
 package/harfbuzz/harfbuzz.mk                  |  2 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 package/harfbuzz/0001-Add-missing-cairo-svg-dependency-to-test-ot-color.patch
package/harfbuzz/0001-Add-missing-cairo-svg-dependency-to-test-ot-color.patch new file +38 -0
new file mode 100644
index 0000000000..ea759e5afc
@@ -0,0 +1,38 @@
+From c2d7dfc68ffcb389c9f73b5ef94da7b270bdcf9e Mon Sep 17 00:00:00 2001
+From: James Hilliard <[email protected]>
+Date: Sat, 22 Jun 2019 19:38:48 -0600
+Subject: [PATCH] Add missing cairo-svg dependency to test-ot-color
+
+Signed-off-by: James Hilliard <[email protected]>
+[james.hilliard1 at gmail.com: backport from upstream commit
+c2d7dfc68ffcb389c9f73b5ef94da7b270bdcf9e]
+---
+ src/test-ot-color.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/test-ot-color.cc b/src/test-ot-color.cc
+index 44bd2eb6..e9126c06 100644
+--- a/src/test-ot-color.cc
++++ b/src/test-ot-color.cc
+@@ -25,7 +25,9 @@
+ 
+ #include "hb.hh"
+ 
+-#ifndef HB_NO_COLOR
++#include <cairo.h>
++
++#if !defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE)
+ 
+ #include "hb-ot.h"
+ 
+@@ -35,7 +37,6 @@
+ #include FT_FREETYPE_H
+ #include FT_GLYPH_H
+ 
+-#include <cairo.h>
+ #include <cairo-ft.h>
+ #include <cairo-svg.h>
+ 
+-- 
+2.20.1
+
package/harfbuzz/harfbuzz.mk +1 -1
index 1144133254..ded5e554e6 100644
@@ -30,7 +30,7 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 HARFBUZZ_CONF_ENV = LDFLAGS="$(TARGET_LDFLAGS) -pthread"
 endif
 
-ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
+ifeq ($(BR2_PACKAGE_CAIRO),y)
 HARFBUZZ_DEPENDENCIES += cairo
 HARFBUZZ_CONF_OPTS += --with-cairo=yes
 else
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Quoted 4 lines · On Sun, 23 Jun 2019 13:03:09 -0600 James Hilliard <[email protected]>…

Fixes:
http://autobuild.buildroot.org/results/f6c0b85fa476e0f52cc06f0133d2e4f9920f7556
test-ot-color.cc:40:10: fatal error: cairo-svg.h: No such file or directory
40 | #include <cairo-svg.h>

Quoted 8 lines
      |          ^~~~~~~~~~~~~
---
 ...airo-svg-dependency-to-test-ot-color.patch | 38 +++++++++++++++++++
 package/harfbuzz/harfbuzz.mk                  |  2 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 package/harfbuzz/0001-Add-missing-cairo-svg-dependency-to-test-ot-color.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Quoted 6 lines · On Sun, 23 Jun 2019 13:03:09 -0600 James Hilliard <[email protected]>…

Fixes:
http://autobuild.buildroot.org/results/f6c0b85fa476e0f52cc06f0133d2e4f9920f7556
test-ot-color.cc:40:10: fatal error: cairo-svg.h: No such file or directory 40 | #include <cairo-svg.h>
| ^~~~~~~~~~~~~

Quoted 8 lines
Quoted 6 lines

---
...airo-svg-dependency-to-test-ot-color.patch | 38 +++++++++++++++++++
package/harfbuzz/harfbuzz.mk | 2 +-

2 files changed, 39 insertions(+), 1 deletion(-)

create mode 100644 package/harfbuzz/0001-Add-missing-cairo-svg-dependency-to-test-ot-color.patch

Applied to master, thanks.

This confuses me. We recently changed harfbuzz to only enable cairo support if cairo-svg is enabled, and now this patch adds an unconditional include of <cairo.h>?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Hi Peter,

Quoted 18 lines · Peter Korsgaard
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Quoted 12 lines · On Sun, 23 Jun 2019 13:03:09 -0600 James Hilliard <[email protected]>…

Fixes:
http://autobuild.buildroot.org/results/f6c0b85fa476e0f52cc06f0133d2e4f9920f7556
test-ot-color.cc:40:10: fatal error: cairo-svg.h: No such file or directory 40 | #include <cairo-svg.h>
| ^~~~~~~~~~~~~

---
...airo-svg-dependency-to-test-ot-color.patch | 38 +++++++++++++++++++
package/harfbuzz/harfbuzz.mk | 2 +-

2 files changed, 39 insertions(+), 1 deletion(-)

create mode 100644 package/harfbuzz/0001-Add-missing-cairo-svg-dependency-to-test-ot-color.patch

Quoted 5 lines
Quoted 1 line

Applied to master, thanks.

This confuses me. We recently changed harfbuzz to only enable cairo support if cairo-svg is enabled, and now this patch adds an unconditional include of <cairo.h>?

As I understand cairo has already been an optional dependency of harfbuzz, so the unconditional cairo.h include should not be a problem. This patch makes cairo-svg.h include depend on '!defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE)'.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#4 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Quoted 24 lines · Baruch Siach

Hi Peter,

Quoted 20 lines · Peter Korsgaard
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Quoted 6 lines · On Sun, 23 Jun 2019 13:03:09 -0600 James Hilliard <[email protected]>…

Fixes:
http://autobuild.buildroot.org/results/f6c0b85fa476e0f52cc06f0133d2e4f9920f7556
test-ot-color.cc:40:10: fatal error: cairo-svg.h: No such file or directory 40 | #include <cairo-svg.h>
| ^~~~~~~~~~~~~

Quoted 6 lines

---
...airo-svg-dependency-to-test-ot-color.patch | 38 +++++++++++++++++++
package/harfbuzz/harfbuzz.mk | 2 +-

2 files changed, 39 insertions(+), 1 deletion(-)

create mode 100644 package/harfbuzz/0001-Add-missing-cairo-svg-dependency-to-test-ot-color.patch

Applied to master, thanks.

Quoted 8 lines
Quoted 3 lines

This confuses me. We recently changed harfbuzz to only enable cairo support if cairo-svg is enabled, and now this patch adds an unconditional include of <cairo.h>?

As I understand cairo has already been an optional dependency of harfbuzz, so the unconditional cairo.h include should not be a problem. This patch makes cairo-svg.h include depend on '!defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE)'.

Yeah, that sounds right, more details here:
https://github.com/harfbuzz/harfbuzz/pull/1788

Quoted 7 lines

baruch

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

#5 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

"James" == James Hilliard <[email protected]> writes:

This confuses me. We recently changed harfbuzz to only enable cairo support if cairo-svg is enabled, and now this patch adds an unconditional include of <cairo.h>?

Quoted 6 lines
Quoted 4 lines

As I understand cairo has already been an optional dependency of harfbuzz, so the unconditional cairo.h include should not be a problem. This patch makes cairo-svg.h include depend on '!defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE)'.

Yeah, that sounds right, more details here:
https://github.com/harfbuzz/harfbuzz/pull/1788

Sorry, I still don't get it.

test-ot-color.cc only gets built if cairo support is enabled:

if HAVE_FREETYPE
if HAVE_CAIRO_FT
noinst_PROGRAMS += test-ot-color

So with the two harfbuzz patches we only end up here if cairo + cairo-svg is enabled, so I don't see what this patch fixes.

Unless the intention is to drop commit ced273e4f1 (package/harfbuzz: fix build with cairo)?

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Hi Peter,

Quoted 21 lines · Peter Korsgaard
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

"James" == James Hilliard <[email protected]> writes:

This confuses me. We recently changed harfbuzz to only enable cairo support if cairo-svg is enabled, and now this patch adds an unconditional include of <cairo.h>?

Quoted 6 lines
Quoted 4 lines

As I understand cairo has already been an optional dependency of harfbuzz, so the unconditional cairo.h include should not be a problem. This patch makes cairo-svg.h include depend on '!defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE)'.

Yeah, that sounds right, more details here:
https://github.com/harfbuzz/harfbuzz/pull/1788

Sorry, I still don't get it.

test-ot-color.cc only gets built if cairo support is enabled:

if HAVE_FREETYPE
if HAVE_CAIRO_FT
noinst_PROGRAMS += test-ot-color

Quoted 5 lines

So with the two harfbuzz patches we only end up here if cairo + cairo-svg is enabled, so I don't see what this patch fixes.

Unless the intention is to drop commit ced273e4f1 (package/harfbuzz: fix build with cairo)?

Yes. Commit de8094925ee reverts commit ced273e4f1a0, and adds the patch.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#7 lore raw

PATCH v2 1/1 package/harfbuzz: fix build without cairo-svg

Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Hi Peter,

Quoted 21 lines · Peter Korsgaard
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

"James" == James Hilliard <[email protected]> writes:

This confuses me. We recently changed harfbuzz to only enable cairo support if cairo-svg is enabled, and now this patch adds an unconditional include of <cairo.h>?

Quoted 6 lines
Quoted 4 lines

As I understand cairo has already been an optional dependency of harfbuzz, so the unconditional cairo.h include should not be a problem. This patch makes cairo-svg.h include depend on '!defined(HB_NO_COLOR) && defined(CAIRO_HAS_SVG_SURFACE)'.

Yeah, that sounds right, more details here:
https://github.com/harfbuzz/harfbuzz/pull/1788

Sorry, I still don't get it.

test-ot-color.cc only gets built if cairo support is enabled:

if HAVE_FREETYPE
if HAVE_CAIRO_FT
noinst_PROGRAMS += test-ot-color

Quoted 7 lines
Quoted 5 lines

So with the two harfbuzz patches we only end up here if cairo + cairo-svg is enabled, so I don't see what this patch fixes.

Unless the intention is to drop commit ced273e4f1 (package/harfbuzz: fix build with cairo)?

Yes. Commit de8094925ee reverts commit ced273e4f1a0, and adds the patch.

Gaah, I really wonder how I missed that. Ok, it would have been great if the commit message would have explained it, but oh well.

Sorry for the noise.

Signature · 1 line
Bye, Peter Korsgaard