diff options
author | Kacper Kołodziej <kacper@kolodziej.in> | 2016-10-15 18:48:18 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-10-21 23:23:11 +0200 |
commit | 4619d2046500054911918dc8325d72f34b534c5a (patch) | |
tree | ede81250d15f0c5772c459db41ab04163161c72c /dev-db/gigabase | |
parent | dev-lua/mpack: Bump to 1.0.3 (diff) | |
download | gentoo-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')
-rw-r--r-- | dev-db/gigabase/files/gigabase-3.83-cpp14.patch | 34 | ||||
-rw-r--r-- | dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch | 63 | ||||
-rw-r--r-- | dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch | 18 | ||||
-rw-r--r-- | dev-db/gigabase/gigabase-3.83-r1.ebuild | 63 | ||||
-rw-r--r-- | dev-db/gigabase/gigabase-3.83-r2.ebuild | 59 |
5 files changed, 162 insertions, 75 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; } diff --git a/dev-db/gigabase/gigabase-3.83-r1.ebuild b/dev-db/gigabase/gigabase-3.83-r1.ebuild deleted file mode 100644 index 671323a643bc..000000000000 --- a/dev-db/gigabase/gigabase-3.83-r1.ebuild +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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 static-libs" - -DEPEND="doc? ( app-doc/doxygen )" -RDEPEND="" - -S="${WORKDIR}/${PN}" - -src_prepare() { - epatch "${FILESDIR}/${P}-fix-dereferencing.patch" -} - -src_configure() { - mf="${S}/Makefile" - - econf $(use_enable static-libs static) - 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 - prune_libtool_files - - 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" -} 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..8dda26b603a6 --- /dev/null +++ b/dev-db/gigabase/gigabase-3.83-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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" +} |