From: Scott V. Kamp Date: Sat, 13 Mar 2010 02:55:32 +0000 (+0000) Subject: [patchteam] - New Package - Rasterbar libtorrent X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=b7b2da7f5cd39a653f89f33e9f47995ba9b3ce23;hp=ab60f0af2a27c1fa6b4e71c8a83948d78014b0b7 [patchteam] - New Package - Rasterbar libtorrent Signed off by alexander@sulfrian.net SVN-Revision: 20173 --- diff --git a/libs/rblibtorrent/Makefile b/libs/rblibtorrent/Makefile new file mode 100644 index 0000000000..b26679bd49 --- /dev/null +++ b/libs/rblibtorrent/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 9173 2007-10-07 03:20:26Z blogic $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rblibtorrent +PKG_VERSION:=0.14.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=libtorrent-rasterbar-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/libtorrent +PKG_MD5SUM:=6959f719245d82758235fd73d93373b2 +PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-rasterbar-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=libtool bzlib +BOOSTPOSTFIX=mt + +include $(INCLUDE_DIR)/package.mk + +define Package/rblibtorrent + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Rasterbar BitTorrent library + URL:=http://www.rasterbar.com/products/libtorrent/ + DEPENDS:=+boost +boost-python +boost-filesystem +boost-regex +boost-thread +boost-program_options +boost-system +libopenssl +endef + +define Package/rblibtorrent/description +Rasterbar libtorrent is a C++ library that aims to be a good alternative to +all the other bittorrent implementations around. It is a library and not a +full featured client, although it comes with a working example client. +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --disable-debug \ + --enable-python-binding \ + --with-ssl=$(STAGING_DIR)/usr \ + --with-boost=$(STAGING_DIR)/usr/include \ + --with-boost-libdir=$(STAGING_DIR)/usr/lib \ + --with-zlib=detect \ + --with-boost-system=boost_system-$(BOOSTPOSTFIX) \ + --with-boost-filesystem=boost_filesystem-$(BOOSTPOSTFIX) \ + --with-boost-thread=boost_thread-$(BOOSTPOSTFIX) \ + --with-boost-regex=boost_regex-$(BOOSTPOSTFIX) \ + --with-boost-python=boost_python-$(BOOSTPOSTFIX) \ + --with-boost-program_options=boost_program_options-$(BOOSTPOSTFIX) + +CONFIGURE_VARS+=CC="$(TARGET_CXX)" + +EXTRA_LDFLAGS+=-lz -lpthread + +define Build/Compile + $(call Build/Compile/Default) + $(call Build/Install/Default) +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + mkdir -p $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/rblibtorrent/install + $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/python2.6/site-packages/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.6/site-packages/*.so* $(1)/usr/lib/python2.6/site-packages/ +endef + +$(eval $(call BuildPackage,rblibtorrent)) diff --git a/libs/rblibtorrent/patches/enable-shared-linking.patch b/libs/rblibtorrent/patches/enable-shared-linking.patch new file mode 100644 index 0000000000..dec80cc2e1 --- /dev/null +++ b/libs/rblibtorrent/patches/enable-shared-linking.patch @@ -0,0 +1,11 @@ +--- libtorrent-rasterbar-0.14.7/bindings/python/Makefile.in 2009-11-18 09:25:39.000000000 +0100 ++++ libtorrent-rasterbar-0.14.7/bindings/python/Makefile.in 2010-02-26 13:27:58.000000000 +0100 +@@ -408,7 +408,7 @@ + + + @ENABLE_PYTHON_BINDING_TRUE@all-local: +-@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py build ++@ENABLE_PYTHON_BINDING_TRUE@ CXX="$(CXX) -pthread -shared" $(PYTHON) setup.py build + + @ENABLE_PYTHON_BINDING_TRUE@install-exec-local: + @ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@