コード例 #1
0
ファイル: protocols.py プロジェクト: dkirker/webos-messaging
def build(ctx):
    ctx.load("account", tooldir="build_lib")
    for name in "msn icq jabber novell yahoo sipe sametime".split(" "):
        use = ["BASE", "GLIB", "XML", "GNUTLS", "PURPLE_BUILD"]
        root_path = join(ctx.env.PURPLE_PATH, "protocols")
        icon_path = join(ctx.env.PIDGIN_PATH, "pidgin", "pixmaps", "protocols")
        exclude = ["win32"]
        includes = []
        path = None
        if name == "jabber":
            # bld.load("sasl", tooldir="build_lib")
            # use += ["sasl", "SASL_BUILD"]
            exclude += ["auth_cyrus.c"]
        elif name == "icq":
            exclude += ["libaim.c"]
            path = "oscar"
        elif name == "aim":
            exclude += ["libicq.c"]
            path = "oscar"
        elif name == "yahoo":
            exclude += ["libyahoojp.c"]

        elif name == "sipe":
            ctx.load("sipe", tooldir="build_lib")
            root_path = join(ctx.env.SIPE_PATH, "src")
            exclude += ["purple-media.c", "tests*.c"]
            path = "purple"
            use = ["SIPE_BUILD",  "libsipe"] + use
            icon_path = join(ctx.env.SIPE_PATH, "pixmaps")

        elif name == "sametime":
            mw_root, mw_version = get_pkg_path_and_version("meanwhile")
            ctx.objects(target="meanwhile",
                        source=ant_glob(ctx, mw_root, "src", "**", "*.c"),
                        use="GLIB"
                       )
            includes.append(join(mw_root, "src"))
            use = ["meanwhile"] + use

        root_path = join(root_path, path if path else name)
        ctx.shlib(target="protocols/%s" % name,
                  source=ant_glob(ctx, root_path, "**", "*.c", exclude=exclude),
                  includes=[root_path] + includes,
                  use=" ".join(use),
                  install_path="${PLUGIN_IPKG_PATH}"
                 )

        for n in _get_accounts(name):
            ctx(
                    features="account",
                    target="accounts",
                    source="accounts/%s.json" % n,
                    install_path="/usr/palm/accounts",
                    prototype="accounts/prototype.json",
                    defines={"icon_path": icon_path}
                )
コード例 #2
0
def build(ctx):
    ctx.load("account", tooldir="build_lib")
    for name in "msn icq jabber novell yahoo sipe sametime".split(" "):
        use = ["BASE", "GLIB", "XML", "GNUTLS", "PURPLE_BUILD"]
        root_path = join(ctx.env.PURPLE_PATH, "protocols")
        icon_path = join(ctx.env.PIDGIN_PATH, "pidgin", "pixmaps", "protocols")
        exclude = ["win32"]
        includes = []
        path = None
        if name == "jabber":
            # bld.load("sasl", tooldir="build_lib")
            # use += ["sasl", "SASL_BUILD"]
            exclude += ["auth_cyrus.c"]
        elif name == "icq":
            exclude += ["libaim.c"]
            path = "oscar"
        elif name == "aim":
            exclude += ["libicq.c"]
            path = "oscar"
        elif name == "yahoo":
            exclude += ["libyahoojp.c"]

        elif name == "sipe":
            ctx.load("sipe", tooldir="build_lib")
            root_path = join(ctx.env.SIPE_PATH, "src")
            exclude += ["purple-media.c", "tests*.c"]
            path = "purple"
            use = ["SIPE_BUILD", "libsipe"] + use
            icon_path = join(ctx.env.SIPE_PATH, "pixmaps")

        elif name == "sametime":
            mw_root, mw_version = get_pkg_path_and_version("meanwhile")
            ctx.objects(target="meanwhile",
                        source=ant_glob(ctx, mw_root, "src", "**", "*.c"),
                        use="GLIB")
            includes.append(join(mw_root, "src"))
            use = ["meanwhile"] + use

        root_path = join(root_path, path if path else name)
        ctx.shlib(target="protocols/%s" % name,
                  source=ant_glob(ctx, root_path, "**", "*.c",
                                  exclude=exclude),
                  includes=[root_path] + includes,
                  use=" ".join(use),
                  install_path="${PLUGIN_IPKG_PATH}")

        for n in _get_accounts(name):
            ctx(features="account",
                target="accounts",
                source="accounts/%s.json" % n,
                install_path="/usr/palm/accounts",
                prototype="accounts/prototype.json",
                defines={"icon_path": icon_path})
コード例 #3
0
ファイル: libpurple.py プロジェクト: dkirker/webos-messaging
def build(bld):
    use = ["BASE", "GLIB", "XML", "GNUTLS", "PURPLE_BUILD"]

    bld.load('protocols', tooldir=bld.env.TOOLDIR)
    for name in bld.env.PURPLE_PLUGINS:
        l = bld.shlib(
            target="plugins/%s" % name,
            source=join(
                bld.env.PURPLE_PATH, "plugins",
                (join("ssl", name) if name.startswith("ssl") else name) +
                ".c"),
            install_path=bld.env.PLUGIN_IPKG_PATH,
            use=use)
        l.env.cshlib_PATTERN = "%s.so"

    exclude = [
        "purple-client.c", "purple-client-example.c", "nullclient.c",
        "dbus-server.c", "protocols", "plugins", "win32", "tests"
    ]

    bld.shlib(target="purple",
              source=ant_glob(bld,
                              bld.env.PURPLE_PATH,
                              "**",
                              "*.c",
                              exclude=exclude),
              export_includes=bld.env.PURPLE_PATH,
              includes=bld.env.PURPLE_PATH,
              use=use + ["plugins"],
              install_path="${APP_IPKG_PATH}/system/var/usr/lib")
コード例 #4
0
def build(ctx):
    exclude = ["windlopen.c", "getaddrinfo.c", "getnameinfo.c", "snprintf.c"]

    def create_symlink(ctx):
        from os import symlink
        try:
            symlink(join("..", get_path(), "include"), "build/sasl")
        except OSError as e:
            if e.errno == 17:
                pass
            else:
                raise

    # HACK!
    ctx.add_pre_fun(create_symlink)

    ctx.objects(target="sasl_plugins",
                source=[
                    join(get_path(), "plugins", i + ".c")
                    for i in plugins + ["plugin_common"]
                ],
                includes=join(get_path(), "include"),
                use="BASE SASL_BUILD")

    ctx.objects(
        target="sasl",
        source=ant_glob(ctx, get_path(), "lib", "*.c", exclude=exclude),
        includes=join(get_path(), "include"),
        export_includes=".",
        use="BASE SASL_BUILD sasl_plugins",
    )
コード例 #5
0
ファイル: meanwhile.py プロジェクト: dkirker/webos-messaging
def build(ctx):
    exclude = [
            "windlopen.c", "getaddrinfo.c", "getnameinfo.c",
            "snprintf.c"
            ]

    def create_symlink(ctx):
        from os import symlink
        try:
            symlink(join("..", get_path(), "include"), "build/sasl")
        except OSError as e:
            if e.errno == 17:
                pass
            else:
                raise

    # HACK!
    ctx.add_pre_fun(create_symlink)

    ctx.objects(target="sasl_plugins",
                source=[join(get_path(), "plugins", i + ".c")
                        for i in plugins + ["plugin_common"]],
                includes=join(get_path(), "include"),
                use="BASE SASL_BUILD"
               )

    ctx.objects(target="sasl",
                source=ant_glob(ctx, get_path(), "lib", "*.c",
                                exclude=exclude),
                includes=join(get_path(), "include"),
                export_includes=".",
                use="BASE SASL_BUILD sasl_plugins",
               )
コード例 #6
0
ファイル: libpurple.py プロジェクト: dkirker/webos-messaging
def build(bld):
    use = ["BASE", "GLIB", "XML", "GNUTLS", "PURPLE_BUILD"]

    bld.load('protocols', tooldir=bld.env.TOOLDIR)
    for name in bld.env.PURPLE_PLUGINS:
        l = bld.shlib(target="plugins/%s" % name,
                      source=join(bld.env.PURPLE_PATH, "plugins",
                                (join("ssl", name)
                                    if name.startswith("ssl")
                                    else name
                                )
                                + ".c"),
                      install_path=bld.env.PLUGIN_IPKG_PATH,
                      use=use)
        l.env.cshlib_PATTERN = "%s.so"

    exclude = ["purple-client.c",
               "purple-client-example.c",
               "nullclient.c",
               "dbus-server.c",
               "protocols",
               "plugins",
               "win32",
               "tests"]

    bld.shlib(
                target="purple",
                source=ant_glob(bld, bld.env.PURPLE_PATH, "**", "*.c", exclude=exclude),
                export_includes=bld.env.PURPLE_PATH,
                includes=bld.env.PURPLE_PATH,
                use=use + ["plugins"],
                install_path="${APP_IPKG_PATH}/system/var/usr/lib"
             )
コード例 #7
0
ファイル: libpurple.py プロジェクト: ChrisPHL/webos-messaging
def build_protocol(ctx, name, path=None, exclude=[], use=[]):
    root_path = join(ctx.env.PURPLE_PATH, "protocols", path if path else name)
    ctx.objects(target="protocol_%s" % name,
                source=ant_glob(ctx, root_path, "**", "*.c", exclude=exclude),
                includes=root_path,
                defines=["PACKAGE=\"%s\"" % (path if path else name)],
                use=" ".join(["GLIB XML PURPLE_BUILD"] + use)
               )
コード例 #8
0
ファイル: sipe.py プロジェクト: dkirker/webos-messaging
def build(ctx):
    ctx.objects(target="libsipe",
                source=ant_glob(ctx, ctx.env.SIPE_PATH, "src", "core", "*.c",
                                exclude=["sip-sec-krb5.c",
                                         "sip-sec-sspi.c",
                                         "sipe-mime.c",
                                         "sipe-win32dep.c",
                                         "sip-sec-ntlm.c",
                                         "*test*.c"]),
                includes=join(ctx.env.SIPE_PATH, "src", "api"),
                use="GLIB NSS SIPE_BUILD XML"
               )
コード例 #9
0
def build(ctx):
    ctx.objects(target="libsipe",
                source=ant_glob(ctx,
                                ctx.env.SIPE_PATH,
                                "src",
                                "core",
                                "*.c",
                                exclude=[
                                    "sip-sec-krb5.c", "sip-sec-sspi.c",
                                    "sipe-mime.c", "sipe-win32dep.c",
                                    "sip-sec-ntlm.c", "*test*.c"
                                ]),
                includes=join(ctx.env.SIPE_PATH, "src", "api"),
                use="GLIB NSS SIPE_BUILD XML")
コード例 #10
0
ファイル: libpurple.py プロジェクト: ChrisPHL/webos-messaging
def build(bld):
    use = ["BASE", "GLIB", "XML", "GNUTLS", "PURPLE_BUILD"]

    for i in bld.env.PURPLE_PROTOCOLS:
        exclude = ["win32"]
        path = None
        if i == "jabber":
            bld.load("sasl", tooldir="build_lib")
            use += ["sasl", "SASL_BUILD"]
        if i == "icq":
            exclude += ["libaim.c"]
            path = "oscar"
        if i == "aim":
            exclude += ["libicq.c"]
            path = "oscar"

        build_protocol(bld, i, path, exclude=exclude, use=use)
        use += ["protocol_%s" % i]

    a = bld.objects(target="plugins",
                source=[join(bld.env.PURPLE_PATH, "plugins",
                            (join("ssl", i) if i.startswith("ssl") else
                                i.lower())
                            + ".c"
                            )
                        for i in bld.env.PURPLE_PLUGINS
                       ],
                use=use)

    exclude = ["purple-client.c",
               "purple-client-example.c",
               "nullclient.c",
               "dbus-server.c",
               "protocols",
               "plugins",
               "win32",
               "tests"]

    path = bld.env.PURPLE_PATH

    bld.shlib(
                target="purple",
                source=ant_glob(bld, path, "**", "*.c", exclude=exclude),
                export_includes=path,
                includes=path,
                use=use + ["plugins"],
             )