PYTHON_PYGAME_SOURCE = pygame-$(PYTHON_PYGAME_VERSION).tar.gz
PYTHON_PYGAME_SITE = https://bitbucket.org/pygame/pygame
PYTHON_PYGAME_SITE_METHOD = hg
+PYTHON_PYGAME_SETUP_TYPE = distutils
ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y)
PYTHON_PYGAME_OPT_DEPENDS += sdl_image
PYTHON_PYGAME_OPT_DEPENDS += sdl_mixer
endif
-PYTHON_PYGAME_DEPENDENCIES = python sdl $(PYTHON_PYGAME_OPT_DEPENDS)
+PYTHON_PYGAME_DEPENDENCIES = sdl $(PYTHON_PYGAME_OPT_DEPENDS)
ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y)
define PYTHON_PYGAME_UNCONFIGURE_IMAGE
$(PYTHON_PYGAME_UNCONFIGURE_SCRAP)
endef
-define PYTHON_PYGAME_BUILD_CMDS
- (cd $(@D); CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
- LDSHARED="$(TARGET_CROSS)gcc -shared" \
- CROSS_COMPILING=yes \
- _python_sysroot=$(STAGING_DIR) \
- _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \
- _python_prefix=/usr \
- _python_exec_prefix=/usr \
- $(HOST_DIR)/usr/bin/python setup.py build)
-endef
-
ifneq ($(BR2_HAVE_DOCUMENTATION),y)
define PYTHON_PYGAME_REMOVE_DOC
rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/docs
endef
+
+PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_DOC
endif
-define PYTHON_PYGAME_INSTALL_TARGET_CMDS
- (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install \
- --prefix=$(TARGET_DIR)/usr)
+define PYTHON_PYGAME_REMOVE_TESTS
rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/tests
- $(PYTHON_PYGAME_REMOVE_DOC)
endef
-$(eval $(generic-package))
+PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_TESTS
+
+$(eval $(python-package))