File tree 1 file changed +31
-0
lines changed
pythonforandroid/recipes/libpcre
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ from pythonforandroid .recipe import Recipe
2
+ from pythonforandroid .util import current_directory
3
+ from pythonforandroid .logger import shprint
4
+ import sh
5
+ from multiprocessing import cpu_count
6
+ from os .path import join
7
+
8
+
9
+ class LibpcreRecipe (Recipe ):
10
+ version = '8.44'
11
+ url = 'https://ftp.pcre.org/pub/pcre/pcre-{version}.tar.bz2'
12
+
13
+ built_libraries = {'libpcre.so' : '.libs' }
14
+
15
+ def build_arch (self , arch ):
16
+ env = self .get_recipe_env (arch )
17
+
18
+ with current_directory (self .get_build_dir (arch .arch )):
19
+ shprint (
20
+ sh .Command ('./configure' ),
21
+ * '''--host=arm-linux-androideabi
22
+ --disable-cpp --enable-jit --enable-utf8
23
+ --enable-unicode-properties''' .split (),
24
+ _env = env )
25
+ shprint (sh .make , '-j' , str (cpu_count ()), _env = env )
26
+
27
+ def get_lib_dir (self , arch ):
28
+ return join (self .get_build_dir (arch ), '.libs' )
29
+
30
+
31
+ recipe = LibpcreRecipe ()
You can’t perform that action at this time.
0 commit comments