All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] ghostscript: not compiled to use freetype lib
@ 2018-07-25 13:08 Thomas Ehrhardt
  2018-07-25 14:36 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Ehrhardt @ 2018-07-25 13:08 UTC (permalink / raw)
  To: buildroot

With this patch ghostscript 9.23 use the freetype lib.

--- a/package/ghostscript/ghostscript.mk
+++ b/package/ghostscript/ghostscript.mk
@@ -10,6 +10,7 @@
 GHOSTSCRIPT_LICENSE = AGPL-3.0
 GHOSTSCRIPT_LICENSE_FILES = LICENSE
 # 0001-Fix-cross-compilation-issue.patch
+# 0002-Fix-shared-lib-freetype.patch
 GHOSTSCRIPT_AUTORECONF = YES
 GHOSTSCRIPT_DEPENDENCIES = \
        host-lcms2 \
@@ -32,9 +33,15 @@
 endef
 GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS

+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+GHOSTSCRIPT_DEPENDENCIES += host-freetype
+HOST_CXXFLAGS += -I$(HOST_DIR)/usr/include/freetype2
+endif
+
 GHOSTSCRIPT_CONF_ENV = \
        CCAUX="$(HOSTCC)" \
-       CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)"
+        CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)" \
+        CXXFLAGS="$(HOST_CXXFLAGS)"

 GHOSTSCRIPT_CONF_OPTS = \
        --disable-compile-inits \

---
file package/ghostscript/0002-Fix-shared-lib-freetype.patch

--- a/configure.ac
+++ b/configure.ac
@@ -967,21 +967,12 @@

     if test x"$FTSRCDIR" = x"src"; then
       AC_MSG_RESULT([no])
-      if test "x$PKGCONFIG" != x; then
-        AC_MSG_CHECKING(for system freetype2 >= 2.4.2 with pkg-config)
-            # pkg-config needs the libtool version, which != the freetype2
version <sigh!>
-            # There is a table of corresponding ft2<->libtool numbers in
freetype/docs/VERSION.DLL
-            if $PKGCONFIG --atleast-version=12.0.6 freetype2; then
-                AC_MSG_RESULT(yes)
-                FT_CFLAGS="$CFLAGS `$PKGCONFIG --cflags freetype2`"
-                FT_LIBS="`$PKGCONFIG --libs freetype2`"
-                FT_BRIDGE=1
-                SHARE_FT=1
-            else
-                AC_MSG_RESULT(no)
-                AC_MSG_WARN([freetype library source not found...using
native rasterizer])
-                AFS=1
-            fi
+      if test "x$BUILD_PKGCONFIG" != x; then
+       AC_MSG_RESULT(yes)
+       FT_CFLAGS="$CFLAGS `$BUILD_PKGCONFIG --cflags freetype2`"
+       FT_LIBS="`$BUILD_PKGCONFIG --libs freetype2`"
+       FT_BRIDGE=1
+       SHARE_FT=1
       else
         AC_CHECK_HEADER([ft2build.h], [FT_BRIDGE=1], [AFS=1])




--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] ghostscript: not compiled to use freetype lib
  2018-07-25 13:08 [Buildroot] [PATCH] ghostscript: not compiled to use freetype lib Thomas Ehrhardt
@ 2018-07-25 14:36 ` Thomas Petazzoni
  2018-07-26 12:51   ` Thomas Ehrhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-07-25 14:36 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for your contribution!

On Wed, 25 Jul 2018 08:08:11 -0500 (CDT), Thomas Ehrhardt wrote:
> With this patch ghostscript 9.23 use the freetype lib.

Your patch (and the previous one) lacks a Signed-off-by.

> +ifeq ($(BR2_PACKAGE_FREETYPE),y)
> +GHOSTSCRIPT_DEPENDENCIES += host-freetype

This is most likely incorrect. BR2_PACKAGE_FREETYPE indicates that the
target freetype is available, it has nothing to do with whether
host-freetype should be used or not.

> +HOST_CXXFLAGS += -I$(HOST_DIR)/usr/include/freetype2

This line is incorrect, because it changes the CXXFLAGS globally, for
all packages.

> file package/ghostscript/0002-Fix-shared-lib-freetype.patch

Weird how this is formatted. In any case, all patches should have a
description and Signed-off-by line.

Could you explain what you are trying to achieve ?

> Sent from: http://buildroot-busybox.2317881.n4.nabble.com/

Please send your e-mails to the mailing list directly. If you don't
want to subscribe because of the traffic, then please subscribe and
disable mail delivery in the Mailman preferences. This will allow you
to send e-mails to the list, but you won't receive all the mailing list
traffic.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] ghostscript: not compiled to use freetype lib
  2018-07-25 14:36 ` Thomas Petazzoni
@ 2018-07-26 12:51   ` Thomas Ehrhardt
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Ehrhardt @ 2018-07-26 12:51 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

the ghostscript isn't compiled against the freetype lib although it is
switched on. Ghostscript doesn't support cross compiling and the old
freetype sources within ghostscript are deleted. So the headers of the
freetype package must be included, and the ghostscript configure is changed
to use the host pkgconfig.

Thomas

Signed-off-by: Thomas Ehrhardt <tehrhardt@innovaphone.com>
---
diff -Nu a/package/ghostscript/0002-Fix-shared-lib-freetype.patch
b/package/ghostscript/0002-Fix-shared-lib-freetype.patch
--- a/package/ghostscript/0002-Fix-shared-lib-freetype.patch
+++ b/package/ghostscript/0002-Fix-shared-lib-freetype.patch
@@ -0,0 +1,30 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -967,21 +967,12 @@
+
+     if test x"$FTSRCDIR" = x"src"; then
+       AC_MSG_RESULT([no])
+-      if test "x$PKGCONFIG" != x; then
+-        AC_MSG_CHECKING(for system freetype2 >= 2.4.2 with pkg-config)
+-            # pkg-config needs the libtool version, which != the freetype2
version <sigh!>
+-            # There is a table of corresponding ft2<->libtool numbers in
freetype/docs/VERSION.DLL
+-            if $PKGCONFIG --atleast-version=12.0.6 freetype2; then
+-                AC_MSG_RESULT(yes)
+-                FT_CFLAGS="$CFLAGS `$PKGCONFIG --cflags freetype2`"
+-                FT_LIBS="`$PKGCONFIG --libs freetype2`"
+-                FT_BRIDGE=1
+-                SHARE_FT=1
+-            else
+-                AC_MSG_RESULT(no)
+-                AC_MSG_WARN([freetype library source not found...using
native rasterizer])
+-                AFS=1
+-            fi
++      if test "x$BUILD_PKGCONFIG" != x; then
++       AC_MSG_RESULT(yes)
++      FT_CFLAGS="$CFLAGS `$BUILD_PKGCONFIG --cflags freetype2`"
++      FT_LIBS="`$BUILD_PKGCONFIG --libs freetype2`"
++      FT_BRIDGE=1
++      SHARE_FT=1
+       else
+         AC_CHECK_HEADER([ft2build.h], [FT_BRIDGE=1], [AFS=1])
+
diff -Nu a/package/ghostscript/ghostscript.mk
b/package/ghostscript/ghostscript.mk
--- a/package/ghostscript/ghostscript.mk
+++ b/package/ghostscript/ghostscript.mk
@@ -10,6 +10,7 @@
 GHOSTSCRIPT_LICENSE = AGPL-3.0
 GHOSTSCRIPT_LICENSE_FILES = LICENSE
 # 0001-Fix-cross-compilation-issue.patch
+# 0002-Fix-shared-lib-freetype.patch
 GHOSTSCRIPT_AUTORECONF = YES
 GHOSTSCRIPT_DEPENDENCIES = \
        host-lcms2 \
@@ -32,9 +33,17 @@
 endef
 GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS

+GHOSTSCRIPT_CXXFLAGS = $(HOST_CXXFLAGS)
+
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+GHOSTSCRIPT_DEPENDENCIES += freetype
+GHOSTSCRIPT_CXXFLAGS += -I$(HOST_DIR)/usr/include/freetype2
+endif
+
 GHOSTSCRIPT_CONF_ENV = \
        CCAUX="$(HOSTCC)" \
-       CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)"
+       CFLAGSAUX="$(HOST_CFLAGS) $(HOST_LDFLAGS)" \
+       CXXFLAGS="$(GHOSTSCRIPT_CXXFLAGS)"

 GHOSTSCRIPT_CONF_OPTS = \
        --disable-compile-inits \
--



--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-26 12:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 13:08 [Buildroot] [PATCH] ghostscript: not compiled to use freetype lib Thomas Ehrhardt
2018-07-25 14:36 ` Thomas Petazzoni
2018-07-26 12:51   ` Thomas Ehrhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.