[csw-devel] SF.net SVN: gar:[17778] csw/mgar/pkg/libtorrent/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Thu Apr 19 15:44:55 CEST 2012
Revision: 17778
http://gar.svn.sourceforge.net/gar/?rev=17778&view=rev
Author: dmichelsen
Date: 2012-04-19 13:44:55 +0000 (Thu, 19 Apr 2012)
Log Message:
-----------
libtorrent/trunk: Update to 0.16.0 with g++ and gxx
Modified Paths:
--------------
csw/mgar/pkg/libtorrent/trunk/Makefile
csw/mgar/pkg/libtorrent/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/libtorrent/trunk/files/0001-Use-correct-m4-quoting-for-code-in-autoconf.patch
csw/mgar/pkg/libtorrent/trunk/files/0002-Use-posix_memalign-only-when-available.patch
csw/mgar/pkg/libtorrent/trunk/files/0003-Fix-the-signature-instead-of-using-sig_t.patch
Modified: csw/mgar/pkg/libtorrent/trunk/Makefile
===================================================================
--- csw/mgar/pkg/libtorrent/trunk/Makefile 2012-04-19 13:06:58 UTC (rev 17777)
+++ csw/mgar/pkg/libtorrent/trunk/Makefile 2012-04-19 13:44:55 UTC (rev 17778)
@@ -1,9 +1,9 @@
NAME = libtorrent
-VERSION = 0.12.6
+VERSION = 0.16.0
CATEGORIES = lib
GARTYPE = v2
-DESCRIPTION = BitTorrent library written in C++ for *nix.
+DESCRIPTION = BitTorrent library written in C++ for *nix
define BLURB
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
@@ -11,52 +11,71 @@
the speed of the official client.
endef
-MASTER_SITES = http://libtorrent.rakshasa.no/downloads/
-DISTFILES = $(NAME)-$(VERSION).tar.gz
+#MASTER_SITES = http://libtorrent.rakshasa.no/downloads/
+MASTER_SITES += $(GOOGLE_MIRROR)
+DISTNAME = libtorrent-rasterbar-$(VERSION)
+DISTFILES = $(DISTNAME).tar.gz
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
-
# Patches from http://cr.opensolaris.org/~alz/bittorrent/raw_files/new/usr/src/lib/libtorrent/
-PATCHFILES = rlibtorrent-04-sunpro.diff rlibtorrent-01-madvise.diff rlibtorrent-03-dh-generate.diff
-PATCHFILES += rlibtorrent-05-tracker-usable.diff
+#PATCHFILES = rlibtorrent-04-sunpro.diff rlibtorrent-01-madvise.diff rlibtorrent-03-dh-generate.diff
+#PATCHFILES += rlibtorrent-05-tracker-usable.diff
-PATCHFILES += 0001-Ignore-__UNUSED.patch
+#PATCHFILES += 0001-Ignore-__UNUSED.patch
-BUILD_DEP_pkgs = CSWossldevel CSWlibsigc++devel
+#PATCHFILES += 0001-Use-correct-m4-quoting-for-code-in-autoconf.patch
-PACKAGES = CSWlibtorrent CSWlibtorrentdevel
+#PATCHFILES += 0002-Use-posix_memalign-only-when-available.patch
-CATALOGNAME_CSWlibtorrent = libtorrent
-CATALOGNAME_CSWlibtorrentdevel = libtorrent_devel
+#PATCHFILES += 0003-Fix-the-signature-instead-of-using-sig_t.patch
-SPKG_DESC_CSWlibtorrent = BitTorrent library written in C++ for *nix
-SPKG_DESC_CSWlibtorrentdevel = Development files for libtorrent
+# As we have patches autoconf we need to autotools bootstrap and that requires
+# cppunit (although it is optional for afterwards building we need it now for the
+# AC macros).
+BUILD_DEP_PKGS += CSWcppunit-gxx-dev
+PACKAGES += CSWlibtorrent
+CATALOGNAME_CSWlibtorrent = libtorrent
+SPKG_DESC_CSWlibtorrent = BitTorrent library written in C++ for *nix
RUNTIME_DEP_PKGS_CSWlibtorrent = CSWosslrt CSWlibsigc++
+
+PACKAGES += CSWlibtorrentdevel
+CATALOGNAME_CSWlibtorrentdevel = libtorrent_devel
+SPKG_DESC_CSWlibtorrentdevel = Development files for libtorrent
RUNTIME_DEP_PKGS_CSWlibtorrentdevel = CSWlibtorrent
-
-BUILD64_LIBS_ONLY = 1
-CONFIGURE_ARGS = $(DIRPATHS) --enable-shared --disable-static --disable-libtool-lock --disable-debug
-
PKGFILES_CSWlibtorrentdevel = $(PKGFILES_DEVEL)
PKGFILES_CSWlibtorrentdevel += $(docdir)/.*
PKGFILES_CSWlibtorrentdevel += .*\.h
PKGFILES_CSWlibtorrentdevel += $(sharedstatedir)/.*
-CHECKPKG_OVERRIDES_CSWlibtorrentdevel += surplus-dependency|CSWlibtorrent
+PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
+prefix = $(BUILD_PREFIX)/gxx
+GARCOMPILER = GNU
+BUILD64_LIBS_ONLY = 1
+CONFIGURE_ARGS += $(DIRPATHS)
+CONFIGURE_ARGS += --enable-shared
+CONFIGURE_ARGS += --disable-static
+CONFIGURE_ARGS += --disable-libtool-lock
+CONFIGURE_ARGS += --disable-debug
+
+# The testsuite has a linker error with mangled C++ symbols, skip for now
+SKIPTEST ?= 1
+
include gar/category.mk
-pre-configure-modulated:
-# cd $(WORKSRC) && aclocal-1.10 -I./scripts -I. && autoheader \
-# && libtoolize --automake --copy --force && automake-1.10 && autoconf
- cd $(WORKSRC) && aclocal-1.10 -I scripts && \
- automake-1.10 --gnu && autoconf
+post-patch-modulated:
+ -cd $(WORKSRC) && ./autogen.sh
+ @$(MAKECOOKIE)
- $(MAKECOOKIE)
+#pre-configure-modulated:
+## cd $(WORKSRC) && aclocal-1.10 -I./scripts -I. && autoheader \
+## && libtoolize --automake --copy --force && automake-1.10 && autoconf
+# cd $(WORKSRC) && aclocal-1.10 -I scripts && \
+# automake-1.10 --gnu && autoconf
+#
+# $(MAKECOOKIE)
-post-configure-modulated:
- perl -pi -e 's,\|-xarch=,|-norunpath|-xarch=,' $(WORKSRC)/libtool
- @$(MAKECOOKIE)
+#post-configure-modulated:
+# perl -pi -e 's,\|-xarch=,|-norunpath|-xarch=,' $(WORKSRC)/libtool
+# @$(MAKECOOKIE)
Modified: csw/mgar/pkg/libtorrent/trunk/checksums
===================================================================
--- csw/mgar/pkg/libtorrent/trunk/checksums 2012-04-19 13:06:58 UTC (rev 17777)
+++ csw/mgar/pkg/libtorrent/trunk/checksums 2012-04-19 13:44:55 UTC (rev 17778)
@@ -1,6 +1 @@
-a60c38bec6f1f18c6055894b15e3cb82 0001-Ignore-__UNUSED.patch
-037499ed708aaf72988cee60e5a8d96b libtorrent-0.12.6.tar.gz
-eb30844ace9f064a8fca5212f5a99fef rlibtorrent-01-madvise.diff
-f2f3738edcbc8d7ccfa14e784f3af9c6 rlibtorrent-03-dh-generate.diff
-c13befd35c91a36f78151accdc70c62c rlibtorrent-04-sunpro.diff
-0d1545bbc1e7c9f5d4de059c855b0f81 rlibtorrent-05-tracker-usable.diff
+0448407e23f53a182311236a96b9a83b libtorrent-rasterbar-0.16.0.tar.gz
Added: csw/mgar/pkg/libtorrent/trunk/files/0001-Use-correct-m4-quoting-for-code-in-autoconf.patch
===================================================================
--- csw/mgar/pkg/libtorrent/trunk/files/0001-Use-correct-m4-quoting-for-code-in-autoconf.patch (rev 0)
+++ csw/mgar/pkg/libtorrent/trunk/files/0001-Use-correct-m4-quoting-for-code-in-autoconf.patch 2012-04-19 13:44:55 UTC (rev 17778)
@@ -0,0 +1,133 @@
+From 5a847a7488e2ea452503765cd74ebcddda2388af Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <da\xC2m at opencsw.org>
+Date: Tue, 17 Apr 2012 15:26:39 +0200
+Subject: [PATCH] Use correct m4 quoting for code in autoconf
+
+This is documented in the autoconf manual in the section
+ AC_LANG_SOURCE
+---
+ scripts/common.m4 | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/scripts/common.m4 b/scripts/common.m4
+index 3d7e864..e0730bb 100644
+--- a/scripts/common.m4
++++ b/scripts/common.m4
+@@ -99,11 +99,11 @@ AC_DEFUN([TORRENT_OTFD], [
+ AC_LANG_PUSH(C++)
+ AC_MSG_CHECKING(for proper overloaded template function disambiguation)
+
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ template <typename T> void f(T&) {}
+ template <typename T> void f(T*) {}
+ int main() { int *i = 0; f(*i); f(i); }
+- ])],
++ ]])],
+ [
+ AC_MSG_RESULT(yes)
+ ], [
+@@ -119,24 +119,24 @@ AC_DEFUN([TORRENT_MINCORE_SIGNEDNESS], [
+ AC_LANG_PUSH(C++)
+ AC_MSG_CHECKING(signedness of mincore parameter)
+
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
+ void f() { mincore((char*)0, 0, (unsigned char*)0); }
+- ])],
++ ]])],
+ [
+ AC_DEFINE(USE_MINCORE, 1, Use mincore)
+ AC_DEFINE(USE_MINCORE_UNSIGNED, 1, use unsigned char* in mincore)
+ AC_MSG_RESULT(unsigned)
+ ],
+ [
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
+ void f() { mincore((char*)0, 0, (char*)0); }
+- ])],
++ ]])],
+ [
+ AC_DEFINE(USE_MINCORE, 1, Use mincore)
+ AC_DEFINE(USE_MINCORE_UNSIGNED, 0, use char* in mincore)
+@@ -168,11 +168,11 @@ AC_DEFUN([TORRENT_MINCORE], [
+ AC_DEFUN([TORRENT_CHECK_MADVISE], [
+ AC_MSG_CHECKING(for madvise)
+
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ void f() { static char test[1024]; madvise((void *)test, sizeof(test), MADV_NORMAL); }
+- ])],
++ ]])],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_MADVISE, 1, Use madvise)
+@@ -184,9 +184,9 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
+ AC_DEFUN([TORRENT_CHECK_POPCOUNT], [
+ AC_MSG_CHECKING(for __builtin_popcount)
+
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ int f() { return __builtin_popcount(0); }
+- ])],
++ ]])],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_BUILTIN_POPCOUNT, 1, Use __builtin_popcount.)
+@@ -198,12 +198,12 @@ AC_DEFUN([TORRENT_CHECK_POPCOUNT], [
+ AC_DEFUN([TORRENT_CHECK_CACHELINE], [
+ AC_MSG_CHECKING(for cacheline)
+
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <stdlib.h>
+ #include <linux/cache.h>
+ void* vptr __cacheline_aligned;
+ void f() { posix_memalign(&vptr, SMP_CACHE_BYTES, 42); }
+- ])],
++ ]])],
+ [
+ AC_MSG_RESULT(found builtin)
+ dnl AC_DEFINE(LT_SMP_CACHE_BYTES, SMP_CACHE_BYTES, Largest L1 cache size we know of, should work on all archs.)
+@@ -223,10 +223,10 @@ dnl Need to fix this so that it uses the stuff defined by the system.
+ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
+ AC_MSG_CHECKING(for execinfo.h)
+
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
++ 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)
+@@ -238,7 +238,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
+ AC_DEFUN([TORRENT_CHECK_ALIGNED], [
+ AC_MSG_CHECKING(the byte alignment)
+
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <inttypes.h>
+ int main() {
+ char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 };
+@@ -247,7 +247,7 @@ AC_DEFUN([TORRENT_CHECK_ALIGNED], [
+ if (*(uint32_t*)(buf + i) == 0) return -1;
+ return 0;
+ }
+- ])],
++ ]])],
+ [
+ AC_MSG_RESULT(none needed)
+ ], [
+--
+1.7.10
+
Added: csw/mgar/pkg/libtorrent/trunk/files/0002-Use-posix_memalign-only-when-available.patch
===================================================================
--- csw/mgar/pkg/libtorrent/trunk/files/0002-Use-posix_memalign-only-when-available.patch (rev 0)
+++ csw/mgar/pkg/libtorrent/trunk/files/0002-Use-posix_memalign-only-when-available.patch 2012-04-19 13:44:55 UTC (rev 17778)
@@ -0,0 +1,26 @@
+From ba65af2026be2372d6d3d1c7a85f518892479221 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <da\xC2m at opencsw.org>
+Date: Tue, 17 Apr 2012 17:09:07 +0200
+Subject: [PATCH] Use posix_memalign only when available
+
+---
+ rak/allocators.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/rak/allocators.h b/rak/allocators.h
+index 0a1b711..cfbd090 100644
+--- a/rak/allocators.h
++++ b/rak/allocators.h
+@@ -77,7 +77,9 @@ public:
+
+ static pointer alloc_size(size_type size) {
+ pointer ptr = NULL;
++#ifdef HAVE_POSIX_MEMALIGN
+ int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
++#endif
+
+ return ptr;
+ }
+--
+1.7.10
+
Added: csw/mgar/pkg/libtorrent/trunk/files/0003-Fix-the-signature-instead-of-using-sig_t.patch
===================================================================
--- csw/mgar/pkg/libtorrent/trunk/files/0003-Fix-the-signature-instead-of-using-sig_t.patch (rev 0)
+++ csw/mgar/pkg/libtorrent/trunk/files/0003-Fix-the-signature-instead-of-using-sig_t.patch 2012-04-19 13:44:55 UTC (rev 17778)
@@ -0,0 +1,54 @@
+From 3f3dd168d995127193a1043e8fd15f1258458f69 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <da\xC2m at opencsw.org>
+Date: Tue, 17 Apr 2012 18:52:22 +0200
+Subject: [PATCH] Fix the signature instead of using sig_t
+
+---
+ test/data/hash_check_queue_test.cc | 4 ++--
+ test/data/hash_queue_test.cc | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/test/data/hash_check_queue_test.cc b/test/data/hash_check_queue_test.cc
+index 59b8522..87daf06 100644
+--- a/test/data/hash_check_queue_test.cc
++++ b/test/data/hash_check_queue_test.cc
+@@ -67,13 +67,13 @@ verify_hash(const done_chunks_type* done_chunks, int index, const torrent::HashS
+
+ static torrent::Poll* create_select_poll() { return torrent::PollSelect::create(256); }
+
+-static void do_nothing() {}
++static void do_nothing(int s) {}
+
+ void
+ HashCheckQueueTest::setUp() {
+ torrent::Poll::slot_create_poll() = tr1::bind(&create_select_poll);
+
+- signal(SIGUSR1, (sig_t)&do_nothing);
++ signal(SIGUSR1, &do_nothing);
+ }
+
+ void
+diff --git a/test/data/hash_queue_test.cc b/test/data/hash_queue_test.cc
+index f31b5f3..f5fc88c 100644
+--- a/test/data/hash_queue_test.cc
++++ b/test/data/hash_queue_test.cc
+@@ -38,14 +38,14 @@ check_for_chunk_done(torrent::HashQueue* hash_queue, done_chunks_type* done_chun
+
+ static torrent::Poll* create_select_poll() { return torrent::PollSelect::create(256); }
+
+-static void do_nothing() {}
++static void do_nothing(int s) {}
+
+ void
+ HashQueueTest::setUp() {
+ CPPUNIT_ASSERT(torrent::taskScheduler.empty());
+
+ torrent::Poll::slot_create_poll() = tr1::bind(&create_select_poll);
+- signal(SIGUSR1, (sig_t)&do_nothing);
++ signal(SIGUSR1, &do_nothing);
+ }
+
+ void
+--
+1.7.10
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list