Skip to content

Commit e990f41

Browse files
committed
Made libpng recipe fully build shared object file
1 parent 66be21d commit e990f41

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

pythonforandroid/recipes/png/__init__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
from pythonforandroid.recipe import NDKRecipe
2+
from pythonforandroid.util import current_directory
3+
from pythonforandroid.logger import shprint
4+
5+
import sh
6+
7+
from os.path import join
28

39

410
class PngRecipe(NDKRecipe):
@@ -15,5 +21,22 @@ class PngRecipe(NDKRecipe):
1521

1622
patches = ['build_shared_library.patch']
1723

24+
generated_libraries = ['libpng.so']
25+
26+
def build_arch(self, arch):
27+
super(PngRecipe, self).build_arch(arch)
28+
29+
with current_directory(self.get_build_dir(arch.arch)):
30+
shprint(
31+
sh.cp,
32+
join(
33+
self.get_build_dir(arch.arch),
34+
'libs',
35+
arch.arch,
36+
'libpng.so'),
37+
join(self.ctx.get_libs_dir(arch.arch), 'libpng16.so'))
38+
39+
40+
pass
1841

1942
recipe = PngRecipe()

0 commit comments

Comments
 (0)