Changeset 228

Show
Ignore:
Timestamp:
11/03/07 22:54:06 (4 years ago)
Author:
DRK
Message:

* Updated the bindings to support cairo 1.2 and cairo 1.4. Support for these can be enabled with the cairo_1_2 and cairo_1_4 version identifiers.
* Added pdf, ps and svg support.
* Updated the build script appropriately.
* Note that cairooo is not likely to receive any further updates in its current form. It is being forked and rewritten for Tango's graphics package, although a port back to Phobos isn't out of the question.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cairo/README.html

    r119 r228  
    44<head> 
    55<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    6 <meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" /> 
     6<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> 
    77<title>cairo bindings for D</title> 
    8 <link rel="stylesheet" href="default.css" type="text/css" /> 
     8<style type="text/css"> 
     9 
     10/* 
     11:Author: David Goodger 
     12:Contact: goodger@python.org 
     13:Date: $Date: 2006-05-21 22:44:42 +0200 (Sun, 21 May 2006) $ 
     14:Revision: $Revision: 4564 $ 
     15:Copyright: This stylesheet has been placed in the public domain. 
     16 
     17Default cascading style sheet for the HTML output of Docutils. 
     18 
     19See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to 
     20customize this style sheet. 
     21*/ 
     22 
     23/* used to remove borders from tables and images */ 
     24.borderless, table.borderless td, table.borderless th { 
     25  border: 0 } 
     26 
     27table.borderless td, table.borderless th { 
     28  /* Override padding for "table.docutils td" with "! important". 
     29     The right padding separates the table cells. */ 
     30  padding: 0 0.5em 0 0 ! important } 
     31 
     32.first { 
     33  /* Override more specific margin styles with "! important". */ 
     34  margin-top: 0 ! important } 
     35 
     36.last, .with-subtitle { 
     37  margin-bottom: 0 ! important } 
     38 
     39.hidden { 
     40  display: none } 
     41 
     42a.toc-backref { 
     43  text-decoration: none ; 
     44  color: black } 
     45 
     46blockquote.epigraph { 
     47  margin: 2em 5em ; } 
     48 
     49dl.docutils dd { 
     50  margin-bottom: 0.5em } 
     51 
     52/* Uncomment (and remove this text!) to get bold-faced definition list terms 
     53dl.docutils dt { 
     54  font-weight: bold } 
     55*/ 
     56 
     57div.abstract { 
     58  margin: 2em 5em } 
     59 
     60div.abstract p.topic-title { 
     61  font-weight: bold ; 
     62  text-align: center } 
     63 
     64div.admonition, div.attention, div.caution, div.danger, div.error, 
     65div.hint, div.important, div.note, div.tip, div.warning { 
     66  margin: 2em ; 
     67  border: medium outset ; 
     68  padding: 1em } 
     69 
     70div.admonition p.admonition-title, div.hint p.admonition-title, 
     71div.important p.admonition-title, div.note p.admonition-title, 
     72div.tip p.admonition-title { 
     73  font-weight: bold ; 
     74  font-family: sans-serif } 
     75 
     76div.attention p.admonition-title, div.caution p.admonition-title, 
     77div.danger p.admonition-title, div.error p.admonition-title, 
     78div.warning p.admonition-title { 
     79  color: red ; 
     80  font-weight: bold ; 
     81  font-family: sans-serif } 
     82 
     83/* Uncomment (and remove this text!) to get reduced vertical space in 
     84   compound paragraphs. 
     85div.compound .compound-first, div.compound .compound-middle { 
     86  margin-bottom: 0.5em } 
     87 
     88div.compound .compound-last, div.compound .compound-middle { 
     89  margin-top: 0.5em } 
     90*/ 
     91 
     92div.dedication { 
     93  margin: 2em 5em ; 
     94  text-align: center ; 
     95  font-style: italic } 
     96 
     97div.dedication p.topic-title { 
     98  font-weight: bold ; 
     99  font-style: normal } 
     100 
     101div.figure { 
     102  margin-left: 2em ; 
     103  margin-right: 2em } 
     104 
     105div.footer, div.header { 
     106  clear: both; 
     107  font-size: smaller } 
     108 
     109div.line-block { 
     110  display: block ; 
     111  margin-top: 1em ; 
     112  margin-bottom: 1em } 
     113 
     114div.line-block div.line-block { 
     115  margin-top: 0 ; 
     116  margin-bottom: 0 ; 
     117  margin-left: 1.5em } 
     118 
     119div.sidebar { 
     120  margin-left: 1em ; 
     121  border: medium outset ; 
     122  padding: 1em ; 
     123  background-color: #ffffee ; 
     124  width: 40% ; 
     125  float: right ; 
     126  clear: right } 
     127 
     128div.sidebar p.rubric { 
     129  font-family: sans-serif ; 
     130  font-size: medium } 
     131 
     132div.system-messages { 
     133  margin: 5em } 
     134 
     135div.system-messages h1 { 
     136  color: red } 
     137 
     138div.system-message { 
     139  border: medium outset ; 
     140  padding: 1em } 
     141 
     142div.system-message p.system-message-title { 
     143  color: red ; 
     144  font-weight: bold } 
     145 
     146div.topic { 
     147  margin: 2em } 
     148 
     149h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, 
     150h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { 
     151  margin-top: 0.4em } 
     152 
     153h1.title { 
     154  text-align: center } 
     155 
     156h2.subtitle { 
     157  text-align: center } 
     158 
     159hr.docutils { 
     160  width: 75% } 
     161 
     162img.align-left { 
     163  clear: left } 
     164 
     165img.align-right { 
     166  clear: right } 
     167 
     168ol.simple, ul.simple { 
     169  margin-bottom: 1em } 
     170 
     171ol.arabic { 
     172  list-style: decimal } 
     173 
     174ol.loweralpha { 
     175  list-style: lower-alpha } 
     176 
     177ol.upperalpha { 
     178  list-style: upper-alpha } 
     179 
     180ol.lowerroman { 
     181  list-style: lower-roman } 
     182 
     183ol.upperroman { 
     184  list-style: upper-roman } 
     185 
     186p.attribution { 
     187  text-align: right ; 
     188  margin-left: 50% } 
     189 
     190p.caption { 
     191  font-style: italic } 
     192 
     193p.credits { 
     194  font-style: italic ; 
     195  font-size: smaller } 
     196 
     197p.label { 
     198  white-space: nowrap } 
     199 
     200p.rubric { 
     201  font-weight: bold ; 
     202  font-size: larger ; 
     203  color: maroon ; 
     204  text-align: center } 
     205 
     206p.sidebar-title { 
     207  font-family: sans-serif ; 
     208  font-weight: bold ; 
     209  font-size: larger } 
     210 
     211p.sidebar-subtitle { 
     212  font-family: sans-serif ; 
     213  font-weight: bold } 
     214 
     215p.topic-title { 
     216  font-weight: bold } 
     217 
     218pre.address { 
     219  margin-bottom: 0 ; 
     220  margin-top: 0 ; 
     221  font-family: serif ; 
     222  font-size: 100% } 
     223 
     224pre.literal-block, pre.doctest-block { 
     225  margin-left: 2em ; 
     226  margin-right: 2em } 
     227 
     228span.classifier { 
     229  font-family: sans-serif ; 
     230  font-style: oblique } 
     231 
     232span.classifier-delimiter { 
     233  font-family: sans-serif ; 
     234  font-weight: bold } 
     235 
     236span.interpreted { 
     237  font-family: sans-serif } 
     238 
     239span.option { 
     240  white-space: nowrap } 
     241 
     242span.pre { 
     243  white-space: pre } 
     244 
     245span.problematic { 
     246  color: red } 
     247 
     248span.section-subtitle { 
     249  /* font-size relative to parent (h1..h6 element) */ 
     250  font-size: 80% } 
     251 
     252table.citation { 
     253  border-left: solid 1px gray; 
     254  margin-left: 1px } 
     255 
     256table.docinfo { 
     257  margin: 2em 4em } 
     258 
     259table.docutils { 
     260  margin-top: 0.5em ; 
     261  margin-bottom: 0.5em } 
     262 
     263table.footnote { 
     264  border-left: solid 1px black; 
     265  margin-left: 1px } 
     266 
     267table.docutils td, table.docutils th, 
     268table.docinfo td, table.docinfo th { 
     269  padding-left: 0.5em ; 
     270  padding-right: 0.5em ; 
     271  vertical-align: top } 
     272 
     273table.docutils th.field-name, table.docinfo th.docinfo-name { 
     274  font-weight: bold ; 
     275  text-align: left ; 
     276  white-space: nowrap ; 
     277  padding-left: 0 } 
     278 
     279h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, 
     280h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { 
     281  font-size: 100% } 
     282 
     283ul.auto-toc { 
     284  list-style-type: none } 
     285 
     286</style> 
    9287</head> 
    10288<body> 
    11289<div class="document" id="cairo-bindings-for-d"> 
    12290<h1 class="title">cairo bindings for D</h1> 
     291 
    13292<!-- This document is written in reStructuredText. --> 
    14293<!-- Build command: 
    15294rst2html.py - -date - -time README.rst README.html --> 
    16 <div class="contents topic" id="contents"
    17 <p class="topic-title first"><a name="contents">Contents</a></p> 
     295<div class="contents topic"
     296<p class="topic-title first"><a id="contents" name="contents">Contents</a></p> 
    18297<ul class="simple"> 
    19298<li><a class="reference" href="#introduction" id="id3" name="id3">Introduction</a></li> 
     
    38317</ul> 
    39318</div> 
    40 <div class="section" id="introduction"
    41 <h1><a class="toc-backref" href="#id3" name="introduction">Introduction</a></h1> 
     319<div class="section"
     320<h1><a class="toc-backref" href="#id3" id="introduction" name="introduction">Introduction</a></h1> 
    42321<p>This project's aim is to provide a complete, up-to-date D binding for the 
    43322<a class="reference" href="http://cairographics.org/">cairo</a> 2D drawing API.  Currently, the binding supports the base cairo 
     
    49328provide a library of additional, high-level functionality with this layer.</p> 
    50329</div> 
    51 <div class="section" id="installation"
    52 <h1><a class="toc-backref" href="#id4" name="installation">Installation</a></h1> 
    53 <div class="section" id="cairo-binding"
    54 <h2><a class="toc-backref" href="#id5" name="cairo-binding">cairo binding</a></h2> 
     330<div class="section"
     331<h1><a class="toc-backref" href="#id4" id="installation" name="installation">Installation</a></h1> 
     332<div class="section"
     333<h2><a class="toc-backref" href="#id5" id="cairo-binding" name="cairo-binding">cairo binding</a></h2> 
    55334<p>To install, simply copy the <tt class="docutils literal"><span class="pre">cairo</span></tt> directory to a place in your D 
    56335compiler's import path.  That's all there is to it.</p> 
     
    71350libraries with debug symbols <a class="footnote-reference" href="#debuglibs" id="id1" name="id1">[1]</a>.</p> 
    72351<p>Use the <tt class="docutils literal"><span class="pre">--help</span></tt> switch for full usage information.</p> 
    73 </div> 
    74 <div class="section" id="cairooo-binding"> 
    75 <h2><a class="toc-backref" href="#id6" name="cairooo-binding">cairooo binding</a></h2> 
     352<p>Also, please note that if you are building static libraries that these 
     353libraries only compile for one particular version of cairo at a time.  To 
     354select which version of the cairo API you want to compile for, you need to use 
     355the following additional arguments to the build script:</p> 
     356<ul class="simple"> 
     357<li>cairo 1.0: no arguments needed.</li> 
     358<li>cairo 1.2: <tt class="docutils literal"><span class="pre">+--version=cairo_1_2</span></tt></li> 
     359<li>cairo 1.4: <tt class="docutils literal"><span class="pre">+--version=cairo_1_4</span></tt></li> 
     360</ul> 
     361<p>You will also need to specify the same version identifier when you compile 
     362your programs.</p> 
     363</div> 
     364<div class="section"> 
     365<h2><a class="toc-backref" href="#id6" id="cairooo-binding" name="cairooo-binding">cairooo binding</a></h2> 
    76366<p>To install the cairooo binding, simply copy both the <tt class="docutils literal"><span class="pre">cairo</span></tt> and <tt class="docutils literal"><span class="pre">cairooo</span></tt> 
    77367directories to a place on your D compiler's import path.</p> 
     
    79369<tt class="docutils literal"><span class="pre">cairooo-build.d</span></tt> script, which will build them to the <tt class="docutils literal"><span class="pre">lib</span></tt> directory. 
    80370Usage is mostly the same as using <tt class="docutils literal"><span class="pre">cairo-build.d</span></tt> (see above).</p> 
    81 </div> 
    82 <div class="section" id="cairo-snippets"> 
    83 <h2><a class="toc-backref" href="#id7" name="cairo-snippets">cairo snippets</a></h2> 
     371<p>Note that cairooo currently does not support cairo 1.2 or 1.4.</p> 
     372</div> 
     373<div class="section"> 
     374<h2><a class="toc-backref" href="#id7" id="cairo-snippets" name="cairo-snippets">cairo snippets</a></h2> 
    84375<p>The <tt class="docutils literal"><span class="pre">cairo_snippets</span></tt> and <tt class="docutils literal"><span class="pre">cairooo_snippets</span></tt> directories contain the 
    85376&quot;snippets&quot; example programs provided by the cairo developers ported to D. 
     
    94385<p>Just be sure to create the <tt class="docutils literal"><span class="pre">output</span></tt> directory if it does not exist first.</p> 
    95386</div> 
    96 <div class="section" id="cairooo-tutorial"
    97 <h2><a class="toc-backref" href="#id8" name="cairooo-tutorial">cairooo tutorial</a></h2> 
     387<div class="section"
     388<h2><a class="toc-backref" href="#id8" id="cairooo-tutorial" name="cairooo-tutorial">cairooo tutorial</a></h2> 
    98389<p>The <tt class="docutils literal"><span class="pre">cairooo_tutorial</span></tt> contains the beginnings of a very simple introductory 
    99390tutorial to programming image programs in D using the cairooo binding.  It is 
    100391pathetically incomplete; however, it may be a useful starting point.</p> 
    101392</div> 
    102 <div class="section" id="demos"
    103 <h2><a class="toc-backref" href="#id9" name="demos">demos</a></h2> 
     393<div class="section"
     394<h2><a class="toc-backref" href="#id9" id="demos" name="demos">demos</a></h2> 
    104395<p>The <tt class="docutils literal"><span class="pre">demos</span></tt> directory will contain a few small demo programs to showcase the 
    105396binding.  Currently, it only has one demo, so the plural is prehaps 
    106397misleading.  Hopefully this will change :)</p> 
    107398</div> 
    108 <div class="section" id="documentation"
    109 <h2><a class="toc-backref" href="#id10" name="documentation">documentation</a></h2> 
     399<div class="section"
     400<h2><a class="toc-backref" href="#id10" id="documentation" name="documentation">documentation</a></h2> 
    110401<p>Whilst this project hopes to eventually have full DDoc documentation for the 
    111402cairooo binding, we will not be providing anything other than minimal 
     
    130421</pre> 
    131422</div> 
    132 <div class="section" id="cairo-for-windows"
    133 <h2><a class="toc-backref" href="#id11" name="cairo-for-windows">cairo for Windows</a></h2> 
     423<div class="section"
     424<h2><a class="toc-backref" href="#id11" id="cairo-for-windows" name="cairo-for-windows">cairo for Windows</a></h2> 
    134425<p>If you are using Windows, you will also probably want to grab the cairo 
    135426library itself.  The best version I have found is on <a class="reference" href="http://www.iki.fi/tml/index.html">Tor Lillqvist</a>'s 
     
    147438</div> 
    148439</div> 
    149 <div class="section" id="usage"
    150 <h1><a class="toc-backref" href="#id12" name="usage">Usage</a></h1> 
    151 <div class="section" id="cairo"
    152 <h2><a class="toc-backref" href="#id13" name="cairo">cairo</a></h2> 
     440<div class="section"
     441<h1><a class="toc-backref" href="#id12" id="usage" name="usage">Usage</a></h1> 
     442<div class="section"
     443<h2><a class="toc-backref" href="#id13" id="cairo" name="cairo">cairo</a></h2> 
    153444<p>To use the binding, simply import <tt class="docutils literal"><span class="pre">cairo.cairo</span></tt>, along with any other 
    154445parts of the library you need.  For example, if you wanted the base cairo 
     
    167458<p>If some part of the library fails to load, these functions will thrown an 
    168459exception which can be caught and dealt with.</p> 
     460<p>To select a particular version of the cairo library, make sure you compile 
     461with an appropriate version flag:</p> 
     462<ul class="simple"> 
     463<li>cairo 1.0: no version flag necessary.</li> 
     464<li>cairo 1.2: --version=cairo_1_2.</li> 
     465<li>cairo 1.4: --version=cairo_1_4.</li> 
     466</ul> 
    169467<p>From there, just start using the cairo API as you would from C.  The cairo 
    170468website contains a collection of <a class="reference" href="http://cairographics.org/samples/">example snippets</a> in C, and this binding 
     
    172470look in the <tt class="docutils literal"><span class="pre">cairo_snippets</span></tt> directory.</p> 
    173471</div> 
    174 <div class="section" id="cairooo"
    175 <h2><a class="toc-backref" href="#id14" name="cairooo">cairooo</a></h2> 
     472<div class="section"
     473<h2><a class="toc-backref" href="#id14" id="cairooo" name="cairooo">cairooo</a></h2> 
    176474<p>To use the cairooo binding instead, import <tt class="docutils literal"><span class="pre">cairooo.all</span></tt>, along with any 
    177475other parts of the library that you need.  To copy the above example, to 
     
    219517</div> 
    220518</div> 
    221 <div class="section" id="contributing"
    222 <h1><a class="toc-backref" href="#id15" name="contributing">Contributing</a></h1> 
     519<div class="section"
     520<h1><a class="toc-backref" href="#id15" id="contributing" name="contributing">Contributing</a></h1> 
    223521<p>The cairo api has a functionality in it that this binding does not 
    224522yet cover: PDF abd PS for example.  However, the only binary version of cairo 
     
    231529In addition to being fun, you get to make pretty pictures in the process!</p> 
    232530</div> 
    233 <div class="section" id="thanks"
    234 <h1><a class="toc-backref" href="#id16" name="thanks">Thanks</a></h1> 
     531<div class="section"
     532<h1><a class="toc-backref" href="#id16" id="thanks" name="thanks">Thanks</a></h1> 
    235533<ul class="simple"> 
    236534<li>Many thanks for the hard work by the people behind the cairo library.</li> 
     
    239537</ul> 
    240538</div> 
    241 <div class="section" id="credits"
    242 <h1><a class="toc-backref" href="#id17" name="credits">Credits</a></h1> 
     539<div class="section"
     540<h1><a class="toc-backref" href="#id17" id="credits" name="credits">Credits</a></h1> 
    243541<p>cairo bindings for D Copyright © 2006 Daniel Keep.  Portions Copyright © 
    2445422006 Michael Parker.</p> 
     
    258556<div class="footer"> 
    259557<hr class="footer" /> 
    260 Generated on: 2006-05-19 02:45 UTC. 
     558Generated on: 2007-11-04 02:51 UTC. 
    261559 
    262560</div> 
  • trunk/cairo/README.rst

    r119 r228  
    5050Use the ``--help`` switch for full usage information. 
    5151 
     52Also, please note that if you are building static libraries that these 
     53libraries only compile for one particular version of cairo at a time.  To 
     54select which version of the cairo API you want to compile for, you need to use 
     55the following additional arguments to the build script: 
     56 
     57* cairo 1.0: no arguments needed. 
     58* cairo 1.2: ``+--version=cairo_1_2`` 
     59* cairo 1.4: ``+--version=cairo_1_4`` 
     60 
     61You will also need to specify the same version identifier when you compile 
     62your programs. 
     63 
    5264cairooo binding 
    5365--------------- 
     
    5971``cairooo-build.d`` script, which will build them to the ``lib`` directory. 
    6072Usage is mostly the same as using ``cairo-build.d`` (see above). 
     73 
     74Note that cairooo currently does not support cairo 1.2 or 1.4. 
    6175 
    6276cairo snippets 
     
    159173exception which can be caught and dealt with. 
    160174 
     175To select a particular version of the cairo library, make sure you compile 
     176with an appropriate version flag: 
     177 
     178* cairo 1.0: no version flag necessary. 
     179* cairo 1.2: --version=cairo_1_2. 
     180* cairo 1.4: --version=cairo_1_4. 
     181 
    161182From there, just start using the cairo API as you would from C.  The cairo 
    162183website contains a collection of `example snippets`_ in C, and this binding 
  • trunk/cairo/cairo-build.d

    r119 r228  
    6161    TARGET_GLITZ = {name:"glitz", type:"lib", target:"lib/cairo_glitz", 
    6262        sources:["cairo/glitz/cairo_glitz.d"]}, 
     63    TARGET_PDF = {name:"pdf", type:"lib", target:"lib/cairo_pdf", 
     64        sources:["cairo/pdf/cairo_pdf.d"]}, 
    6365    TARGET_PNG = {name:"png", type:"lib", target:"lib/cairo_png", 
    6466        sources:["cairo/png/cairo_png.d"]}, 
     67    TARGET_PS = {name:"ps", type:"lib", target:"lib/cairo_ps", 
     68        sources:["cairo/ps/cairo_ps.d"]}, 
     69    TARGET_SVG = {name:"svg", type:"lib", target:"lib/cairo_svg", 
     70        sources:["cairo/svg/cairo_svg.d"]}, 
    6571    TARGET_WIN32 = {name:"win32", type:"lib", target:"lib/cairo_win32", 
    6672        flags:["-Xwin32"], sources:["cairo/win32/cairo_win32.d"]}, 
     73    TARGET_WIN32_DFL = {name:"win32-dfl", type:"lib", 
     74        target:"lib/cairo_win32_dfl", 
     75        flags:["-Xwin32","-Xdfl","-version=cairo_dfl"], 
     76        sources:["cairo/win32/cairo_win32.d"]}, 
    6777    TARGET_XLIB = {name:"xlib", type:"lib", target:"lib/cairo_xlib", 
    6878        sources:["cairo/xlib/cairo_xlib.d"]}; 
     
    7181    const Target 
    7282        TARGET_ALL = {name:"all", type:"dummy", 
    73             deps:[&TARGET_CAIRO, &TARGET_GLITZ, &TARGET_PNG, &TARGET_WIN32]}; 
     83            deps:[&TARGET_CAIRO, &TARGET_GLITZ, &TARGET_PDF, 
     84                  &TARGET_PNG, &TARGET_PS, &TARGET_SVG, 
     85                  &TARGET_WIN32]}; 
    7486version(linux) 
    7587    const Target 
    7688        TARGET_ALL = {name:"all", type:"dummy", 
    77             deps:[&TARGET_CAIRO, &TARGET_GLITZ, &TARGET_PNG, &TARGET_XLIB]}; 
     89            deps:[&TARGET_CAIRO, &TARGET_GLITZ, &TARGET_PDF, 
     90                  &TARGET_PNG, &TARGET_PS, &TARGET_SVG, 
     91                  &TARGET_XLIB]}; 
    7892 
    7993const Target[] TARGETS = 
    8094    [TARGET_ALL, TARGET_PNG, TARGET_CAIRO, TARGET_GLITZ, TARGET_WIN32, 
    81      TARGET_XLIB]; 
     95     TARGET_WIN32_DFL, TARGET_XLIB, TARGET_PDF, TARGET_PS, TARGET_SVG]; 
    8296const DEFAULT_TARGET = &TARGET_ALL; 
    8397const DEBUG_TARGET_SUFFIX = "_debug"; 
    8498 
    8599const char[][] FLAGS = ["-allobj","-cleanup"]; 
    86 const char[][] FLAGS_DEBUG = ["-debug","-unittest","-g"]; 
     100const char[][] FLAGS_DEBUG = ["-debug","-unittest","-version=Unittest","-g"]; 
    87101const char[][] FLAGS_RELEASE = ["-release","-inline","-O"]; 
    88102 
     
    148162    --very-verbose  Verbose script AND toolchain commands. 
    149163    --help          This message. 
     164    +arg            "arg" is passed on to the compiler verbatim. 
    150165 
    151166Supported targets: 
     
    184199    bool veryVerbose = false; 
    185200    char[][] targetNames; 
     201    char[][] extraFlags; 
    186202     
    187203    // Check for flags 
     
    201217            return 0; 
    202218        } 
     219        else if( arg[0] == '+' ) 
     220        { 
     221            extraFlags.pushBack(arg[1..$]); 
     222        } 
    203223        else if( arg[0..2] == "--" ) 
    204224        { 
     
    269289 
    270290        // Do the build 
    271         build(flags ~ target.flags ~ target.sources); 
     291        build(flags ~ target.flags ~ extraFlags ~ target.sources); 
    272292    } 
    273293 
  • trunk/cairo/cairo/cairo.d

    r179 r228  
    5454     
    5555    libCairo = loadSharedLib(libName); 
     56 
     57    /* Try to find out what version of cairo we've got.  If it's too old, 
     58     * throw an exception explaining this. 
     59     */ 
     60    auto versionnum = (cast(pf_cairo_version) 
     61            getProc(libCairo,"cairo_version"))(); 
     62 
     63    version( cairo_1_4 ) 
     64        auto expected_version = CAIRO_VERSION_ENCODE(1,4,0); 
     65 
     66    else version( cairo_1_2 ) 
     67        auto expected_version = CAIRO_VERSION_ENCODE(1,2,0); 
     68     
     69    else 
     70        auto expected_version = CAIRO_VERSION_ENCODE(1,0,0); 
     71     
     72    if( versionnum < expected_version ) 
     73        throw new CairoVersionException(versionnum, expected_version); 
     74 
     75    // Now we can actually load the functions. 
    5676    cairo_loadprocs(libCairo); 
    5777} 
     
    90110} 
    91111 
     112version( Tango ) 
     113{ 
     114    import tango.text.convert.Integer : toUtf8; 
     115    alias toUtf8 intToString; 
     116} 
     117else 
     118{ 
     119    import std.string : toString; 
     120    alias toString intToString; 
     121} 
     122 
     123private char[] verToString(int ver) 
     124{ 
     125    return intToString(ver/100_00) 
     126        ~ "." ~ intToString((ver/100)%100) 
     127        ~ "." ~ intToString(ver%100); 
     128} 
     129 
     130private class CairoVersionException : Exception 
     131{ 
     132    this(int got, int expected) 
     133    { 
     134        this("expected cairo version "~verToString(expected) 
     135                ~", got version "~verToString(got)~"."); 
     136    } 
     137 
     138    this(char[] msg) 
     139    { 
     140        super(msg); 
     141    } 
     142} 
     143 
    92144static ~this() 
    93145{ 
  • trunk/cairo/cairo/cairofuncs.d

    r119 r228  
    11/** 
    2  * This module contains all the "standard" cairo function calls, 
    3  * as well as functions relating to PNG functionality. 
     2 * This module contains all the "standard" cairo function calls. 
    43 * 
    54 * This file is automatically generated; do not directly modify. 
     
    4241module cairo.cairofuncs; 
    4342 
     43version( cairo_1_4 ) { version = cairo_1_2; } 
     44 
    4445private 
    4546{ 
    4647    import cairo.cairotypes; 
    4748    import cairo.loader; 
     49} 
     50 
     51/** 
     52 * This function encodes the given cairo version into an integer. The numbers 
     53 * returned by cairo_version() are encoded using this function. Two encoded 
     54 * version numbers can be compared as integers. The encoding ensures that 
     55 * later versions compare greater than earlier versions. 
     56 */ 
     57int CAIRO_VERSION_ENCODE(int major, int minor, int micro) 
     58{ 
     59    return major*10_000 + minor*100 + micro; 
    4860} 
    4961 
     
    213225    cairo_scale = cast(pf_cairo_scale)getProc(lib, "cairo_scale"); 
    214226    cairo_matrix_init_translate = cast(pf_cairo_matrix_init_translate)getProc(lib, "cairo_matrix_init_translate"); 
     227    version( cairo_1_2 ) 
     228    { 
     229        cairo_scaled_font_get_ctm = cast(pf_cairo_scaled_font_get_ctm)getProc(lib, "cairo_scaled_font_get_ctm"); 
     230        cairo_image_surface_get_format = cast(pf_cairo_image_surface_get_format)getProc(lib, "cairo_image_surface_get_format"); 
     231        cairo_surface_get_content = cast(pf_cairo_surface_get_content)getProc(lib, "cairo_surface_get_content"); 
     232        cairo_set_scaled_font = cast(pf_cairo_set_scaled_font)getProc(lib, "cairo_set_scaled_font"); 
     233        cairo_surface_get_device_offset = cast(pf_cairo_surface_get_device_offset)getProc(lib, "cairo_surface_get_device_offset"); 
     234        cairo_scaled_font_get_font_options = cast(pf_cairo_scaled_font_get_font_options)getProc(lib, "cairo_scaled_font_get_font_options"); 
     235        cairo_pop_group_to_source = cast(pf_cairo_pop_group_to_source)getProc(lib, "cairo_pop_group_to_source"); 
     236        cairo_scaled_font_text_extents = cast(pf_cairo_scaled_font_text_extents)getProc(lib, "cairo_scaled_font_text_extents"); 
     237        cairo_push_group_with_content = cast(pf_cairo_push_group_with_content)getProc(lib, "cairo_push_group_with_content"); 
     238        cairo_pattern_get_type = cast(pf_cairo_pattern_get_type)getProc(lib, "cairo_pattern_get_type"); 
     239        cairo_image_surface_get_data = cast(pf_cairo_image_surface_get_data)getProc(lib, "cairo_image_surface_get_data"); 
     240        cairo_get_group_target = cast(pf_cairo_get_group_target)getProc(lib, "cairo_get_group_target"); 
     241        cairo_surface_set_fallback_resolution = cast(pf_cairo_surface_set_fallback_resolution)getProc(lib, "cairo_surface_set_fallback_resolution"); 
     242        cairo_scaled_font_get_font_matrix = cast(pf_cairo_scaled_font_get_font_matrix)getProc(lib, "cairo_scaled_font_get_font_matrix"); 
     243        cairo_scaled_font_get_font_face = cast(pf_cairo_scaled_font_get_font_face)getProc(lib, "cairo_scaled_font_get_font_face"); 
     244        cairo_scaled_font_get_type = cast(pf_cairo_scaled_font_get_type)getProc(lib, "cairo_scaled_font_get_type"); 
     245        cairo_pop_group = cast(pf_cairo_pop_group)getProc(lib, "cairo_pop_group"); 
     246        cairo_font_face_get_type = cast(pf_cairo_font_face_get_type)getProc(lib, "cairo_font_face_get_type"); 
     247        cairo_surface_get_type = cast(pf_cairo_surface_get_type)getProc(lib, "cairo_surface_get_type"); 
     248        cairo_push_group = cast(pf_cairo_push_group)getProc(lib, "cairo_push_group"); 
     249        cairo_new_sub_path = cast(pf_cairo_new_sub_path)getProc(lib, "cairo_new_sub_path"); 
     250        cairo_image_surface_get_stride = cast(pf_cairo_image_surface_get_stride)getProc(lib, "cairo_image_surface_get_stride"); 
     251    } 
     252    version( cairo_1_4 ) 
     253    { 
     254        cairo_get_user_data = cast(pf_cairo_get_user_data)getProc(lib, "cairo_get_user_data"); 
     255        cairo_scaled_font_get_user_data = cast(pf_cairo_scaled_font_get_user_data)getProc(lib, "cairo_scaled_font_get_user_data"); 
     256        cairo_pattern_get_rgba = cast(pf_cairo_pattern_get_rgba)getProc(lib, "cairo_pattern_get_rgba"); 
     257        cairo_font_face_get_reference_count = cast(pf_cairo_font_face_get_reference_count)getProc(lib, "cairo_font_face_get_reference_count"); 
     258        cairo_scaled_font_set_user_data = cast(pf_cairo_scaled_font_set_user_data)getProc(lib, "cairo_scaled_font_set_user_data"); 
     259        cairo_pattern_get_radial_circles = cast(pf_cairo_pattern_get_radial_circles)getProc(lib, "cairo_pattern_get_radial_circles"); 
     260        cairo_clip_extents = cast(pf_cairo_clip_extents)getProc(lib, "cairo_clip_extents"); 
     261        cairo_pattern_get_color_stop_rgba = cast(pf_cairo_pattern_get_color_stop_rgba)getProc(lib, "cairo_pattern_get_color_stop_rgba"); 
     262        cairo_get_dash_count = cast(pf_cairo_get_dash_count)getProc(lib, "cairo_get_dash_count"); 
     263        cairo_get_reference_count = cast(pf_cairo_get_reference_count)getProc(lib, "cairo_get_reference_count"); 
     264        cairo_rectangle_list_destroy = cast(pf_cairo_rectangle_list_destroy)getProc(lib, "cairo_rectangle_list_destroy"); 
     265        cairo_pattern_get_reference_count = cast(pf_cairo_pattern_get_reference_count)getProc(lib, "cairo_pattern_get_reference_count"); 
     266        cairo_pattern_get_surface = cast(pf_cairo_pattern_get_surface)getProc(lib, "cairo_pattern_get_surface"); 
     267        cairo_pattern_set_user_data = cast(pf_cairo_pattern_set_user_data)getProc(lib, "cairo_pattern_set_user_data"); 
     268        cairo_get_dash = cast(pf_cairo_get_dash)getProc(lib, "cairo_get_dash"); 
     269        cairo_set_user_data = cast(pf_cairo_set_user_data)getProc(lib, "cairo_set_user_data"); 
     270        cairo_scaled_font_get_reference_count = cast(pf_cairo_scaled_font_get_reference_count)getProc(lib, "cairo_scaled_font_get_reference_count"); 
     271        cairo_get_scaled_font = cast(pf_cairo_get_scaled_font)getProc(lib, "cairo_get_scaled_font"); 
     272        cairo_copy_clip_rectangle_list = cast(pf_cairo_copy_clip_rectangle_list)getProc(lib, "cairo_copy_clip_rectangle_list"); 
     273        cairo_pattern_get_color_stop_count = cast(pf_cairo_pattern_get_color_stop_count)getProc(lib, "cairo_pattern_get_color_stop_count"); 
     274        cairo_surface_get_reference_count = cast(pf_cairo_surface_get_reference_count)getProc(lib, "cairo_surface_get_reference_count"); 
     275        cairo_pattern_get_user_data = cast(pf_cairo_pattern_get_user_data)getProc(lib, "cairo_pattern_get_user_data"); 
     276        cairo_pattern_get_linear_points = cast(pf_cairo_pattern_get_linear_points)getProc(lib, "cairo_pattern_get_linear_points"); 
     277    } 
    215278} 
    216279 
     
    380443typedef void function(cairo_t* cr, double sx, double sy) pf_cairo_scale; 
    381444typedef void function(cairo_matrix_t* matrix, double tx, double ty) pf_cairo_matrix_init_translate; 
     445version( cairo_1_2 ) 
     446{ 
     447    typedef void function(cairo_scaled_font_t* scaled_font, cairo_matrix_t* ctm) pf_cairo_scaled_font_get_ctm; 
     448    typedef cairo_format_t function(cairo_surface_t* surface) pf_cairo_image_surface_get_format; 
     449    typedef cairo_content_t function(cairo_surface_t* surface) pf_cairo_surface_get_content; 
     450    typedef void function(cairo_t* cr, cairo_scaled_font_t* scaled_font) pf_cairo_set_scaled_font; 
     451    typedef void function(cairo_surface_t* surface, double* x_offset, double* y_offset) pf_cairo_surface_get_device_offset; 
     452    typedef void function(cairo_scaled_font_t* scaled_font, cairo_font_options_t* options) pf_cairo_scaled_font_get_font_options; 
     453    typedef void function(cairo_t* cr) pf_cairo_pop_group_to_source; 
     454    typedef void function(cairo_scaled_font_t* scaled_font, char* utf8, cairo_text_extents_t* extents) pf_cairo_scaled_font_text_extents; 
     455    typedef void function(cairo_t* cr, cairo_content_t content) pf_cairo_push_group_with_content; 
     456    typedef cairo_pattern_type_t function(cairo_pattern_t* pattern) pf_cairo_pattern_get_type; 
     457    typedef ubyte* function(cairo_surface_t* surface) pf_cairo_image_surface_get_data; 
     458    typedef cairo_surface_t* function(cairo_t* cr) pf_cairo_get_group_target; 
     459    typedef void function(cairo_surface_t* surface, double x_pixels_per_inch, double y_pixels_per_inch) pf_cairo_surface_set_fallback_resolution; 
     460    typedef void function(cairo_scaled_font_t* scaled_font, cairo_matrix_t* font_matrix) pf_cairo_scaled_font_get_font_matrix; 
     461    typedef cairo_font_face_t* function(cairo_scaled_font_t* scaled_font) pf_cairo_scaled_font_get_font_face; 
     462    typedef cairo_font_type_t function(cairo_scaled_font_t* scaled_font) pf_cairo_scaled_font_get_type; 
     463    typedef cairo_pattern_t* function(cairo_t* cr) pf_cairo_pop_group; 
     464    typedef cairo_font_type_t function(cairo_font_face_t* font_face) pf_cairo_font_face_get_type; 
     465    typedef cairo_surface_t function(cairo_surface_t* surface) pf_cairo_surface_get_type; 
     466    typedef void function(cairo_t* cr) pf_cairo_push_group; 
     467    typedef void function(cairo_t* cr) pf_cairo_new_sub_path; 
     468    typedef int function(cairo_surface_t* surface) pf_cairo_image_surface_get_stride; 
     469} 
     470version( cairo_1_4 ) 
     471{ 
     472    typedef void* function(cairo_t* cr, cairo_user_data_key_t* key) pf_cairo_get_user_data; 
     473    typedef void* function(cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key) pf_cairo_scaled_font_get_user_data; 
     474    typedef cairo_status_t function(cairo_pattern_t* pattern, double* red, double* green, double* blue, double* alpha) pf_cairo_pattern_get_rgba; 
     475    typedef uint function(cairo_font_face_t* font_face) pf_cairo_font_face_get_reference_count; 
     476    typedef cairo_status_t function(cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy) pf_cairo_scaled_font_set_user_data; 
     477    typedef cairo_status_t function(cairo_pattern_t* pattern, double* x0, double* y0, double* r0, double* x1, double* y1, double* r1) pf_cairo_pattern_get_radial_circles; 
     478    typedef void function(cairo_t* cr, double* x1, double* y1, double* x2, double* y2) pf_cairo_clip_extents; 
     479    typedef cairo_status_t function(cairo_pattern_t* pattern, int index, double* offset, double* red, double* green, double* blue, double* alpha) pf_cairo_pattern_get_color_stop_rgba; 
     480    typedef int function(cairo_t* cr) pf_cairo_get_dash_count; 
     481    typedef uint function(cairo_t* cr) pf_cairo_get_reference_count; 
     482    typedef void function(cairo_rectangle_list_t* rectangle_list) pf_cairo_rectangle_list_destroy; 
     483    typedef uint function(cairo_pattern_t* pattern) pf_cairo_pattern_get_reference_count; 
     484    typedef cairo_status_t function(cairo_pattern_t* pattern, cairo_surface_t** surface) pf_cairo_pattern_get_surface; 
     485    typedef cairo_status_t function(cairo_pattern_t* pattern, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy) pf_cairo_pattern_set_user_data; 
     486    typedef void function(cairo_t* cr, double* dashes, double* offset) pf_cairo_get_dash; 
     487    typedef cairo_status_t function(cairo_t* cr, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy) pf_cairo_set_user_data; 
     488    typedef uint function(cairo_scaled_font_t* scaled_font) pf_cairo_scaled_font_get_reference_count; 
     489    typedef cairo_scaled_font_t* function(cairo_t* cr) pf_cairo_get_scaled_font; 
     490    typedef cairo_rectangle_list_t* function(cairo_t* cr) pf_cairo_copy_clip_rectangle_list; 
     491    typedef cairo_status_t function(cairo_pattern_t* pattern, int* count) pf_cairo_pattern_get_color_stop_count; 
     492    typedef uint function(cairo_surface_t* surface) pf_cairo_surface_get_reference_count; 
     493    typedef void* function(cairo_pattern_t* pattern, cairo_user_data_key_t* key) pf_cairo_pattern_get_user_data; 
     494    typedef cairo_status_t function(cairo_pattern_t* pattern, double* x0, double* y0, double* x1, double* y1) pf_cairo_pattern_get_linear_points; 
     495} 
    382496 
    383497//pfName Name; 
     
    543657pf_cairo_scale cairo_scale; 
    544658pf_cairo_matrix_init_translate cairo_matrix_init_translate; 
     659version( cairo_1_2 ) 
     660{ 
     661    pf_cairo_scaled_font_get_ctm cairo_scaled_font_get_ctm; 
     662    pf_cairo_image_surface_get_format cairo_image_surface_get_format; 
     663    pf_cairo_surface_get_content cairo_surface_get_content; 
     664    pf_cairo_set_scaled_font cairo_set_scaled_font; 
     665    pf_cairo_surface_get_device_offset cairo_surface_get_device_offset; 
     666    pf_cairo_scaled_font_get_font_options cairo_scaled_font_get_font_options; 
     667    pf_cairo_pop_group_to_source cairo_pop_group_to_source; 
     668    pf_cairo_scaled_font_text_extents cairo_scaled_font_text_extents; 
     669    pf_cairo_push_group_with_content cairo_push_group_with_content; 
     670    pf_cairo_pattern_get_type cairo_pattern_get_type; 
     671    pf_cairo_image_surface_get_data cairo_image_surface_get_data; 
     672    pf_cairo_get_group_target cairo_get_group_target; 
     673    pf_cairo_surface_set_fallback_resolution cairo_surface_set_fallback_resolution; 
     674    pf_cairo_scaled_font_get_font_matrix cairo_scaled_font_get_font_matrix; 
     675    pf_cairo_scaled_font_get_font_face cairo_scaled_font_get_font_face; 
     676    pf_cairo_scaled_font_get_type cairo_scaled_font_get_type; 
     677    pf_cairo_pop_group cairo_pop_group; 
     678    pf_cairo_font_face_get_type cairo_font_face_get_type; 
     679    pf_cairo_surface_get_type cairo_surface_get_type; 
     680    pf_cairo_push_group cairo_push_group; 
     681    pf_cairo_new_sub_path cairo_new_sub_path; 
     682    pf_cairo_image_surface_get_stride cairo_image_surface_get_stride; 
     683} 
     684version( cairo_1_4 ) 
     685{ 
     686    pf_cairo_get_user_data cairo_get_user_data; 
     687    pf_cairo_scaled_font_get_user_data cairo_scaled_font_get_user_data; 
     688    pf_cairo_pattern_get_rgba cairo_pattern_get_rgba; 
     689    pf_cairo_font_face_get_reference_count cairo_font_face_get_reference_count; 
     690    pf_cairo_scaled_font_set_user_data cairo_scaled_font_set_user_data; 
     691    pf_cairo_pattern_get_radial_circles cairo_pattern_get_radial_circles; 
     692    pf_cairo_clip_extents cairo_clip_extents; 
     693    pf_cairo_pattern_get_color_stop_rgba cairo_pattern_get_color_stop_rgba; 
     694    pf_cairo_get_dash_count cairo_get_dash_count; 
     695    pf_cairo_get_reference_count cairo_get_reference_count; 
     696    pf_cairo_rectangle_list_destroy cairo_rectangle_list_destroy; 
     697    pf_cairo_pattern_get_reference_count cairo_pattern_get_reference_count; 
     698    pf_cairo_pattern_get_surface cairo_pattern_get_surface; 
     699    pf_cairo_pattern_set_user_data cairo_pattern_set_user_data; 
     700    pf_cairo_get_dash cairo_get_dash; 
     701    pf_cairo_set_user_data cairo_set_user_data; 
     702    pf_cairo_scaled_font_get_reference_count cairo_scaled_font_get_reference_count; 
     703    pf_cairo_get_scaled_font cairo_get_scaled_font; 
     704    pf_cairo_copy_clip_rectangle_list cairo_copy_clip_rectangle_list; 
     705    pf_cairo_pattern_get_color_stop_count cairo_pattern_get_color_stop_count; 
     706    pf_cairo_surface_get_reference_count cairo_surface_get_reference_count; 
     707    pf_cairo_pattern_get_user_data cairo_pattern_get_user_data; 
     708    pf_cairo_pattern_get_linear_points cairo_pattern_get_linear_points; 
     709} 
    545710 
  • trunk/cairo/cairo/cairotypes.d

    r119 r228  
    3939 */ 
    4040module cairo.cairotypes; 
     41 
     42version( cairo_1_4 ) { version = cairo_1_2; } 
    4143 
    4244extern(C): 
     
    271273} 
    272274 
     275version( cairo_1_2 ) 
     276{ 
     277    enum cairo_font_type_t 
     278    { 
     279        CAIRO_FONT_TYPE_TOY, 
     280        CAIRO_FONT_TYPE_FT, 
     281        CAIRO_FONT_TYPE_WIN32, 
     282        CAIRO_FONT_TYPE_ATSUI 
     283    } 
     284 
     285    enum cairo_pattern_type_t 
     286    { 
     287        CAIRO_PATTERN_TYPE_SOLID, 
     288        CAIRO_PATTERN_TYPE_SURFACE, 
     289        CAIRO_PATTERN_TYPE_LINEAR, 
     290        CAIRO_PATTERN_TYPE_RADIAL 
     291    } 
     292 
     293    enum cairo_surface_type_t 
     294    { 
     295        CAIRO_SURFACE_TYPE_IMAGE, 
     296        CAIRO_SURFACE_TYPE_PDF, 
     297        CAIRO_SURFACE_TYPE_PS, 
     298        CAIRO_SURFACE_TYPE_XLIB, 
     299        CAIRO_SURFACE_TYPE_XCB, 
     300        CAIRO_SURFACE_TYPE_GLITZ, 
     301        CAIRO_SURFACE_TYPE_QUARTZ, 
     302        CAIRO_SURFACE_TYPE_WIN32, 
     303        CAIRO_SURFACE_TYPE_BEOS, 
     304        CAIRO_SURFACE_TYPE_DIRECTFB, 
     305        CAIRO_SURFACE_TYPE_SVG, 
     306        CAIRO_SURFACE_TYPE_OS2 
     307    } 
     308} 
     309 
     310version( cairo_1_4 ) 
     311{ 
     312    struct cairo_rectangle_t 
     313    { 
     314        double x, y, width, height; 
     315    } 
     316 
     317    struct cairo_rectangle_list_t 
     318    { 
     319        cairo_status_t status; 
     320        cairo_rectangle_t* rectangles; 
     321        int num_rectangles; 
     322    } 
     323} 
     324 
  • trunk/cairo/cairo/loader.d

    r179 r228  
    44 * the Derelict project's loader.d file. 
    55 * 
    6  * Authors: Daniel Keep 
    7  * Copyright: 2005-2006, Derelict developers; 
    8  *            2006, Daniel Keep. 
     6 * Authors: Derelict developers, Daniel Keep 
     7 * Copyright: 2005-2006 Derelict developers, 2006 Daniel Keep. 
    98 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    109 */ 
    1110/* 
    12  * Copyright © 2006 Daniel Keep 
     11 * Copyright © 2006 Daniel Keep. 
    1312 * All rights reserved. 
    1413 * 
  • trunk/cairo/cairo/png/cairofuncs_png.d

    r119 r228  
    4242module cairo.png.cairofuncs_png; 
    4343 
     44version( cairo_1_4 ) { version = cairo_1_2; } 
     45 
    4446private 
    4547{ 
  • trunk/cairo/cairo/win32/cairotypes_win32.d

    r179 r228  
    4343 
    4444public import cairo.cairotypes; 
    45 public import win32.windows; 
    4645 
     46version( cairo_dfl ) 
     47{ 
     48    public import dfl.internal.winapi : HDC, LOGFONTW; 
     49} 
     50else 
     51{ 
     52    public import win32.windows : HDC, LOGFONTW; 
     53} 
     54 
  • trunk/cairo/cairo_snippets/cairo_snippets_png_run.bat

    r97 r228  
    11@ECHO OFF 
    22mkdir output 2>NUL 
    3 build -cleanup -release -I.. cairo_snippets_png && cairo_snippets_png 
     3bud -cleanup -release -I.. cairo_snippets_png && cairo_snippets_png 
  • trunk/cairo/cairooo-build.d

    r119 r228  
    6565    TARGET_WIN32 = {name:"win32oo", type:"lib", target:"lib/cairooo_win32", 
    6666        flags:["-Xwin32"], sources:["cairooo/win32/all.d"]}, 
     67    TARGET_WIN32_DFL = {name:"win32oo-dfl", type:"lib", 
     68        target:"lib/cairooo_win32_dfl", 
     69        flags:["-Xwin32","-Xdfl","-version=cairo_dfl"], 
     70        sources:["cairooo/win32/all.d"]}, 
    6771    TARGET_XLIB = {name:"xliboo", type:"lib", target:"lib/cairooo_xlib", 
    6872        sources:["cairooo/xlib/all.d"]}, 
     
    8387const Target[] TARGETS = 
    8488    [TARGET_ALL, TARGET_PNG, TARGET_CAIRO, TARGET_GLITZ, TARGET_WIN32, 
    85      TARGET_XLIB, TARGET_EXTRA]; 
     89     TARGET_WIN32_DFL, TARGET_XLIB, TARGET_EXTRA]; 
    8690const DEFAULT_TARGET = &TARGET_ALL; 
    8791const DEBUG_TARGET_SUFFIX = "_debug"; 
    8892 
    8993const char[][] FLAGS = ["-allobj","-cleanup"]; 
    90 const char[][] FLAGS_DEBUG = ["-debug","-unittest","-g"]; 
     94const char[][] FLAGS_DEBUG = ["-debug","-unittest","-version=Unittest","-g"]; 
    9195const char[][] FLAGS_RELEASE = ["-release","-inline","-O"]; 
    9296 
  • trunk/cairo/util/script.d

    r179 r228  
    8686    } 
    8787 
    88     void 
     88    /+void 
    8989    echof(...) 
    9090    { 
    9191        // D really needs argument exploding... 
    9292        writefx(stdout, _arguments, _argptr, true); 
     93    }+/ 
     94 
     95    void 
     96    echof(T...)(T args) 
     97    { 
     98        writefln("", args); 
    9399    } 
    94100 
     
    120126            opts[$-1] = fixPath(opt); 
    121127        } 
    122         exec("build",opts); 
     128        exec("bud",opts); 
    123129    } 
    124130