1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-01 01:32:04 +03:00
vimr/third-party/deps/pcre.py
Tae Won Ha d0d244b9e9 Disable pcre-jit for now
No JIT support for arm64 for the time being
2020-11-21 10:37:23 +01:00

55 lines
1.2 KiB
Python

from string import Template
from config import Target
from builder import Builder
from utils.shell import shell
# language=bash
download_command = Template(
"""
curl -L -s -o pcre.tar.bz2 "https://ftp.pcre.org/pub/pcre/pcre-${version}.tar.bz2"
"""
)
# language=bash
extract_command = Template(
"""
rm -rf "pcre-${target}"
tar xf pcre.tar.bz2
mv "pcre-${version}" "pcre-${target}"
"""
)
# language=bash
make_command = Template(
"""
pushd pcre-${target} >/dev/null
./configure \
CFLAGS="${cflags}" \
CXXFLAGS="${cflags}" \
MACOSX_DEPLOYMENT_TARGET="${deployment_target}" \
--disable-dependency-tracking \
--enable-utf8 \
--enable-pcre8 \
--enable-pcre16 \
--enable-pcre32 \
--enable-unicode-properties \
--enable-pcregrep-libz \
--enable-pcregrep-libbz2 \
--enable-jit=no \
--disable-shared \
--host="${host}" \
--prefix="${install_path}"
make MACOSX_DEPLOYMENT_TARGET="${deployment_target}" install
popd >/dev/null
"""
)
# language=bash
build_universal_and_install_command = Template(
"""
lipo -create -output "${install_lib_path}/libpcre.a" "${arm64_lib_path}/libpcre.a" "${x86_64_lib_path}/libpcre.a"
cp -r "${arm64_include_path}"/* "${install_include_path}"
"""
)