Example #1
0
def check_oss_4front(ctx, dependency_identifier):
    oss_libdir = __get_osslibdir()

    # avoid false positive from native sys/soundcard.h
    if not oss_libdir:
        ctx.undefine(inflector.define_key(dependency_identifier))
        return False

    soundcard_h = os.path.join(oss_libdir, "include/sys/soundcard.h")
    include_dir = os.path.join(oss_libdir, "include")

    fn = check_cc(header_name=soundcard_h,
                  defines=['PATH_DEV_DSP="/dev/dsp"',
                           'PATH_DEV_MIXER="/dev/mixer"'],
                  cflags='-I{0}'.format(include_dir),
                  fragment=load_fragment('oss_audio.c'))

    return fn(ctx, dependency_identifier)
Example #2
0
def check_oss_4front(ctx, dependency_identifier):
    oss_libdir = __get_osslibdir()

    # avoid false positive from native sys/soundcard.h
    if not oss_libdir:
        ctx.undefine(inflector.define_key(dependency_identifier))
        return False

    soundcard_h = os.path.join(oss_libdir, "include/sys/soundcard.h")
    include_dir = os.path.join(oss_libdir, "include")

    fn = check_cc(header_name=soundcard_h,
                  defines=['PATH_DEV_DSP="/dev/dsp"',
                           'PATH_DEV_MIXER="/dev/mixer"'],
                  cflags='-I{0}'.format(include_dir),
                  fragment=load_fragment('oss_audio.c'))

    return fn(ctx, dependency_identifier)
Example #3
0
 def fn(ctx, dependency_identifier, **kw):
     if not hasattr(ctx, 'egl_provider'):
         egl_provider_check = check or check_pkg_config(name)
         if egl_provider_check(ctx, dependency_identifier):
             ctx.egl_provider = name
             for ver in ['1.5', '1.4', '1.3', '1.2', '1.1', '1.0']:
                 stmt = 'int x[EGL_VERSION_{0}]'.format(ver.replace('.','_'))
                 check_stmt = check_statement(['EGL/egl.h'], stmt)
                 if check_stmt(ctx, dependency_identifier):
                     ctx.egl_provider_version = StrictVersion(ver)
                     break
             return True
         else:
             return False
     else:
         minVersionSV = minVersion and StrictVersion(minVersion)
         if not minVersionSV or ctx.egl_provider_version and \
                 ctx.egl_provider_version >= minVersionSV:
             defkey = inflector.define_key(dependency_identifier)
             ctx.define(defkey, 1)
             return True
         else:
             return False