summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2017-04-08 12:19:18 +0200
committerPacho Ramos <pacho@gentoo.org>2017-04-08 12:28:05 +0200
commit236d2ef9901bee9fdcb6763b05cc500a5d2ac127 (patch)
tree0f8578365148f1e786af115a1c695ef554bb6a45 /dev-db/xbase
parentdev-db/kyotocabinet: Fix gcc6 support (#594064 by Peter Levine), port to eapi... (diff)
downloadgentoo-236d2ef9901bee9fdcb6763b05cc500a5d2ac127.tar.gz
gentoo-236d2ef9901bee9fdcb6763b05cc500a5d2ac127.tar.bz2
gentoo-236d2ef9901bee9fdcb6763b05cc500a5d2ac127.zip
dev-db/xbase: Fix gcc6/7 support (#594174 by Peter Levine), port to eapi6.
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-db/xbase')
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc6.patch49
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc7.patch34
-rw-r--r--dev-db/xbase/xbase-3.1.2.ebuild39
3 files changed, 109 insertions, 13 deletions
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc6.patch b/dev-db/xbase/files/xbase-3.1.2-gcc6.patch
new file mode 100644
index 000000000000..8dd4cdaef971
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc6.patch
@@ -0,0 +1,49 @@
+diff -up xbase64-3.1.2/xbase64/xblock.cpp.gcc6 xbase64-3.1.2/xbase64/xblock.cpp
+--- xbase64-3.1.2/xbase64/xblock.cpp.gcc6 2016-02-16 16:06:40.146864585 -0500
++++ xbase64-3.1.2/xbase64/xblock.cpp 2016-02-16 16:07:51.137342339 -0500
+@@ -84,7 +84,7 @@ xbLock::xbLock(xbDbf * pdbf)
+ TableLockCnt = 0;
+ MemoLockCnt = 0;
+ IndexLockCnt = 0;
+- std::cout << "xbLock constructor" << std::cout;
++ std::cout << "xbLock constructor";
+ }
+ /*************************************************************************/
+ xbLock::~xbLock()
+@@ -169,7 +169,7 @@ else if( LockType == XB_LOCK || LockType
+ /*************************************************************************/
+ xbaseLock::xbaseLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "xbaseLock constructor" << std::cout;
++ std::cout << "xbaseLock constructor";
+ }
+ /*************************************************************************/
+ xbShort xbaseLock::LockTableHeader( xbShort LockType )
+@@ -336,7 +336,7 @@ xbShort xbaseLock::LockInit()
+ /*************************************************************************/
+ dbaseLock::dbaseLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "dbaseLock constructor" << std::cout;
++ std::cout << "dbaseLock constructor";
+ }
+ /*************************************************************************/
+ xbShort dbaseLock::LockTableHeader( xbShort LockType )
+@@ -460,7 +460,7 @@ xbShort dbaseLock::UnlockAll()
+ /*************************************************************************/
+ clipperLock::clipperLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "clipperLock constructor" << std::cout;
++ std::cout << "clipperLock constructor";
+ }
+ /*************************************************************************/
+ xbShort clipperLock::LockTableHeader( xbShort LockType )
+@@ -523,7 +523,7 @@ xbShort clipperLock::UnlockAll()
+ /*************************************************************************/
+ foxproLock::foxproLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "foxproLock constructor" << std::cout;
++ std::cout << "foxproLock constructor";
+ }
+ /*************************************************************************/
+ xbShort foxproLock::LockTableHeader( xbShort LockType )
+diff -up xbase64-3.1.2/xbase64/xblock.h.gcc6 xbase64-3.1.2/xbase64/xblock.h
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc7.patch b/dev-db/xbase/files/xbase-3.1.2-gcc7.patch
new file mode 100644
index 000000000000..119fb59e1681
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc7.patch
@@ -0,0 +1,34 @@
+diff -up xbase64-3.1.2/bin/dbfutil1.cpp.gcc7 xbase64-3.1.2/bin/dbfutil1.cpp
+--- xbase64-3.1.2/bin/dbfutil1.cpp.gcc7 2017-02-20 09:59:36.135561103 -0500
++++ xbase64-3.1.2/bin/dbfutil1.cpp 2017-02-20 10:00:32.743218194 -0500
+@@ -157,7 +157,8 @@ void MyClass::SetFilter()
+ memset( Expression, 0x00, 512 );
+ while( !strlen( Expression )){
+ std::cout << "Enter filter expression (like AMOUNT<5)" << std::endl;
+- gets( Expression );
++ fgets( Expression, sizeof(Expression), stdin );
++ strtok( Expression, "\n" );
+ }
+ if( xbf )
+ delete xbf;
+@@ -247,7 +248,8 @@ void MyClass::ProcessExpression()
+ while( !strstr( exprsn, "QUIT" ) && !strstr( exprsn, "quit" )){
+
+ std::cout << ">";
+- gets( exprsn );
++ fgets( exprsn, sizeof(exprsn), stdin );
++ strtok( exprsn, "\n" );
+
+ if( strstr( exprsn, "HELP" ) || strstr( exprsn, "help" )){
+ std::cout << "** Command Help ***" << std::endl << std::endl;
+diff -up xbase64-3.1.2/xbase64/xbase64.h.gcc7 xbase64-3.1.2/xbase64/xbase64.h
+--- xbase64-3.1.2/xbase64/xbase64.h.gcc7 2017-02-20 09:49:07.063609482 -0500
++++ xbase64-3.1.2/xbase64/xbase64.h 2017-02-20 09:57:36.586618723 -0500
+@@ -53,6 +53,7 @@
+ #endif
+
+ #include <string.h>
++#include <cstdio>
+
+ #if defined(__WIN32__)
+ #include "windows.h"
diff --git a/dev-db/xbase/xbase-3.1.2.ebuild b/dev-db/xbase/xbase-3.1.2.ebuild
index fda7955bdacf..eba9889c70a0 100644
--- a/dev-db/xbase/xbase-3.1.2.ebuild
+++ b/dev-db/xbase/xbase-3.1.2.ebuild
@@ -1,9 +1,8 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
-AUTOTOOLS_AUTORECONF=no
-inherit autotools-utils
+EAPI=6
+inherit autotools ltprune
DESCRIPTION="xbase (i.e. dBase, FoxPro, etc.) compatible C++ class library"
HOMEPAGE="http://linux.techass.com/projects/xdb/"
@@ -17,18 +16,32 @@ IUSE="doc static-libs"
S="${WORKDIR}"/${PN}64-${PV}
PATCHES=(
- "${FILESDIR}"/${P}-fixconfig.patch
- "${FILESDIR}"/${P}-gcc44.patch
- "${FILESDIR}"/${PN}-2.0.0-ppc.patch
- "${FILESDIR}"/${P}-xbnode.patch
- "${FILESDIR}"/${P}-lesserg.patch
- "${FILESDIR}"/${P}-outofsource.patch
- "${FILESDIR}"/${P}-gcc47.patch
- "${FILESDIR}"/${P}-gcc-version.patch
+ "${FILESDIR}"/${P}-fixconfig.patch
+ "${FILESDIR}"/${P}-gcc44.patch
+ "${FILESDIR}"/${PN}-2.0.0-ppc.patch
+ "${FILESDIR}"/${P}-xbnode.patch
+ "${FILESDIR}"/${P}-lesserg.patch
+ "${FILESDIR}"/${P}-outofsource.patch
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-gcc-version.patch
+ "${FILESDIR}"/${P}-gcc6.patch
+ "${FILESDIR}"/${P}-gcc7.patch
)
+src_prepare() {
+ default
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
src_install() {
- autotools-utils_src_install
+ default
+ prune_libtool_files
+
# media-tv/linuxtv-dvb-apps collision, bug #208596
mv "${ED}/usr/bin/zap" "${ED}/usr/bin/${PN}-zap" || die