summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper KoƂodziej <kacper@kolodziej.in>2016-10-15 18:48:18 +0200
committerDavid Seifert <soap@gentoo.org>2016-10-21 23:23:11 +0200
commit4619d2046500054911918dc8325d72f34b534c5a (patch)
treeede81250d15f0c5772c459db41ab04163161c72c /dev-db/gigabase/files
parentdev-lua/mpack: Bump to 1.0.3 (diff)
downloadgentoo-4619d2046500054911918dc8325d72f34b534c5a.tar.gz
gentoo-4619d2046500054911918dc8325d72f34b534c5a.tar.bz2
gentoo-4619d2046500054911918dc8325d72f34b534c5a.zip
dev-db/gigabase: fix cpp14 compilation errors; bug #594550
Package-Manager: portage-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/2584 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-db/gigabase/files')
-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.patch18
3 files changed, 103 insertions, 12 deletions
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
index b96f47bc2130..d2f0669d24fa 100644
--- a/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
+++ b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
@@ -1,7 +1,5 @@
-Index: session.cpp
-===================================================================
---- session.cpp (revision 15)
-+++ session.cpp (revision 16)
+--- a/session.cpp
++++ b/session.cpp
@@ -131,7 +131,7 @@
throw CursorException("Cursor is not opened");
}
@@ -20,10 +18,8 @@ Index: session.cpp
if (size <= SOCKET_BUFFER_SIZE) {
fillBuffer(size);
if (record != NULL) {
-Index: database.cpp
-===================================================================
---- database.cpp (revision 15)
-+++ database.cpp (revision 16)
+--- a/database.cpp
++++ b/database.cpp
@@ -739,40 +739,55 @@
return;
@@ -164,10 +160,8 @@ Index: database.cpp
case dbvmInvokeSelfMethodReal8:
expr->ref.field->method->invoke(iattr.record, &sattr.fvalue);
return;
-Index: server.cpp
-===================================================================
---- server.cpp (revision 15)
-+++ server.cpp (revision 16)
+--- a/server.cpp
++++ b/server.cpp
@@ -2097,7 +2097,7 @@
bufUsed = 0;
}