Mercurial > vanilla
changeset 36:d9494e071f33
databases/db: initial import, closes #1108
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 26 Feb 2019 19:31:00 +0100 |
parents | bb7aa3c8a64c |
children | b5e6536b2140 |
files | databases/db/atomic.patch databases/db/db.info databases/db/db.sh databases/db/disable-docs.patch |
diffstat | 4 files changed, 106 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/databases/db/atomic.patch Tue Feb 26 19:31:00 2019 +0100 @@ -0,0 +1,20 @@ +--- src/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400 ++++ src/dbinc/atomic.h.change 2013-03-12 14:06:35.000000000 -0400 +@@ -144,7 +144,7 @@ + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __atomic_compare_exchange_db((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __atomic_compare_exchange_db( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/databases/db/db.info Tue Feb 26 19:31:00 2019 +0100 @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=db +PKGVERSION=5.3.28 +PKGREVISION=1 +PKGSUMMARY="Berkeley database system" +PKGDOWNLOAD="http://download.oracle.com/berkeley-$PKGNAME/$PKGNAME-$PKGVERSION.tar.gz"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/databases/db/db.sh Tue Feb 26 19:31:00 2019 +0100 @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +source ./db.info + +case $(uname -m) in +x86_64) + CFLAGS="-O2 -fPIC" + ;; +*) + CFLAGS="-O2" + ;; +esac + +set -e + +rm -rf $PKGNAME-$PKGVERSION +tar xvaf $PKGNAME-$PKGVERSION.tar.gz +pushd $PKGNAME-$PKGVERSION + +patch -p0 < ../atomic.patch +patch -p0 < ../disable-docs.patch +pushd build_unix +CFLAGS="$CFLAGS" ../dist/configure \ + --prefix=/usr \ + --enable-compat185 \ + --enable-shared \ + --enable-static \ + --enable-cxx \ + --enable-dbm \ + --enable-stl + +make +make install DESTDIR=$DESTDIR +rm -f $DESTDIR/usr/lib/libdb{_stl-5.3,_cxx-5.3,-5.3}.la +popd + +popd +rm -rf $PKGNAME-$PKGVERSION
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/databases/db/disable-docs.patch Tue Feb 26 19:31:00 2019 +0100 @@ -0,0 +1,11 @@ +--- dist/Makefile.in.orig 2019-02-26 11:14:52.887232105 +0100 ++++ dist/Makefile.in 2019-02-26 11:15:26.536396962 +0100 +@@ -1076,7 +1076,7 @@ + # Library and standard utilities install. + ################################################## + library_install: install_setup +-library_install: install_include install_lib install_utilities install_docs ++library_install: install_include install_lib install_utilities + + uninstall: uninstall_include uninstall_lib uninstall_utilities uninstall_docs +