Patchwork [5/5] libglib2: use system pcre when available

login
register
mail settings
Submitter Thomas Petazzoni
Date March 9, 2013, 6:21 p.m.
Message ID <1362853290-15592-6-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/226369/
State Accepted
Commit fe192908a4e3195b6f724310fe83fadaf18b66e7
Headers show

Comments

Thomas Petazzoni - March 9, 2013, 6:21 p.m.
By default, glib builds its own internal copy of the pcre library, but
it also allows to use the one available from the system. Use this
possibility when pcre is already selected in the Buildroot
configuration.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libglib2/libglib2.mk |    7 +++++++
 1 file changed, 7 insertions(+)
Peter Korsgaard - March 9, 2013, 8:18 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> By default, glib builds its own internal copy of the pcre library, but
 Thomas> it also allows to use the one available from the system. Use this
 Thomas> possibility when pcre is already selected in the Buildroot
 Thomas> configuration.

Committed, thanks.

Patch

diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index b108b89..4ca6ca3 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -81,6 +81,13 @@  LIBGLIB2_CONF_OPT += --with-libiconv=gnu
 LIBGLIB2_DEPENDENCIES += libiconv
 endif
 
+ifeq ($(BR2_PACKAGE_PCRE),y)
+LIBGLIB2_CONF_OPT += --with-pcre=system
+LIBGLIB2_DEPENDENCIES += pcre
+else
+LIBGLIB2_CONF_OPT += --with-pcre=internal
+endif
+
 define LIBGLIB2_REMOVE_DEV_FILES
 	rm -rf $(TARGET_DIR)/usr/lib/glib-2.0
 	rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gettext