summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-10-11 08:26:35 +0000
committerPeter Volkov <pva@gentoo.org>2011-10-11 08:26:35 +0000
commitdc41f2a371badf4f30092fb613e594f3f4034781 (patch)
tree463bb16b7d63febee8999027d337f0da10a02de6 /dev-db
parentInclude PLCFLAGS, PLLDFLAGS in swipl pkg-config file. Closes #380661 (diff)
downloadgentoo-2-dc41f2a371badf4f30092fb613e594f3f4034781.tar.gz
gentoo-2-dc41f2a371badf4f30092fb613e594f3f4034781.tar.bz2
gentoo-2-dc41f2a371badf4f30092fb613e594f3f4034781.zip
Added tests inside ebuild, patch from upstream to fix gcc warnings.
(Portage version: 2.1.10.25/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/gigabase/ChangeLog8
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch188
-rw-r--r--dev-db/gigabase/gigabase-3.83-r1.ebuild62
3 files changed, 257 insertions, 1 deletions
diff --git a/dev-db/gigabase/ChangeLog b/dev-db/gigabase/ChangeLog
index 0f090fdec341..757bfc3b27ea 100644
--- a/dev-db/gigabase/ChangeLog
+++ b/dev-db/gigabase/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/gigabase
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/gigabase/ChangeLog,v 1.52 2011/10/02 09:17:21 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/gigabase/ChangeLog,v 1.53 2011/10/11 08:26:34 pva Exp $
+
+*gigabase-3.83-r1 (11 Oct 2011)
+
+ 11 Oct 2011; Peter Volkov <pva@gentoo.org> +gigabase-3.83-r1.ebuild,
+ +files/gigabase-3.83-fix-dereferencing.patch:
+ Added tests inside ebuild, patch from upstream to fix gcc warnings.
*gigabase-3.83 (02 Oct 2011)
diff --git a/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
new file mode 100644
index 000000000000..b96f47bc2130
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
@@ -0,0 +1,188 @@
+Index: session.cpp
+===================================================================
+--- session.cpp (revision 15)
++++ session.cpp (revision 16)
+@@ -131,7 +131,7 @@
+ throw CursorException("Cursor is not opened");
+ }
+ fillBuffer(sizeof(oid_t));
+- oid_t currOid = *(oid_t*)&sockBuf[bufPos];
++ oid_t currOid = *(oid_t*)(sockBuf + bufPos);
+ bufPos += sizeof(oid_t);
+ if (currObj != NULL) {
+ delete[] currObj;
+@@ -139,7 +139,7 @@
+ }
+ if (currOid != 0) {
+ fillBuffer(sizeof(int));
+- size_t size = *(int*)&sockBuf[bufPos];
++ size_t size = *(int*)(sockBuf + bufPos);
+ if (size <= SOCKET_BUFFER_SIZE) {
+ fillBuffer(size);
+ if (record != NULL) {
+Index: database.cpp
+===================================================================
+--- database.cpp (revision 15)
++++ database.cpp (revision 16)
+@@ -739,40 +739,55 @@
+ return;
+
+ case dbvmInvokeMethodBool:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.bvalue);
+- sattr.bvalue = *(bool*)&sattr.bvalue;
+- iattr.free(sattr);
+- return;
++ {
++ bool val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.bvalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt1:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+- sattr.ivalue = *(int1*)&sattr.ivalue;
+- iattr.free(sattr);
+- return;
++ {
++ int1 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.ivalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt2:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+- sattr.ivalue = *(int2*)&sattr.ivalue;
+- iattr.free(sattr);
+- return;
++ {
++ int2 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.ivalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt4:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+- sattr.ivalue = *(int4*)&sattr.ivalue;
+- iattr.free(sattr);
+- return;
++ {
++ int4 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.ivalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt8:
+ execute(expr->ref.base, iattr, sattr);
+ expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+ iattr.free(sattr);
+ return;
+ case dbvmInvokeMethodReal4:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.fvalue);
+- sattr.fvalue = *(real4*)&sattr.fvalue;
+- iattr.free(sattr);
+- return;
++ {
++ real4 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.fvalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodReal8:
+ execute(expr->ref.base, iattr, sattr);
+ expr->ref.field->method->invoke(sattr.base, &sattr.fvalue);
+@@ -792,28 +807,43 @@
+ return;
+
+ case dbvmInvokeSelfMethodBool:
+- expr->ref.field->method->invoke(iattr.record, &sattr.bvalue);
+- sattr.bvalue = *(bool*)&sattr.bvalue;
+- return;
++ {
++ bool val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.bvalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt1:
+- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+- sattr.ivalue = *(int1*)&sattr.ivalue;
+- return;
++ {
++ int1 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.ivalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt2:
+- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+- sattr.ivalue = *(int2*)&sattr.ivalue;
+- return;
++ {
++ int2 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.ivalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt4:
+- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+- sattr.ivalue = *(int4*)&sattr.ivalue;
+- return;
++ {
++ int4 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.ivalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt8:
+ expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+ return;
+ case dbvmInvokeSelfMethodReal4:
+- expr->ref.field->method->invoke(iattr.record, &sattr.fvalue);
+- sattr.fvalue = *(real4*)&sattr.fvalue;
+- return;
++ {
++ real4 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.fvalue = *(real4*)&sattr.fvalue;
++ return;
++ }
+ case dbvmInvokeSelfMethodReal8:
+ expr->ref.field->method->invoke(iattr.record, &sattr.fvalue);
+ return;
+Index: server.cpp
+===================================================================
+--- server.cpp (revision 15)
++++ server.cpp (revision 16)
+@@ -2097,7 +2097,7 @@
+ bufUsed = 0;
+ }
+ oid_t oid = cursor.getOid();
+- *(oid_t*)&buf[bufUsed] = oid;
++ *(oid_t*)(buf + bufUsed) = oid;
+ bufUsed += sizeof(oid_t);
+ dbRecord* record = db->getRow(tie, oid);
+ size_t size = record->size;
+@@ -2129,7 +2129,7 @@
+ bufUsed = 0;
+ }
+ }
+- *(oid_t*)&buf[bufUsed] = 0;
++ *(oid_t*)(buf + bufUsed) = 0;
+ return session->sock->write(buf, bufUsed + sizeof(oid_t));
+ }
+
diff --git a/dev-db/gigabase/gigabase-3.83-r1.ebuild b/dev-db/gigabase/gigabase-3.83-r1.ebuild
new file mode 100644
index 000000000000..33ad0aaaa64a
--- /dev/null
+++ b/dev-db/gigabase/gigabase-3.83-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/gigabase/gigabase-3.83-r1.ebuild,v 1.1 2011/10/11 08:26:35 pva Exp $
+
+EAPI="4"
+inherit eutils multilib
+
+DESCRIPTION="OO-DBMS with interfaces for C/C++/Java/PHP/Perl"
+HOMEPAGE="http://www.garret.ru/~knizhnik/gigabase.html"
+SRC_URI="mirror://sourceforge/gigabase/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+S=${WORKDIR}/gigabase
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-fix-dereferencing.patch"
+}
+
+src_configure() {
+ mf="${S}/Makefile"
+
+ econf
+ sed -r -i -e 's/subsql([^\.]|$)/subsql-gdb\1/' ${mf} || die
+}
+
+src_compile() {
+ emake
+ use doc && { doxygen doxygen.cfg || die; }
+}
+
+src_test() {
+ pwd
+ cd ${S}
+ local TESTS
+ local -i failcnt=0
+ TESTS="testddl testidx testidx2 testiref testleak testperf testperf2 testspat testtl testsync testtimeseries"
+
+ for t in ${TESTS}; do
+ ./${t} || { ewarn "$t fails"; failcnt+=1; }
+ done
+ [[ $failcnt != 0 ]] && die "See warnings above for tests that failed"
+}
+
+src_install() {
+ einstall
+
+ dodoc CHANGES
+ use doc && dohtml GigaBASE.htm
+ use doc && dohtml -r docs/html/*
+}
+
+pkg_postinst() {
+ elog "The subsql binary has been renamed to subsql-gdb,"
+ elog "to avoid a name clash with the FastDB version of subsql"
+}