예제 #1
0
파일: CONFIG.py 프로젝트: YuanYuLin/libcogl
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    ops.exportEnv(
        ops.addEnv("PATH", ops.path_join(install_tmp_dir, "usr/local/bin")))

    cc_sysroot = ops.getEnv("CC_SYSROOT")

    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa/')

    ldflags = ""
    ldflags += " -L" + ops.path_join(cc_sysroot, 'lib')
    ldflags += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    ldflags += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    ldflags += " -L" + ops.path_join(iopc.getSdkPath(), 'usr/lib')

    libs = ""
    libs += " -lgbm -lexpat -lxml2 -ldrm"
    ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    ops.exportEnv(ops.setEnv("LIBS", libs))
    #extra_conf.append('CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libz') + '"')

    return False
예제 #2
0
파일: CONFIG.py 프로젝트: YuanYuLin/libglu
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_LIBDIR", ops.path_join(iopc.getSdkPath(), "pkgconfig")))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_SYSROOT_DIR", iopc.getSdkPath()))

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libdrm/libdrm')

    ldflags = ""
    ldflags += " -L" + ops.path_join(cc_sysroot, 'lib')
    ldflags += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    ldflags += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')

    libs = ""
    libs += " -lffi -lxml2 -lexpat -ldrm"
    #ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    #ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    #ops.exportEnv(ops.setEnv("LIBS", libs))

    return False
예제 #3
0
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--disable-x11")
    extra_conf.append("--host=" + cc_host)

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libz')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpcre3')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpixman')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libglib/glib-2.0')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa/EGL')

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -lz -lglib-2.0 -lpcre -lffi -lpixman-1 -lxml2 -lgbm -ldrm -lEGL -lgbm -lexpat -lglapi"
    extra_conf.append("CFLAGS=" + cflags)
    extra_conf.append("LDFLAGS=" + libs)
    extra_conf.append("--enable-egl=yes")
    #extra_conf.append("--enable-glx=yes")
    #extra_conf.append("--enable-opengl")
    #extra_conf.append("--enable-virglrenderer")

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #4
0
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("V=1")
    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libglib/glib-2.0')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpcre3')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/freetype')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/freetype/freetype2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/fontconfig')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/fontconfig/fontconfig')

    libs = ""
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -lglib-2.0 -lpcre"
    libs += " -lfreetype"
    libs += " -lfontconfig -luuid"
    extra_conf.append("GLIB_CFLAGS=" + cflags)
    extra_conf.append("GLIB_LIBS=" + libs)
    extra_conf.append("FREETYPE_CFLAGS=" + cflags)
    extra_conf.append("FREETYPE_LIBS=" + libs)
    extra_conf.append("FONTCONFIG_CFLAGS=" + cflags)
    extra_conf.append("FONTCONFIG_LIBS=" + libs)

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #5
0
파일: CONFIG.py 프로젝트: YuanYuLin/libx11
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("--disable-docs")
    extra_conf.append("--disable-x11")
    extra_conf.append("--enable-wayland")
    extra_conf.append("--with-x-locale-root=/usr/local/share/X11/locale")
    extra_conf.append('WAYLAND_CFLAGS="-I ' + ops.path_join(iopc.getSdkPath(), 'usr/include/wayland') + '"')
    extra_conf.append('WAYLAND_LIBS="-L ' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lwayland-client"')
    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #6
0
파일: CONFIG.py 프로젝트: YuanYuLin/mtdev
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    ops.exportEnv(ops.setEnv("PKG_CONFIG_LIBDIR", ops.path_join(iopc.getSdkPath(), "pkgconfig")))
    ops.exportEnv(ops.setEnv("PKG_CONFIG_SYSROOT_DIR", iopc.getSdkPath()))

    '''
    ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    ops.exportEnv(ops.setEnv("LIBS", libs))
    '''
    return False
예제 #7
0
def set_global(args):
    global pkg_path
    global output_dir
    global tarball_pkg
    global install_dir
    global install_tmp_dir
    global tarball_dir
    global cc_host
    global tmp_include_dir
    global dst_include_dir
    global dst_lib_dir
    global src_pkgconfig_dir
    global dst_pkgconfig_dir
    global host_utils
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    tarball_pkg = ops.path_join(pkg_path, TARBALL_FILE)
    install_dir = ops.path_join(output_dir, INSTALL_DIR)
    install_tmp_dir = ops.path_join(output_dir, INSTALL_DIR + "-tmp")
    tarball_dir = ops.path_join(output_dir, TARBALL_DIR)
    cc_host_str = ops.getEnv("CROSS_COMPILE")
    cc_host = cc_host_str[:len(cc_host_str) - 1]
    tmp_include_dir = ops.path_join(output_dir,
                                    ops.path_join("include", args["pkg_name"]))
    dst_include_dir = ops.path_join("include", args["pkg_name"])
    dst_lib_dir = ops.path_join(install_dir, "lib")
    src_pkgconfig_dir = ops.path_join(pkg_path, "pkgconfig")
    dst_pkgconfig_dir = ops.path_join(install_dir, "pkgconfig")
    host_utils = ops.path_join(iopc.getSdkPath(), "host_utils")
예제 #8
0
def MAIN_SDKENV(args):
    set_global(args)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/platform')
    iopc.add_includes(cflags)

    return False
예제 #9
0
파일: CONFIG.py 프로젝트: YuanYuLin/libpng
def MAIN_EXTRACT(args):
    set_global(args)

    ops.unTarXz(tarball_pkg, output_dir)
    ops.copyto(ops.path_join(iopc.getSdkPath(), 'usr/include/libz/.'), tarball_dir)
    #ops.copyto(ops.path_join(pkg_path, "finit.conf"), output_dir)

    return True
예제 #10
0
파일: CONFIG.py 프로젝트: YuanYuLin/python
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("--disable-ipv6")
    extra_conf.append("--enable-optimizations")

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libz')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpcre3')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpixman')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libglib/glib-2.0')

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -lz -lglib-2.0 -lpcre -lffi -lpixman-1 -lxml2"
    #extra_conf.append("--extra-cflags=" + cflags)
    #extra_conf.append("--extra-ldflags=" + libs)

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #11
0
def MAIN_SDKENV(args):
    set_global(args)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/' + args["pkg_name"])
    iopc.add_includes(cflags)

    return False
예제 #12
0
def MAIN_SDKENV(args):
    set_global(args)

    sdkinclude_dir = ops.path_join(iopc.getSdkPath(), 'usr/include/' + args["pkg_name"])
    cflags = ""
    cflags += " -I" + sdkinclude_dir
    cflags += " -I" + ops.path_join(sdkinclude_dir, "luajit-2.0")
    iopc.add_includes(cflags)

    return False
예제 #13
0
def MAIN_SDKENV(args):
    set_global(args)
    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include')
    #cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/linux_headers')

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    #libs += " -L" + ops.path_join(iopc.getSdkPath(), 'usr/lib')
    libs += " -lm -ldl -lpthread -lrt"

    iopc.add_includes(cflags)
    iopc.add_libs(libs)

    return False
예제 #14
0
파일: CONFIG.py 프로젝트: YuanYuLin/libglu
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa')

    libs = ""
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -ldrm -lEGL -lglapi -lGLESv2"

    extra_conf.append('GL_CFLAGS=' + cflags)
    extra_conf.append('GL_LIBS=' + libs)

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #15
0
def MAIN_SDKENV(args):
    set_global(args)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/' + args["pkg_name"])
    iopc.add_includes(cflags)

    libs = ""
    libs += " -lcairo"
    iopc.add_libs(libs)

    return False
예제 #16
0
def MAIN_SDKENV(args):
    set_global(args)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/' + args["pkg_name"])
    iopc.add_includes(cflags)

    libs = ""
    libs += " -lwayland-client -lwayland-cursor -lwayland-egl -lwayland-server"
    iopc.add_libs(libs)

    return False
예제 #17
0
def MAIN_CONFIGURE(args):
    set_global(args)

    print "SDK include path:" + iopc.getSdkPath()

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("--without-libjpeg")
    extra_conf.append("--without-libtiff")
    extra_conf.append("--disable-gtk-doc-html")
    extra_conf.append("--disable-glibtest")

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), "usr/include/libxml2")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    "usr/include/libglib/glib-2.0")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    "usr/include/libglib/gio-unix-2.0")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), "usr/include/libglib")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), "usr/include/libpcre3")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpng')
    extra_conf.append("BASE_DEPENDENCIES_CFLAGS=" + cflags)
    extra_conf.append("GLIB_CFLAGS=" + cflags)
    extra_conf.append("CFLAGS=" + cflags)

    libs = ""
    libs += " -L" + ops.path_join(iopc.getSdkPath(), "lib")
    libs += " -lxml2 -lglib-2.0 -lpng -lz"
    extra_conf.append("BASE_DEPENDENCIES_LIBS=" + libs)
    extra_conf.append("GLIB_LIBS=" + libs)
    extra_conf.append("LIBS=" + libs)
    '''
    extra_conf.append("--disable-libmount")
    extra_conf.append("--disable-fam")
    extra_conf.append("--with-pcre=system")
    extra_conf.append('ZLIB_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libz') + '"')
    extra_conf.append('ZLIB_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lz"')
    extra_conf.append('LIBFFI_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libffi') + '"')
    extra_conf.append('LIBFFI_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'usr/lib') + ' -lffi"')
    extra_conf.append('PCRE_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libpcre3') + '"')
    extra_conf.append('PCRE_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lpcre"')
    extra_conf.append("glib_cv_stack_grows=no")
    extra_conf.append("glib_cv_uscore=no")
    extra_conf.append("glib_cv_pcre_has_unicode=yes")
    '''

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #18
0
파일: CONFIG.py 프로젝트: YuanYuLin/weston
def MAIN_SDKENV(args):
    set_global(args)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/' + args["pkg_name"])
    iopc.add_includes(cflags)

    libs = ""
    libs += " -lweston-4 -lweston-desktop-4"
    iopc.add_libs(libs)

    return False
예제 #19
0
def MAIN_SDKENV(args):
    set_global(args)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/' + args["pkg_name"])
    cflags += " -DMESA_EGL_NO_X11_HEADERS"
    iopc.add_includes(cflags)

    libs = ""
    libs += " -lEGL -lGLESv2 -lgbm -lglapi -lOSMesa -lwayland-egl"
    iopc.add_libs(libs)

    return False
예제 #20
0
def MAIN_SDKENV(args):
    set_global(args)

    pkgsdk_include_dir = ops.path_join(iopc.getSdkPath(),
                                       'usr/include/' + args["pkg_name"])
    cflags = ""
    cflags += " -I" + pkgsdk_include_dir
    cflags += " -I" + ops.path_join(pkgsdk_include_dir, "freetype2")
    iopc.add_includes(cflags)

    libs = ""
    libs += " -lfreetype"
    iopc.add_libs(libs)

    return False
예제 #21
0
파일: CONFIG.py 프로젝트: YuanYuLin/libdbus
def MAIN_SDKENV(args):
    set_global(args)

    pkginclude_dir = ops.path_join(iopc.getSdkPath(),
                                   'usr/include/' + args["pkg_name"])
    cflags = ""
    cflags += " -I" + pkginclude_dir
    cflags += " -I" + ops.path_join(pkginclude_dir, "dbus-1.0")
    cflags += " -I" + ops.path_join(pkginclude_dir, "dbus-1.0/dbus")
    iopc.add_includes(cflags)

    libs = ""
    libs += " -ldbus-1"
    iopc.add_libs(libs)

    return False
예제 #22
0
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("V=1")
    extra_conf.append("--disable-x11")
    extra_conf.append("--disable-gles1")
    extra_conf.append("--enable-gles2")
    extra_conf.append("--enable-egl")
    extra_conf.append("--enable-libdrm")
    #extra_conf.append("--enable-vg")

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglu')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libdrm/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libdrm/libkms')
    cflags += " -DMESA_EGL_NO_X11_HEADERS"

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -ldrm -lEGL -lglapi -lGLESv2 -lOSMesa -lGLU -lgbm -lxml2 -lexpat -lz -lffi -lfreetype"

    extra_conf.append('GL_CFLAGS=' + cflags)
    extra_conf.append('GL_LIBS=' + libs)
    extra_conf.append('EGL_CFLAGS=' + cflags)
    extra_conf.append('EGL_LIBS=' + libs)
    extra_conf.append('GLESV2_CFLAGS=' + cflags)
    extra_conf.append('GLESV2_LIBS=' + libs)
    extra_conf.append('DRM_CFLAGS=' + cflags)
    extra_conf.append('DRM_LIBS=' + libs)
    extra_conf.append('GBM_CFLAGS=' + cflags)
    extra_conf.append('GBM_LIBS=' + libs)
    extra_conf.append('OSMESA_CFLAGS=' + cflags)
    extra_conf.append('OSMESA_LIBS=' + libs)

    #extra_conf.append('GLEW_CFLAGS=' + cflags)
    #extra_conf.append('GLEW_LIBS=' + libs)
    extra_conf.append('GLU_CFLAGS=' + cflags)
    extra_conf.append('GLU_LIBS=' + libs)
    extra_conf.append('FREETYPE2_CFLAGS=' + libs)
    extra_conf.append('FREETYPE2_LIBS=' + libs)

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #23
0
def MAIN_SDKENV(args):
    set_global(args)

    pkgsdk_include_dir=ops.path_join(iopc.getSdkPath(), 'usr/include/' + args["pkg_name"])
    cflags = ""
    cflags += " -I" + pkgsdk_include_dir
    cflags += " -I" + ops.path_join(pkgsdk_include_dir, "libdrm")
    iopc.add_includes(cflags)

    libs = ""
    libs += " -ldrm -lkms"
    if selected_platform_panda :
        libs += " "
    if selected_platform_j3455 :
        libs += " -ldrm_amdgpu -ldrm_freedreno -ldrm_intel -ldrm_nouveau -ldrm_radeon"
    iopc.add_libs(libs)

    return False
예제 #24
0
파일: CONFIG.py 프로젝트: YuanYuLin/libcogl
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("--enable-glib=yes")
    extra_conf.append("--enable-cogl-path=yes")
    extra_conf.append("--enable-gdk-pixbuf=yes")
    extra_conf.append("--enable-gles1=no")
    extra_conf.append("--enable-gles2=yes")
    extra_conf.append("--enable-cogl-gles2=yes")
    extra_conf.append("--enable-kms-egl-platform=yes")

    if iopc.is_selected_package(PKG_WAYLAND):
        extra_conf.append("--enable-wayland-egl-platform=yes")
        extra_conf.append("--enable-wayland-egl-server=yes")
    else:
        extra_conf.append("--enable-wayland-egl-platform=no")
        extra_conf.append("--enable-wayland-egl-server=no")

    extra_conf.append("--enable-gl=no")
    extra_conf.append("--enable-examples-install=no")
    extra_conf.append("--enable-cairo=no")
    extra_conf.append("--enable-cogl-gst=no")
    extra_conf.append("--disable-gtk-doc")
    extra_conf.append("--disable-glibtest")

    libs = ""
    libs += " -L" + ops.path_join(iopc.getSdkPath(), "lib")
    libs += " -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -lgdk_pixbuf-2.0 -lgbm -ldrm -lEGL"
    extra_conf.append("COGL_DEP_LIBS=" + libs)

    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), "usr/include/libxml2")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    "usr/include/libglib/glib-2.0")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    "usr/include/libglib/gio-unix-2.0")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), "usr/include/libglib")
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), "usr/include/libpcre3")
    #cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpng')
    extra_conf.append("COGL_DEP_CFLAGS=" + cflags)

    iopc.configure(tarball_dir, extra_conf)

    return True
예제 #25
0
def set_global(args):
    global pkg_path
    global output_dir
    global dst_lib_dir
    global dst_usr_lib_dir
    global arch
    global arch_cc_version
    global cross_compiler_tarball
    global cross_compiler_tarball_type
    global cross_compiler_tarball_root
    global cc_path
    global cc_name
    global cc_sysroot_lib
    global cc_sysroot_usr_lib
    global cc_version
    global cc_sdk_sysroot
    global pkgconfig_dir
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    pkg_args = args["pkg_args"]
    arch_cc_version = pkg_args["version"]
    if arch_cc_version == "Linaro-2017.01":
        cross_compiler_tarball = ops.path_join(
            pkg_path,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/bin")
        #cc_name=ops.path_join(cc_path, "arm-linux-gnueabi-")
        cc_name = "arm-linux-gnueabi-"
        cc_sysroot_lib = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc"
        )
        cc_version = "2.21"
    elif arch_cc_version == "Linaro-2017.01hf":
        cross_compiler_tarball = ops.path_join(
            pkg_path,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin")
        #cc_name=ops.path_join(cc_path, "arm-linux-gnueabihf-")
        cc_name = "arm-linux-gnueabihf-"
        cc_sysroot_lib = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib"
        )
        cc_sysroot_usr_lib = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc"
        )
        cc_version = "2.21"
    elif arch_cc_version == "CodeSourcery-2014.05":
        cross_compiler_tarball = ops.path_join(
            pkg_path,
            "arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2")
        cross_compiler_tarball_type = "BZ2"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(output_dir, "arm-2014.05/bin")
        #cc_name=ops.path_join(cc_path, "arm-none-linux-gnueabi-")
        cc_name = "arm-none-linux-gnueabi-"
        cc_sysroot_lib = ops.path_join(
            output_dir, "arm-2014.05/arm-none-linux-gnueabi/libc/armv4t/lib")
        cc_sysroot_usr_lib = ops.path_join(
            output_dir,
            "arm-2014.05/arm-none-linux-gnueabi/libc/armv4t/usr/lib")
        cc_sdk_sysroot = ops.path_join(
            output_dir, "arm-2014.05/arm-none-linux-gnueabi/libc/armv4t")
        cc_version = "2.18"
    elif arch_cc_version == "iopc_gcc_armel_2017.02.3":
        cross_compiler_tarball = ops.path_join(
            pkg_path, "iopc_gcc_armel_2017.02.3.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(cross_compiler_tarball_root,
                                "iopc_gcc_armel_2017.02.3/usr/bin")
        #cc_name=ops.path_join(cc_path, "arm-iopc-linux-gnueabi-")
        cc_name = "arm-iopc-linux-gnueabi-"
        cc_sysroot_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_armel_2017.02.3/usr/arm-iopc-linux-gnueabi/sysroot/lib")
        cc_sysroot_usr_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_armel_2017.02.3/usr/arm-iopc-linux-gnueabi/sysroot/usr/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_armel_2017.02.3/usr/arm-iopc-linux-gnueabi/sysroot")
        cc_version = "2.24"
    elif arch_cc_version == "iopc_gcc_x86_64_2017.02.3":
        cross_compiler_tarball = ops.path_join(
            pkg_path, "iopc_gcc_x86_64_2017.02.3.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(cross_compiler_tarball_root,
                                "iopc_gcc_x86_64_2017.02.3/usr/bin")
        #cc_name=ops.path_join(cc_path, "x86_64-iopc-linux-gnu-")
        cc_name = "x86_64-iopc-linux-gnu-"
        cc_sysroot_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_x86_64_2017.02.3/usr/x86_64-iopc-linux-gnu/sysroot/lib")
        cc_sysroot_usr_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_x86_64_2017.02.3/usr/x86_64-iopc-linux-gnu/sysroot/usr/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_x86_64_2017.02.3/usr/x86_64-iopc-linux-gnu/sysroot")
        cc_version = "2.24"
    else:
        sys.exit(1)

    dst_lib_dir = ops.path_join(output_dir, "lib")
    dst_usr_lib_dir = ops.path_join(iopc.getSdkPath(), "usr/lib")
    pkgconfig_dir = ops.path_join(iopc.getSdkPath(), "pkgconfig")
예제 #26
0
def MAIN_CONFIGURE(args):
    set_global(args)

    cflags = iopc.get_includes()
    libs = iopc.get_libs()
    print cflags
    print libs
    print "SDK include path:" + iopc.getSdkPath()

    extra_conf = []
    extra_conf.append("--without-x")
    extra_conf.append("--enable-png=yes")
    extra_conf.append("--enable-xml=yes")
    extra_conf.append("--enable-glesv2=yes")
    extra_conf.append("--enable-drm=no") # TODO: need to fix
    extra_conf.append("--enable-ft=yes")
    extra_conf.append("--enable-fc=yes")
    extra_conf.append("--enable-gallium=no")
    extra_conf.append("--enable-egl=yes")
    extra_conf.append("--disable-ps") 
    extra_conf.append("--disable-pdf")
    extra_conf.append("--enable-svg=no")
    extra_conf.append("--enable-pthread=yes")
    extra_conf.append("--enable-gobject=yes")
    extra_conf.append("--enable-interpreter=no")
    extra_conf.append("--disable-gtk-doc")
    extra_conf.append("--host=" + cc_host)

    '''
    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpixman')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpng')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libdrm/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libudev')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/freetype')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/freetype/freetype2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/fontconfig')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libz')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib/glib-2.0')

    libs = ""
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -lpixman-1 -lpng -lGLESv2 -ldrm -lfreetype -lfontconfig -lEGL -lgbm -lexpat -lglapi -lffi -lz -lxml2 -lpthread -luuid"
    libs += " -lglib-2.0 -lwayland-client -lwayland-server -lpcre"
    '''
    extra_conf.append('pixman_CFLAGS=' + cflags)
    extra_conf.append('pixman_LIBS=' + libs)
    extra_conf.append('png_REQUIRES=libpng')
    extra_conf.append('png_CFLAGS=' + cflags)
    extra_conf.append('png_LIBS=' + libs)
    extra_conf.append('glesv2_CFLAGS=' + cflags)
    extra_conf.append('glesv2_LIBS=' + libs)
    extra_conf.append('drm_CFLAGS=' + cflags)
    extra_conf.append('drm_LIBS=' + libs)
    extra_conf.append('FREETYPE_CFLAGS=' + cflags)
    extra_conf.append('FREETYPE_LIBS=' + libs)
    extra_conf.append('FONTCONFIG_CFLAGS=' + cflags)
    extra_conf.append('FONTCONFIG_LIBS=' + libs)
    #extra_conf.append('egl_CFLAGS=-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa -I' + ops.path_join(iopc.getSdkPath(),'usr/include/libudev')) + ' -DMESA_EGL_NO_X11_HEADERS')
    extra_conf.append('egl_CFLAGS=' + cflags)
    extra_conf.append('egl_LIBS=' + libs)
    extra_conf.append('glib_CFLAGS=' + cflags)
    extra_conf.append('glib_LIBS=' + libs)
    extra_conf.append('CFLAGS=' + cflags)
    extra_conf.append('LIBS=' + libs)
    #extra_conf.append('CAIRO_CFLAGS=' + cflags)
    #extra_conf.append('CFLAGS=' + cflags)
    #libs = ""
    #libs += ' -L' + ops.path_join(iopc.getSdkPath(), 'lib') 
    #libs += ' -lz -lxml2 -lpthread -ldrm -luuid' 
    #extra_conf.append('CAIRO_LIBS=' + libs)
    #extra_conf.append('LIBS=' + libs)
    #extra_conf.append('egl_LIBS=-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lEGL -lgbm -ldrm -lexpat -lwayland-client -lglapi -lffi -lwayland-server')
    iopc.configure(tarball_dir, extra_conf)

    return True