From 931d9eabef5099b3a118ac3a9ed5d12cf2fb811e Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 15 May 2013 08:25:56 +0200
Subject: [PATCH] tdb: cross build for 32bit archs; disable python pkg.

---
 srcpkgs/tdb/files/cross-32bit.answers | 46 +++++++++++++++++++++++++++
 srcpkgs/tdb/template                  | 29 +++++++++++------
 2 files changed, 65 insertions(+), 10 deletions(-)
 create mode 100644 srcpkgs/tdb/files/cross-32bit.answers

diff --git a/srcpkgs/tdb/files/cross-32bit.answers b/srcpkgs/tdb/files/cross-32bit.answers
new file mode 100644
index 0000000000..6262d36125
--- /dev/null
+++ b/srcpkgs/tdb/files/cross-32bit.answers
@@ -0,0 +1,46 @@
+Checking uname sysname type: OK
+Checking uname machine type: OK
+Checking uname release type: OK
+Checking uname version type: OK
+Checking simple C program: OK
+building library support: OK
+Checking for large file support: OK
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for WORDS_BIGENDIAN: OK
+Checking size of char: "1"
+Checking size of int: "4"
+Checking size of long long: "4"
+Checking size of long: "4"
+Checking size of off_t: "4"
+Checking size of short: "2"
+Checking size of size_t: "4"
+Checking size of ssize_t: "4"
+Checking size of dev_t: "4"
+Checking size of ino_t: "4"
+Checking size of time_t: "4"
+Checking size of void*: "4"
+Checking for C99 vsnprintf: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking size of bool: "1"
+Checking size of int8_t: "1"
+Checking size of uint8_t: "1"
+Checking size of int16_t: "2"
+Checking size of uint16_t: "2"
+Checking size of int32_t: "4"
+Checking size of uint32_t: "4"
+Checking size of int64_t: "4"
+Checking size of uint64_t: "4"
+Checking correct behavior of strtoll: OK
+Checking correct behavior of strptime: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking for HAVE_IFACE_IFCONF: OK
+Checking for HAVE_IFACE_IFREQ: OK
+Checking getconf LFS_CFLAGS: OK
+Checking for large file support without additional flags: OK
+Checking for working strptime: OK
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: OK
+Checking getconf large file support flags work: OK
diff --git a/srcpkgs/tdb/template b/srcpkgs/tdb/template
index fbc3b7f98c..2cc0e22ca2 100644
--- a/srcpkgs/tdb/template
+++ b/srcpkgs/tdb/template
@@ -1,9 +1,9 @@
 # Template build file for 'tdb'.
 pkgname=tdb
 version=1.2.11
-revision=2
+revision=3
 build_style=gnu-configure
-hostmakedepends="pkg-config python-devel libxslt docbook-xsl"
+hostmakedepends="pkg-config python libxslt docbook-xsl"
 short_desc="Hierarchical pool based memory allocator with destructors"
 maintainer="Juan RP <xtraeme@gmail.com>"
 license="GPL-3"
@@ -15,9 +15,25 @@ long_desc="
  TDB features, unlike GDBM, multiple writers support with appropriate locking
  and transactions."
 
+do_configure() {
+	if [ "$CROSS_BUILD" ]; then
+		cp ${FILESDIR}/cross-32bit.answers .
+		_args="--cross-compile --hostcc=cc --cross-answers=cross-32bit.answers"
+	fi
+	./configure --prefix=/usr --disable-python ${_args}
+}
+
+do_build() {
+	make ${makejobs}
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} install
+}
+
 tdb-devel_package() {
 	depends="libtdb-${version}_${revision}"
-	short_desc="${short_desc} - development files"
+	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
@@ -31,13 +47,6 @@ libtdb_package() {
 	}
 }
 
-tdb-python_package() {
-	short_desc="Trivial Database - python bindings"
-	pkg_install() {
-		vmove "usr/lib/python*"
-	}
-}
-
 tdb_package() {
 	pkg_install() {
 		vmove usr