Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4c6b9898da
Fetching contributors…

Cannot retrieve contributors at this time

file 108 lines (102 sloc) 3.782 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
$include "Rosella/Core.winxed";
$include "Rosella/Winxed.winxed";

function setup_memcached(var parrotstore, var argv)
{
    parrotstore["winxed_winxed"]["parrotstore/memcached.winxed"] = [
        "memcached/Includes.winxed",
        "memcached/Memcached.winxed",
        "memcached/ServerList.winxed"
    ];
    parrotstore["pir_winxed"]["parrotstore/memcached.pir"] = "parrotstore/memcached.winxed";
    parrotstore["pbc_pir"]["parrotstore/memcached.pbc"] = "parrotstore/memcached.pir";
    parrotstore["inst_lib"].push("parrotstore/memcached.pbc");
}

function setup_mysql(var parrotstore, var argv)
{
    parrotstore["dynpmc_cflags"] = "-g -I./mysql/include";
    parrotstore["dynpmc_ldflags"] = "-lmysqlclient";
    parrotstore["dynpmc"]["mysql_group"] = [
        "mysql/pmc/mysqldbcontext.pmc",
        "mysql/pmc/mysqldatatable.pmc",
        "mysql/pmc/mysqldatarow.pmc"
    ];
}

function setup_mongodb(var parrotstore, var argv)
{
    parrotstore["dynpmc_cflags"] = "-g -I./mongodb/mongo-c-driver/src -I./mongodb/include";
    parrotstore["dynpmc_ldflags"] = "-lbson -lmongoc";
    parrotstore["dynpmc"]["mongodb_group"] = [
        "mongodb/pmc/mongodbcontext.pmc",
        "mongodb/pmc/bsondocument.pmc"
    ];
    //parrotstore["winxed_winxed"]["parrotstore/mongodb.winxed"] = [
    // "mongodb/Includes.winxed",
    // "mongodb/JsonToBsonBuilder.winxed"
    //];
    //parrotstore["pir_winxed"]["parrotstore/mongodb.pir"] = "parrotstore/mongodb.winxed";
    //parrotstore["pbc_pir"]["parrotstore/mongodb.pbc"] = "parrotstore/mongodb.pir";
    //parrotstore["inst_lib"].push("parrotstore/mongodb.pbc");
}

function setup_main(var parrotstore, string target, var argv)
{
    switch (target) {
        case "memcached":
            setup_memcached(parrotstore, argv);
            break;
        case "mongodb":
            setup_mongodb(parrotstore, argv);
            break;
        case "mysql":
            setup_mysql(parrotstore, argv);
            break;
    }
}

function main[main](var argv)
{
    int exit_code = 0;
    string programname = argv.shift();
    var parrotstore = __get_distutils_data();
    try {
        Rosella.Winxed.Distutils.winxed_setup();
        string libtarget = argv.shift();
        setup_main(parrotstore, libtarget, argv);
        setup(argv, parrotstore);
    } catch (e) {
        say(e["message"]);
        for (string bt in e.backtrace_strings())
            say(bt);
        exit_code = 1;
    }
    if (exit_code != 0)
        exit(exit_code);
}

function __get_distutils_data()
{
    return {
        "name" : 'ParrotStore',
        "abstract" : 'Library for Parrot database, cache and persistance',
        "authority" : 'http://github.com/Whiteknight',
        "copyright_holder" : 'Andrew Whitworth',
        "keywords" : ["memcached", "database", "persistance"],
        "license_type" : 'Artistic License 2.0',
        "license_uri" : 'http://www.perlfoundation.org/artistic_license_2_0',
        "checkout_uri" : 'git://github.com/Whiteknight/ParrotStore.git',
        "browser_uri" : 'git://github.com/Whiteknight/ParrotStore',
        "project_uri" : 'git://github.com/Whiteknight/ParrotStore',
        "pir_nqp-rx" : {},
        "pir_winxed" : {},
        "pbc_pbc" : {},
        "pbc_pir" : {},
        "pir_pir" : {},
        "winxed_debug" : false,
        "winxed_winxed" : {},
        "inst_lib" : [],
        "installable_pbc" : {},
        "include_winxed" : {},
        "inst_wxheader" : [],
        "dynpmc_cflags" : "",
        "dynpmc_ldflags" : "",
        "dynpmc" : {},
        "manifest_includes" : ["README.md", "setup.winxed"]
    };
}
Something went wrong with that request. Please try again.