1 ################################################################################
5 ################################################################################
7 # stable 1.9.1 release requires V4L which has been wiped out of recent Linux
8 # kernels, so use latest mercurial revision until next stable release is out.
9 PYTHON_PYGAME_VERSION
= d61ea8eabd56
10 PYTHON_PYGAME_SOURCE
= pygame-
$(PYTHON_PYGAME_VERSION
).
tar.gz
11 PYTHON_PYGAME_SITE
= https
://bitbucket.org
/pygame
/pygame
12 PYTHON_PYGAME_SITE_METHOD
= hg
13 PYTHON_PYGAME_SETUP_TYPE
= distutils
14 PYTHON_PYGAME_LICENSE
= LGPLv2.1
+
15 PYTHON_PYGAME_LICENSE_FILES
= LGPL
17 ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE
),y
)
18 PYTHON_PYGAME_OPT_DEPENDS
+= sdl_image
21 ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_FONT
),y
)
22 PYTHON_PYGAME_OPT_DEPENDS
+= sdl_ttf
25 ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER
),y
)
26 PYTHON_PYGAME_OPT_DEPENDS
+= sdl_mixer
29 PYTHON_PYGAME_DEPENDENCIES
= sdl
$(PYTHON_PYGAME_OPT_DEPENDS
)
31 ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE
),y
)
32 define PYTHON_PYGAME_UNCONFIGURE_IMAGE
33 $(SED
) 's/^imageext/#imageext/' $(@D
)/Setup
37 ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_FONT
),y
)
38 define PYTHON_PYGAME_UNCONFIGURE_FONT
39 $(SED
) 's/^font/#font/' $(@D
)/Setup
43 ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER
),y
)
44 define PYTHON_PYGAME_UNCONFIGURE_MIXER
45 $(SED
) 's/^mixer/#mixer/g' $(@D
)/Setup
49 # Both require numpy or numeric python module
50 define PYTHON_PYGAME_UNCONFIGURE_SNDARRAY
51 $(SED
) 's/^_numericsndarray/#_numericsndarray/' $(@D
)/Setup
54 define PYTHON_PYGAME_UNCONFIGURE_SURFARRAY
55 $(SED
) 's/^_numericsurfarray/#_numericsurfarray/' $(@D
)/Setup
59 define PYTHON_PYGAME_UNCONFIGURE_MOVIE
60 $(SED
) 's/^movie/#movie/' $(@D
)/Setup
63 ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_SCRAP
),y
)
64 define PYTHON_PYGAME_UNCONFIGURE_SCRAP
65 $(SED
) 's/^scrap/#scrap/' $(@D
)/Setup
69 define PYTHON_PYGAME_UNCONFIGURE_FREETYPE
70 $(SED
) 's/^_freetype/#_freetype/' $(@D
)/Setup
73 PYTHON_PYGAME_SDL_FLAGS
= `$(STAGING_DIR)/usr/bin/sdl-config --cflags`
74 PYTHON_PYGAME_SDL_FLAGS
+= `$(STAGING_DIR)/usr/bin/sdl-config --libs`
76 # Pygame needs a Setup file where options should be commented out if
77 # dependencies are not available
78 define PYTHON_PYGAME_CONFIGURE_CMDS
79 cp
-f
$(@D
)/Setup.in
$(@D
)/Setup
80 $(SED
) "s~^SDL = ~SDL = $(PYTHON_PYGAME_SDL_FLAGS) \n#~" $(@D
)/Setup
81 $(SED
) 's/^pypm/#pypm/' $(@D
)/Setup
82 $(PYTHON_PYGAME_UNCONFIGURE_IMAGE
)
83 $(PYTHON_PYGAME_UNCONFIGURE_FONT
)
84 $(PYTHON_PYGAME_UNCONFIGURE_MIXER
)
85 $(PYTHON_PYGAME_UNCONFIGURE_SNDARRAY
)
86 $(PYTHON_PYGAME_UNCONFIGURE_SURFARRAY
)
87 $(PYTHON_PYGAME_UNCONFIGURE_MOVIE
)
88 $(PYTHON_PYGAME_UNCONFIGURE_SCRAP
)
89 $(PYTHON_PYGAME_UNCONFIGURE_FREETYPE
)
92 define PYTHON_PYGAME_REMOVE_DOC
93 rm -rf
$(TARGET_DIR
)/usr
/lib
/python
*/site-packages
/pygame
/docs
96 PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS
+= PYTHON_PYGAME_REMOVE_DOC
98 define PYTHON_PYGAME_REMOVE_TESTS
99 rm -rf
$(TARGET_DIR
)/usr
/lib
/python
*/site-packages
/pygame
/tests
102 PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS
+= PYTHON_PYGAME_REMOVE_TESTS
104 ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES
),y
)
105 define PYTHON_PYGAME_REMOVE_EXAMPLES
106 rm -rf
$(TARGET_DIR
)/usr
/lib
/python
$(PYTHON_VERSION_MAJOR
)/site-packages
/pygame
/examples
108 PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS
+= PYTHON_PYGAME_REMOVE_EXAMPLES
111 $(eval
$(python-package
))