forked from openembedded/meta-openembedded
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Mesa has support for perfetto, but the libperfetto library is needed - Only v27 seems to be supported for now. Update perfetto accordingly - Make sure perfetto and libperfetto share the same codebase - Patch meson.build to allow shared build - Add a version number to avoid having a non symlink so file packaged into dev package. - Create a PC file for libperfetto to allow mesa to find it using pkgconfig. - Add nobranch=1 for the git repos to silence warnings about missing default branch Signed-off-by: Markus Volk <[email protected]> Signed-off-by: Khem Raj <[email protected]>
- Loading branch information
1 parent
9a6c1d8
commit af77fb4
Showing
4 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001 | ||
From: Markus Volk <[email protected]> | ||
Date: Mon, 17 Oct 2022 19:20:53 +0200 | ||
Subject: [PATCH] meson: add PC file for lib_perfetto | ||
|
||
--- | ||
meson.build | 12 ++++++++++-- | ||
1 file changed, 10 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/meson.build b/meson.build | ||
index 06015141c..752b4d928 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -19,9 +19,12 @@ | ||
project( | ||
'perfetto', | ||
['c','cpp'], | ||
- default_options: ['c_std=c99', 'cpp_std=c++11'] | ||
+ default_options: ['c_std=c99', 'cpp_std=c++11'], | ||
+ version: '27.1' | ||
) | ||
|
||
+soversion = meson.project_version() | ||
+ | ||
fs = import('fs') | ||
|
||
if not fs.is_dir('sdk') | ||
@@ -30,8 +33,9 @@ endif | ||
|
||
dep_threads = dependency('threads') | ||
|
||
-lib_perfetto = static_library( | ||
+lib_perfetto = shared_library( | ||
'perfetto', | ||
+ version: soversion, | ||
sources: 'sdk/perfetto.cc', | ||
dependencies: dep_threads, | ||
install: true, | ||
@@ -39,6 +43,10 @@ lib_perfetto = static_library( | ||
|
||
inc_perfetto = include_directories('sdk') | ||
|
||
+install_headers('sdk/perfetto.h') | ||
+pkg = import('pkgconfig') | ||
+pkg.generate(lib_perfetto) | ||
+ | ||
dep_perfetto = declare_dependency( | ||
link_with: lib_perfetto, | ||
include_directories: inc_perfetto, | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LICENSE = "Apache-2.0" | ||
LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" | ||
|
||
require perfetto.inc | ||
|
||
inherit meson | ||
|
||
SRC_URI:append = " file://0001-meson-add-pc-file-for-lib_perfetto.patch" | ||
|
||
FILES:${PN} += "${datadir}" | ||
BBCLASSEXTEND = "native nativesdk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SUMMARY = "Perfetto - System profiling, app tracing and trace analysis." | ||
HOMEPAGE = "https://github.com/google/perfetto" | ||
|
||
SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1" | ||
|
||
SRCREV_perfetto = "1c52b5e132312aeb007ed180d4ba1d8d66227923" | ||
PV = "27.1" | ||
|
||
S = "${WORKDIR}/git" |