libtorrent: new package
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Mon, 14 May 2012 10:55:28 +0000 (10:55 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 14 May 2012 21:00:56 +0000 (23:00 +0200)
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Config.in
package/libtorrent/Config.in [new file with mode: 0644]
package/libtorrent/libtorrent-cross_compile.patch [new file with mode: 0644]
package/libtorrent/libtorrent.mk [new file with mode: 0644]

index 9a854f1c8048bd78c0a82efb244342d71e6d8f10..c3dc715f8d494023431cb011e9d235e650553604 100644 (file)
@@ -411,6 +411,7 @@ source "package/libpcap/Config.in"
 source "package/libosip2/Config.in"
 source "package/librsync/Config.in"
 source "package/libsoup/Config.in"
+source "package/libtorrent/Config.in"
 source "package/libupnp/Config.in"
 source "package/libvncserver/Config.in"
 source "package/zeromq/Config.in"
diff --git a/package/libtorrent/Config.in b/package/libtorrent/Config.in
new file mode 100644 (file)
index 0000000..f0315a4
--- /dev/null
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_LIBTORRENT
+       bool "libtorrent"
+       depends on BR2_INSTALL_LIBSTDCPP
+       select BR2_PACKAGE_LIBSIGC
+       help
+         BitTorrent library written in C++ for *nix
+
+         http://libtorrent.rakshasa.no/
+
+comment "libtorrent requires a toolchain with C++ support enabled"
+       depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/libtorrent/libtorrent-cross_compile.patch b/package/libtorrent/libtorrent-cross_compile.patch
new file mode 100644 (file)
index 0000000..39fe700
--- /dev/null
@@ -0,0 +1,27 @@
+Fix cross compilation, based on OpenWRT patch.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura libtorrent-0.13.2/configure.ac libtorrent-0.13.2-cross/configure.ac
+--- libtorrent-0.13.2/configure.ac     2012-04-20 03:55:10.000000000 -0300
++++ libtorrent-0.13.2-cross/configure.ac       2012-05-09 10:57:49.671175421 -0300
+@@ -17,7 +17,6 @@
+ AM_INIT_AUTOMAKE
+ AM_CONFIG_HEADER(config.h)
+-AM_PATH_CPPUNIT(1.9.6)
+ AC_DISABLE_STATIC
+ AM_DISABLE_STATIC
+diff -Nura libtorrent-0.13.2/scripts/checks.m4 libtorrent-0.13.2-cross/scripts/checks.m4
+--- libtorrent-0.13.2/scripts/checks.m4        2012-04-12 06:44:23.000000000 -0300
++++ libtorrent-0.13.2-cross/scripts/checks.m4  2012-05-09 10:42:32.642728917 -0300
+@@ -96,7 +96,7 @@
+ AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
+   AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
+-  AC_RUN_IFELSE([AC_LANG_SOURCE([
++  AC_LINK_IFELSE([AC_LANG_SOURCE([
+       #include <fcntl.h>
+       #include <stdlib.h>
+       #include <unistd.h>
diff --git a/package/libtorrent/libtorrent.mk b/package/libtorrent/libtorrent.mk
new file mode 100644 (file)
index 0000000..100e684
--- /dev/null
@@ -0,0 +1,16 @@
+#############################################################
+#
+# libtorrent
+#
+#############################################################
+
+LIBTORRENT_VERSION = 0.13.2
+LIBTORRENT_SITE = http://libtorrent.rakshasa.no/downloads
+LIBTORRENT_DEPENDENCIES = host-pkg-config libsigc \
+       $(if $(BR2_PACKAGE_OPENSSL),openssl)
+LIBTORRENT_CONF_OPT = --enable-aligned \
+       $(if $(BR2_PACKAGE_OPENSSL),--enable-openssl,--disable-openssl)
+LIBTORRENT_INSTALL_STAGING = YES
+LIBTORRENT_AUTORECONF = YES
+
+$(eval $(call AUTOTARGETS))