gdbm: Update to 1.16

This commit is contained in:
Alexey Pavlov 2018-06-28 13:51:37 +03:00
parent c911ba2e22
commit ffcf8f0398
3 changed files with 27 additions and 45 deletions

View File

@ -1,14 +1,16 @@
--- origsrc/gdbm-1.11/src/Makefile.am 2014-05-26 21:27:28.220164600 -0500
+++ src/gdbm-1.11/src/Makefile.am 2014-05-26 21:27:43.507105800 -0500
@@ -79,7 +79,7 @@ libgdbmapp_a_SOURCES =\
# Programs
@@ -89,8 +89,8 @@ libgdbmapp_a_SOURCES =\
bin_PROGRAMS = gdbmtool gdbm_load gdbm_dump
-gdbmtool_LDADD = ./libgdbmapp.a ./libgdbm.la
+gdbmtool_LDADD = libgdbmapp.a libgdbm.la
gdbmtool_LDADD = \
- ./libgdbmapp.a\
- ./libgdbm.la\
+ libgdbmapp.a \
+ libgdbm.la \
@READLINE_LIBS@
gdbmtool_SOURCES = \
datconv.c\
gram.y\
@@ -92,5 +92,5 @@ gdbmtool_SOURCES = \
AM_YFLAGS = -dtv
#AM_LFLAGS = -d

View File

@ -1,24 +1,24 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=('gdbm' 'libgdbm' 'libgdbm-devel')
pkgver=1.11
pkgrel=3
pkgver=1.16
pkgrel=1
pkgdesc="GNU database library"
url="https://www.gnu.org/software/gdbm/gdbm.html"
license=('GPL3')
arch=('i686' 'x86_64')
depends=('sh')
makedepends=('libreadline-devel')
source=(https://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz{,.sig}
gdbm-1.10-zeroheaders.patch
1.10-no-undefined.patch
1.11-parallel-make.patch
gdbm-1.11-msysize.patch)
options=('!makeflags')
sha256sums=('8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3'
sha256sums=('c8a18bc6259da0c3eefefb018f8aa298fddc6f86c6fc0f0dec73270896ab512f'
'SKIP'
'ff33700f7919039037e5f56452c56ca00e968637f6f38485c9b8ae586770ee5a'
'0401f8026f4673ea1be50bfd3bfa6c6b3bddd8539733d58911336c7908df452f'
'b2d661b1365fde38e4ed1796433767ed61b3be72f3b6c48b3d27e4004db01877'
'06054fb2f8a015a5ab785e829206ca56f5752d8009ab6f0c33e4a8fcd0bf477a'
'4a3bbb05aa085be08e9a1c2e14ddd99d7b04423a18b0e5e9d6d82bc826133610'
'4ccc9d37fd0d93d16f8d9f9c6ac4fb548643fa732f2c73e669751f3e9ba3401f')
prepare() {
@ -43,6 +43,7 @@ build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--build=${CHOST} \
--enable-libgdbm-compat
make
make DESTDIR=${srcdir}/dest install
@ -54,7 +55,7 @@ check() {
}
package_gdbm() {
depends=(libgdbm=$pkgver)
depends=("libgdbm=${pkgver}")
groups=('Database')
install=gdbm.install
@ -68,7 +69,7 @@ package_gdbm() {
}
package_libgdbm() {
depends=('gcc-libs')
depends=('gcc-libs' 'libreadline')
groups=('libraries')
mkdir -p ${pkgdir}/usr/bin
@ -78,7 +79,7 @@ package_libgdbm() {
package_libgdbm-devel() {
pkgdesc="libgdbm headers and libraries"
options=('staticlibs')
depends=("libgdbm=${pkgver}")
depends=("libgdbm=${pkgver}" 'libreadline-devel')
groups=('development')
mkdir -p ${pkgdir}/usr

View File

@ -1,33 +1,12 @@
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++)
diff -Naur gdbm-1.15.orig/src/gdbmopen.c gdbm-1.15/src/gdbmopen.c
--- gdbm-1.15.orig/src/gdbmopen.c 2018-05-06 21:50:23.243439700 -0400
+++ gdbm-1.15/src/gdbmopen.c 2018-05-07 14:15:12.620590400 -0400
@@ -656,7 +656,7 @@
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);
(dbf->bucket_cache[index]).ca_bucket =
- malloc (dbf->header->bucket_size);
+ calloc (1, dbf->header->bucket_size);
if ((dbf->bucket_cache[index]).ca_bucket == NULL)
{
gdbm_errno = GDBM_MALLOC_ERROR;
GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);