Skip to contentSkip to conversation

Comments on boost package

Buildroot New Allan W. Nielsen 2 participants 4 messages Sep 23, 2011

lore
Share & tools
lore
#0 lore raw

Hi Thomas

Thanks for your comments on the boost package.

I have done all the corrections you suggested except this one:

Quoted 1 line

+BOOST_WITHOUT_FLAGS_COMMASEPERATED = $(shell echo

        > $(BOOST_WITHOUT_FLAGS) | tr ' ' ',')
Quoted 2 lines

Maybe this can be done with a make $(subst ...) call.

I simply could not get it to work.

Beside, I have removed python support as I had troubles testing it.

Let me know it there is any thing else

Best regards
Allan W. Nielsen

#1 lore raw

PATCH 1/1 boost: New package added. Version 1.47

---
 package/Config.in       |    1 +
 package/boost/Config.in |   99 +++++++++++++++++++++++++++++++++++++++++++++++
 package/boost/boost.mk  |   91 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 191 insertions(+), 0 deletions(-)
 create mode 100644 package/boost/Config.in
 create mode 100644 package/boost/boost.mk
package/Config.in +1 -0
index 12fd0dc..88aaf2d 100644
@@ -340,6 +340,7 @@ endmenu
 menu "Other"
 source "package/libargtable2/Config.in"
 source "package/argp-standalone/Config.in"
+source "package/boost/Config.in"
 source "package/libatomic_ops/Config.in"
 source "package/libcap/Config.in"
 source "package/libdaemon/Config.in"
package/boost/Config.in new file +99 -0

99 lines not on this page · raw message

package/boost/boost.mk new file +91 -0

91 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 1/1 boost: New package added. Version 1.47

Le Fri, 23 Sep 2011 13:35:02 +0200,
"Allan W. Nielsen" <[email protected]> a ?crit :

package/boost/boost.mk line 8

Quoted 8 lines
package/boost/boost.mk new file +8 -0
+#############################################################
+#
+# Boost
+#
+#############################################################
+
+BOOST_VERSION = 1.47.0
+BOOST_FILE_VERSION=$(subst .,_,$(BOOST_VERSION))

To be consistent, space before and after =.

package/boost/boost.mk line 11

Quoted 3 lines
package/boost/boost.mk new file +3 -0
+BOOST_SOURCE = boost_$(BOOST_FILE_VERSION).tar.bz2
+BOOST_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/boost
+BOOST_INSTALL_STAGING=YES

Same here.

package/boost/boost.mk line 16

Quoted 5 lines
package/boost/boost.mk new file +5 -0
+
+TARGET_CC_VERSION = $(shell $(TARGET_CC) --version | head -n 1 | sed -e "s/.*[[:space:]]\([[:digit:].]\+$$\)/\1/g" )
+
+BOOST_DEPENDENCIES=bzip2
+BOOST_DEPENDENCIES+=zlib

Same here.

Quoted 1 line

+BOOST_WITHOUT_FLAGS_COMMASEPERATED = $(shell echo $(BOOST_WITHOUT_FLAGS) | tr ' ' ',')

So, here you can use the $(subst
$(space),$(comma),$(BOOST_WITHOUT_FLAGS)) trick.

Quoted 25 lines
package/boost/boost.mk new file +25 -0
+define BOOST_CONFIGURE_CMDS
+	(cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS))
+	echo "using gcc : $(TARGET_CC_VERSION) : \"$(TARGET_CXX)\" : <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam
+	echo "" >> $(@D)/user-config.jam
+endef
+
+define BOOST_INSTALL_TARGET_CMDS
+	(cd $(@D) && ./b2 -q -d+2 \
+	--user-config=$(@D)/user-config.jam \
+	toolset=gcc \
+	variant=$(BOOST_VARIANT) \
+	link=$(BOOST_LINK) \
+	threading=$(BOOST_MULTI) \
+	runtime-link=$(BOOST_LINK) \
+	--prefix=$(TARGET_DIR)/usr \
+	--layout=system install )
+endef
+
+define BOOST_INSTALL_STAGING_CMDS
+	(cd $(@D) && ./bjam -d+2 \
+	--user-config=$(@D)/user-config.jam \
+	toolset=gcc \
+	variant=$(BOOST_VARIANT) \
+	link=$(BOOST_LINK) \
+	threading=$(BOOST_MULTI) \

package/boost/boost.mk line 88

Quoted 10 lines
package/boost/boost.mk new file +10 -0
+	runtime-link=$(BOOST_LINK) \
+	--prefix=$(STAGING_DIR)/usr \
+	--layout=system install)
+endef
+
+define BOOST_REMOVE_HDRS
+	rm -rf $(TARGET_DIR)/usr/include/boost
+endef
+
+BOOST_POST_INSTALL_STAGING_HOOKS += BOOST_REMOVE_HDRS

Again, this is not needed, usr/include in TARGET_DIR is removed globally by target-finalize in the main Makefile.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw
In reply to Allan W. Nielsen

Le Fri, 23 Sep 2011 13:35:01 +0200,
"Allan W. Nielsen" <[email protected]> a ?crit :

Quoted 3 lines
Quoted 1 line

Maybe this can be done with a make $(subst ...) call.

I simply could not get it to work.

It's a little bit tricky:

	$(subst $(space),$(comma),$(myvar))

The "space" and "comma" variables are defined by the main Buildroot Makefile, and they allow to pass a space and a comma as argument to $(subst) :-)

Regards,

Thomas

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