Show
Ignore:
Timestamp:
11/03/07 22:54:06 (5 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/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