Skip to contentSkip to conversation

package/xerces: add enable network option

PATCH New Jared Bents 3 participants 3 messages May 4, 2020 – May 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/xerces: add enable network option

Update to add the option to compile xerces with network enabled by default so it can be unselected to compile without network support.

--
v2: - updated change logic for enable network instead of
disable network

---
 package/xerces/Config.in | 10 ++++++++++
 package/xerces/xerces.mk |  4 ++++
 2 files changed, 14 insertions(+)
package/xerces/Config.in +10 -0
index 2edc4346b5..a9b102bd5e 100644
@@ -6,5 +6,15 @@ config BR2_PACKAGE_XERCES
 
 	  http://xerces.apache.org/xerces-c/
 
+if BR2_PACKAGE_XERCES
+
+config BR2_PACKAGE_XERCES_ENABLE_NETWORK
+	bool "Enable network support"
+	default y
+	help
+	  Enable network support in xerces
+
+endif
+
 comment "xerces-c++ needs a toolchain w/ C++, wchar"
 	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR)
package/xerces/xerces.mk +4 -0
index c75a8b0d35..a73537fb3e 100644
@@ -31,12 +31,16 @@ XERCES_CONF_ENV += LIBS=-liconv
 XERCES_DEPENDENCIES += libiconv
 endif
 
+ifeq ($(BR2_PACKAGE_XERCES_ENABLE_NETWORK),y)
 ifeq ($(BR2_PACKAGE_LIBCURL),y)
 XERCES_CONF_OPTS += -Dnetwork-accessor=curl
 XERCES_DEPENDENCIES += libcurl
 else
 XERCES_CONF_OPTS += -Dnetwork-accessor=socket
 endif
+else
+XERCES_CONF_OPTS += -Dnetwork:BOOL=OFF
+endif
 
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 XERCES_CONF_OPTS += -Dthreads=ON
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 package/xerces: add enable network option

Quoted 5 lines · On Mon, 4 May 2020 15:25:58 -0500 Jared Bents…

Update to add the option to compile xerces with network enabled by default so it can be unselected to compile without network support.

Could you expand the commit log with an explantion of the *why* we want to add this new option? Size impact? If so, what is the size impact? Some other reason?

package/xerces/xerces.mk XERCES_CONF_ENV += LIBS=-liconv · line 42

Quoted 9 lines
package/xerces/xerces.mk +3 -0
+ifeq ($(BR2_PACKAGE_XERCES_ENABLE_NETWORK),y)
 ifeq ($(BR2_PACKAGE_LIBCURL),y)
 XERCES_CONF_OPTS += -Dnetwork-accessor=curl
 XERCES_DEPENDENCIES += libcurl
 else
 XERCES_CONF_OPTS += -Dnetwork-accessor=socket
 endif
+else
+XERCES_CONF_OPTS += -Dnetwork:BOOL=OFF

We don't use this :BOOL type specification anywhere in CMake packages in Buildroot, could you keep it consistent with the rest of the package?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 package/xerces: add enable network option

Thomas,

Quoted 14 lines · Thomas Petazzoni
Quoted 5 lines · On Mon, 4 May 2020 15:25:58 -0500 Jared Bents…

Update to add the option to compile xerces with network enabled by default so it can be unselected to compile without network support.

Could you expand the commit log with an explantion of the *why* we want to add this new option? Size impact? If so, what is the size impact? Some other reason?

Quoted 12 lines

package/xerces/xerces.mk XERCES_CONF_ENV += LIBS=-liconv · line 42

Quoted 9 lines
package/xerces/xerces.mk +3 -0
+ifeq ($(BR2_PACKAGE_XERCES_ENABLE_NETWORK),y)
 ifeq ($(BR2_PACKAGE_LIBCURL),y)
 XERCES_CONF_OPTS += -Dnetwork-accessor=curl
 XERCES_DEPENDENCIES += libcurl
 else
 XERCES_CONF_OPTS += -Dnetwork-accessor=socket
 endif
+else
+XERCES_CONF_OPTS += -Dnetwork:BOOL=OFF

We don't use this :BOOL type specification anywhere in CMake packages in Buildroot, could you keep it consistent with the rest of the package?

v3
http://patchwork.ozlabs.org/project/buildroot/patch/20200520222850.55150-1-matthew.weber at rockwellcollins.com/

Best Regards,
Matt