summaryrefslogtreecommitdiff
path: root/pkg/pcre/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-09-17 00:03:34 -0700
committerMichael Forney <mforney@mforney.org>2017-09-25 19:23:06 -0700
commitba94a8513d9a0aadb3f2c834c74b64aa644c61e8 (patch)
tree48ac6c85baa7b9d960b9e1e726a906e61ca60967 /pkg/pcre/gen.lua
parentcb362b531d79708a259bbf070dee5104fd63df08 (diff)
Rewrite ninja generation scripts in Lua
Diffstat (limited to 'pkg/pcre/gen.lua')
-rw-r--r--pkg/pcre/gen.lua44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkg/pcre/gen.lua b/pkg/pcre/gen.lua
new file mode 100644
index 00000000..a0532581
--- /dev/null
+++ b/pkg/pcre/gen.lua
@@ -0,0 +1,44 @@
+cflags{
+ '-D HAVE_CONFIG_H',
+ '-I include',
+ '-I $dir',
+ '-I $srcdir',
+ '-I $outdir/include',
+}
+
+build('sed', '$outdir/include/pcre.h', '$srcdir/pcre.h.in', {
+ expr={
+ '-e s,@PCRE_MAJOR@,8,',
+ '-e s,@PCRE_MINOR@,41,',
+ '-e s,@PCRE_PRERELEASE@,,',
+ '-e s,@PCRE_DATE@,2017-07-05,',
+ },
+})
+pkg.hdrs = {'$outdir/include/pcre.h'}
+
+build('copy', '$outdir/pcre_chartables.c', '$srcdir/pcre_chartables.c.dist')
+lib('libpcre.a', {
+ 'pcre_byte_order.c',
+ 'pcre_compile.c',
+ 'pcre_config.c',
+ 'pcre_dfa_exec.c',
+ 'pcre_exec.c',
+ 'pcre_fullinfo.c',
+ 'pcre_get.c',
+ 'pcre_globals.c',
+ 'pcre_jit_compile.c',
+ 'pcre_maketables.c',
+ 'pcre_newline.c',
+ 'pcre_ord2utf8.c',
+ 'pcre_refcount.c',
+ 'pcre_string_utils.c',
+ 'pcre_study.c',
+ 'pcre_tables.c',
+ 'pcre_ucd.c',
+ 'pcre_valid_utf8.c',
+ 'pcre_version.c',
+ 'pcre_xclass.c',
+ '$outdir/pcre_chartables.c',
+}, {'$dir/headers'})
+
+fetch 'curl'