2008-04-20 10:51:16 +00:00
#
2010-02-16 03:04:02 +00:00
# Copyright (C) 2007-2010 OpenWrt.org
2007-09-22 16:07:24 +00:00
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := libtorrent
2010-11-28 18:02:09 +00:00
PKG_REV := 1189
2009-12-05 13:52:22 +00:00
PKG_VERSION := 0.12.6_r$( PKG_REV)
2010-11-28 18:02:09 +00:00
PKG_RELEASE := 3
2010-02-16 03:04:02 +00:00
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.bz2
2009-04-03 09:14:09 +00:00
PKG_SOURCE_URL := svn://rakshasa.no/libtorrent/trunk/libtorrent
PKG_SOURCE_SUBDIR := $( PKG_NAME) -$( PKG_VERSION)
PKG_SOURCE_VERSION := $( PKG_REV)
PKG_SOURCE_PROTO := svn
2007-09-22 16:07:24 +00:00
2010-02-16 03:04:02 +00:00
PKG_FIXUP := libtool
PKG_INSTALL := 1
2007-12-27 02:12:04 +00:00
2007-09-22 16:07:24 +00:00
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
d e f i n e P a c k a g e / l i b t o r r e n t
SECTION:= libs
CATEGORY:= Libraries
TITLE:= Rakshasa' s BitTorrent library
URL:= http://libtorrent.rakshasa.no/
2010-10-05 23:56:19 +00:00
DEPENDS:= +libopenssl +libsigcxx @!LINUX_2_4
2007-09-22 16:07:24 +00:00
e n d e f
d e f i n e P a c k a g e / l i b t o r r e n t / d e s c r i p t i o n
2010-02-16 03:04:02 +00:00
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus
on high performance and good code. The library differentiates itself from
other implementations by transfering directly from file pages to the
network stack. On high-bandwidth connections it is able to seed at 3 times
2007-09-22 16:07:24 +00:00
the speed of the official client.
e n d e f
2009-05-27 12:07:38 +00:00
i f n e q ( $( CONFIG_GCC_VERSION_ 3_ 4) $( CONFIG_GCC_VERSION_ 4_ 1) , )
2010-07-16 13:29:10 +00:00
TARGET_CPPFLAGS += -fno-strict-aliasing
2009-05-27 12:07:38 +00:00
e n d i f
TARGET_CPPFLAGS += -fno-inline
2009-04-03 09:14:09 +00:00
2010-07-16 13:29:10 +00:00
# XXX: fixes the following error when configure from rtorrent is trying
# to link against libtorrent on arm (#7026)
#
# ./staging_dir/toolchain-arm_v5t_gcc-4.3.3+cs_uClibc-0.9.30.1_eabi/usr/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.3.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: conftest: hidden symbol `__sync_add_and_fetch_4' in /media/Scratch/OpenWrt/backfire/build.d/orion/staging_dir/toolchain-arm_v5t_gcc-4.3.3+cs_uClibc-0.9.30.1_eabi/usr/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.3.3/libgcc.a(linux-atomic.o) is referenced by DSO
# ./staging_dir/toolchain-arm_v5t_gcc-4.3.3+cs_uClibc-0.9.30.1_eabi/usr/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.3.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: final link failed: Nonrepresentable section on output
#
2010-08-04 12:27:04 +00:00
i f n e q ( $( CONFIG_arm ) $( CONFIG_armeb ) , )
2010-07-16 13:29:10 +00:00
TARGET_LDFLAGS += -Wl,--whole-archive -lgcc -lgcc_s -Wl,--no-whole-archive
e n d i f
2008-05-03 02:30:04 +00:00
# XXX: rtorrent needs encryption (--enable-openssl)
2007-09-22 16:07:24 +00:00
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--enable-aligned \
--disable-debug \
2008-05-03 02:30:04 +00:00
--enable-openssl \
2007-09-22 16:07:24 +00:00
2009-04-03 09:14:09 +00:00
d e f i n e B u i l d / C o n f i g u r e
( cd $( PKG_BUILD_DIR) ; ./autogen.sh ) ;
$( call Build/Configure/Default)
e n d e f
2007-09-22 16:07:24 +00:00
d e f i n e B u i l d / I n s t a l l D e v
2008-05-03 02:30:04 +00:00
$( INSTALL_DIR) $( 1) /usr/include
2007-10-07 03:20:26 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/include/torrent $( 1) /usr/include/
2008-05-03 02:30:04 +00:00
$( INSTALL_DIR) $( 1) /usr/lib
2007-10-07 03:20:26 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libtorrent.{ a,so*} $( 1) /usr/lib/
2008-05-03 02:30:04 +00:00
$( INSTALL_DIR) $( 1) /usr/lib/pkgconfig
2007-10-07 03:20:26 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/lib/pkgconfig/libtorrent.pc $( 1) /usr/lib/pkgconfig/
2007-09-22 16:07:24 +00:00
e n d e f
d e f i n e P a c k a g e / l i b t o r r e n t / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libtorrent.so.* $( 1) /usr/lib/
e n d e f
$( eval $ ( call BuildPackage ,libtorrent ) )