summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-05-15 10:50:00 +0000
committerIan Delaney <idella4@gentoo.org>2015-05-15 10:50:00 +0000
commitcc571e287608fe15ae30a424d6052c75c905391f (patch)
treebc6a915109ffcb66ff766e33f8b2a2776d8ea369 /dev-db
parentppc stable wrt bug #548738 (diff)
downloadgentoo-2-cc571e287608fe15ae30a424d6052c75c905391f.tar.gz
gentoo-2-cc571e287608fe15ae30a424d6052c75c905391f.tar.bz2
gentoo-2-cc571e287608fe15ae30a424d6052c75c905391f.zip
Use pread(), pread64(), pwrite() and pwrite64() (bug #549080). Update dependencies, CPPFLAGS, configure options. Patch by Arfrever.
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/sqlite/ChangeLog6
-rw-r--r--dev-db/sqlite/sqlite-3.8.10.1.ebuild55
2 files changed, 36 insertions, 25 deletions
diff --git a/dev-db/sqlite/ChangeLog b/dev-db/sqlite/ChangeLog
index bfaa936f185f..af54780bed20 100644
--- a/dev-db/sqlite/ChangeLog
+++ b/dev-db/sqlite/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-db/sqlite
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/ChangeLog,v 1.564 2015/05/15 10:31:20 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/ChangeLog,v 1.565 2015/05/15 10:50:00 idella4 Exp $
+
+ 15 May 2015; Ian Delaney <idella4@gentoo.org> sqlite-3.8.10.1.ebuild:
+ Use pread(), pread64(), pwrite() and pwrite64() (bug #549080). Update
+ dependencies, CPPFLAGS, configure options. Patch by Arfrever.
15 May 2015; Justin Lecher <jlec@gentoo.org> metadata.xml,
sqlite-3.8.10.1.ebuild:
diff --git a/dev-db/sqlite/sqlite-3.8.10.1.ebuild b/dev-db/sqlite/sqlite-3.8.10.1.ebuild
index bef5061d3daf..ede3c4247876 100644
--- a/dev-db/sqlite/sqlite-3.8.10.1.ebuild
+++ b/dev-db/sqlite/sqlite-3.8.10.1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/sqlite-3.8.10.1.ebuild,v 1.4 2015/05/15 10:31:20 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/sqlite-3.8.10.1.ebuild,v 1.5 2015/05/15 10:50:00 idella4 Exp $
EAPI="5"
-inherit autotools eutils flag-o-matic multilib multilib-minimal versionator
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
DOC_PV="${SRC_PV}"
@@ -23,8 +23,6 @@ SLOT="3"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-REQUIRED_USE="tools? ( tcl )"
-
RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
@@ -38,7 +36,8 @@ DEPEND="${RDEPEND}
test? (
app-arch/unzip
dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )"
+ )
+ tools? ( dev-lang/tcl:0 )"
amalgamation() {
! use tcl && ! use test && ! use tools
@@ -69,10 +68,18 @@ src_prepare() {
# At least ppc-aix, x86-interix and *-solaris need newer libtool.
# use prefix && eautoreconf
+ if use icu; then
+ if amalgamation; then
+ sed -e "s/LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
multilib_copy_sources
}
-multilib_src_configure() {
+src_configure() {
# `configure` from amalgamation tarball does not add -DSQLITE_DEBUG or -DNDEBUG flag.
if amalgamation; then
if use debug; then
@@ -116,34 +123,34 @@ multilib_src_configure() {
append-cppflags -DSQLITE_SOUNDEX
if use icu; then
+ # Support ICU extension.
+ # http://sqlite.org/compile.html#enable_icu
append-cppflags -DSQLITE_ENABLE_ICU
- if amalgamation; then
- sed -e "s/LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
fi
- # Enable secure_delete pragma.
- # http://sqlite.org/pragma.html#pragma_secure_delete
if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # http://sqlite.org/pragma.html#pragma_secure_delete
append-cppflags -DSQLITE_SECURE_DELETE
fi
- # Starting from 3.6.23, SQLite has locking strategies that are specific to
- # OSX. By default they are enabled, and use semantics that only make sense
- # on OSX. However, they require gethostuuid() function for that, which is
- # only available on OSX starting from 10.6 (Snow Leopard). For earlier
- # versions of OSX we have to disable all this nifty locking options, as
- # suggested by upstream.
- if [[ "${CHOST}" == *-darwin[56789] ]]; then
- append-cppflags -DSQLITE_ENABLE_LOCKING_STYLE="0"
- fi
-
if [[ "${CHOST}" == *-mint* ]]; then
append-cppflags -DSQLITE_OMIT_WAL
fi
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread_pwrite_test" <<< $'#include <unistd.h>\nint main()\n{\n pread(0, NULL, 0, 0);\n pwrite(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
+ append-cppflags -DUSE_PREAD
+ fi
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
+ append-cppflags -DUSE_PREAD64
+ elif $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -D_LARGEFILE64_SOURCE -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
+ append-cppflags -DUSE_PREAD64 -D_LARGEFILE64_SOURCE
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
# `configure` from amalgamation tarball does not support
# --with-readline-inc and --(enable|disable)-tcl options.
econf \
@@ -153,7 +160,7 @@ multilib_src_configure() {
$(use_enable static-libs static) \
$(amalgamation || echo --with-readline-inc="-I${EPREFIX}/usr/include/readline") \
$(amalgamation || use_enable debug) \
- $(amalgamation || echo --enable-tcl)
+ $(amalgamation || if use tcl || use test; then echo --enable-tcl; else echo --disable-tcl; fi)
}
multilib_src_compile() {