Skip to contentSkip to conversation

libxml2: add support for building host library with python support

PATCH New Noel vellemans 3 participants 3 messages Nov 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxml2: add support for building host library with python support

From: Vellemans Noel <[email protected]>

Patch based on the initial work of Will Wagner (Thanks Will). libxml2 host library with python support is required to build mesa3d (7.10.1)

---
 package/libxml2/Config.in  |    3 +++
 package/libxml2/libxml2.mk |   10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
package/libxml2/Config.in +3 -0
index ebd63fe..ea62663 100644
@@ -4,3 +4,6 @@ config BR2_PACKAGE_LIBXML2
 	  XML C Parser
 
 	  http://xmlsoft.org/
+
+config BR2_PACKAGE_HOST_LIBXML2_PYTHON
+    bool
\ No newline at end of file
package/libxml2/libxml2.mk +9 -1
index 71f2bd1..fde3735 100644
@@ -26,7 +26,15 @@ LIBXML2_POST_INSTALL_STAGING_HOOKS += LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP
 
 HOST_LIBXML2_DEPENDENCIES = host-pkgconf
 
-HOST_LIBXML2_CONF_OPT = --without-debug --without-python
+HOST_LIBXML2_CONF_OPT = --without-debug
+
+ifeq ($(BR2_PACKAGE_HOST_LIBXML2_PYTHON),y)
+HOST_LIBXML2_DEPENDENCIES += host-python
+HOST_LIBXML2_CONF_OPT += --with-python=$(HOST_DIR)/usr
+else
+HOST_LIBXML2_CONF_OPT += --without-python
+endif
+
 
 define LIBXML2_REMOVE_CONFIG_SCRIPTS
 	$(RM) -f $(TARGET_DIR)/usr/bin/xml2-config
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 libxml2: add support for building host library with python support

Noel,

package/libxml2/Config.in config BR2_PACKAGE_LIBXML2 · line 9

Quoted 3 lines · Noel vellemans
package/libxml2/Config.in +2 -0
+config BR2_PACKAGE_HOST_LIBXML2_PYTHON
+    bool
\ No newline at end of file

I don't know if we want to introduce sub-options for host packages.

Quoted 8 lines
package/libxml2/libxml2.mk +0 -0
index 71f2bd1..fde3735 100644
@@ -26,7 +26,15 @@ LIBXML2_POST_INSTALL_STAGING_HOOKS +=

LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP
HOST_LIBXML2_DEPENDENCIES = host-pkgconf

package/libxml2/libxml2.mk LIBXML2_POST_INSTALL_STAGING_HOOKS += LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP · line 36

Quoted 9 lines
package/libxml2/libxml2.mk +8 -1
-HOST_LIBXML2_CONF_OPT = --without-debug --without-python
+HOST_LIBXML2_CONF_OPT = --without-debug
+
+ifeq ($(BR2_PACKAGE_HOST_LIBXML2_PYTHON),y)
+HOST_LIBXML2_DEPENDENCIES += host-python
+HOST_LIBXML2_CONF_OPT += --with-python=$(HOST_DIR)/usr
+else
+HOST_LIBXML2_CONF_OPT += --without-python
+endif

I'm confused here. I thought mesa required a Python that has xml2 support. But here you're building xml2 with Python support. Could you enlighten me? :-)

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 libxml2: add support for building host library with python support

Hi thomas,

Quoted 1 line
Quoted 1 line

I don't know if we want to introduce sub-options for host packages.

Well, I first did HARD-code this option into my "test"-build, but based on (a previous) patch from Will and based on the comments of Arnout, I kind of did agree on the sub-option.
I know its not that good-looking, but at this time, it looks a 'reasonable' way of getting this done.

Ref to : [Buildroot] mesa3d: "ImportError: No module named libxml2"

Quoted 1 line
Quoted 1 line

I'm confused here. I thought mesa required a Python that has xml2

support. But here you're building xml2 with Python support.

Quoted 1 line
Quoted 1 line

Could you enlighten me? :-)

Please have a look at this

http://lists.busybox.net/pipermail/buildroot/2012-November/061334.html

... Hope is clears out some questions...

Again, open to comments and/or better solutions, but at this time it looked acceptable (if you ask me).

Regards Noel

-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Sent: 14Nov12 10:26
To: Vellemans, Noel
Cc: buildroot at busybox.net; willw at carallon.com
Subject: Re: [Buildroot] [PATCH 1/1] libxml2: add support for building host library with python support

Noel,

package/libxml2/Config.in config BR2_PACKAGE_LIBXML2 · line 9

Quoted 3 lines · Noel vellemans
package/libxml2/Config.in +2 -0
+config BR2_PACKAGE_HOST_LIBXML2_PYTHON
+    bool
\ No newline at end of file

I don't know if we want to introduce sub-options for host packages.

Quoted 8 lines
package/libxml2/libxml2.mk +0 -0
index 71f2bd1..fde3735 100644
@@ -26,7 +26,15 @@ LIBXML2_POST_INSTALL_STAGING_HOOKS += 

LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP
HOST_LIBXML2_DEPENDENCIES = host-pkgconf

package/libxml2/libxml2.mk LIBXML2_POST_INSTALL_STAGING_HOOKS += LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP

Quoted 7 lines
package/libxml2/libxml2.mk +6 -1
-HOST_LIBXML2_CONF_OPT = --without-debug --without-python
+HOST_LIBXML2_CONF_OPT = --without-debug
+
+ifeq ($(BR2_PACKAGE_HOST_LIBXML2_PYTHON),y)
+HOST_LIBXML2_DEPENDENCIES += host-python HOST_LIBXML2_CONF_OPT += 
+--with-python=$(HOST_DIR)/usr else HOST_LIBXML2_CONF_OPT += 
+--without-python endif

I'm confused here. I thought mesa required a Python that has xml2 support. But here you're building xml2 with Python support. Could you enlighten me? :-)

Thanks!

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux development, consulting, training and support.
http://free-electrons.com