summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2013-02-11 18:57:06 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-02-16 05:54:59 +0100
commite479f15945d82232803305f88fdc87b4961ff896 (patch)
tree01465fe08220c01ddf7c8fd7112742981504c06e /meta-oe/recipes-connectivity
parent99481803dd879b29e98bbff18cfc721102119564 (diff)
downloadmeta-openembedded-e479f15945d82232803305f88fdc87b4961ff896.tar.gz
libtorrent: Integrated version 0.13.3
Add patch to avoid running AC_RUN_IFELSE code while configuring package. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity')
-rw-r--r--meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch94
-rw-r--r--meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb17
2 files changed, 111 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch b/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch
new file mode 100644
index 000000000..79d4f29fa
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch
@@ -0,0 +1,94 @@
1Using AC_RUN_IFELSE prevent people from configuring package for
2cross-compiling. Don't run code while configuring package.
3
4Upstream-Status: Pending
5Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
6
7Index: libtorrent-0.13.3/scripts/checks.m4
8===================================================================
9--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-05-14 14:17:04.000000000 +0300
10+++ libtorrent-0.13.3/scripts/checks.m4 2013-02-10 15:28:37.414445524 +0200
11@@ -95,40 +95,6 @@
12
13 AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
14 AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
15-
16- AC_RUN_IFELSE([AC_LANG_SOURCE([
17- #include <fcntl.h>
18- #include <stdlib.h>
19- #include <unistd.h>
20- #include <sys/event.h>
21- #include <sys/time.h>
22- int main() {
23- struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@;
24- struct timespec ts = { 0, 0 };
25- int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n;
26- char buffer@<:@9001@:>@;
27- if (pipe(pfd) == -1) return 1;
28- if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2;
29- while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer));
30- if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3;
31- if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4;
32- EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL);
33- EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL);
34- if ((kfd = kqueue()) == -1) return 5;
35- if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6;
36- if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7;
37- if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8;
38- read(pfd@<:@0@:>@, buffer, sizeof(buffer));
39- if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9;
40- return 0;
41- }
42- ])],
43- [
44- AC_MSG_RESULT(yes)
45- ], [
46- AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.)
47- AC_MSG_RESULT(no)
48- ])
49 ])
50
51 AC_DEFUN([TORRENT_WITH_KQUEUE], [
52Index: libtorrent-0.13.3/scripts/common.m4
53===================================================================
54--- libtorrent-0.13.3.orig/scripts/common.m4 2012-05-14 14:17:04.000000000 +0300
55+++ libtorrent-0.13.3/scripts/common.m4 2013-02-10 15:27:55.874446741 +0200
56@@ -222,38 +222,10 @@
57
58 AC_DEFUN([TORRENT_CHECK_EXECINFO], [
59 AC_MSG_CHECKING(for execinfo.h)
60-
61- AC_RUN_IFELSE([AC_LANG_SOURCE([
62- #include <execinfo.h>
63- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
64- ])],
65- [
66- AC_MSG_RESULT(yes)
67- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
68- ], [
69- AC_MSG_RESULT(no)
70- ])
71 ])
72
73 AC_DEFUN([TORRENT_CHECK_ALIGNED], [
74 AC_MSG_CHECKING(the byte alignment)
75-
76- AC_RUN_IFELSE([AC_LANG_SOURCE([
77- #include <inttypes.h>
78- int main() {
79- char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 };
80- int i;
81- for (i = 1; i < 4; ++i)
82- if (*(uint32_t*)(buf + i) == 0) return -1;
83- return 0;
84- }
85- ])],
86- [
87- AC_MSG_RESULT(none needed)
88- ], [
89- AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
90- AC_MSG_RESULT(required)
91- ])
92 ])
93
94
diff --git a/meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb b/meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb
new file mode 100644
index 000000000..ecc254fc1
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "libTorrent is a BitTorrent library written in C++ for *nix, \
2with a focus on high performance and good code."
3HOMEPAGE = "http://libtorrent.rakshasa.no/"
4LICENSE = "GPL-2.0"
5LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
6
7DEPENDS = "libsigc++-2.0 openssl cppunit"
8
9SRC_URI = "http://libtorrent.rakshasa.no/downloads/${PN}-${PV}.tar.gz \
10 file://don-t-run-code-while-configuring-package.patch \
11 "
12
13SRC_URI[md5sum] = "e94f6c590bb02aaf4d58618f738a85f2"
14SRC_URI[sha256sum] = "34317d6783b7f8d0805274c9467475b5432a246c0de8e28fc16e3b0b43f35677"
15
16inherit autotools
17