Ticket #13351: 0214-Configure-allow-opengl-GLES-selection-v2.patch

File 0214-Configure-allow-opengl-GLES-selection-v2.patch, 4.6 KB (added by warpme, 5 years ago)

v2 for setups where OS has only GLES

  • mythtv/configure

    diff -Naur mythtv-master-20181124-gb89d3b6-old/mythtv/configure mythtv-master-20181124-gb89d3b6-new/mythtv/configure
    old new  
    144144  --disable-systemd_notify disable systemd notify support
    145145  --disable-systemd_journal disable systemd journal support
    146146
     147  --enable-opengles        enable OpenGL ES
     148
    147149  --enable-mac-bundle      produce standalone OS X apps (e.g. mythfrontend.app)
    148150
    149151  --disable-libxml2        disable libxml2 support (disc metadata)
     
    19741976    lirc
    19751977    mheg
    19761978    opengl
     1979    opengles
    19771980    opengl_video
    19781981    opengl_themepainter
    19791982    openmax
     
    27772780enable mheg
    27782781enable mythtranscode
    27792782enable opengl
    2780 enable opengles
     2783disable opengles
    27812784enable opengl_video
    27822785enable opengl_themepainter
    27832786enable symbol_visibility
     
    60426045                             { check_cpp_condition x264.h "X264_MPEG2" &&
    60436046                               enable libx262; }
    60446047enabled libxml2           && require_pkg_config libxml2 libxml-2.0 libxml/xmlversion.h xmlCheckVersion
    6045 enabled opengl            && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" ||
    6046                                check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
    6047                                check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
    6048                                check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
    6049                                check_lib opengl GLES/gl.h glGetError "-Wl,-framework,OpenGLES" ||
    6050                                { check_pkg_config GLESv2 glesv2 GLES2/gl2.h glGetError &&
    6051                                  check_pkg_config EGL egl EGL/egl.h eglGetProcAddress &&
    6052                                  enable opengl
    6053                                } ||
    6054                                { check_lib GLESv2 GLES2/gl2.h glGetError "-lGLESv2" &&
    6055                                  check_lib EGL EGL/egl.h eglGetProcAddress "-lEGL" &&
    6056                                  enable opengl
    6057                                } ||
    6058                                die "ERROR: opengl not found."
    6059                              }
     6048
     6049if enabled opengl; then
     6050  check_lib opengl GL/glx.h glXGetProcAddress "-lGL" ||
     6051  check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
     6052  check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
     6053  check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
     6054  check_lib opengl GLES/gl.h glGetError "-Wl,-framework,OpenGLES" ||
     6055  { check_lib GLESv2 GLES2/gl2.h glGetError "-lGLESv2" &&
     6056    check_lib EGL EGL/egl.h eglGetProcAddress "-lEGL"; } ||
     6057  die "ERROR: OpenGL not found!";
     6058  enable opengl
     6059  if enabled opengl_video; then
     6060    enable opengl_video
     6061  fi
     6062  if enabled opengl_themepainter; then
     6063    enable opengl_themepainter
     6064  fi
     6065fi
     6066
     6067if enabled opengles; then
     6068    check_pkg_config GLESv2 glesv2 GLES2/gl2.h glGetError &&
     6069    check_pkg_config EGL egl EGL/egl.h eglGetProcAddress ||
     6070    die "ERROR: OpenGL ES not found!";
     6071    check_lib GLESv2 GLES2/gl2.h glGetError "-lGLESv2" &&
     6072    check_lib EGL EGL/egl.h eglGetProcAddress "-lEGL" ||
     6073    die "ERROR: OpenGL ES not found!";
     6074fi
     6075
    60606076if enabled libmpeg2external; then
    60616077    check_lib libmpeg2external mpeg2dec/mpeg2.h mpeg2_init -lmpeg2 || disable libmpeg2external
    60626078    if disabled libmpeg2external; then
     
    65636579# Disable OpenGL ES support if Qt does not support it
    65646580QTCONF=$(pkg-config --variable=qt_config Qt5Core || pkg-config --variable=qt_config QtCore)
    65656581if echo "$QTCONF" | grep -qv opengles2 ; then
    6566     if test $target_os != android ; then
    6567         disable opengles
    6568     fi
     6582    true
     6583else
     6584    die "ERROR: Qt not provides OpenGL ES support"
    65696585fi
    65706586
    65716587if enabled firewire; then
     
    73777393  fi
    73787394fi
    73797395  echo "OpenGL support            ${opengl-no}"
    7380   echo "OpenGL video              ${opengl_video-no}"
    7381   echo "OpenGL ThemePainter       ${opengl_themepainter-no}"
     7396  echo "  OpenGL ES 2.0           ${opengles-no}"
     7397  echo "  OpenGL video            ${opengl_video-no}"
     7398  echo "  OpenGL ThemePainter     ${opengl_themepainter-no}"
    73827399  if test x"$target_os" = x"darwin" ; then
    73837400    echo "VDA support               ${vda-no}"
    73847401  fi
     
    74017418fi
    74027419echo "libdns_sd (Bonjour)       ${libdns_sd-no}"
    74037420echo "libcrypto                 ${libcrypto-no}"
    7404 echo "OpenGL ES 2.0             ${opengles-no}"
    74057421if enabled libbluray_external; then
    74067422    echo "bluray support            yes (system)"
    74077423else