diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2005-05-28 12:34:30 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2005-05-28 12:34:30 +0000 |
commit | 977b5450df12be10704647341cb1079aaf9fd7a3 (patch) | |
tree | e887054a3af1243143dcda3fe04295f05d61ecd8 /dev-libs | |
parent | Version bump for bug 94230. (diff) | |
download | gentoo-2-977b5450df12be10704647341cb1079aaf9fd7a3.tar.gz gentoo-2-977b5450df12be10704647341cb1079aaf9fd7a3.tar.bz2 gentoo-2-977b5450df12be10704647341cb1079aaf9fd7a3.zip |
Took over maintainership. Updated with a couple of patches to compile testsuite and use it.
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/wefts/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/wefts/Manifest | 19 | ||||
-rw-r--r-- | dev-libs/wefts/files/digest-wefts-0.99c-r1 (renamed from dev-libs/wefts/files/digest-wefts-0.99c) | 0 | ||||
-rw-r--r-- | dev-libs/wefts/files/testsuite.h | 131 | ||||
-rw-r--r-- | dev-libs/wefts/files/wefts-m_ret.patch | 15 | ||||
-rw-r--r-- | dev-libs/wefts/files/wefts-order.patch | 142 | ||||
-rw-r--r-- | dev-libs/wefts/metadata.xml | 5 | ||||
-rw-r--r-- | dev-libs/wefts/wefts-0.99c-r1.ebuild | 66 | ||||
-rw-r--r-- | dev-libs/wefts/wefts-0.99c.ebuild | 46 |
9 files changed, 373 insertions, 61 deletions
diff --git a/dev-libs/wefts/ChangeLog b/dev-libs/wefts/ChangeLog index 6132c2caeaa7..5f244b842144 100644 --- a/dev-libs/wefts/ChangeLog +++ b/dev-libs/wefts/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-libs/wefts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/wefts/ChangeLog,v 1.2 2005/04/19 10:25:25 beu Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/wefts/ChangeLog,v 1.3 2005/05/28 12:34:30 flameeyes Exp $ + +*wefts-0.99c-r1 (28 May 2005) + + 28 May 2005; Diego Pettenò <flameeyes@gentoo.org> +files/testsuite.h, + +files/wefts-m_ret.patch, +files/wefts-order.patch, metadata.xml, + -wefts-0.99c.ebuild, +wefts-0.99c-r1.ebuild: + Took over maintainership. Updated with a couple of patches to compile + testsuite and use it. 19 Apr 2005; Elfyn McBratney <beu@gentoo.org> metadata.xml: Remove retired developer from metadata.xml. diff --git a/dev-libs/wefts/Manifest b/dev-libs/wefts/Manifest index d04d10c7e18a..af98be4584f9 100644 --- a/dev-libs/wefts/Manifest +++ b/dev-libs/wefts/Manifest @@ -1,15 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 dffd46174e78b327c834fc3e4b1cf848 metadata.xml 160 MD5 1d5b3e4627586694c01fee8e48bf0fc5 ChangeLog 543 -MD5 028681f293cbf07363631b8f3beef379 wefts-0.99c.ebuild 863 -MD5 7c5372f040edc68ac55c917fe359dc95 files/digest-wefts-0.99c 66 +MD5 dffd46174e78b327c834fc3e4b1cf848 metadata.xml 160 +MD5 2b109e96c697e539ec851c4fb4e8deca wefts-0.99c-r1.ebuild 1363 MD5 86220ba170f6600578c478f1d5ebd9fc files/wefts-errno.patch 347 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) - -iD8DBQFCZNy7jUHll2nfF60RAlUzAKCJD7kTjAcohwnuepQYmzfdMAW2iACgqAHd -eufYc60KdbJYpL/5UFcxFHM= -=SMmO ------END PGP SIGNATURE----- +MD5 5036540a346f143db4c4af79f2520ec5 files/wefts-m_ret.patch 562 +MD5 f99e546eae62b996fb6100effe222152 files/wefts-order.patch 5848 +MD5 5bc78912d5a760e329bf2258e738d2ee files/testsuite.h 3282 +MD5 7c5372f040edc68ac55c917fe359dc95 files/digest-wefts-0.99c-r1 66 diff --git a/dev-libs/wefts/files/digest-wefts-0.99c b/dev-libs/wefts/files/digest-wefts-0.99c-r1 index ddac873e81ff..ddac873e81ff 100644 --- a/dev-libs/wefts/files/digest-wefts-0.99c +++ b/dev-libs/wefts/files/digest-wefts-0.99c-r1 diff --git a/dev-libs/wefts/files/testsuite.h b/dev-libs/wefts/files/testsuite.h new file mode 100644 index 000000000000..9fa5e35643dc --- /dev/null +++ b/dev-libs/wefts/files/testsuite.h @@ -0,0 +1,131 @@ +/* + testsuite.h + Definition of test class. + + $Id: testsuite.h,v 1.1 2005/05/28 12:34:30 flameeyes Exp $ +--------------------------------------------- + Begin : Fri, 12 Mar 2004 07:53:14 +0100 + Author : Giancarlo Niccolai + + Last modified because: + +*/ + +/************************************************************************** +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU Library General Public License as * +* published by the Free Software Foundation; either version 2.1 of the * +* License, or (at your option) any later version. * +***************************************************************************/ + +#ifndef TESTSUITE_H +#define TESTSUITE_H + +#include <vector> +#include <string> + +/** Forward declaration */ +class Test; +class TestSuite; + +/** Construct on first use semantic! */ +TestSuite& defTestSuite(); + +class TestProgress +{ +public: + virtual void progress( int max, int cur ) = 0; + virtual int verbosity() const = 0; + virtual int stressLevel() const = 0; +}; + +typedef std::vector< Test *> TestList; + +class TestSuite: public TestProgress +{ + TestList m_tests; + Test *m_current; + int m_currentId; + + int m_verbosity; + int m_stressLevel; +public: + TestSuite() { + m_verbosity = 0; + m_stressLevel = 0; + }; + + void add( Test *test ); + + virtual void progress( int max, int cur ); + virtual int verbosity() const { return m_verbosity; } + virtual int stressLevel() const { return m_stressLevel; } + void verbosity(const int lev ) { m_verbosity = lev; } + void stressLevel( const int lev ) { m_stressLevel = lev; } + + + int countTests() { return m_tests.size(); } + + void run(); + void list(); + void sort(); + void listTest( int id ); + void runTest( int id ); +}; + +/** A test instance. */ +class Test: public TestProgress +{ +protected: + bool m_result; + bool m_complete; + TestProgress *m_progressor; + + std::string m_name; + std::string m_description; + +protected: + int m_testId; + + Test( TestSuite* target = 0 ) { + m_result = false; + m_complete = false; + m_progressor = this ; + + // provide a coherent default + // testId is starting from 1. + m_testId = 1; + + if (target) + target->add( this ); + else + defTestSuite().add( this ); + } + +public: + + bool complete() { return m_complete; } + bool result() { return m_result; } + void setProgressor( TestProgress *prog ) { m_progressor = prog; } + /** We set a dummy progressor to ourselves to "do nothing" if no progressor is set. + This method does nothing; when initialized, the test class progressor is set + to itself, so if the test sends some progress but no correct progressor has + been set, this dummy test gets called. + */ + virtual void progress( int , int ) {} + virtual int verbosity() const {return 0;} + virtual int stressLevel() const {return 0;} + /** ID of this test. + It starts from 1...! + */ + int testId() const { return m_testId; } + + const std::string &name() const { return m_name; } + const std::string &description() const { return m_description ; } + virtual bool run() = 0; + +}; + + +#endif +/* end of testsuite.h */ diff --git a/dev-libs/wefts/files/wefts-m_ret.patch b/dev-libs/wefts/files/wefts-m_ret.patch new file mode 100644 index 000000000000..6b69dcf3b015 --- /dev/null +++ b/dev-libs/wefts/files/wefts-m_ret.patch @@ -0,0 +1,15 @@ +diff -ur libwefts-0.99c/include/wefts_ringbuffer.h libwefts-0.99c-m_ret/include/wefts_ringbuffer.h +--- libwefts-0.99c/include/wefts_ringbuffer.h 2004-03-28 23:45:40.000000000 +0200 ++++ libwefts-0.99c-m_ret/include/wefts_ringbuffer.h 2005-05-28 13:55:15.527607400 +0200 +@@ -226,9 +226,9 @@ + + m_mutex.lock(); + if ( m_wPos > m_rPos ) +- m_ret = m_size -m_wPos + m_rPos + 1; ++ ret = m_size -m_wPos + m_rPos + 1; + else +- m_ret = m_rPos - m_wPos; ++ ret = m_rPos - m_wPos; + m_mutex.unlock(); + + return ret; diff --git a/dev-libs/wefts/files/wefts-order.patch b/dev-libs/wefts/files/wefts-order.patch new file mode 100644 index 000000000000..9086407459d1 --- /dev/null +++ b/dev-libs/wefts/files/wefts-order.patch @@ -0,0 +1,142 @@ +diff -ur libwefts-0.99c/Makefile.am libwefts-0.99c-order/Makefile.am +--- libwefts-0.99c/Makefile.am 2004-04-10 22:14:07.000000000 +0200 ++++ libwefts-0.99c-order/Makefile.am 2005-05-28 13:57:17.152117664 +0200 +@@ -4,7 +4,7 @@ + # Toplevel Makefile.am + # $Id: wefts-order.patch,v 1.1 2005/05/28 12:34:30 flameeyes Exp $ + +-SUBDIRS = include ltlib testsuite tests src doc ++SUBDIRS = include ltlib src testsuite tests doc + + EXTRA_DIST = \ + AUTHORS README RELNOTES \ +diff -ur libwefts-0.99c/tests/Makefile.am libwefts-0.99c-order/tests/Makefile.am +--- libwefts-0.99c/tests/Makefile.am 2004-03-28 10:28:10.000000000 +0200 ++++ libwefts-0.99c-order/tests/Makefile.am 2005-05-28 14:07:42.447058384 +0200 +@@ -43,92 +43,92 @@ + testxmutex + + test_SOURCES = test.cpp +-test_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++test_LDADD = $(top_builddir)/src/libwefts.a + test_LDFLAGS=-lpthread + + teststop_SOURCES = teststop.cpp +-teststop_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++teststop_LDADD = $(top_builddir)/src/libwefts.a + teststop_LDFLAGS=-lpthread + + testbarrier_SOURCES = testbarrier.cpp +-testbarrier_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testbarrier_LDADD = $(top_builddir)/src/libwefts.a + testbarrier_LDFLAGS=-lpthread + + testcritical_SOURCES = testcritical.cpp +-testcritical_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testcritical_LDADD = $(top_builddir)/src/libwefts.a + testcritical_LDFLAGS=-lpthread + + + testopenbar_SOURCES = testopenbar.cpp +-testopenbar_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testopenbar_LDADD = $(top_builddir)/src/libwefts.a + testopenbar_LDFLAGS=-lpthread + + testsubscr_SOURCES = testsubscr.cpp +-testsubscr_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testsubscr_LDADD = $(top_builddir)/src/libwefts.a + testsubscr_LDFLAGS=-lpthread + + testtimesub_SOURCES = testtimesub.cpp +-testtimesub_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testtimesub_LDADD = $(top_builddir)/src/libwefts.a + testtimesub_LDFLAGS=-lpthread + + testrlock_SOURCES = testrlock.cpp +-testrlock_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testrlock_LDADD = $(top_builddir)/src/libwefts.a + testrlock_LDFLAGS=-lpthread + + testrwlock_SOURCES = testrwlock.cpp +-testrwlock_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testrwlock_LDADD = $(top_builddir)/src/libwefts.a + testrwlock_LDFLAGS=-lpthread + + testfence_SOURCES = testfence.cpp +-testfence_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testfence_LDADD = $(top_builddir)/src/libwefts.a + testfence_LDFLAGS=-lpthread + + testmoan_SOURCES = testmoan.cpp +-testmoan_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testmoan_LDADD = $(top_builddir)/src/libwefts.a + testmoan_LDFLAGS=-lpthread + + testpromote_SOURCES = testpromote.cpp +-testpromote_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testpromote_LDADD = $(top_builddir)/src/libwefts.a + testpromote_LDFLAGS=-lpthread + + testcleanup_SOURCES = testcleanup.cpp +-testcleanup_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testcleanup_LDADD = $(top_builddir)/src/libwefts.a + testcleanup_LDFLAGS=-lpthread + + testcoffee_SOURCES = testcoffee.cpp +-testcoffee_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ../lib/libwefts.a ++testcoffee_LDADD = $(top_builddir)/src/libwefts.a + testcoffee_LDFLAGS=-lpthread + + testcoffee2_SOURCES = testcoffee2.cpp +-testcoffee2_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testcoffee2_LDADD = $(top_builddir)/src/libwefts.a + testcoffee2_LDFLAGS=-lpthread + + testcond_SOURCES = testcond.cpp +-testcond_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testcond_LDADD = $(top_builddir)/src/libwefts.a + testcond_LDFLAGS=-lpthread + + testspecific_SOURCES = testspecific.cpp +-testspecific_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testspecific_LDADD = $(top_builddir)/src/libwefts.a + testspecific_LDFLAGS=-lpthread + + testqueue_SOURCES = testqueue.cpp +-testqueue_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testqueue_LDADD = $(top_builddir)/src/libwefts.a + testqueue_LDFLAGS=-lpthread + + testring_SOURCES = testring.cpp +-testring_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testring_LDADD = $(top_builddir)/src/libwefts.a + testring_LDFLAGS=-lpthread + + testsemaphore_SOURCES = testsemaphore.cpp +-testsemaphore_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testsemaphore_LDADD = $(top_builddir)/src/libwefts.a + testsemaphore_LDFLAGS=-lpthread + + teststack_SOURCES = teststack.cpp +-teststack_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++teststack_LDADD = $(top_builddir)/src/libwefts.a + teststack_LDFLAGS=-lpthread + + testxmutex_SOURCES = testxmutex.cpp +-testxmutex_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testxmutex_LDADD = $(top_builddir)/src/libwefts.a + testxmutex_LDFLAGS=-lpthread + + endif +diff -ur libwefts-0.99c/testsuite/Makefile.am libwefts-0.99c-order/testsuite/Makefile.am +--- libwefts-0.99c/testsuite/Makefile.am 2004-03-28 23:37:18.000000000 +0200 ++++ libwefts-0.99c-order/testsuite/Makefile.am 2005-05-28 14:05:45.987762888 +0200 +@@ -18,7 +18,7 @@ + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/testsuite + noinst_HEADERS = testsuite.h + testsuite_SOURCES = main.cpp testsuite.cpp ts_cancel.cpp ts_cond.cpp ts_moaning.cpp ts_rmutex.cpp ts_thread.cpp ts_process.cpp +-testsuite_LDADD = $(top_builddir)/src/libwefts.a $(top_builddir)/lib/libwefts.a ++testsuite_LDADD = $(top_builddir)/src/libwefts.a + testsuite_LDFLAGS = -lpthread + METASOURCES = AUTO + diff --git a/dev-libs/wefts/metadata.xml b/dev-libs/wefts/metadata.xml index 20ce219711a2..7e80c352c2da 100644 --- a/dev-libs/wefts/metadata.xml +++ b/dev-libs/wefts/metadata.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>no-herd</herd> +<maintainer> +<email>flameeyes@gentoo.org</email> +<name>Diego Pettenò</name> +</maintainer> </pkgmetadata> diff --git a/dev-libs/wefts/wefts-0.99c-r1.ebuild b/dev-libs/wefts/wefts-0.99c-r1.ebuild new file mode 100644 index 000000000000..bf2d414c888c --- /dev/null +++ b/dev-libs/wefts/wefts-0.99c-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/wefts/wefts-0.99c-r1.ebuild,v 1.1 2005/05/28 12:34:30 flameeyes Exp $ + +inherit eutils + +MY_P="lib${P}" + +DESCRIPTION="A C++ high-level yet efficent multithreading library, portable across pthread-enabled platforms." + +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" +HOMEPAGE="http://wefts.sourceforge.net/" + +DEPEND="doc? ( app-doc/doxygen ) + sys-devel/autoconf + sys-devel/automake" +RDEPEND="" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~ppc ~x86 ~amd64" +IUSE="doc debug" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/${PN}-errno.patch + epatch ${FILESDIR}/${PN}-m_ret.patch + epatch ${FILESDIR}/${PN}-order.patch + + cp ${FILESDIR}/testsuite.h ${S}/testsuite + + ./autogen.sh || die "autogen failed" + libtoolize --copy --force +} + +src_compile() { + hasq maketest ${FEATURES} && \ + myconf="${myconf} --enable-suite" + + econf \ + $(use_enable doc) \ + $(use_enable debug) \ + ${myconf} \ + || die "econf failed" + + emake || die "emake failed" +} + +src_test() { + einfo "Please ignore failures on test #5, it's platform-dependant." + + cd ${S}/testsuite + ./testsuite || die "Some tests failed." +} + +src_install () { + make DESTDIR=${D} install || die + + if use doc; then + dohtml -r ${S}/doc/html/* + fi +} + diff --git a/dev-libs/wefts/wefts-0.99c.ebuild b/dev-libs/wefts/wefts-0.99c.ebuild deleted file mode 100644 index 402e77b91bab..000000000000 --- a/dev-libs/wefts/wefts-0.99c.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/wefts/wefts-0.99c.ebuild,v 1.1 2004/12/30 21:12:11 chriswhite Exp $ - -inherit eutils - -MY_P="lib${P}" - -DESCRIPTION="A C++ high-level yet efficent multithreading library, portable across pthread-enabled platforms." - -SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" -HOMEPAGE="http://wefts.sourceforge.net/" - -DEPEND="doc? ( app-doc/doxygen )" -RDEPEND="" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~ppc" -IUSE="doc debug" - -S=${WORKDIR}/${MY_P} - -src_unpack() { - unpack ${A} - cd ${S} - - epatch ${FILESDIR}/${PN}-errno.patch -} - -src_compile() { - econf \ - $(use_enable doc) \ - $(use_enable debug) \ - || die - - emake || die -} - -src_install () { - make DESTDIR=${D} install || die - - if use doc; then - dohtml -r ${S}/doc/html/* - fi -} - |