python-pygame: Make installation of examples optional
authorMaarten ter Huurne <maarten@treewalker.org>
Tue, 8 Apr 2014 17:45:06 +0000 (19:45 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 11 Apr 2014 20:10:05 +0000 (22:10 +0200)
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>
package/python-pygame/Config.in
package/python-pygame/python-pygame.mk

index b9a367de6fa2ece045553de669a0f598adfb99a6..f72ee319f092aadd49deb71248b0eb8d8b98b401 100644 (file)
@@ -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
index d9219b991b9a23456d27a26ff13ef853671625a8..2278a5cf508198c23e298fd310788f79a0398527 100644 (file)
@@ -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))