summaryrefslogtreecommitdiff
path: root/dev-db/gigabase
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-db/gigabase
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db/gigabase')
-rw-r--r--dev-db/gigabase/Manifest6
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-cpp14.patch34
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch63
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch182
-rw-r--r--dev-db/gigabase/gigabase-3.83-r2.ebuild58
-rw-r--r--dev-db/gigabase/metadata.xml27
6 files changed, 370 insertions, 0 deletions
diff --git a/dev-db/gigabase/Manifest b/dev-db/gigabase/Manifest
new file mode 100644
index 000000000000..6ed28db46608
--- /dev/null
+++ b/dev-db/gigabase/Manifest
@@ -0,0 +1,6 @@
+AUX gigabase-3.83-cpp14.patch 978 BLAKE2B 652c9d72e54a984e4ae2531be8b31d2ac279b95590d7756869ed2e915e0ebd500a9acf68f74c9ac8439cf1195a04d8546f7b0915333c0ac0dec514cc3480e7d3 SHA512 93a4ca2af7161af11c6b05af9a608884ca3991bf1615866a1c12271ad4cbf7748fae05dd7ad82dc2dc69fc36423039115242f38688dcdddb166d4e1c8d53b305
+AUX gigabase-3.83-fix-build-system.patch 2139 BLAKE2B b93b6d0dac817905a8d77476ab6abf8985155e429c47c527f8c909b1ec453ce1c9498b01811ade562c3d376bd6893cd545fb0452fa599b0378bffa0b5ad2a980 SHA512 a1f80fbf4a06f7646c617dc572066bf73255c2040512407d2440d5196d7a551f62df1cdfc276d890632c6567a11951bf42b20c82c91604696dc1414420bbf0df
+AUX gigabase-3.83-fix-dereferencing.patch 5947 BLAKE2B f10c92dcb5c2f48768b581e1f1359abb2c47b365fee214e4867791e059101ef9db1aced22c0cdaafebe99e65ee41ca1cb4fecb03dc02f7a3a43126865a36433a SHA512 7603024ce9eded76a36317a52cf49783fe37bc5cc0642648031f9f2c216d6a7234cdd49a019605b7a169f4d4277a052675adb809efc161160b3e9d847ddec522
+DIST gigabase-3.83.tar.gz 1746301 BLAKE2B f9168a7182f2a152a36a9bda12c91f3f2507f17a28e3cac9a58ed25795fdee73e397021ef46f3ad75dffb2f76b81c47d3d8d4cc900b1345619939e450daa6e9a SHA512 df2eab9b8ceae831c24a25f010cf06ebdd38fdf2f7478116b0d769092d6e4575c5c95222562410752df462a8bf3cc2f205c05d3adfaeb1634e82f443529957e5
+EBUILD gigabase-3.83-r2.ebuild 1164 BLAKE2B 6711fc6b21a32aad33e2178441ada39f1f72872d5888ef723fa31af498b8f7091fc78019f68dbed4746ff11ba78f00a1f31b36f25e44baa7e5149e954109775a SHA512 bb2ffc6bf438f919e0a8afb3815e0dc1056b285cd0d5d26cb43afe5433a67c7d2b79c6a07945d1901c78dfb0a16d94c3cb1eb58094328b0f41ca8675fc392622
+MISC metadata.xml 1528 BLAKE2B bd59a6efb4ae6eb108992929bb590318a5d4f1266bcb5da81675679eb3c305398464aba74657d6fed0e391cd2baf79901423065f04cd00c5980706b6342738d8 SHA512 3361591956fa707cf0607695ec180eb011f832519dd8147406ea2c065f7809758b145b007ad177cc5e15b5ca7416c91eaaae49ed3a6a3bd028e4c153fd12851c
diff --git a/dev-db/gigabase/files/gigabase-3.83-cpp14.patch b/dev-db/gigabase/files/gigabase-3.83-cpp14.patch
new file mode 100644
index 000000000000..47d2a1a540ff
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-cpp14.patch
@@ -0,0 +1,34 @@
+This patch fixes GCC6 (C++14) compilation errors. It replaces two invalid macro
+calls with correct code in one place. It also removes redefinitions of fmax and
+fmin functions which exist in standard library since C++11.
+Gentoo-bug: https://bugs.gentoo.org/show_bug.cgi?id=594550
+
+--- a/testddl.cpp
++++ b/testddl.cpp
+@@ -102,8 +102,13 @@
+
+ REGISTER(Record);
+
++#if __cplusplus < 201103L
+ USER_FUNC(sin);
+ USER_FUNC(cos);
++#else
++static dbUserFunction fsin_descriptor((double (*)(double))&sin, STRLITERAL("sin"));
++static dbUserFunction fcos_descriptor((double (*)(double))&cos, STRLITERAL("cos"));
++#endif
+
+ int __cdecl main()
+ {
+--- a/testtimeseries.cpp
++++ b/testtimeseries.cpp
+@@ -47,8 +47,10 @@
+ REGISTER(Stock);
+
+ inline int random(unsigned mod) { return rand() % mod; }
++#if __cplusplus < 201103L
+ inline float fmax(float x, float y) { return x > y ? x : y; }
+ inline float fmin(float x, float y) { return x < y ? x : y; }
++#endif
+
+ int main(int argc, char* argv[])
+ {
diff --git a/dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch b/dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch
new file mode 100644
index 000000000000..d807bc9a7fdb
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch
@@ -0,0 +1,63 @@
+Fix build system to respect DESTDIR and rename subsql to subsql-gdb,
+in order to avoid name clash with FastDB version of subsql.
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -21,7 +21,7 @@
+ # Place where to copy Gigabase library
+ libdir = @libdir@
+
+-# Place where to copy Gigabase subsql utility
++# Place where to copy Gigabase subsql-gdb utility
+ bindir = @bindir@
+
+ VERSION = 2
+@@ -42,7 +42,7 @@
+
+ GB_LIB = libgigabase$(SUFF).${LIBEXT}
+ CLI_LIB = libcli$(SUFF).${LIBEXT}
+-EXES = subsql
++EXES = subsql-gdb
+
+ EXAMPLES = guess testdb testjoin testddl testperf testspat testperf2 testsync testiref testtrav testidx testidx2 clitest testblob testleak testsession testtimeseries testtl
+ WEB_EXAMPLES = cgistub bugdb clidb
+@@ -90,8 +90,8 @@
+ clitest: clitest.o $(CLI_LIB)
+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o clitest clitest.o $(CLI_LIB) $(SOCKLIBS)
+
+-subsql: subsql.o $(GB_LIB)
+- $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o subsql subsql.o $(GB_LIB) $(SOCKLIBS)
++subsql-gdb: subsql.o $(GB_LIB)
++ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o subsql-gdb subsql.o $(GB_LIB) $(SOCKLIBS)
+
+ bugdb: bugdb.o $(GB_LIB)
+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o bugdb bugdb.o $(GB_LIB) $(SOCKLIBS)
+@@ -153,18 +153,18 @@
+ testleak: testleak.o $(GB_LIB)
+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o testleak testleak.o $(GB_LIB) $(SLHACK)
+
+-install: subsql $(GB_LIB) $(CLI_LIB)
+- mkdir -p $(includedir)
+- cp $(INCS) $(CLI_INCS) $(includedir)
+- mkdir -p $(libdir)
+- $(LIBTOOL) --mode=install $(INSTALL) $(GB_LIB) $(CLI_LIB) $(libdir)
+- mkdir -p $(bindir)
+- if test -x .libs/subsql ; then \
+- cp .libs/subsql $(bindir); \
++install: subsql-gdb $(GB_LIB) $(CLI_LIB)
++ mkdir -p $(DESTDIR)$(includedir)
++ cp $(INCS) $(CLI_INCS) $(DESTDIR)$(includedir)
++ mkdir -p $(DESTDIR)$(libdir)
++ $(LIBTOOL) --mode=install $(INSTALL) $(GB_LIB) $(CLI_LIB) $(DESTDIR)$(libdir)
++ mkdir -p $(DESTDIR)$(bindir)
++ if test -x .libs/subsql-gdb ; then \
++ cp .libs/subsql-gdb $(DESTDIR)$(bindir); \
+ else \
+- cp subsql $(bindir); \
++ cp subsql-gdb $(DESTDIR)$(bindir); \
+ fi
+-# strip $(bindir)/subsql
++# strip $(bindir)/subsql-gdb
+
+ clean:
+ rm -f *.o *.lo core *~
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..d2f0669d24fa
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
@@ -0,0 +1,182 @@
+--- a/session.cpp
++++ b/session.cpp
+@@ -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) {
+--- a/database.cpp
++++ b/database.cpp
+@@ -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;
+--- a/server.cpp
++++ b/server.cpp
+@@ -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-r2.ebuild b/dev-db/gigabase/gigabase-3.83-r2.ebuild
new file mode 100644
index 000000000000..5e21d4f9ae8f
--- /dev/null
+++ b/dev-db/gigabase/gigabase-3.83-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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 static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-dereferencing.patch"
+ "${FILESDIR}/${P}-cpp14.patch" # fix #594550
+ "${FILESDIR}/${P}-fix-build-system.patch"
+)
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ doxygen doxygen.cfg || die
+ HTML_DOCS=( GigaBASE.htm docs/html/. )
+ fi
+}
+
+src_test() {
+ local t
+ for t in testddl testidx testidx2 testiref testleak testperf \
+ testperf2 testspat testtl testsync testtimeseries; do
+ ./${t} || die
+ done
+}
+
+src_install() {
+ default
+
+ if ! use static-libs; then
+ find "${D}" -name '*.la' -delete || die
+ fi
+}
+
+pkg_postinst() {
+ elog "The subsql binary has been renamed to subsql-gdb,"
+ elog "to avoid a name clash with the FastDB version of subsql"
+}
diff --git a/dev-db/gigabase/metadata.xml b/dev-db/gigabase/metadata.xml
new file mode 100644
index 000000000000..4277b141f815
--- /dev/null
+++ b/dev-db/gigabase/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Object-Relational Database Management System GigaBASE inherits most of the
+ features of FastDB, but uses page pool instead of direct mapping of file on
+ virtual memory. So GigaBASE is able to handle database, which size
+ significantly exceeds size of computer physical memory. Convenient and
+ flexible C++ interface makes development of application for GigaBASE very
+ easy and automatic scheme evaluation simplifies maintenance and modification
+ of the system. GigaBASE merges best features of relational (simple data
+ structure and non-procedural query language) and object-oriented (direct
+ object references, user defined types and methods) databases. GigaBASE is
+ primary oriented on application requiring fast data retrieving by means of
+ indices and direct object references, such as Web Server databases
+ applications. SUBSQL utility can be used for database browsing and
+ inspection, performing online backups, database recovery, importing data to
+ and exporting data from database. GigaBASE will perform automatic recovery
+ after system or application crash, you should not worry about it. The only
+ thing you can have to do manually is stopping all database application if
+ one of them is crashed leaving database blocked.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gigabase</remote-id>
+ </upstream>
+</pkgmetadata>