Skip to contentSkip to conversation

mariadb: not use the bundled libpcre2

PATCH New Yu, Mingli 1 participant 1 message Aug 5, 2020

lore
Share & tools
lore

Yu, Mingli

author
#0 lore raw

PATCH 1/1 mariadb: not use the bundled libpcre2

From: Mingli Yu <[email protected]>

From mariadb 10.5.1, it starts to use pcre2 [1] which is the bundled libpre2 by default. If using the bundled one, it will fetch, unpack and build the libpcre2 during mariadb do_compile phase as mariadb uses the bundled libpcre2 as an external project, more details in [2].

To avoid downloading the libpcre2 source from website during mariadb do_compile phase, switch to use the system libpcre2.

[1] https://mariadb.com/kb/en/pcre/
[2] https://github.com/MariaDB/server/blob/10.5/cmake/pcre.cmake

---
 meta-oe/recipes-dbs/mysql/mariadb-native_10.5.4.bb | 2 +-
 meta-oe/recipes-dbs/mysql/mariadb.inc              | 1 +
 meta-oe/recipes-dbs/mysql/mariadb_10.5.4.bb        | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
meta-oe/recipes-dbs/mysql/mariadb-native_10.5.4.bb +1 -1
index e1a038dfa..73b2a0980 100644
@@ -2,7 +2,7 @@ require mariadb.inc
 inherit native
 
 PROVIDES += "mysql5-native"
-DEPENDS = "ncurses-native zlib-native bison-native"
+DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native"
 
 RDEPENDS_${PN} = ""
 PACKAGES = ""
meta-oe/recipes-dbs/mysql/mariadb.inc +1 -0
index 58f573e5e..1aa1f68cd 100644
@@ -77,6 +77,7 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
                  -DNROFF=FALSE \
                  -DENABLE_DTRACE=FALSE \
                  -DWITH_PIC=ON \
+                 -DWITH_PCRE=system \
                  -DINSTALL_LAYOUT=RPM \
                  -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \
                  -DINSTALL_LIBDIR:PATH=${baselib} \
meta-oe/recipes-dbs/mysql/mariadb_10.5.4.bb +1 -1
index 220b904b2..e6743fe97 100644
@@ -2,7 +2,7 @@ require mariadb.inc
 
 EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
 
-DEPENDS += "mariadb-native bison-native curl openssl ncurses zlib libaio libedit libevent libxml2"
+DEPENDS += "mariadb-native bison-native libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2"
 
 PROVIDES += "mysql5 libmysqlclient"
 
Signature · 1 line
2.17.1