$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: grafikrobot_at_[hidden]
Date: 2007-12-28 03:31:45
Author: grafik
Date: 2007-12-28 03:31:45 EST (Fri, 28 Dec 2007)
New Revision: 42321
URL: http://svn.boost.org/trac/boost/changeset/42321
Log:
Building of FreeType 2.
Added:
   sandbox/tools/build_extensions/example/freetype/
   sandbox/tools/build_extensions/example/freetype/build.jam   (contents, props changed)
   sandbox/tools/build_extensions/ext/freetype.jam   (contents, props changed)
Added: sandbox/tools/build_extensions/example/freetype/build.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/example/freetype/build.jam	2007-12-28 03:31:45 EST (Fri, 28 Dec 2007)
@@ -0,0 +1,13 @@
+#~ Copyright 2007 Rene Rivera
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+using freetype : 2.3.5 : $(PACKAGES)/freetype-2.3.5 ;
+
+import stage ;
+
+install stage-lib
+    : /ext/freetype//freetype/<link>static /ext/freetype//freetype/<link>shared
+    : <location>$(STAGE_ROOT)/lib <install-dependencies>on <install-type>LIB
+    ;
Added: sandbox/tools/build_extensions/ext/freetype.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/freetype.jam	2007-12-28 03:31:45 EST (Fri, 28 Dec 2007)
@@ -0,0 +1,75 @@
+#~ Copyright Rene Rivera 2007.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+###
+
+import extension ;
+
+extension.declare freetype ;
+
+rule init ( version ? : location : options * )
+{
+    version ?= default ;
+    local requirements =
+        [ extension.define freetype $(version) : $(location) : $(options) ]
+        <freetype-version>$(version)
+        <freetype-location>$(location)
+        <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+        <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
+        ;
+    local common-requirements =
+        <include>$(location)/include
+        ;
+    
+    local rule src ( subdir names + )
+    {
+        return $(location)/src/$(subdir)/$(names:S=.c) ;
+    }
+    
+    extension.text freetype $(version)
+        :   ftdefs.h
+        :   "#define FT_EXPORT(x) FT_DLLEXPORT extern x"
+        ;
+    common-requirements +=
+        <implicit-dependency>/ext/freetype//ftdefs.h
+        <dependency>/ext/freetype//ftdefs.h
+        <toolset>msvc:<cflags>-FIftdefs.h
+        <toolset>msvc,<link>static:<define>FT_DLLEXPORT=
+        ;
+        
+    lib freetype
+        :   [ src autofit autofit ]
+            [ src base ftbase ]
+            [ src base
+                ftsystem ftinit ftglyph ftmm ftbdf ftbbox ftdebug
+                ftxf86 fttype1 ftpfr ftstroke ftwinfnt ftotval ftbitmap
+                ftsynth ftgxval ftlcdfil ftgasp ftpatent ]
+            [ src bdf bdf ]
+            [ src cache ftcache ]
+            [ src cff cff ]
+            [ src cid type1cid ]
+            [ src gzip ftgzip ]
+            [ src lzw ftlzw ]
+            [ src pcf pcf ]
+            [ src pfr pfr ]
+            [ src psaux psaux ]
+            [ src pshinter pshinter ]
+            [ src psnames psnames ]
+            [ src raster raster ]
+            [ src sfnt sfnt ]
+            [ src smooth smooth ]
+            [ src truetype truetype ]
+            [ src type1 type1 ]
+            [ src type42 type42 ]
+            [ src winfonts winfnt ]
+        :   $(requirements) $(common-requirements)
+            <location-prefix>freetype
+            <define>FT2_BUILD_LIBRARY
+            <toolset>msvc,<link>shared:<define>FT_DLLEXPORT=__declspec(dllexport)
+        :
+        :   $(common-requirements)
+            <toolset>msvc,<link>shared:<define>FT_DLLEXPORT=__declspec(dllimport)
+        ;
+}