shithub: freetype+ttf2subf

Download patch

ref: 31d97df99fb8c7f52d19d675b8d497753f719594
parent: 5025ed7b008385c767ff2f878c1decd740b060d3
author: Werner Lemberg <[email protected]>
date: Sun Jun 21 15:12:12 EDT 2015

Make Jam support work again.

This is just very basic stuff and just a little bit tested on
GNU/Linux only.  I won't delve into this since I'm not a Jam user.

* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
(DEFINES): Replace with...
(CCFLAGS): ... this.

* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
already handled in the top-level Jamfile.

* src/autofit/Jamfile (DEFINES): Replace with...
(CCFLAGS): ... this.
(_sources): Add missing files.

* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
longer contains macro header definitions.

* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
src/truetype/Jamfile (_sources): Add missing files.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2015-06-21  Werner Lemberg  <[email protected]>
+
+	Make Jam support work again.
+
+	This is just very basic stuff and just a little bit tested on
+	GNU/Linux only.  I won't delve into this since I'm not a Jam user.
+
+	* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
+	(DEFINES): Replace with...
+	(CCFLAGS): ... this.
+
+	* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
+	already handled in the top-level Jamfile.
+
+	* src/autofit/Jamfile (DEFINES): Replace with...
+	(CCFLAGS): ... this.
+	(_sources): Add missing files.
+
+	* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
+	longer contains macro header definitions.
+
+	* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
+	src/truetype/Jamfile (_sources): Add missing files.
+
 2015-06-16  Werner Lemberg  <[email protected]>
 
 	Fix Savannah bug #45326.
--- a/Jamfile
+++ b/Jamfile
@@ -73,20 +73,20 @@
 FT2_COMPONENTS ?= autofit    # auto-fitter
                   base       # base component (public APIs)
                   bdf        # BDF font driver
+                  bzip2      # support for bzip2-compressed PCF font
                   cache      # cache sub-system
                   cff        # CFF/CEF font driver
                   cid        # PostScript CID-keyed font driver
-                  pcf        # PCF font driver
-                  bzip2      # support for bzip2-compressed PCF font
                   gzip       # support for gzip-compressed PCF font
                   lzw        # support for LZW-compressed PCF font
+                  pcf        # PCF font driver
                   pfr        # PFR/TrueDoc font driver
                   psaux      # common PostScript routines module
                   pshinter   # PostScript hinter module
                   psnames    # PostScript names handling
                   raster     # monochrome rasterizer
-                  smooth     # anti-aliased rasterizer
                   sfnt       # SFNT-based format support routines
+                  smooth     # anti-aliased rasterizer
                   truetype   # TrueType font driver
                   type1      # PostScript Type 1 font driver
                   type42     # PostScript Type 42 (embedded TrueType) driver
@@ -121,10 +121,9 @@
 }
 
 
-# We need `freetype2/include' in the current include path in order to
+# We need `include' in the current include path in order to
 # compile any part of FreeType 2.
-#: updating documentation for upcoming release
-
+#
 HDRS += $(FT2_INCLUDE) ;
 
 
@@ -131,7 +130,7 @@
 # We need to #define FT2_BUILD_LIBRARY so that our sources find the
 # internal headers
 #
-DEFINES += FT2_BUILD_LIBRARY ;
+CCFLAGS += -DFT2_BUILD_LIBRARY ;
 
 # Uncomment the following line if you want to build individual source files
 # for each FreeType 2 module.  This is only useful during development, and
@@ -140,12 +139,13 @@
 # FT2_MULTI = true ;
 
 
-# The file <config/ftheader.h> is used to define macros that are later used
-# in #include statements.  It needs to be parsed in order to record these
-# definitions.
+# The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
+# macros that are later used in #include statements.  They need to be parsed
+# in order to record these definitions.
 #
-HDRMACRO  [ FT2_SubDir  include freetype config ftheader.h ] ;
-HDRMACRO  [ FT2_SubDir  include freetype internal internal.h ] ;
+HDRMACRO  [ FT2_SubDir  $(FT2_INCLUDE_DIR) config ftheader.h ] ;
+HDRMACRO  [ FT2_SubDir  $(FT2_INCLUDE_DIR) internal internal.h ] ;
+HDRMACRO  [ FT2_SubDir  $(FT2_INCLUDE_DIR) internal ftserv.h ] ;
 
 
 # Now include the Jamfile in `freetype2/src', used to drive the compilation
@@ -153,7 +153,7 @@
 #
 SubInclude  FT2_TOP $(FT2_SRC_DIR) ;
 
-# Handle the generation of the `ftexport.sym' file which contain the list
+# Handle the generation of the `ftexport.sym' file, which contains the list
 # of exported symbols.  This can be used on Unix by libtool.
 #
 SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
@@ -195,7 +195,12 @@
 
 actions RefDoc
 {
-  python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.6 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h
+  python $(FT2_SRC)/tools/docmaker/docmaker.py
+         --prefix=ft2
+         --title=FreeType-2.6
+         --output=$(DOC_DIR)
+         $(FT2_INCLUDE)/*.h
+         $(FT2_INCLUDE)/config/*.h
 }
 
 RefDoc  refdoc ;
--- a/src/Jamfile
+++ b/src/Jamfile
@@ -11,12 +11,6 @@
 
 SubDir  FT2_TOP $(FT2_SRC_DIR) ;
 
-# The file <internal/internal.h> is used to define macros that are
-# later used in #include statements.  It needs to be parsed in order to
-# record these definitions.
-#
-HDRMACRO  [ FT2_SubDir $(FT2_INCLUDE_DIR) internal internal.h ] ;
-
 for xx in $(FT2_COMPONENTS)
 {
   SubInclude FT2_TOP $(FT2_SRC_DIR) $(xx) ;
--- a/src/autofit/Jamfile
+++ b/src/autofit/Jamfile
@@ -17,11 +17,25 @@
   # define FT2_AUTOFIT2 to enable experimental latin hinter replacement
   if $(FT2_AUTOFIT2)
   {
-    DEFINES += FT_OPTION_AUTOFIT2 ;
+    CCFLAGS += FT_OPTION_AUTOFIT2 ;
   }
   if $(FT2_MULTI)
   {
-    _sources = afangles afglobal afhints aflatin afcjk afindic afloader afmodule afdummy afwarp afpic ;
+    _sources = afangles
+               afblue
+               afcjk
+               afdummy
+               afglobal
+               afhints
+               afindic
+               aflatin
+               afloader
+               afmodule
+               afpic
+               afranges
+               afwarp
+               hbshim
+               ;
 
     if $(FT2_AUTOFIT2)
     {
--- a/src/base/Jamfile
+++ b/src/base/Jamfile
@@ -17,10 +17,19 @@
 
   if $(FT2_MULTI)
   {
-    _sources = ftadvanc ftcalc   ftdbgmem ftgloadr
-               ftobjs   ftoutln  ftrfork  ftsnames
-               ftstream fttrigon ftutil
-               basepic  ftpic
+    _sources = basepic
+               ftadvanc
+               ftcalc
+               ftdbgmem
+               ftgloadr
+               ftobjs
+               ftoutln
+               ftpic
+               ftrfork
+               ftsnames
+               ftstream
+               fttrigon
+               ftutil
                ;
   }
   else
@@ -34,13 +43,31 @@
 # Add the optional/replaceable files.
 #
 {
-  local  _sources = bbox   bdf    bitmap debug  gasp
-                    glyph  gxval  init   lcdfil mm
-                    otval  pfr    stroke synth  system
-                    type1  winfnt xf86   patent
+  local  _sources = ftapi
+                    ftbbox
+                    ftbdf
+                    ftbitmap
+                    ftcid
+                    ftdebug
+                    ftfntfmt
+                    ftfstype
+                    ftgasp
+                    ftglyph
+                    ftgxval
+                    ftinit
+                    ftlcdfil
+                    ftmm
+                    ftotval
+                    ftpatent
+                    ftpfr
+                    ftstroke
+                    ftsynth
+                    ftsystem
+                    fttype1
+                    ftwinfnt
                     ;
 
-  Library  $(FT2_LIB) : ft$(_sources).c ;
+  Library  $(FT2_LIB) : $(_sources).c ;
 }
 
 # Add Macintosh-specific file to the library when necessary.
--- a/src/bdf/Jamfile
+++ b/src/bdf/Jamfile
@@ -16,7 +16,9 @@
 
   if $(FT2_MULTI)
   {
-    _sources = bdfdrivr bdflib ;
+    _sources = bdfdrivr
+               bdflib
+               ;
   }
   else
   {
--- a/src/cache/Jamfile
+++ b/src/cache/Jamfile
@@ -11,25 +11,19 @@
 
 SubDir  FT2_TOP $(FT2_SRC_DIR) cache ;
 
-# The file <ftcache.h> contains some macro definitions that are
-# later used in #include statements related to the cache sub-system.  It
-# needs to be parsed through a HDRMACRO rule for macro definitions.
-#
-HDRMACRO  [ FT2_SubDir  include ftcache.h ] ;
-
 {
   local  _sources ;
 
   if $(FT2_MULTI)
   {
-    _sources = ftcmru
-               ftcmanag
+    _sources = ftcbasic
                ftccache
                ftcglyph
-               ftcsbits
                ftcimage
-               ftcbasic
+               ftcmanag
                ftccmap
+               ftcmru
+               ftcsbits
                ;
   }
   else
--- a/src/cff/Jamfile
+++ b/src/cff/Jamfile
@@ -16,7 +16,23 @@
 
   if $(FT2_MULTI)
   {
-    _sources = cffdrivr cffgload cffload cffobjs cffparse cffcmap cffpic ;
+    _sources = cffcmap
+               cffdrivr
+               cffgload
+               cffload
+               cffobjs
+               cffparse
+               cffpic
+               cf2arrst
+               cf2blues
+               cf2error
+               cf2font
+               cf2ft
+               cf2hints
+               cf2intrp
+               cf2read
+               cf2stack
+               ;
   }
   else
   {
--- a/src/cid/Jamfile
+++ b/src/cid/Jamfile
@@ -16,7 +16,12 @@
 
   if $(FT2_MULTI)
   {
-    _sources = cidobjs cidload cidgload cidriver cidparse ;
+    _sources = cidgload
+               cidload
+               cidobjs
+               cidparse
+               cidriver
+               ;
   }
   else
   {
--- a/src/gxvalid/Jamfile
+++ b/src/gxvalid/Jamfile
@@ -17,10 +17,29 @@
 
   if $(FT2_MULTI)
   {
-    _sources = gxvcommn gxvfeat  gxvbsln  gxvtrak  gxvopbd  gxvprop
-               gxvmort  gxvmort0 gxvmort1 gxvmort2 gxvmort4 gxvmort5
-               gxvmorx  gxvmorx0 gxvmorx1 gxvmorx2 gxvmorx4 gxvmorx5
-               gxvlcar  gxvkern  gxvmod   gxvjust  ;
+    _sources = gxvbsln
+               gxvcommn
+               gxvfeat
+               gxvjust
+               gxvkern
+               gxvlcar
+               gxvmod
+               gxvmort
+               gxvmort0
+               gxvmort1
+               gxvmort2
+               gxvmort4
+               gxvmort5
+               gxvmorx
+               gxvmorx0
+               gxvmorx1
+               gxvmorx2
+               gxvmorx4
+               gxvmorx5
+               gxvopbd
+               gxvprop
+               gxvtrak
+               ;
   }
   else
   {
--- a/src/otvalid/Jamfile
+++ b/src/otvalid/Jamfile
@@ -16,7 +16,15 @@
 
   if $(FT2_MULTI)
   {
-    _sources = otvbase otvcommn otvgdef otvgpos otvgsub otvjstf otvmod otvmath ;
+    _sources = otvbase
+               otvcommn
+               otvgdef
+               otvgpos
+               otvgsub
+               otvjstf
+               otvmath
+               otvmod
+               ;
   }
   else
   {
--- a/src/pcf/Jamfile
+++ b/src/pcf/Jamfile
@@ -16,7 +16,10 @@
 
   if $(FT2_MULTI)
   {
-    _sources = pcfdrivr pcfread pcfutil ;
+    _sources = pcfdrivr
+               pcfread
+               pcfutil
+               ;
   }
   else
   {
--- a/src/pfr/Jamfile
+++ b/src/pfr/Jamfile
@@ -16,7 +16,13 @@
 
   if $(FT2_MULTI)
   {
-    _sources = pfrdrivr pfrgload pfrload pfrobjs pfrcmap pfrsbit ;
+    _sources = pfrcmap
+               pfrdrivr
+               pfrgload
+               pfrload
+               pfrobjs
+               pfrsbit
+               ;
   }
   else
   {
--- a/src/psaux/Jamfile
+++ b/src/psaux/Jamfile
@@ -16,8 +16,12 @@
 
   if $(FT2_MULTI)
   {
-    _sources = psauxmod psobjs   t1decode t1cmap
-               psconv   afmparse
+    _sources = afmparse
+               psauxmod
+               psconv
+               psobjs
+               t1cmap
+               t1decode
                ;
   }
   else
--- a/src/pshinter/Jamfile
+++ b/src/pshinter/Jamfile
@@ -16,7 +16,12 @@
 
   if $(FT2_MULTI)
   {
-    _sources = pshrec pshglob pshalgo pshmod pshpic ;
+    _sources = pshalgo
+               pshglob
+               pshmod
+               pshpic
+               pshrec
+               ;
   }
   else
   {
--- a/src/psnames/Jamfile
+++ b/src/psnames/Jamfile
@@ -16,7 +16,9 @@
 
   if $(FT2_MULTI)
   {
-    _sources = psmodule pspic ;
+    _sources = psmodule
+               pspic
+               ;
   }
   else
   {
--- a/src/raster/Jamfile
+++ b/src/raster/Jamfile
@@ -16,7 +16,10 @@
 
   if $(FT2_MULTI)
   {
-    _sources = ftraster ftrend1 rastpic ;
+    _sources = ftraster
+               ftrend1
+               rastpic
+               ;
   }
   else
   {
--- a/src/sfnt/Jamfile
+++ b/src/sfnt/Jamfile
@@ -16,7 +16,18 @@
 
   if $(FT2_MULTI)
   {
-    _sources = sfobjs sfdriver ttcmap ttmtx ttpost ttload ttsbit ttkern ttbdf sfntpic ;
+    _sources = pngshim
+               sfdriver
+               sfntpic
+               sfobjs
+               ttbdf
+               ttcmap
+               ttkern
+               ttload
+               ttmtx
+               ttpost
+               ttsbit
+               ;
   }
   else
   {
--- a/src/smooth/Jamfile
+++ b/src/smooth/Jamfile
@@ -16,7 +16,10 @@
 
   if $(FT2_MULTI)
   {
-    _sources = ftgrays ftsmooth ftspic ;
+    _sources = ftgrays
+               ftsmooth
+               ftspic
+               ;
   }
   else
   {
--- a/src/truetype/Jamfile
+++ b/src/truetype/Jamfile
@@ -16,7 +16,15 @@
 
   if $(FT2_MULTI)
   {
-    _sources = ttdriver ttobjs ttpload ttgload ttinterp ttgxvar ttpic ;
+    _sources = ttdriver
+               ttgload
+               ttgxvar
+               ttinterp
+               ttobjs
+               ttpic
+               ttpload
+               ttsubpix
+               ;
   }
   else
   {
--- a/src/type1/Jamfile
+++ b/src/type1/Jamfile
@@ -16,7 +16,13 @@
 
   if $(FT2_MULTI)
   {
-    _sources = t1afm t1driver t1objs t1load t1gload t1parse ;
+    _sources = t1afm
+               t1driver
+               t1gload
+               t1load
+               t1objs
+               t1parse
+               ;
   }
   else
   {
--- a/src/type42/Jamfile
+++ b/src/type42/Jamfile
@@ -16,7 +16,10 @@
 
   if $(FT2_MULTI)
   {
-    _sources = t42objs t42parse t42drivr ;
+    _sources = t42drivr
+               t42objs
+               t42parse
+               ;
   }
   else
   {