build script: add pcre target

This commit is contained in:
alexey.lysiuk 2020-12-03 12:51:55 +02:00
parent 20d038030b
commit 23522ec45d
2 changed files with 20 additions and 0 deletions

5
.gitignore vendored
View file

@ -21,6 +21,11 @@
/deps/nasm/bin/ndisasm
/deps/openal/lib/cmake/
/deps/opusfile/lib/libopusurl.a
/deps/pcre/bin/
/deps/pcre/include/pcre_*.h
/deps/pcre/include/pcrecpp*.h
/deps/pcre/lib/libpcrecpp.a
/deps/pcre/lib/libpcreposix.a
/deps/sndfile/bin/
/deps/sndfile/include/sndfile.hh
/deps/sndfile/lib/cmake/

View file

@ -770,6 +770,20 @@ class OpusFileTarget(ConfigureMakeStaticDependencyTarget):
return os.path.exists(builder.source_path + 'opusfile.pc.in')
class PcreTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='pcre'):
super().__init__(name)
self.options['--enable-unicode-properties'] = 'yes'
def prepare_source(self, builder: 'Builder'):
builder.download_source(
'https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.bz2',
'19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d')
def detect(self, builder: 'Builder') -> bool:
return os.path.exists(builder.source_path + 'pcre.h.in')
class SndFileTarget(CMakeStaticDependencyTarget):
def __init__(self, name='sndfile'):
super().__init__(name)
@ -1011,6 +1025,7 @@ class Builder(object):
OpenALTarget(),
OpusTarget(),
OpusFileTarget(),
PcreTarget(),
SndFileTarget(),
VorbisTarget(),
ZlibTarget(),