summaryrefslogtreecommitdiff
path: root/dev-db/gigabase
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-db/gigabase
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-db/gigabase')
-rw-r--r--dev-db/gigabase/Manifest8
-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, 372 insertions, 0 deletions
diff --git a/dev-db/gigabase/Manifest b/dev-db/gigabase/Manifest
new file mode 100644
index 000000000000..1169c0435042
--- /dev/null
+++ b/dev-db/gigabase/Manifest
@@ -0,0 +1,8 @@
+AUX gigabase-3.83-cpp14.patch 978 SHA256 24cfb56d4c084536916c82baab733716ba167ebe62e078505fe0dd7143bc2fcf SHA512 93a4ca2af7161af11c6b05af9a608884ca3991bf1615866a1c12271ad4cbf7748fae05dd7ad82dc2dc69fc36423039115242f38688dcdddb166d4e1c8d53b305 WHIRLPOOL 2ebb46acc7260c9416d2730a7f06b51c3bf49d94a41f5a424b8307b6edc708a478b977006e782a74850d9d7e2ff848c8a4f1c4d64bfddb54ff0f57fe4278c76c
+AUX gigabase-3.83-fix-build-system.patch 2139 SHA256 e273fc54e59a55e999c0c4ea6b3f8476782127899304d0628d4b775cfdef9543 SHA512 a1f80fbf4a06f7646c617dc572066bf73255c2040512407d2440d5196d7a551f62df1cdfc276d890632c6567a11951bf42b20c82c91604696dc1414420bbf0df WHIRLPOOL 37f80db79c2bab17e2860a53b68a31613a16e2074b8533abfd6838d8053e4e6e095ce686cf1968c21abd7b6c74d5b550eb2b157ee944e9eae82c7e1dc2aa8b55
+AUX gigabase-3.83-fix-dereferencing.patch 5947 SHA256 7fee24c651ae65e64f9d57043f51c129108665191107e83eef0cda0cb630c881 SHA512 7603024ce9eded76a36317a52cf49783fe37bc5cc0642648031f9f2c216d6a7234cdd49a019605b7a169f4d4277a052675adb809efc161160b3e9d847ddec522 WHIRLPOOL c25220d4d0a134865d14b769dd13d52e93bd4c3e9206412cfb3b4596b9e381a243b77d67c97ef013611ea4a8a0444e0f32e29dd88954867727a225a59d8581eb
+DIST gigabase-3.83.tar.gz 1746301 SHA256 0d627fa41ce0b3336b08738bf00cfc41ef5ddc8eb91c11f6a621d0e6f2e65607 SHA512 df2eab9b8ceae831c24a25f010cf06ebdd38fdf2f7478116b0d769092d6e4575c5c95222562410752df462a8bf3cc2f205c05d3adfaeb1634e82f443529957e5 WHIRLPOOL 4be91ddc164b96346e8d69c00f1467c2c90676e5c3225f54a8d7d2436f59d5ef3cd41658e7061a41945e1a29c86bea5f33731c13df1442320210b1905f7d1778
+EBUILD gigabase-3.83-r2.ebuild 1164 SHA256 f118087f7b829072e74d7c4421dfc883e7aca6c543d5b38a9da46d5c5cf01c3e SHA512 bb2ffc6bf438f919e0a8afb3815e0dc1056b285cd0d5d26cb43afe5433a67c7d2b79c6a07945d1901c78dfb0a16d94c3cb1eb58094328b0f41ca8675fc392622 WHIRLPOOL be983f68bf965f41ba309e3c5bd228e9f8e13b3504effdf16b8c4e876271696da32e6301cdf13333ef87e1427e1d0a24b3b7da3ccc042485e76cc8e1e004c0c0
+MISC ChangeLog 3021 SHA256 fac8d4c0634c310036e8891f294f5174ec20be65d18a848bf693e8634f120d00 SHA512 a34bd987efb88b345441eef38fd61f1c4e95af823ce93c818deaeb7039047ba571dce2b6629696bd06bdd8594e7a5b93d78c5de00fb34ed9adfd9c6b0dd4b264 WHIRLPOOL 91617e904bf0fedf269ceeccdc8abc6d67172ee08bc841665d0ff8c448aeaee90f3ad42ab6f4956e0878af505f0fb8ddceda99595c0cda916e6e0a007359587a
+MISC ChangeLog-2015 7974 SHA256 1a8db815fbccc5f1322489a5afb1c898058a36e4c74f87a7f598b75fe480ce1d SHA512 82ace709c93cb8c3d4d89df26e8d286a05a87381ec254bb28bc9dfa6d1b1fbc385635a562ce9e43f9ce22f3c483ae0171c4b728d605bb94c2983874365ba7451 WHIRLPOOL 1156f5f23d4e8e3fca05c9a48b274161829664290991368292a39ebaa7175c5a2f6a1041b53139456817e003ba069c60234d0c13e50605b5f2ae1e2397ba5428
+MISC metadata.xml 1528 SHA256 a0c4cae3111a7513443ecb594ffca1d40b0562a58e7271b94cc22e41a63cad56 SHA512 3361591956fa707cf0607695ec180eb011f832519dd8147406ea2c065f7809758b145b007ad177cc5e15b5ca7416c91eaaae49ed3a6a3bd028e4c153fd12851c WHIRLPOOL d864305cd93247afa7b0cec071974c965f32a0b28a5e2042fc07ec2e2e555b60644200b77ad150887b57efdd48c47cce770745b86fb76ae28efd87f51bb81e55
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>