boost: New package added. Version 1.47
PATCH 1/1 boost: New package added. Version 1.47
--- package/Config.in | 1 + package/boost/Config.in | 102 ++++++++++++++++++++++++++++ package/boost/boost.mk | 169 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+), 0 deletions(-) create mode 100644 package/boost/Config.in create mode 100644 package/boost/boost.mk
package/Config.in +1 -0
@@ -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 +102 -0
102 lines not on this page · raw message
package/boost/boost.mk new file +169 -0
169 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 1/1 boost: New package added. Version 1.47
Hello Allan,
Thanks for contributing this package!
Le Fri, 23 Sep 2011 10:50:51 +0200,
"Allan W. Nielsen" <[email protected]> a ?crit :
package/boost/Config.in line 4
Quoted 5 lines
package/boost/Config.in new file +4
-0@@ -0,0 +1,102 @@ +config BR2_PACKAGE_BOOST + bool "boost" + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_ZLIB
Should be just a tab.
package/boost/Config.in line 45
Quoted 3 lines
package/boost/Config.in new file +3
-0+config BR2_PACKAGE_BOOST_ICU + depends on BR2_PACKAGE_BOOST + bool "boost-icu"
Presumably you need to select BR2_PACKAGE_ICU here.
package/boost/Config.in line 65
Quoted 3 lines
package/boost/Config.in new file +3
-0+config BR2_PACKAGE_BOOST_PYTHON + depends on BR2_PACKAGE_BOOST + bool "boost-python"
Don't you need to have Python as a dependency to build this ?
package/boost/boost.mk line 8
Quoted 2 lines
package/boost/boost.mk new file +2
-0+BOOST_VERSION = 1.47.0 +BOOST_FILE_VERSION=$(shell echo $(BOOST_VERSION) | sed -e s/\\\./_/g)
BOOST_FILE_VERSION=$(subst .,_,$(BOOST_VERSION))
package/boost/boost.mk line 12
Quoted 4 lines
package/boost/boost.mk new file +4
-0+BOOST_SOURCE = boost_$(BOOST_FILE_VERSION).tar.bz2 +BOOST_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/boost + +TARGET_CC_VERSION = $(shell $(TARGET_CC) --version | head -n 1 | perl -pe "s/^.+?([\d\.]+)[^ ]+$$/\1/g" )
I'd prefer to rely on make/shell only rather than using Perl here.
package/boost/boost.mk line 53
Quoted 3 lines
package/boost/boost.mk new file +3
-0+ifneq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) +BOOST_WITHOUT_FLAGS+=iostreams +endif
Note that you can also write:
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_IOSTREAMS),iostreams)
package/boost/boost.mk line 107
Quoted 5 lines
package/boost/boost.mk new file +5
-0+ifeq ($(BR2_ENABLE_DEBUG),y) +BOOST_VARIANT=debug +else +BOOST_VARIANT=release +endif
and
BOOST_VARIANT = $(if $(BR2_ENABLE_DEBUG),debug,release)
package/boost/boost.mk line 121
Quoted 1 line
package/boost/boost.mk new file +1
-0+BOOST_WITHOUT_FLAGS_COMMASEPERATED = $(shell echo $(BOOST_WITHOUT_FLAGS) | tr ' ' ',')
Maybe this can be done with a make $(subst ...) call.
package/boost/boost.mk line 131
Quoted 8 lines
package/boost/boost.mk new file +8
-0+define BOOST_CONFIGURE_CMDS + (cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS)) + echo "#!/bin/sh" > $(@D)/gcc-wrap + echo "$(TARGET_CXX) \$$@" >> $(@D)/gcc-wrap + chmod +x $(@D)/gcc-wrap + echo "using gcc : $(TARGET_CC_VERSION) : \"$(@D)/gcc-wrap\" : <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam + echo "" >> $(@D)/user-config.jam +endef
Could you expand a bit on why a gcc wrapper is needed here ? A comment above the CONFIGURE_CMDS about this would be great.
Quoted 10 lines
package/boost/boost.mk new file +10
-0+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 )
package/boost/boost.mk line 152
Quoted 10 lines
package/boost/boost.mk new file +10
-0+ + (cd $(@D) && ./bjam -d+2 \ + --user-config=$(@D)/user-config.jam \ + toolset=gcc \ + variant=$(BOOST_VARIANT) \ + link=$(BOOST_LINK) \ + threading=$(BOOST_MULTI) \ + runtime-link=$(BOOST_LINK) \ + --prefix=$(STAGING_DIR)/usr \ + --layout=system install)
This install to staging, so it should be in BOOST_INSTALL_STAGING_CMDS, and you should set BOOST_INSTALL_STAGING=YES at the top of your package.
package/boost/boost.mk line 157
Quoted 3 lines
package/boost/boost.mk new file +3
-0+define BOOST_REMOVE_HDRS + rm -rf $(TARGET_DIR)/usr/include/boost +endef
Not needed, everything in $(TARGET_DIR)/usr/include is removed.
package/boost/boost.mk line 161
Quoted 3 lines
package/boost/boost.mk new file +3
-0+define BOOST_STRIP + find $(TARGET_DIR)/usr/lib -name "libboost*" -type f -exec $(STRIPCMD) {} \; +endef
Not needed, all binaries are automatically stripped.
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