Files
buildroot/package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch
Adam Duskett 1956e4e434 package/flutter-engine: bump to version 3.29.2
As of Flutter 3.27.4, the flutter-engine github repository is archived, and the
flutter-engine source code now resides at https://github.com/flutter/flutter/.

Because of the above, the following changes must occure:

- Paths are now prefixed with engine/src.

- The "name" field in the dot-gclient file is now "./", and the gen-tarball
  script:
   - Makes the dl-tmp/src dir
   - Copies the dot-gclient file to the dl-tmp/src dir
   - Runs gclient.py inside of the dl-tmp/src dir

Without these changes, gclient creates two directores:
dl-tmp/src/flutter and dl-tmp/src/engine, and cloning fails with the following
error:

```
python3: can't open file 'dl-tmp/src/engine/src/flutter/tools/pub_get_offline.py':
[Errno 2] No such file or directory
```

because the file resides at src/flutter/engine/src/flutter/tools.
Changing the name from src/flutter to ./ and running gclient.py directly in
the src directory creates a proper directory structure suitable for compiling.

Of course, this also means there is a new pushd in the gen_tarball method to
move to ${SCRATCH_DIR} to ensure the tarball is generated outside of the
source directory.

Tested with run-tests tests.package.test_flutter.TestFlutter.test_run.

The license file has changed, but it's still BSD-3-Clause.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-04-21 23:19:59 +02:00

38 lines
1.2 KiB
Diff

From 51e8fed854fd9d373bb9b20d7ed8e7cf6ef12312 Mon Sep 17 00:00:00 2001
From: Adam Duskett <adam.duskett@amarulasolutions.com>
Date: Wed, 19 Jul 2023 11:48:59 -0700
Subject: [PATCH] pkg-config.py: do not prepend sysroot path
Buildroot uses the standard PKG_CONFIG_SYSROOT_DIR variable, so what the
pkg-config.py script is doing doesn't make sense. There is no need to prepend
the sysroot, and flutter should let pkg-config use the PKG_CONFIG_SYSROOT_DIR
variable.
Without this patch, the pkg-config.py script double prepends the sysroot path.
IE: output/host/.../sysroot/output/host/.../sysroot
Upstream: https://github.com/flutter/flutter/issues/132152
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
engine/src/build/config/linux/pkg-config.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/engine/src/build/config/linux/pkg-config.py b/engine/src/build/config/linux/pkg-config.py
index b4a6aff17..44ffdcaea 100644
--- a/engine/src/build/config/linux/pkg-config.py
+++ b/engine/src/build/config/linux/pkg-config.py
@@ -207,9 +207,7 @@ def main():
all_flags = flag_string.strip().split(' ')
- sysroot = options.sysroot
- if not sysroot:
- sysroot = ''
+ sysroot = ''
includes = []
cflags = []
--
2.41.0