aboutsummaryrefslogtreecommitdiffstats
path: root/main/gdbm
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-23 08:18:21 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-23 09:48:43 +0000
commit3170330d4a705ff43a0fb9c8040ecb7d402d7770 (patch)
treec76a6706d670582a43f5140372578cbbac5bbef7 /main/gdbm
parentacc02b2ed81c8624b64584f0135014847fb59f23 (diff)
downloadaports-3170330d4a705ff43a0fb9c8040ecb7d402d7770.tar.bz2
aports-3170330d4a705ff43a0fb9c8040ecb7d402d7770.tar.xz
main/gdbm: upgrade to 1.10
Diffstat (limited to 'main/gdbm')
-rw-r--r--main/gdbm/APKBUILD47
-rw-r--r--main/gdbm/gdbm-1.10-zeroheaders.patch33
2 files changed, 57 insertions, 23 deletions
diff --git a/main/gdbm/APKBUILD b/main/gdbm/APKBUILD
index f967552d36..dd515f5ec7 100644
--- a/main/gdbm/APKBUILD
+++ b/main/gdbm/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gdbm
-pkgver=1.8.3
-pkgrel=5
+pkgver=1.10
+pkgrel=0
pkgdesc="GNU dbm is a set of database routines that use extensible hashing"
url="http://www.gnu.org/software/gdbm/"
arch="all"
@@ -10,37 +10,38 @@ license="GPL"
depends=""
makedepends=""
install=
-subpackages="$pkgname-dev $pkgname-dev"
-source="ftp://ftp.nluug.nl/pub/gnu/gdbm/gdbm-1.8.3.tar.gz
-30-gdbm-1.8.3-build.patch
-20-gdbm-1.8.3-compat-linking.patch
-10-gdbm-1.8.3-fix-install-ownership.patch"
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.nluug.nl/pub/gnu/gdbm/gdbm-$pkgver.tar.gz
+ gdbm-1.10-zeroheaders.patch"
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- for i in ../*.patch; do
- msg "Applying $i"
- patch -p0 < $i || return 1
+_builddir="$srcdir"/gdbm-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
done
+}
+build() {
+ cd "$_builddir"
+ # we disable large-file due to it makes the db file non-compat
+ # with gdbm-1.8.3
./configure --prefix=/usr \
- --includedir=/usr/include/gdbm \
+ --enable-libgdbm-compat \
+ --disable-largefile \
--disable-dependency-tracking \
--enable-fast-install
make || return 1
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- make INSTALL_ROOT="$pkgdir" install || return 1
- make INSTALL_ROOT="$pkgdir" install-compat || return 1
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
rm "$pkgdir"/usr/lib/*.la || return 1
- mv "${pkgdir}"/usr/include/gdbm/gdbm.h "${pkgdir}"/usr/include/
}
-md5sums="1d1b1d5c0245b1c00aff92da751e9aa1 gdbm-1.8.3.tar.gz
-5e76bc4f51640434e4279e940f6c73fb 30-gdbm-1.8.3-build.patch
-c8e2323a9e075d5c947cb7c7aeae5384 20-gdbm-1.8.3-compat-linking.patch
-4c7b88079898d7cb380e95c8ae99a9f9 10-gdbm-1.8.3-fix-install-ownership.patch"
+md5sums="88770493c2559dc80b561293e39d3570 gdbm-1.10.tar.gz
+ac255b10452005237836cd2d3a470733 gdbm-1.10-zeroheaders.patch"
diff --git a/main/gdbm/gdbm-1.10-zeroheaders.patch b/main/gdbm/gdbm-1.10-zeroheaders.patch
new file mode 100644
index 0000000000..a268f6bdfa
--- /dev/null
+++ b/main/gdbm/gdbm-1.10-zeroheaders.patch
@@ -0,0 +1,33 @@
+diff -up gdbm-1.10/src/falloc.c.zeroheaders gdbm-1.10/src/falloc.c
+--- gdbm-1.10/src/falloc.c.zeroheaders 2011-11-11 11:59:11.000000000 +0100
++++ gdbm-1.10/src/falloc.c 2011-11-14 17:34:32.487604027 +0100
+@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf)
+
+
+ /* Split the header block. */
+- temp = (avail_block *) malloc (av_size);
++ temp = (avail_block *) calloc (1, av_size);
+ if (temp == NULL) _gdbm_fatal (dbf, _("malloc error"));
+ /* Set the size to be correct AFTER the pop_avail_block. */
+ temp->size = dbf->header->avail.size;
+diff -up gdbm-1.10/src/gdbmopen.c.zeroheaders gdbm-1.10/src/gdbmopen.c
+--- gdbm-1.10/src/gdbmopen.c.zeroheaders 2011-11-11 19:39:42.000000000 +0100
++++ gdbm-1.10/src/gdbmopen.c 2011-11-14 17:33:24.867608650 +0100
+@@ -264,7 +264,7 @@ gdbm_open (const char *file, int block_s
+ (dbf->header->block_size - sizeof (hash_bucket))
+ / sizeof (bucket_element) + 1;
+ dbf->header->bucket_size = dbf->header->block_size;
+- dbf->bucket = (hash_bucket *) malloc (dbf->header->bucket_size);
++ dbf->bucket = (hash_bucket *) calloc (1, dbf->header->bucket_size);
+ if (dbf->bucket == NULL)
+ {
+ gdbm_close (dbf);
+@@ -456,7 +456,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s
+ for(index = 0; index < size; index++)
+ {
+ (dbf->bucket_cache[index]).ca_bucket
+- = (hash_bucket *) malloc (dbf->header->bucket_size);
++ = (hash_bucket *) calloc (1, dbf->header->bucket_size);
+ if ((dbf->bucket_cache[index]).ca_bucket == NULL)
+ {
+ gdbm_errno = GDBM_MALLOC_ERROR;