Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add recipe for libpcre #2276

Merged
merged 2 commits into from
Aug 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions pythonforandroid/recipes/libpcre/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from pythonforandroid.recipe import Recipe
from pythonforandroid.util import current_directory
from pythonforandroid.logger import shprint
import sh
from multiprocessing import cpu_count
from os.path import join


class LibpcreRecipe(Recipe):
version = '8.44'
url = 'https://ftp.pcre.org/pub/pcre/pcre-{version}.tar.bz2'

built_libraries = {'libpcre.so': '.libs'}

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

with current_directory(self.get_build_dir(arch.arch)):
shprint(
sh.Command('./configure'),
*'''--host=arm-linux-androideabi
--disable-cpp --enable-jit --enable-utf8
--enable-unicode-properties'''.split(),
_env=env)
shprint(sh.make, '-j', str(cpu_count()), _env=env)

def get_lib_dir(self, arch):
return join(self.get_build_dir(arch), '.libs')


recipe = LibpcreRecipe()