boost: Allow sub-lib selection.

This is not the optimum solution and it probably needs a rewrite using a Config.in file, but it's better than what we have now...


git-svn-id: svn://svn.openwrt.org/openwrt/packages@18998 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mb 2010-01-02 14:54:11 +00:00
parent 699e0eae81
commit c88860beb6

View File

@ -29,24 +29,34 @@ define Package/boost
URL:=http://www.boost.org/ URL:=http://www.boost.org/
endef endef
define Package/boost-serialization
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Boost-serialization library
DEPENDS:=+boost
endef
define Package/boost-regex
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Boost-regex library
DEPENDS:=+boost
endef
define Build/Configure define Build/Configure
endef endef
# bjam does not support anything like DESTDIR # bjam does not support anything like DESTDIR
CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR) CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
LIBRARIES:= \
serialization
define Build/Compile define Build/Compile
( cd $(PKG_BUILD_DIR) ; \ ( cd $(PKG_BUILD_DIR) ; \
echo "using gcc : : $(GNU_TARGET_NAME)-gcc : <cflags>$(CFLAGS) <cxxflags>$(CXXFLAGS) <linkflags>$(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \ echo "using gcc : : $(GNU_TARGET_NAME)-gcc : <cflags>$(CFLAGS) <cxxflags>$(CXXFLAGS) <linkflags>$(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
bjam \ bjam \
'-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \ '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
--toolset=gcc --build-type=minimal --layout=system \ --toolset=gcc --build-type=minimal --layout=system \
$(foreach c, $(LIBRARIES), \ $(patsubst %,--with-regex,$(filter y m,$(CONFIG_PACKAGE_boost-regex))) \
--with-$(c) \ $(patsubst %,--with-serialization,$(filter y m,$(CONFIG_PACKAGE_boost-serialization))) \
) \
$(CONFIGURE_ARGS) \ $(CONFIGURE_ARGS) \
install \ install \
) )
@ -68,11 +78,6 @@ define Package/boost/install
$(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/
endef endef
# TODO: Split libboost into several smaller packages $(eval $(call BuildPackage,boost-serialization))
$(eval $(call BuildPackage,boost-regex))
#define Package/boost-serialization/install
# $(INSTALL_DIR) $(1)/usr/lib
# $(CP) $(PKG_INSTALL_DIR)/lib/*serialization*.so* $(1)/usr/lib/
#endef
$(eval $(call BuildPackage,boost)) $(eval $(call BuildPackage,boost))