mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
package/flutter-engine: don't pollute user's home directory
flutter-engine will forcibly create ~/.dart/ and ~/.flutter/ and store stuff in there. This is however quite dirty and pollutes the user's home, and will also not work when the home is read-only (e.g. shared in a container). Forcibly redirect flutter-engine to the same location where we redirected host-flutter-sdk-bin, using the same trick of redefining HOME as for host-flutter-sdk-bin. Ideally, we'd like to have some way to share this with all flutter-based packages, but we so far have only a few of them, so it is too early to even think about some commonalities (even less so about a shared infra). So we just duplicate the setting for now, this can be revisited later. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
751e90e6eb
commit
439c9516e8
@@ -185,11 +185,14 @@ define FLUTTER_ENGINE_EXTRACT_CMDS
|
|||||||
| $(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) -
|
| $(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) -
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# We must set the home directory to the sdk directory or else flutter will
|
||||||
|
# place .dart, and .flutter in ~/.
|
||||||
define FLUTTER_ENGINE_CONFIGURE_CMDS
|
define FLUTTER_ENGINE_CONFIGURE_CMDS
|
||||||
cd $(@D) && \
|
cd $(@D) && \
|
||||||
rm -rf $(FLUTTER_ENGINE_BUILD_DIR) && \
|
rm -rf $(FLUTTER_ENGINE_BUILD_DIR) && \
|
||||||
PATH=$(HOST_DIR)/share/depot_tools:$(BR_PATH) \
|
PATH=$(HOST_DIR)/share/depot_tools:$(BR_PATH) \
|
||||||
PUB_CACHE=$(FLUTTER_SDK_BIN_PUB_CACHE) \
|
PUB_CACHE=$(FLUTTER_SDK_BIN_PUB_CACHE) \
|
||||||
|
HOME=$(HOST_FLUTTER_SDK_BIN_SDK) \
|
||||||
./flutter/tools/gn \
|
./flutter/tools/gn \
|
||||||
$(FLUTTER_ENGINE_CONF_OPTS)
|
$(FLUTTER_ENGINE_CONF_OPTS)
|
||||||
endef
|
endef
|
||||||
@@ -198,6 +201,7 @@ define FLUTTER_ENGINE_BUILD_CMDS
|
|||||||
cd $(@D) && \
|
cd $(@D) && \
|
||||||
PATH=$(HOST_DIR)/share/depot_tools:$(BR_PATH) \
|
PATH=$(HOST_DIR)/share/depot_tools:$(BR_PATH) \
|
||||||
PUB_CACHE=$(FLUTTER_SDK_BIN_PUB_CACHE) \
|
PUB_CACHE=$(FLUTTER_SDK_BIN_PUB_CACHE) \
|
||||||
|
HOME=$(HOST_FLUTTER_SDK_BIN_SDK) \
|
||||||
$(HOST_DIR)/bin/ninja \
|
$(HOST_DIR)/bin/ninja \
|
||||||
-j $(PARALLEL_JOBS) \
|
-j $(PARALLEL_JOBS) \
|
||||||
-C $(FLUTTER_ENGINE_BUILD_DIR)
|
-C $(FLUTTER_ENGINE_BUILD_DIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user