aboutsummaryrefslogtreecommitdiff
path: root/package/python-pygame
diff options
context:
space:
mode:
authorGravatar Maarten ter Huurne <maarten@treewalker.org>2014-04-08 19:45:06 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-04-11 22:10:05 +0200
commit75d03d1bb9df15aa00964ecac118d208a10815f2 (patch)
treeb12e796bba99d66add25c959cf35f470490d79d6 /package/python-pygame
parentc8b281354c934f2b03eb6e7d8dfb03284983c4ce (diff)
downloadbuildroot-75d03d1bb9df15aa00964ecac118d208a10815f2.tar.gz
buildroot-75d03d1bb9df15aa00964ecac118d208a10815f2.tar.bz2
python-pygame: Make installation of examples optional
They take up 1.5 MB in the target file system. Signed-Off-By: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/python-pygame')
-rw-r--r--package/python-pygame/Config.in6
-rw-r--r--package/python-pygame/python-pygame.mk7
2 files changed, 13 insertions, 0 deletions
diff --git a/package/python-pygame/Config.in b/package/python-pygame/Config.in
index b9a367de6f..f72ee319f0 100644
--- a/package/python-pygame/Config.in
+++ b/package/python-pygame/Config.in
@@ -20,6 +20,12 @@ config BR2_PACKAGE_PYTHON_PYGAME_IMAGE
pygame module for loading, saving and transfering images.
Will autoselect sdl_image with png and jpeg support.
+config BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES
+ bool "pygame.examples"
+ help
+ Include examples.
+ Selecting this option adds about 1.5 MB to the target file system.
+
config BR2_PACKAGE_PYTHON_PYGAME_FONT
bool "pygame.font"
select BR2_PACKAGE_SDL_TTF
diff --git a/package/python-pygame/python-pygame.mk b/package/python-pygame/python-pygame.mk
index d9219b991b..2278a5cf50 100644
--- a/package/python-pygame/python-pygame.mk
+++ b/package/python-pygame/python-pygame.mk
@@ -94,4 +94,11 @@ endef
PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_TESTS
+ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES),y)
+define PYTHON_PYGAME_REMOVE_EXAMPLES
+ rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/pygame/examples
+endef
+PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_EXAMPLES
+endif
+
$(eval $(python-package))