2022-12-02 21:15:34 +01:00
|
|
|
from pythonforandroid.logger import shprint
|
|
|
|
from pythonforandroid.util import current_directory
|
2019-03-30 21:58:45 +01:00
|
|
|
from pythonforandroid.recipe import Recipe
|
|
|
|
from multiprocessing import cpu_count
|
|
|
|
import sh
|
|
|
|
|
|
|
|
|
|
|
|
class LibIconvRecipe(Recipe):
|
|
|
|
|
2022-12-02 21:15:34 +01:00
|
|
|
version = '1.16'
|
2019-03-30 21:58:45 +01:00
|
|
|
|
|
|
|
url = 'https://ftp.gnu.org/pub/gnu/libiconv/libiconv-{version}.tar.gz'
|
|
|
|
|
2022-12-02 21:15:34 +01:00
|
|
|
built_libraries = {'libiconv.so': 'lib/.libs'}
|
2019-03-30 21:58:45 +01:00
|
|
|
|
|
|
|
def build_arch(self, arch):
|
|
|
|
env = self.get_recipe_env(arch)
|
|
|
|
with current_directory(self.get_build_dir(arch.arch)):
|
|
|
|
shprint(
|
|
|
|
sh.Command('./configure'),
|
2022-12-02 21:15:34 +01:00
|
|
|
'--host=' + arch.command_prefix,
|
|
|
|
'--prefix=' + self.ctx.get_python_install_dir(arch.arch),
|
2019-03-30 21:58:45 +01:00
|
|
|
_env=env)
|
|
|
|
shprint(sh.make, '-j' + str(cpu_count()), _env=env)
|
|
|
|
|
|
|
|
|
|
|
|
recipe = LibIconvRecipe()
|