File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
pythonforandroid/recipes/pygame_sdl2 Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ from pythonforandroid .toolchain import CythonRecipe , shprint , current_directory , ArchAndroid
3
+ from os .path import exists , join
4
+ import sh
5
+ import glob
6
+
7
+
8
+ class PygameSDL2Recipe (CythonRecipe ):
9
+ # version = 'stable'
10
+ version = 'master'
11
+ url = 'https://github.com/renpy/pygame_sdl2/archive/{version}.zip'
12
+ name = 'pygame_sdl2'
13
+
14
+ depends = ['sdl2' ]
15
+ conflicts = ['pygame' ]
16
+
17
+ def get_recipe_env (self , arch ):
18
+ env = super (PygameSDL2Recipe , self ).get_recipe_env (arch )
19
+ env ['CFLAGS' ] = (env ['CFLAGS' ] +
20
+ ' -I{}' .format (join (self .ctx .bootstrap .build_dir , 'jni' , 'SDL' , 'include' )) +
21
+ ' -I{}' .format (join (self .ctx .bootstrap .build_dir , 'jni' , 'SDL2_image' )) +
22
+ ' -I{}' .format (join (self .ctx .bootstrap .build_dir , 'jni' , 'SDL2_mixer' )) +
23
+ ' -I{}' .format (join (self .ctx .bootstrap .build_dir , 'jni' , 'SDL2_ttf' )) +
24
+ ' -LSDL2 -LSDL2_image -LSDL2_mixer -LSDL2_ttf' )
25
+ env ['CXXFLAGS' ] = env ['CFLAGS' ]
26
+ env ['PYGAME_SDL2_ANDROID' ] = 'yes'
27
+ return env
28
+
29
+ recipe = PygameSDL2Recipe ()
You can’t perform that action at this time.
0 commit comments