From 054bbfc550a12d9c43018c34fa3c18d87ca1065e Mon Sep 17 00:00:00 2001 From: mirko Date: Fri, 13 Mar 2009 01:23:17 +0000 Subject: [PATCH] added libboost (serialization only for now) git-svn-id: svn://svn.openwrt.org/openwrt/packages@14861 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/boost/Makefile | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 libs/boost/Makefile diff --git a/libs/boost/Makefile b/libs/boost/Makefile new file mode 100644 index 000000000..26886ba22 --- /dev/null +++ b/libs/boost/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 12228 2009-03-12 22:43:15Z mirko $ + +# Dude, this "boost" is really one of the most crude stuff I ported yet. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=boost +PKG_VERSION:=1_38_0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/boost \ + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/boost + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Boost provides free peer-reviewed portable C++ source libraries + URL:=http://www.boost.org/ + DEPENDS:=+boost-jam +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 : : $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc : $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) ;" > tools/build/v2/site-config.jam ; \ + $(STAGING_DIR_HOST)/usr/bin/bjam \ + '-sBUILD=release space on off' \ + --toolset=gcc \ + $(foreach c, $(LIBRARIES), \ + --with-$(c) \ + ) \ + $(CONFIGURE_ARGS) \ + install \ + ) +endef + +define Package/boost/description + Boost provides free peer-reviewed portable C++ source libraries +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/boost $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/include/boost-*/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above + $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/ +endef + +define Package/boost/install + $(INSTALL_DIR) $(1)/usr/lib + $(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))