A problem in programs/fonttosfnt/util.c when building against freetype-2.3.x (latest release)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


(This is part of a collection of patches and workarounds I have
for consideration for problems in the build process in current
cvs.  I'll just briefly describe each patch(-set) below, and if
needed will put them into bugzilla separately with more details.)


3.  A problem in programs/fonttosfnt/util.c when building against
freetype-2.3.x (latest release)


Build Log snip:

>>>>
[...]
util.c:37:10: error: #include expects "FILENAME" or <FILENAME>
[...]
<<<<


To recreate:

a) build and install freetype-2.3.4 (latest release)
b) specify these in your [build/]config/cf/host.def file:
#define HasFreetype2	YES
#define Freetype2Dir	/usr/local   (or wherever you installed freetype)


Discussion:


The Freetype dudes & -ettes don't want us to use "internal"
headers & APIs anymore.  But they know about projects such as xf86
that still need to access that level.

The freetype install script won't copy their "internal" header
hiearchy, and to add more insult, it will actually try to forcibly
remove such if already installed on your box.

No I don't have a patch to work around this completely or
automatically (e.g. if you still use an antiquated version of
freetype ;) ).  What's more, you may still need to manually copy
those "internal" headers as/when freetype itself is updated.


For now, a quick patch to fix this:

>>>>-cut->>>>
--- util.c_orig	2005-02-06 19:01:16 -0600
+++ util.c	2007-04-06 10:53:36 -0500
@@ -32,6 +32,13 @@
 #endif
 #include <stdarg.h>
 
+/* !!!
+   you may need to manually recursively copy all of
+   <freetype2srcdir>/include/freetype/internal
+   to your local tree where they can be found, e.g.
+   /usr/local/include/freetype2/freetype/.
+   !!! */
+#define FT2_BUILD_LIBRARY 1
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_INTERNAL_OBJECTS_H
<<<<-cut-<<<<


Note the comment!  Hopefully that will provide a clue when ppl
come across this problem while building xf86.

We should not blindly apply this patch to cvs because it might
then fail for most systems that have pre-22x (maybe even pre-23x)
versions of freetype.  But I don't quite know how to do this
rightly to appease everyone.

Using a current release of freetype will bring in a lot of fixes
in that area, which is enough of a reason to consider it.  I can
definitely tell the custom settings in ftoption.h look much much
better on screen with their latest release than before.

Thanks for any help.  :)


_______________________________________________
Devel mailing list
Devel@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [X Forum]     [XFree86]     [XFree86 Newbie]     [X.Org]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux