File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
pythonforandroid/recipes/zbarlight Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ from os .path import join
2+ from pythonforandroid .recipe import PythonRecipe
3+
4+
5+ class ZBarLightRecipe (PythonRecipe ):
6+
7+ version = '2.1'
8+
9+ url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz' # noqa
10+
11+ call_hostpython_via_targetpython = False
12+
13+ depends = ['setuptools' , 'libzbar' ]
14+
15+ def get_recipe_env (self , arch = None , with_flags_in_cc = True ):
16+ env = super (ZBarLightRecipe , self ).get_recipe_env (arch , with_flags_in_cc )
17+ libzbar = self .get_recipe ('libzbar' , self .ctx )
18+ libzbar_dir = libzbar .get_build_dir (arch .arch )
19+ env ['PYTHON_ROOT' ] = self .ctx .get_python_install_dir ()
20+ env ['CFLAGS' ] += ' -I' + join (libzbar_dir , 'include' )
21+ env ['LDFLAGS' ] += ' -L' + join (libzbar_dir , 'zbar' , '.libs' )
22+ env ['LIBS' ] = env .get ('LIBS' , '' ) + ' -landroid -lzbar'
23+ return env
24+
25+
26+ recipe = ZBarLightRecipe ()
You can’t perform that action at this time.
0 commit comments