diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-03-02 19:55:24 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-03-02 19:55:24 +0100 |
commit | 793e72f68b1e005ae1ce5f204d7776e9cc335d26 (patch) | |
tree | 5c7de052cf9c69517763f71c8a7554e42ebae7cc /recipes | |
parent | c251713b01d3597e2959b8db0eba8f31b244cf5a (diff) |
mingw-regex: Add standalone implementation for POSIX regex
Windows has none but flex needs it for compilation.
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/build-tools/mingw-regex.recipe | 15 | ||||
-rw-r--r-- | recipes/build-tools/mingw-regex/0001-Fix-compilation.patch | 36 |
2 files changed, 51 insertions, 0 deletions
diff --git a/recipes/build-tools/mingw-regex.recipe b/recipes/build-tools/mingw-regex.recipe new file mode 100644 index 00000000..cc76f472 --- /dev/null +++ b/recipes/build-tools/mingw-regex.recipe @@ -0,0 +1,15 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + +class Recipe(recipe.Recipe): + name = 'mingw-regex' + version = '2.5' + licenses = [License.LGPLv2_1Plus] + files_libs = ['libregex'] + files_devel = ['include/regex.h'] + autoreconf = True + commit = 'origin/master' + patches = ['mingw-regex/0001-Fix-compilation.patch'] + + def prepare(self): + self.remotes['origin'] = 'git://git.code.sf.net/p/mingw/regex' + self.remotes['upstream'] = self.remotes['origin'] diff --git a/recipes/build-tools/mingw-regex/0001-Fix-compilation.patch b/recipes/build-tools/mingw-regex/0001-Fix-compilation.patch new file mode 100644 index 00000000..7f7f5559 --- /dev/null +++ b/recipes/build-tools/mingw-regex/0001-Fix-compilation.patch @@ -0,0 +1,36 @@ +From 619fa92b1fc80f9a188a7a4198b01644887f6b4c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> +Date: Mon, 2 Mar 2015 19:48:59 +0100 +Subject: [PATCH] Fix compilation + +I have no idea why compilation fails, but it does so this way on Windows: + +regcomp.c: At top level: +regcomp.c:509:20: error: unknown type name 'preg' +regcomp.c:509:26: error: unknown type name 'errbuf' +regcomp.c:509:34: error: unknown type name 'errbuf_size' +regcomp.c:514:1: error: expected identifier or '(' before '{' token +--- + regcomp.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/regcomp.c b/regcomp.c +index 78a1218..fad65f5 100644 +--- a/regcomp.c ++++ b/regcomp.c +@@ -506,11 +506,7 @@ weak_alias (__regcomp, regcomp) + from either regcomp or regexec. We don't use PREG here. */ + + size_t +-regerror (errcode, preg, errbuf, errbuf_size) +- int errcode; +- const regex_t *__restrict preg; +- char *__restrict errbuf; +- size_t errbuf_size; ++regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, size_t errbuf_size) + { + const char *msg; + size_t msg_size; +-- +2.1.4 + |