Sync from SUSE:SLFO:Main kyotocabinet revision 43bf9ad04be2d882e69eb6b03022413b

This commit is contained in:
Adrian Schröter 2024-05-03 14:16:15 +02:00
commit a00eebb7f1
9 changed files with 441 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libkyotocabinet16

View File

@ -0,0 +1,85 @@
From: Shawn Landden <shawnlandden@gmail.com>
Date: Thu, 21 Jun 2012 20:34:28 -0700
Subject: configure: 8 byte atomics
fix up configure test to handle lack of 8 byte atomics correctly
as is the case with all ARM targets currently
---
configure | 29 +++++++++++++----------------
configure.in | 19 ++++++++++++++++---
2 files changed, 29 insertions(+), 19 deletions(-)
Index: kyotocabinet-1.2.77/configure
===================================================================
--- kyotocabinet-1.2.77.orig/configure
+++ kyotocabinet-1.2.77/configure
@@ -4041,25 +4041,22 @@ fi
# Atomic operations
if test "$enable_atomic" != "no"
then
- printf 'checking for atomic operations... '
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
+ printf 'checking for 8 byte atomic operations... '
+ if printf '
+/* Some targets support 4 byte atomics, but not 8 byte atomics,
+ * and will fail at link time if they are used.
+ *
+ * http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Atomic-Builtins.html
+ * http://gcc.gnu.org/wiki/Atomic
+ */
+#include <stdint.h>
int
main ()
{
-__sync_fetch_and_add
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- MYGCCATOMIC=yes
-else
- MYGCCATOMIC=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$MYGCCATOMIC" = "yes"
+uint64_t n = 0xdeadbeaf;
+__sync_bool_compare_and_swap(&n, 0xdeadbeaf, 0);
+return n;
+}' | $CC -xc -o config.tmp - >/dev/null 2>&1
then
MYCPPFLAGS="$MYCPPFLAGS -D_MYGCCATOMIC"
printf 'yes\n'
Index: kyotocabinet-1.2.77/configure.in
===================================================================
--- kyotocabinet-1.2.77.orig/configure.in
+++ kyotocabinet-1.2.77/configure.in
@@ -229,9 +229,22 @@ fi
# Atomic operations
if test "$enable_atomic" != "no"
then
- printf 'checking for atomic operations... '
- AC_TRY_COMPILE([], [__sync_fetch_and_add], [MYGCCATOMIC=yes], [MYGCCATOMIC=no])
- if test "$MYGCCATOMIC" = "yes"
+ printf 'checking for 8 byte atomic operations... '
+ if printf '
+/* Some targets support 4 byte atomics, but not 8 byte atomics,
+ * and will fail at link time if they are used.
+ *
+ * http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Atomic-Builtins.html
+ * http://gcc.gnu.org/wiki/Atomic
+ */
+#include <stdint.h>
+int
+main ()
+{
+uint64_t n = 0xdeadbeaf;
+__sync_bool_compare_and_swap(&n, 0xdeadbeaf, 0);
+return n;
+}' | $CC -xc -o config.tmp - >/dev/null 2>&1
then
MYCPPFLAGS="$MYCPPFLAGS -D_MYGCCATOMIC"
printf 'yes\n'

BIN
kyotocabinet-1.2.77.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
Index: kyotocabinet-1.2.76/configure.in
===================================================================
--- kyotocabinet-1.2.76.orig/configure.in
+++ kyotocabinet-1.2.76/configure.in
@@ -35,8 +35,8 @@ MYDOCUMENTFILES="COPYING FOSSEXCEPTION C
MYPCFILES="kyotocabinet.pc"
# Building flags
-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0"
-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
+MYCFLAGS="-Wall -fPIC -fsigned-char "
+MYCXXFLAGS="-Wall -fPIC -fsigned-char -fvisibility-inlines-hidden"
MYCPPFLAGS="-I. -I\$(INCLUDEDIR)"
MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"

View File

@ -0,0 +1,48 @@
Index: kyotocabinet-1.2.77/Makefile.in
===================================================================
--- kyotocabinet-1.2.77.orig/Makefile.in
+++ kyotocabinet-1.2.77/Makefile.in
@@ -56,7 +56,7 @@ LDFLAGS = @MYLDFLAGS@
CMDLDFLAGS = @MYCMDLDFLAGS@
CMDLIBS = @MYCMDLIBS@
LIBS = @LIBS@
-RUNENV = @MYLDLIBPATHENV@=@MYLDLIBPATH@
+RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR)
POSTCMD = @MYPOSTCMD@
Index: kyotocabinet-1.2.77/configure.in
===================================================================
--- kyotocabinet-1.2.77.orig/configure.in
+++ kyotocabinet-1.2.77/configure.in
@@ -35,27 +35,18 @@ MYDOCUMENTFILES="COPYING FOSSEXCEPTION C
MYPCFILES="kyotocabinet.pc"
# Building flags
-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2"
+MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0"
MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include"
+MYCPPFLAGS="-I. -I\$(INCLUDEDIR)"
MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
-MYLDFLAGS="-L. -L\$(LIBDIR) -L/usr/local/lib"
+MYLDFLAGS="-L. -L\$(LIBDIR)"
MYCMDLDFLAGS=""
MYCMDLIBS=""
MYLDLIBPATH=""
MYLDLIBPATHENV="LD_LIBRARY_PATH"
MYPOSTCMD="true"
-# Building paths
-PATH=".:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH"
-CPATH=".:/usr/local/include:$CPATH"
-LIBRARY_PATH=".:/usr/local/lib:$LIBRARY_PATH"
-LD_LIBRARY_PATH=".:/usr/local/lib:$LD_LIBRARY_PATH"
-PKG_CONFIG_PATH=".:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
-
-
#================================================================
# Options

15
kyotocabinet-pie.patch Normal file
View File

@ -0,0 +1,15 @@
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.in
+++ b/configure.in 2021-04-21 06:45:28.707199498 +0000
@@ -41,7 +41,7 @@ MYCPPFLAGS="-I. -I\$(INCLUDEDIR)"
MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
MYLDFLAGS="-L. -L\$(LIBDIR)"
-MYCMDLDFLAGS=""
+MYCMDLDFLAGS="-pie"
MYCMDLIBS=""
MYLDLIBPATH=""
MYLDLIBPATHENV="LD_LIBRARY_PATH"

103
kyotocabinet.changes Normal file
View File

@ -0,0 +1,103 @@
-------------------------------------------------------------------
Tue May 30 10:50:48 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
- Update url to new website.
-------------------------------------------------------------------
Wed Apr 21 06:51:44 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Add yet an other patch kyotocabinet-pie.patch
* link all executables as pie (bsc#1185033)
-------------------------------------------------------------------
Thu Mar 12 11:45:45 UTC 2020 - Martin Pluskal <mpluskal@suse.com>
- Update to version 1.2.77:
* kcthread.cc (CondVar::wait): a bug on Win32 was fixed.
* kcdbext.h (IndexDB::set, IndexDB::replace): a bug of updating
existing records was fixed.
* kcdb.h (DB::check): new function.
- Drop no longer needed gcc6-fix-errors.patch
- Modernise spec file
-------------------------------------------------------------------
Wed Jan 3 12:18:07 UTC 2018 - dimstar@opensuse.org
- Add baselibs.conf: Produce libkyotocabinet16-32bit, dependency to
libpinyin13-32bit.
-------------------------------------------------------------------
Tue May 9 14:46:10 UTC 2017 - werner@suse.de
- boo#1037914: Do not optimize for native cpu of the build system!
-------------------------------------------------------------------
Tue Apr 4 03:47:22 UTC 2017 - crrodriguez@opensuse.org
- kyotocabinet-fix-debuginfo.patch: Fix debuginfo generation
- gcc6-fix-errors.patch: return NULL instead, make GCC7 happy
-------------------------------------------------------------------
Wed May 25 09:38:17 UTC 2016 - martin.liska@suse.com
- Add gcc6-fix-errors.patch to remove errors seen by GCC6.
-------------------------------------------------------------------
Fri Jan 4 16:30:01 UTC 2013 - jengelh@inai.de
- Avoid explicit requires on library packages
-------------------------------------------------------------------
Thu Dec 27 10:34:38 UTC 2012 - dvaleev@suse.com
- fix up configure test to handle lack of 8 byte atomics correctly
(configure-8-byte-atomics.patch)
-------------------------------------------------------------------
Sat Aug 11 14:19:14 UTC 2012 - jengelh@inai.de
- Replace %makeinstall by make install; the former seldomly works
- kyoto requires at least i586 an arch; force it on RH6 (which
defaults to i386)
-------------------------------------------------------------------
Tue Jul 31 12:45:52 UTC 2012 - cfarrell@suse.com
- license update: SUSE-GPL-3.0-with-FLOSS-exception
Package allows exceptions for linking with components under certain
licenses (similar to MySQL)
-------------------------------------------------------------------
Sun Jul 22 01:31:25 UTC 2012 - i@marguerite.su
- update version 1.2.76
* kcthread.cc (CondVar::wait): a bug on Win32 was fixed.
* kcdbext.h (IndexDB::set, IndexDB::replace): a bug of updating existing records was fixed.
* kcdb.h (DB::check): new function.
-------------------------------------------------------------------
Thu Jun 21 23:28:49 UTC 2012 - jengelh@inai.de
- Make kyotocabinet installation work on SLE_11
-------------------------------------------------------------------
Fri Feb 3 14:40:02 UTC 2012 - jengelh@medozas.de
- Remove redundant tags/sections per specfile guideline suggestions
- Add autotools BuildRequires for factory/12.2
-------------------------------------------------------------------
Tue May 3 22:20:07 UTC 2011 - unnamedrambler@gmail.com
- updated to 1.2.52
-------------------------------------------------------------------
Tue Mar 15 15:04:42 UTC 2011 - prusnak@opensuse.org
- updated to 1.2.50
-------------------------------------------------------------------
Thu Mar 3 20:07:53 UTC 2011 - prusnak@opensuse.org
- created package (version 1.2.47)

148
kyotocabinet.spec Normal file
View File

@ -0,0 +1,148 @@
#
# spec file for package kyotocabinet
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define soname 16
Name: kyotocabinet
Version: 1.2.77
Release: 0
Summary: A straightforward implementation of DBM
License: SUSE-GPL-3.0-with-FLOSS-exception
Group: Productivity/Databases/Tools
URL: https://dbmx.net/kyotocabinet/
Source: https://dbmx.net/kyotocabinet/pkg/kyotocabinet-%{version}.tar.gz
Source99: baselibs.conf
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: %{name}-fix_rpath.patch
Patch2: configure-8-byte-atomics.patch
Patch3: %{name}-pie.patch
Patch4: %{name}-fix-debuginfo.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libbz2-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: zlib-devel
%if "%{_target_cpu}" == "i386"
# kyotocabinet uses __sync_* primitives and requires at least 586
ExclusiveArch: i586
%endif
%description
Kyoto Cabinet is a library of routines for managing a database. The database
is a simple data file containing records, each is a pair of a key and a
value. Every key and value is serial bytes with variable length. Both binary
data and character string can be used as a key and a value. Each key
must be unique within a database. There is neither concept of data tables
nor data types. Records are organized in hash table or B+ tree.
Kyoto Cabinet runs very fast. For example, elapsed time to store one
million records is 0.9 seconds for hash database, and 1.1 seconds for B+ tree
database. Moreover, the size of database is very small. For example, overhead
for a record is 16 bytes for hash database, and 4 bytes for B+ tree database.
Furthermore, scalability of Kyoto Cabinet is great. The database size can be
up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C,
Java, Python, Ruby, Perl, and Lua. Kyoto Cabinet is available on platforms
which have API conforming to C++03 with the TR1 library extensions.
Kyoto Cabinet is a free software licensed under the GNU General Public License.
On the other hand, a commercial license is also provided. If you use
Kyoto Cabinet within a proprietary software, the commercial license is required.
This package contains the command-line utilities to manage KyotoCabinet
database files.
%package -n libkyotocabinet-devel
Summary: Development Environment for the kyotocabinet Library
Group: Development/Languages/C and C++
Requires: libkyotocabinet%{soname} = %{version}
Provides: libkyotocabinet%{soname}-devel = %{version}
%description -n libkyotocabinet-devel
This package contains the development environment (headers, shared
library symlink, pkg-config file, ...) for libkyotocabinet%{soname}
%package -n libkyotocabinet%{soname}
Summary: Modern Implementation of DBM - Shared Library
Group: System/Libraries
Provides: libkyotocabinet = %{version}
%description -n libkyotocabinet%{soname}
Kyoto Cabinet is a library of routines for managing a database. The database
is a simple data file containing records, each is a pair of a key and a
value. Every key and value is serial bytes with variable length. Both binary
data and character string can be used as a key and a value. Each key
must be unique within a database. There is neither concept of data tables
nor data types. Records are organized in hash table or B+ tree.
Kyoto Cabinet runs very fast. For example, elapsed time to store one
million records is 0.9 seconds for hash database, and 1.1 seconds for B+ tree
database. Moreover, the size of database is very small. For example, overhead
for a record is 16 bytes for hash database, and 4 bytes for B+ tree database.
Furthermore, scalability of Kyoto Cabinet is great. The database size can be
up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C,
Java, Python, Ruby, Perl, and Lua. Kyoto Cabinet is available on platforms
which have API conforming to C++03 with the TR1 library extensions.
Kyoto Cabinet is a free software licensed under the GNU General Public License.
On the other hand, a commercial license is also provided. If you use
Kyoto Cabinet within a proprietary software, the commercial license is required.
%prep
%autosetup -p1
%build
sed -ie "/ldconfig/d" Makefile.in
sed -ie "/DOCDIR/d" Makefile.in
sed -ri 's/-march=native/-O2 -g3/g' configure.in
autoreconf -fiv
%configure
%make_build
%install
%make_install
rm -rf %{buildroot}%{_datadir}/kyotocabinet
rm -rf %{buildroot}%{_libdir}/libkyotocabinet.a
%check
# make check
%post -n libkyotocabinet%{soname} -p /sbin/ldconfig
%postun -n libkyotocabinet%{soname} -p /sbin/ldconfig
%files
%license COPYING
%doc ChangeLog
%doc doc/*
%doc *.idl
%{_bindir}/*
%{_mandir}/man1/*
%files -n libkyotocabinet-devel
%{_includedir}/*.h
%{_libdir}/libkyotocabinet.so
%{_libdir}/pkgconfig/kyotocabinet.pc
%files -n libkyotocabinet%{soname}
%license COPYING
%doc ChangeLog
%{_libdir}/libkyotocabinet.so.%{soname}*
%changelog