Skip to contentSkip to conversation

package/benejson: disable for static-only builds

PATCH New Yann E. MORIN 2 participants 2 messages Jan 31, 2015 – Feb 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/benejson: disable for static-only builds

benejson does not know how to build static-only libraries. as well, it is not able to build shared-only libs either.

But if shared libs are possible, we can built static ones, so we just disable benejson for static-only.

Fixes:

    http://autobuild.buildroot.org/results/56a/56a721885c890f3d62bf9e13d712767e66937c51/
    http://autobuild.buildroot.org/results/7c5/7c54dce4801a53bec378b422edfa42dfa990eabe/
    [...]
---
 package/benejson/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/benejson/Config.in +2 -0
index cb86d67..dc0081c 100644
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_BENEJSON
 	bool "benejson"
+	# bnejson does not know how to only build static libs
+	depends on !BR2_STATIC_LIBS
 	depends on BR2_INSTALL_LIBSTDCPP
 	help
 	  benejson is a buffering SAX-style JSON parser library.
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 package/benejson: disable for static-only builds

Quoted 2 lines · Yann E. MORIN

benejson does not know how to build static-only libraries. as well, it is not able to build shared-only libs either.

Well, actually scons allows specifying targets explicitly.

Benejson is just a small library, so it should not cause much trouble later. And there's already a similar block with install commands anyway.

package/benejson/benejson.mk +9 -1
@@ -20,10 +20,18 @@ endef
 BENEJSON_POST_PATCH_HOOKS += BENEJSON_DISABLE_WCHAR
 endif
 
+BENEJSON_SCONS_TARGETS = include
+ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+BENEJSON_SCONS_TARGETS += lib/libbenejson.a
+endif
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+BENEJSON_SCONS_TARGETS += lib/libbenejson.so
+endif
+
 define BENEJSON_BUILD_CMDS
 	(cd $(@D); \
 		$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
-		$(SCONS))
+		$(SCONS) $(BENEJSON_SCONS_TARGETS))
 endef
 
 ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)