linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / tools / misc / ttmkfdir / cstring.patch
blobe1da347c64f1468534321bb7cf6457ccb112fc6e
1 diff --git a/Makefile b/Makefile
2 index e65b64c..52af5ed 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -41,8 +41,9 @@ all: ttmkfdir
6 .cpp.o:
7 libtool --mode=compile $(CXX) $(CXXFLAGS) -o $@ -c $^
9 +# ulgy hack for libtool to find .o files !!
10 ttmkfdir: ttmkfdir.o directory.o commandline.o ttf.o encoding.o parser.o builtin.o
11 - libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
12 + libtool --mode=link $(CXX) -o $@ ./.libs/ttmkfdir.o ./.libs/directory.o ./.libs/commandline.o ./.libs/ttf.o ./.libs/encoding.o ./.libs/parser.o ./.libs/builtin.o $(LDFLAGS)
14 parser.cpp: encoding.l
15 flex -i -8 -o$@ $<
16 diff --git a/encoding.cpp b/encoding.cpp
17 index 9035d35..b4e9733 100644
18 --- a/encoding.cpp
19 +++ b/encoding.cpp
20 @@ -2,7 +2,9 @@
21 #include <cstdio>
22 #include <cstdlib>
23 #include <cstring>
24 -#include "freetype/freetype.h"
25 +#include <ft2build.h>
26 +#include FT_FREETYPE_H
27 +#include <freetype/ftsnames.h>
29 #include "ttmkfdir.h"
30 #include "encoding.h"
31 diff --git a/encoding.h b/encoding.h
32 index fc618bc..e01518f 100644
33 --- a/encoding.h
34 +++ b/encoding.h
35 @@ -6,7 +6,8 @@
36 #include <map>
37 #include <string>
39 -#include "freetype/freetype.h"
40 +#include <ft2build.h>
41 +#include FT_FREETYPE_H
43 #include "util.h"
45 diff --git a/ttf.cpp b/ttf.cpp
46 index 1dda774..97b37f3 100644
47 --- a/ttf.cpp
48 +++ b/ttf.cpp
49 @@ -239,7 +239,7 @@ Face::FontFamilyName (void) const
50 for (i = 0; i < n; i++) {
51 if ((fterror = FT_Get_Sfnt_Name (face, i, &NamePtr)) != FT_Err_Ok) {
52 std::cout << "Warning: Can't SFNT name : " << FileName << "(" << fterror << ")" << std::endl;
53 - return;
54 + return 0;
56 platform = NamePtr.platform_id;
57 encoding = NamePtr.encoding_id;
58 diff --git a/ttf.h b/ttf.h
59 index 4261ef8..c4a0f1f 100644
60 --- a/ttf.h
61 +++ b/ttf.h
62 @@ -3,13 +3,14 @@
63 #define TTF_H__
65 #include <string>
66 +#include <ft2build.h>
67 +#include FT_FREETYPE_H
68 #include "freetype/freetype.h"
69 #include "freetype/tttables.h"
70 #include "freetype/ftsnames.h"
71 #include "freetype/ttnameid.h"
72 #include "freetype/fterrors.h"
73 -#include "freetype/ftmodule.h"
75 +#include "freetype/ftmodapi.h"
76 #include "util.h"
77 #include "encoding.h"