boost: Allow sub-lib selection. This is not the optimum solution and it probably...
authorMichael Büsch <mb@bu3sch.de>
Sat, 2 Jan 2010 14:54:11 +0000 (14:54 +0000)
committerMichael Büsch <mb@bu3sch.de>
Sat, 2 Jan 2010 14:54:11 +0000 (14:54 +0000)
SVN-Revision: 18998

libs/boost/Makefile

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