Skip to content

Commit e6692e1

Browse files
committed
kivy thorvg support
1 parent 38c85cc commit e6692e1

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

pythonforandroid/recipes/kivy/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import packaging.version
44

55
import sh
6-
from pythonforandroid.recipe import PyProjectRecipe
6+
from pythonforandroid.recipe import PyProjectRecipe, Recipe
77
from pythonforandroid.toolchain import current_directory, shprint
88

99

@@ -33,7 +33,7 @@ class KivyRecipe(PyProjectRecipe):
3333
url = 'https://github.com/kivy/kivy/archive/{version}.zip'
3434
name = 'kivy'
3535

36-
depends = [('sdl2', 'sdl3'), 'pyjnius', 'setuptools', 'android']
36+
depends = [('sdl2', 'sdl3'), 'pyjnius', 'setuptools', 'android', 'libthorvg']
3737
python_depends = ['certifi', 'chardet', 'idna', 'requests', 'urllib3', 'filetype']
3838
hostpython_prerequisites = ["cython>=0.29.1,<=3.0.12"]
3939

@@ -70,6 +70,13 @@ def get_recipe_env(self, arch, **kwargs):
7070
if not is_kivy_less_than_3(self, arch):
7171
env['KIVY_CROSS_PLATFORM'] = 'android'
7272

73+
# thorvg headers
74+
env['KIVY_THORVG_LIB_DIR'] = self.ctx.get_libs_dir(arch.arch)
75+
env['KIVY_THORVG_INCLUDE_DIR'] = join(
76+
Recipe.get_recipe('libthorvg', self.ctx).get_include_dir(arch),
77+
'thorvg-1'
78+
)
79+
7380
if 'sdl2' in self.ctx.recipe_build_order:
7481
env['USE_SDL2'] = '1'
7582
env['KIVY_SPLIT_EXAMPLES'] = '1'

pythonforandroid/recipes/libthorvg/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
class LibThorVGRecipe(MesonRecipe):
1111
name = "libthorvg"
12-
version = "1.0.1"
13-
url = "https://github.com/thorvg/thorvg/releases/download/v{version}/thorvg.tar.gz"
12+
version = "1.0.5"
13+
url = "https://github.com/thorvg/thorvg/archive/refs/tags/v{version}.tar.gz"
1414
config_otps = [
1515
"-Dsimd=true",
1616
"-Dbindings=capi",
1717
"-Dtools=all",
18-
"-Dengines=sw,gl",
18+
"-Dengines=cpu,gl",
1919
"-Dloaders=svg,png,jpg,ttf,webp",
2020
"-Dextra=opengl_es,lottie_exp,openmp",
2121
]

pythonforandroid/recipes/thorvg-python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class ThorVGPythonRecipe(PyProjectRecipe):
55
site_packages_name = "thorvg_python"
6-
version = "1.1.1"
6+
version = "1.1.3"
77
url = "https://github.com/laggykiller/thorvg-python/archive/refs/tags/v{version}.tar.gz"
88
depends = ["libthorvg"]
99
patches = ["sharedlib.patch"]

0 commit comments

Comments
 (0)