Skip to content

Commit 7bb8c8d

Browse files
committed
add back kivent recipes
1 parent 25e5acc commit 7bb8c8d

File tree

4 files changed

+127
-0
lines changed

4 files changed

+127
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
from pythonforandroid.recipe import CythonRecipe
2+
from os.path import join
3+
4+
5+
class KiventCoreRecipe(CythonRecipe):
6+
version = 'master'
7+
url = 'https://github.com/kivy/kivent/archive/{version}.zip'
8+
name = 'kivent_core'
9+
10+
depends = ['kivy']
11+
12+
subbuilddir = False
13+
14+
def get_recipe_env(self, arch, with_flags_in_cc=True):
15+
env = super(KiventCoreRecipe, self).get_recipe_env(
16+
arch, with_flags_in_cc=with_flags_in_cc
17+
)
18+
env['CYTHONPATH'] = env['PYTHONPATH'] = self.get_recipe(
19+
'kivy', self.ctx
20+
).get_build_dir(arch.arch)
21+
return env
22+
23+
def get_build_dir(self, arch, sub=False):
24+
builddir = super(KiventCoreRecipe, self).get_build_dir(arch)
25+
if sub or self.subbuilddir:
26+
return join(builddir, 'modules', 'core')
27+
else:
28+
return builddir
29+
30+
def build_arch(self, arch):
31+
self.subbuilddir = True
32+
super(KiventCoreRecipe, self).build_arch(arch)
33+
self.subbuilddir = False
34+
35+
36+
recipe = KiventCoreRecipe()
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from pythonforandroid.recipe import CythonRecipe
2+
from os.path import join
3+
4+
5+
class KiventCymunkRecipe(CythonRecipe):
6+
name = 'kivent_cymunk'
7+
8+
depends = ['kivent_core', 'cymunk']
9+
10+
subbuilddir = False
11+
12+
def get_recipe_env(self, arch, with_flags_in_cc=True):
13+
env = super(KiventCymunkRecipe, self).get_recipe_env(
14+
arch, with_flags_in_cc=with_flags_in_cc)
15+
cymunk = self.get_recipe('cymunk', self.ctx).get_build_dir(arch.arch)
16+
kivy = self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch)
17+
kivent = self.get_recipe('kivent_core',
18+
self.ctx).get_build_dir(arch.arch, sub=True)
19+
env['CYTHONPATH'] = env['PYTHONPATH'] = ':'.join((kivy, cymunk, kivent))
20+
return env
21+
22+
def prepare_build_dir(self, arch):
23+
'''No need to prepare, we'll use kivent_core'''
24+
return
25+
26+
def get_build_dir(self, arch):
27+
builddir = self.get_recipe('kivent_core', self.ctx).get_build_dir(arch)
28+
return join(builddir, 'modules', 'cymunk')
29+
30+
31+
recipe = KiventCymunkRecipe()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from pythonforandroid.recipe import CythonRecipe
2+
from os.path import join
3+
4+
5+
class KiventParticlesRecipe(CythonRecipe):
6+
name = 'kivent_particles'
7+
8+
depends = ['kivent_core']
9+
10+
subbuilddir = False
11+
12+
def get_recipe_env(self, arch, with_flags_in_cc=True):
13+
env = super(KiventParticlesRecipe, self).get_recipe_env(
14+
arch, with_flags_in_cc=with_flags_in_cc)
15+
kivy = self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch)
16+
kivent = self.get_recipe('kivent_core',
17+
self.ctx).get_build_dir(arch.arch, sub=True)
18+
env['CYTHONPATH'] = env['PYTHONPATH'] = ':'.join((kivy, kivent))
19+
return env
20+
21+
def prepare_build_dir(self, arch):
22+
'''No need to prepare, we'll use kivent_core'''
23+
return
24+
25+
def get_build_dir(self, arch):
26+
builddir = self.get_recipe('kivent_core', self.ctx).get_build_dir(arch)
27+
return join(builddir, 'modules', 'particles')
28+
29+
30+
recipe = KiventParticlesRecipe()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from pythonforandroid.recipe import CythonRecipe
2+
from os.path import join
3+
4+
5+
class KiventPolygenRecipe(CythonRecipe):
6+
name = 'kivent_polygen'
7+
8+
depends = ['kivent_core']
9+
10+
subbuilddir = False
11+
12+
def get_recipe_env(self, arch, with_flags_in_cc=True):
13+
env = super(KiventPolygenRecipe, self).get_recipe_env(
14+
arch, with_flags_in_cc=with_flags_in_cc)
15+
kivy = self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch)
16+
kivent = self.get_recipe('kivent_core',
17+
self.ctx).get_build_dir(arch.arch, sub=True)
18+
env['CYTHONPATH'] = env['PYTHONPATH'] = ':'.join((kivy, kivent))
19+
return env
20+
21+
def prepare_build_dir(self, arch):
22+
'''No need to prepare, we'll use kivent_core'''
23+
return
24+
25+
def get_build_dir(self, arch):
26+
builddir = self.get_recipe('kivent_core', self.ctx).get_build_dir(arch)
27+
return join(builddir, 'modules', 'polygen')
28+
29+
30+
recipe = KiventPolygenRecipe()

0 commit comments

Comments
 (0)