[oe-commits] Andrei Gherzan : libtorrent: Integrated version 0.13.3

git at git.openembedded.org git at git.openembedded.org
Sat Feb 16 04:57:10 UTC 2013


Module: meta-openembedded.git
Branch: master
Commit: e479f15945d82232803305f88fdc87b4961ff896
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=e479f15945d82232803305f88fdc87b4961ff896

Author: Andrei Gherzan <andrei at gherzan.ro>
Date:   Mon Feb 11 18:57:06 2013 +0000

libtorrent: Integrated version 0.13.3

Add patch to avoid running AC_RUN_IFELSE code while configuring package.

Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../don-t-run-code-while-configuring-package.patch |   94 ++++++++++++++++++++
 .../libtorrent/libtorrent_0.13.3.bb                |   17 ++++
 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 0000000..79d4f29
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch
@@ -0,0 +1,94 @@
+Using AC_RUN_IFELSE prevent people from configuring package for
+cross-compiling. Don't run code while configuring package.
+
+Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
+
+Index: libtorrent-0.13.3/scripts/checks.m4
+===================================================================
+--- libtorrent-0.13.3.orig/scripts/checks.m4	2012-05-14 14:17:04.000000000 +0300
++++ libtorrent-0.13.3/scripts/checks.m4	2013-02-10 15:28:37.414445524 +0200
+@@ -95,40 +95,6 @@
+
+ AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
+   AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
+-
+-  AC_RUN_IFELSE([AC_LANG_SOURCE([
+-      #include <fcntl.h>
+-      #include <stdlib.h>
+-      #include <unistd.h>
+-      #include <sys/event.h>
+-      #include <sys/time.h>
+-      int main() {
+-        struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@;
+-        struct timespec ts = { 0, 0 };
+-        int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n;
+-        char buffer@<:@9001@:>@;
+-        if (pipe(pfd) == -1) return 1;
+-        if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2;
+-        while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer));
+-        if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3;
+-        if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4;
+-        EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL);
+-        EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL);
+-        if ((kfd = kqueue()) == -1) return 5;
+-        if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6;
+-        if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7;
+-        if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8;
+-        read(pfd@<:@0@:>@, buffer, sizeof(buffer));
+-        if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9;
+-        return 0;
+-      }
+-      ])],
+-    [
+-      AC_MSG_RESULT(yes)
+-    ], [
+-      AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.)
+-      AC_MSG_RESULT(no)
+-    ])
+ ])
+
+ AC_DEFUN([TORRENT_WITH_KQUEUE], [
+Index: libtorrent-0.13.3/scripts/common.m4
+===================================================================
+--- libtorrent-0.13.3.orig/scripts/common.m4	2012-05-14 14:17:04.000000000 +0300
++++ libtorrent-0.13.3/scripts/common.m4	2013-02-10 15:27:55.874446741 +0200
+@@ -222,38 +222,10 @@
+
+ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
+   AC_MSG_CHECKING(for execinfo.h)
+-
+-  AC_RUN_IFELSE([AC_LANG_SOURCE([
+-      #include <execinfo.h>
+-      int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
+-      ])],
+-    [
+-      AC_MSG_RESULT(yes)
+-      AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
+-    ], [
+-      AC_MSG_RESULT(no)
+-  ])
+ ])
+
+ AC_DEFUN([TORRENT_CHECK_ALIGNED], [
+   AC_MSG_CHECKING(the byte alignment)
+-
+-  AC_RUN_IFELSE([AC_LANG_SOURCE([
+-      #include <inttypes.h>
+-      int main() {
+-        char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 };
+-	int i;
+-        for (i = 1; i < 4; ++i)
+-	  if (*(uint32_t*)(buf + i) == 0) return -1;
+-	return 0;
+-	}
+-      ])],
+-    [
+-      AC_MSG_RESULT(none needed)
+-    ], [
+-      AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
+-      AC_MSG_RESULT(required)
+-  ])
+ ])
+
+
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 0000000..ecc254f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "libTorrent is a BitTorrent library written in C++ for *nix, \
+with a focus on high performance and good code."
+HOMEPAGE = "http://libtorrent.rakshasa.no/"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+DEPENDS = "libsigc++-2.0 openssl cppunit"
+
+SRC_URI = "http://libtorrent.rakshasa.no/downloads/${PN}-${PV}.tar.gz \
+    file://don-t-run-code-while-configuring-package.patch \
+    "
+
+SRC_URI[md5sum] = "e94f6c590bb02aaf4d58618f738a85f2"
+SRC_URI[sha256sum] = "34317d6783b7f8d0805274c9467475b5432a246c0de8e28fc16e3b0b43f35677"
+
+inherit autotools
+





More information about the Openembedded-commits mailing list