- Corrected wrong dependency of -devel from main to -libs package

- Always enable 8 byte atomics patch e.g. for ppc32 (#1007732 #c5)
- Fixed previously added patch for building under RHEL 5 (#915123)
- Added dependencies to enable lzo and lzma/xz compression support
- Enabled the built-in test suite (with limitations at RHEL 5 ppc)
This commit is contained in:
Robert Scheck 2013-11-17 22:40:05 +01:00
parent da6e6df392
commit c213903613
4 changed files with 148 additions and 15 deletions

View File

@ -1,6 +1,7 @@
Patch by Shawn Landden <shawnlandden@gmail.com> for kyotocabinet >= 1.2.76, which fixes
the configure test to handle lack of 8 byte atomics correctly as is the case with all ARM
targets (and especially RHEL 5 on ix86) currently.
the configure test to handle lack of 8 byte atomics correctly as is the case with ARM 32
bit on all Fedora releases, Intel 32 bit on RHEL 5 and PowerPC 32 bit on RHEL 5 and all
Fedora releases.
--- kyotocabinet-1.2.76/configure.in 2012-05-24 13:31:42.000000000 +0200
+++ kyotocabinet-1.2.76/configure.in.8-byte-atomics 2013-03-01 00:21:21.000000000 +0100

View File

@ -0,0 +1,90 @@
Patch by Robert Scheck <robert@fedoraproject.org> for kyotocabinet >= 1.2.76 to ensure
that CFLAGS and CXXFLAGS do not include "-g0 -O2" or "-O0" at all as we need debug info
for the -debuginfo RPM packages. Additionally the patch removes "-rpath-link" as well.
--- kyotocabinet-1.2.76/configure 2012-05-24 13:31:45.000000000 +0200
+++ kyotocabinet-1.2.76/configure.cflags 2013-11-17 18:28:55.000000000 +0100
@@ -2109,8 +2109,8 @@
MYPCFILES="kyotocabinet.pc"
# Building flags
-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2"
-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
+MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char"
+MYCXXFLAGS="-Wall -fPIC -fsigned-char"
MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include"
MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
@@ -2147,8 +2147,8 @@
if test "$enable_debug" = "yes"
then
- MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g -O0"
- MYCXXFLAGS="-Wall -fPIC -fsigned-char -g -O0"
+ MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g"
+ MYCXXFLAGS="-Wall -fPIC -fsigned-char -g"
MYCPPFLAGS="$MYCPPFLAGS -UNDEBUG -D_KCDEBUG"
is_static="yes"
enables="$enables (debug)"
@@ -2178,8 +2178,8 @@
if test "$enable_opt" = "no"
then
- MYCFLAGS="$MYCFLAGS -O0"
- MYCXXFLAGS="$MYCXXFLAGS -O0"
+ MYCFLAGS="$MYCFLAGS"
+ MYCXXFLAGS="$MYCXXFLAGS"
enables="$enables (no-opt)"
fi
@@ -4538,7 +4538,6 @@
# As-needed linking
if uname | grep Linux >config.tmp
then
- MYLDFLAGS="$MYLDFLAGS -Wl,-rpath-link,.:/usr/local/lib:$MYLDLIBPATH"
MYLDFLAGS="$MYLDFLAGS -Wl,--as-needed"
else
MYCMDLIBS="$MYCMDLIBS $LIBS"
--- kyotocabinet-1.2.76/configure.in 2012-05-24 13:31:42.000000000 +0200
+++ kyotocabinet-1.2.76/configure.in.cflags 2013-11-17 18:29:20.000000000 +0100
@@ -35,8 +35,8 @@
MYPCFILES="kyotocabinet.pc"
# Building flags
-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2"
-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
+MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char"
+MYCXXFLAGS="-Wall -fPIC -fsigned-char"
MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include"
MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
@@ -70,8 +70,8 @@
AC_HELP_STRING([--enable-debug], [build for debugging]))
if test "$enable_debug" = "yes"
then
- MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g -O0"
- MYCXXFLAGS="-Wall -fPIC -fsigned-char -g -O0"
+ MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g"
+ MYCXXFLAGS="-Wall -fPIC -fsigned-char -g"
MYCPPFLAGS="$MYCPPFLAGS -UNDEBUG -D_KCDEBUG"
is_static="yes"
enables="$enables (debug)"
@@ -95,8 +95,8 @@
AC_HELP_STRING([--disable-opt], [build without optimization]))
if test "$enable_opt" = "no"
then
- MYCFLAGS="$MYCFLAGS -O0"
- MYCXXFLAGS="$MYCXXFLAGS -O0"
+ MYCFLAGS="$MYCFLAGS"
+ MYCXXFLAGS="$MYCXXFLAGS"
enables="$enables (no-opt)"
fi
@@ -302,7 +302,6 @@
# As-needed linking
if uname | grep Linux >config.tmp
then
- MYLDFLAGS="$MYLDFLAGS -Wl,-rpath-link,.:/usr/local/lib:$MYLDLIBPATH"
MYLDFLAGS="$MYLDFLAGS -Wl,--as-needed"
else
MYCMDLIBS="$MYCMDLIBS $LIBS"

View File

@ -6,6 +6,28 @@ file. Passing "long long" and "unsigned long long" to tr1_hashtable_define_trivi
is the key. For further information, also have a look to Red Hat Bugzilla, bug ID #915123:
https://bugzilla.redhat.com/show_bug.cgi?id=915123
--- kyotocabinet-1.2.76/configure 2012-05-24 13:31:45.000000000 +0200
+++ kyotocabinet-1.2.76/configure.tr1_hashtable 2013-11-17 03:11:59.000000000 +0100
@@ -2090,7 +2090,7 @@
# Targets
MYHEADERFILES="kccommon.h kcutil.h kcthread.h kcfile.h"
-MYHEADERFILES="$MYHEADERFILES kccompress.h kccompare.h kcmap.h kcregex.h"
+MYHEADERFILES="$MYHEADERFILES kccompress.h kccompare.h kcmap.h kcregex.h kcfunctional.h"
MYHEADERFILES="$MYHEADERFILES kcdb.h kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h"
MYHEADERFILES="$MYHEADERFILES kchashdb.h kcdirdb.h kctextdb.h kcpolydb.h kcdbext.h kclangc.h"
MYLIBRARYFILES="libkyotocabinet.a"
--- kyotocabinet-1.2.76/configure.in 2012-05-24 13:31:42.000000000 +0200
+++ kyotocabinet-1.2.76/configure.in.tr1_hashtable 2013-11-17 03:12:07.000000000 +0100
@@ -16,7 +16,7 @@
# Targets
MYHEADERFILES="kccommon.h kcutil.h kcthread.h kcfile.h"
-MYHEADERFILES="$MYHEADERFILES kccompress.h kccompare.h kcmap.h kcregex.h"
+MYHEADERFILES="$MYHEADERFILES kccompress.h kccompare.h kcmap.h kcregex.h kcfunctional.h"
MYHEADERFILES="$MYHEADERFILES kcdb.h kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h"
MYHEADERFILES="$MYHEADERFILES kchashdb.h kcdirdb.h kctextdb.h kcpolydb.h kcdbext.h kclangc.h"
MYLIBRARYFILES="libkyotocabinet.a"
--- kyotocabinet-1.2.76/kccommon.h 2012-05-24 18:27:59.000000000 +0200
+++ kyotocabinet-1.2.76/kccommon.h.tr1_hashtable 2013-03-01 00:09:59.000000000 +0100
@@ -44,7 +44,7 @@
@ -13,12 +35,12 @@ https://bugzilla.redhat.com/show_bug.cgi?id=915123
#include <utility>
-#include <functional>
+#include "functional"
+#include <kcfunctional.h>
#include <memory>
#include <iterator>
#include <algorithm>
--- kyotocabinet-1.2.76/functional 1970-01-01 01:00:00.000000000 +0100
+++ kyotocabinet-1.2.76/functional.tr1_hashtable 2013-03-01 00:06:28.000000000 +0100
--- kyotocabinet-1.2.76/kcfunctional.h 1970-01-01 01:00:00.000000000 +0100
+++ kyotocabinet-1.2.76/kcfunctional.h.tr1_hashtable 2013-03-01 00:06:28.000000000 +0100
@@ -0,0 +1,1282 @@
+// TR1 functional header -*- C++ -*-
+

View File

@ -1,15 +1,16 @@
Summary: A straightforward implementation of DBM
Name: kyotocabinet
Version: 1.2.76
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv3
Group: Applications/Databases
URL: http://fallabs.com/%{name}/
Source: http://fallabs.com/%{name}/pkg/%{name}-%{version}.tar.gz
Patch0: kyotocabinet-1.2.76-8-byte-atomics.patch
Patch1: kyotocabinet-1.2.76-tr1_hashtable.patch
Patch0: kyotocabinet-1.2.76-cflags.patch
Patch1: kyotocabinet-1.2.76-8-byte-atomics.patch
Patch2: kyotocabinet-1.2.76-tr1_hashtable.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: zlib-devel
BuildRequires: zlib-devel, lzo-devel, xz-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -35,7 +36,7 @@ for any Kyoto Cabinet client program or interface.
%package devel
Summary: Development files for Kyoto Cabinet
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig
Requires: %{name}-libs%{?_isa} = %{version}-%{release}, pkgconfig
%description devel
The kyotocabinet-devel package contains libraries and header files for
@ -56,14 +57,14 @@ applications that use Kyoto Cabinet.
%prep
%setup -q
%patch0 -p1 -b .cflags
%patch1 -p1 -b .8-byte-atomics
%if 0%{?rhel} == 5
%patch0 -p1 -b .8-byte-atomics
%patch1 -p1 -b .tr1_hashtable
%patch2 -p1 -b .tr1_hashtable
%endif
sed -e 's/ -g0 -O2//' -e 's/ -O0//' -i configure
%build
%configure --disable-opt
%configure --disable-opt --enable-lzo --enable-lzma
make %{?_smp_mflags}
%install
@ -76,6 +77,15 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libkyotocabinet.a
# Clean up for later usage in documentation
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}
%check
# All kcutilmgr compression tests on RHEL 5 (ppc) just cause 99.9% CPU
# usage but do not continue or simply fail. However all the other tests
# including compression ones work as expected. What is the impact here?
%if 0%{?rhel} == 5 && "%{_arch}" == "ppc"
sed -e '/$(RUNENV) $(RUNCMD) .\/kcutilmgr comp /d' -i Makefile
%endif
make check
%clean
rm -rf $RPM_BUILD_ROOT
@ -136,6 +146,9 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/kcdbext.h
%{_includedir}/kcdirdb.h
%{_includedir}/kcfile.h
%if 0%{?rhel} == 5
%{_includedir}/kcfunctional.h
%endif
%{_includedir}/kchashdb.h
%{_includedir}/kclangc.h
%{_includedir}/kcmap.h
@ -155,6 +168,13 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING doc/api/* kyotocabinet.idl
%changelog
* Sun Nov 17 2013 Robert Scheck <robert@fedoraproject.org> 1.2.76-5
- Corrected wrong dependency of -devel from main to -libs package
- Always enable 8 byte atomics patch e.g. for ppc32 (#1007732 #c5)
- Fixed previously added patch for building under RHEL 5 (#915123)
- Added dependencies to enable lzo and lzma/xz compression support
- Enabled the built-in test suite (with limitations at RHEL 5 ppc)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.76-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
@ -182,7 +202,7 @@ rm -rf $RPM_BUILD_ROOT
- Prevent -march=native build flag [735822], credit Ville Skyatta
<ville.skyata@iki.fi>
* Mon Aug 31 2011 Casey Dahlin <cdahlin@redhat.com> - 1.2.70-1
* Wed Aug 31 2011 Casey Dahlin <cdahlin@redhat.com> - 1.2.70-1
- Update to latest upstream
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.31-3