Skip to content

Commit b8cd0e2

Browse files
committed
Made freetype recipe generate a shared library and not use harfbuzz
1 parent b76e4c4 commit b8cd0e2

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

pythonforandroid/recipes/freetype/__init__.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,28 @@ class FreetypeRecipe(Recipe):
1010
version = '2.5.5'
1111
url = 'http://download.savannah.gnu.org/releases/freetype/freetype-{version}.tar.gz' # noqa
1212

13-
depends = ['harfbuzz']
14-
1513
def should_build(self, arch):
1614
if exists(join(self.get_build_dir(arch.arch),
17-
'objs', '.libs', 'libfreetype.a')):
15+
'objs', '.libs', 'libfreetype.so')):
1816
return False
1917
return True
2018

2119
def build_arch(self, arch):
2220
env = self.get_recipe_env(arch)
2321

24-
harfbuzz_recipe = Recipe.get_recipe('harfbuzz', self.ctx)
25-
env['LDFLAGS'] = ' '.join(
26-
[env['LDFLAGS'],
27-
'-L{}'.format(join(harfbuzz_recipe.get_build_dir(arch.arch),
28-
'src', '.libs'))])
29-
3022
with current_directory(self.get_build_dir(arch.arch)):
3123
configure = sh.Command('./configure')
3224
shprint(configure,
3325
'--host=arm-linux-androideabi',
3426
'--prefix={}'.format(realpath('.')),
3527
'--without-zlib',
28+
'--without-harfbuzz',
3629
'--with-png=no',
37-
'--disable-shared',
3830
_env=env)
3931
shprint(sh.make, '-j5', _env=env)
4032

41-
shprint(sh.cp, 'objs/.libs/libfreetype.a', self.ctx.libs_dir)
33+
def postbuild_arch(self, arch):
34+
shprint(sh.cp, 'objs/.libs/libfreetype.so', self.ctx.get_libs_dir(arch.arch))
4235

4336

4437
recipe = FreetypeRecipe()

0 commit comments

Comments
 (0)