aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/eglinfo/files/0001-Check-for-libegl-using-pkg-config.patch
blob: 0289ac228ca7a8bcb6511590c125d3eb4c112c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 58d51d941d3f4dfa38be18282d3e285d76d9020d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 13 Aug 2018 15:46:53 -0700
Subject: [PATCH] Check for libegl using pkg-config

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 wscript | 1 +
 1 file changed, 1 insertion(+)

Index: git/wscript
===================================================================
--- git.orig/wscript
+++ git/wscript
@@ -160,14 +160,9 @@ def configure_raspberrypi_device(conf, p
 		conf.env['PLATFORM_USELIBS'] += ["X11"]
 	elif platform == "fb":
 		conf.env['PLATFORM_SOURCE'] = ['src/platform_fb_raspberrypi.cpp']
-	conf.check_cxx(mandatory = 1, lib = ['GLESv2', 'EGL', 'bcm_host'], uselib_store = 'EGL')
+	conf.check_cfg(package='egl', args='--libs --cflags')
 	import os
 	sysroot = conf.options.sysroot + conf.options.prefix
-        std_include_path = os.path.join(sysroot, 'include')
-	vcos_pthread_path = os.path.join(sysroot, 'include/interface/vcos/pthreads')
-	vcms_host_path = os.path.join(sysroot, 'include/interface/vmcs_host/linux')
-	if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path, std_include_path], uselib_store = 'EGL'):
-		conf.fatal('Check if --prefix and --sysroot are set correctly.')
 	conf.env['WITH_APIS'] = []
 	if check_gles2(conf):
 		conf.env['WITH_APIS'] += ['GLES1', 'GLES2']
n> # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import logging import os import sys import argparse import signal bindir = os.path.dirname(__file__) topdir = os.path.dirname(bindir) sys.path[0:0] = [os.path.join(topdir, 'lib')] import bb.tinfoil import bb.msg logger = bb.msg.logger_create('bitbake-layers', sys.stdout) def main(): signal.signal(signal.SIGPIPE, signal.SIG_DFL) parser = argparse.ArgumentParser( description="BitBake layers utility", epilog="Use %(prog)s <subcommand> --help to get help on a specific command", add_help=False) parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') parser.add_argument('-F', '--force', help='Force add without recipe parse verification', action='store_true') parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') global_args, unparsed_args = parser.parse_known_args() # Help is added here rather than via add_help=True, as we don't want it to # be handled by parse_known_args() parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS, help='show this help message and exit') subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>') subparsers.required = True if global_args.debug: logger.setLevel(logging.DEBUG) elif global_args.quiet: logger.setLevel(logging.ERROR) # Need to re-run logger_create with color argument # (will be the same logger since it has the same name) bb.msg.logger_create('bitbake-layers', output=sys.stdout, color=global_args.color) plugins = [] tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) try: tinfoil.prepare(True) for path in ([topdir] + tinfoil.config_data.getVar('BBPATH').split(':')): pluginpath = os.path.join(path, 'lib', 'bblayers') bb.utils.load_plugins(logger, plugins, pluginpath) registered = False for plugin in plugins: if hasattr(plugin, 'register_commands'): registered = True plugin.register_commands(subparsers) if hasattr(plugin, 'tinfoil_init'): plugin.tinfoil_init(tinfoil) if not registered: logger.error("No commands registered - missing plugins?") sys.exit(1) args = parser.parse_args(unparsed_args, namespace=global_args) if getattr(args, 'parserecipes', False): tinfoil.config_data.disableTracking() tinfoil.parseRecipes() tinfoil.config_data.enableTracking() return args.func(args) finally: tinfoil.shutdown() if __name__ == "__main__": try: ret = main() except bb.BBHandledException: ret = 1 except Exception: ret = 1 import traceback traceback.print_exc() sys.exit(ret)