Skip to content

Commit

Permalink
Remove unused c_options[use_mali]. Add platform option to build again…
Browse files Browse the repository at this point in the history
…st mesa video core drivers
  • Loading branch information
rnixx committed Oct 29, 2018
1 parent 678a055 commit fa9932d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ def pkgconfig(*packages, **kw):
kivy_ios_root = environ.get('KIVYIOSROOT', None)
if kivy_ios_root is not None:
platform = 'ios'
# proprietary broadcom video core drivers
if exists('/opt/vc/include/bcm_host.h'):
platform = 'rpi'
# use mesa video core drivers
if environ.get('VIDEOCOREMESA', None):
platform = 'vc'
if exists('/usr/lib/arm-linux-gnueabihf/libMali.so'):
platform = 'mali'

Expand All @@ -149,7 +153,6 @@ def pkgconfig(*packages, **kw):
#
c_options = OrderedDict()
c_options['use_rpi'] = platform == 'rpi'
c_options['use_mali'] = platform == 'mali'
c_options['use_egl'] = False
c_options['use_opengl_es2'] = None
c_options['use_opengl_mock'] = environ.get('READTHEDOCS', None) == 'True'
Expand Down Expand Up @@ -388,7 +391,7 @@ def _check_and_fix_sdl2_mixer(f_path):
print('User distribution detected, avoid portable command.')

# Detect which opengl version headers to use
if platform in ('android', 'darwin', 'ios', 'rpi', 'mali'):
if platform in ('android', 'darwin', 'ios', 'rpi', 'mali', 'vc'):
c_options['use_opengl_es2'] = True
elif c_options['use_opengl_es2'] is None:
c_options['use_opengl_es2'] = \
Expand Down Expand Up @@ -627,7 +630,7 @@ def determine_gl_flags():
'for rpi platform, falling back to EGL and GLESv2.')
gl_libs = ['EGL', 'GLESv2']
flags['libraries'] = ['bcm_host'] + gl_libs
elif platform == 'mali':
elif platform in ['mali', 'vc']:
flags['include_dirs'] = ['/usr/include/']
flags['library_dirs'] = ['/usr/lib/arm-linux-gnueabihf']
flags['libraries'] = ['GLESv2']
Expand Down

0 comments on commit fa9932d

Please sign in to comment.