Skip to content

Commit f4b4502

Browse files
committed
[recipe-lib] Make libglob a library recipe
1 parent e848e2d commit f4b4502

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pythonforandroid/recipes/libglob/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
available via '-lglob' LDFLAG
44
"""
55
from os.path import exists, join
6-
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
6+
from pythonforandroid.recipe import Recipe
77
from pythonforandroid.toolchain import current_directory
88
from pythonforandroid.logger import info, shprint
99
import sh
1010

1111

12-
class LibGlobRecipe(CompiledComponentsPythonRecipe):
12+
class LibGlobRecipe(Recipe):
1313
"""Make a glob.h and glob.so for the python_install_dir()"""
1414
version = '0.0.1'
1515
url = None
@@ -20,6 +20,7 @@ class LibGlobRecipe(CompiledComponentsPythonRecipe):
2020
# https://raw.githubusercontent.com/white-gecko/TokyoCabinet/master/glob.c
2121
# and pushed in via patch
2222
name = 'libglob'
23+
built_libraries = {'libglob.so': '.'}
2324

2425
depends = [('hostpython2', 'hostpython3')]
2526
patches = ['glob.patch']
@@ -35,7 +36,7 @@ def prebuild_arch(self, arch):
3536
info("creating {}".format(path))
3637
shprint(sh.mkdir, '-p', path)
3738

38-
def build_arch(self, arch):
39+
def do_build_libs(self, arch):
3940
"""simple shared compile"""
4041
env = self.get_recipe_env(arch, with_flags_in_cc=False)
4142
for path in (
@@ -60,7 +61,6 @@ def build_arch(self, arch):
6061
cflags.extend(['-shared', '-I.', 'glob.o', '-o', 'libglob.so'])
6162
cflags.extend(env['LDFLAGS'].split())
6263
shprint(cc, *cflags, _env=env)
63-
shprint(sh.cp, 'libglob.so', join(self.ctx.libs_dir, arch.arch))
6464

6565

6666
recipe = LibGlobRecipe()

0 commit comments

Comments
 (0)