[UpTools] fix build on 64-bit platforms (don't fiddle with libdir in configure) fix build on s390 where size_t
Dan Horák
sharkcz at fedoraproject.org
Fri Mar 25 16:01:15 UTC 2011
commit f5664279258f223e8da0146ff516dbc941dd971d
Author: Dan Horák <dan at danny.cz>
Date: Fri Mar 25 17:01:07 2011 +0100
fix build on 64-bit platforms (don't fiddle with libdir in configure)
fix build on s390 where size_t is unsigned long
UpTools-8.5.4-64bit.patch | 18 ++++++++++++++++++
UpTools-8.5.4-s390.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
UpTools.spec | 10 +++++++++-
clog | 3 ++-
4 files changed, 71 insertions(+), 2 deletions(-)
---
diff --git a/UpTools-8.5.4-64bit.patch b/UpTools-8.5.4-64bit.patch
new file mode 100644
index 0000000..e3d806a
--- /dev/null
+++ b/UpTools-8.5.4-64bit.patch
@@ -0,0 +1,18 @@
+diff -up UpTools-8.5.4/configure.64bit UpTools-8.5.4/configure
+--- UpTools-8.5.4/configure.64bit 2011-03-25 16:07:14.000000000 +0100
++++ UpTools-8.5.4/configure 2011-03-25 16:07:38.000000000 +0100
+@@ -10930,14 +10930,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ # Let make expand exec_prefix. Allows to override the makevar 'prefix' later
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+-#
+-case $host in #(
+- *x86_64*) :
+- libdir=$prefix/lib64 ;; #(
+- *) :
+- libdir=$prefix/lib ;;
+-esac
+-
+ # Checks for programs.
+ #Esta es otra manera de pisar las flags de manera amigable.
+ #cxxflags_save="$CXXFLAGS"
diff --git a/UpTools-8.5.4-s390.patch b/UpTools-8.5.4-s390.patch
new file mode 100644
index 0000000..70f16e4
--- /dev/null
+++ b/UpTools-8.5.4-s390.patch
@@ -0,0 +1,42 @@
+diff -up UpTools-8.5.4/include/UpTools/UpOp.h.s390 UpTools-8.5.4/include/UpTools/UpOp.h
+--- UpTools-8.5.4/include/UpTools/UpOp.h.s390 2011-03-25 15:14:26.000000000 +0100
++++ UpTools-8.5.4/include/UpTools/UpOp.h 2011-03-25 15:49:59.000000000 +0100
+@@ -66,7 +66,7 @@ std::string& operator<<( std::string& s
+ std::string& operator<<( std::string& s , long long d );
+ std::string& operator<<( std::string& s , unsigned long long d );
+ std::string& operator<<( std::string& s , bool b );
+-#if __WORDSIZE==64
++#if __WORDSIZE==64 || defined(__s390__)
+ std::string& operator<<( std::string& s , size_t b );
+ #endif
+
+@@ -77,7 +77,7 @@ float& operator<<( float&
+ long long& operator<<( long long& d , const std::string& s );
+ unsigned long long& operator<<( unsigned long long& d, const std::string& s );
+ bool& operator<<( bool& b , const std::string& s );
+-#if __WORDSIZE==64
++#if __WORDSIZE==64 || defined(__s390__)
+ size_t& operator<<( size_t& b , const std::string& s );
+ #endif
+
+diff -up UpTools-8.5.4/UpOp.cc.s390 UpTools-8.5.4/UpOp.cc
+--- UpTools-8.5.4/UpOp.cc.s390 2011-03-25 15:14:42.000000000 +0100
++++ UpTools-8.5.4/UpOp.cc 2011-03-25 15:49:19.000000000 +0100
+@@ -42,7 +42,7 @@
+
+
+ /////////////////////////////////////////////////////////////////////
+-#if __WORDSIZE==64
++#if __WORDSIZE==64 || defined(__s390__)
+ std::string& operator<<(std::string& s,size_t n) {
+ char buf[32],*p=buf+31; *p=0;
+ do { *(--p) = '0'+(n%10); } while(n/=10);
+@@ -127,7 +127,7 @@ unsigned long long& operator<<(unsigned
+ return n;
+ }
+
+-#if __WORDSIZE==64
++#if __WORDSIZE==64 || defined(__s390__)
+ size_t& operator<<(size_t& n,const std::string& s) {
+ size_t len = s.size();
+ if(len==0) return (n=0);
diff --git a/UpTools.spec b/UpTools.spec
index 1b6f6c3..db97033 100644
--- a/UpTools.spec
+++ b/UpTools.spec
@@ -1,10 +1,12 @@
Summary: C++ library for HPC, networking, DB, memory, etc
Name: UpTools
Version: 8.5.4
-Release: 12%{dist}
+Release: 13%{dist}
License: BSD with advertising
Group: Development/Libraries
Source: http://www.palermo.edu/ingenieria/%{name}-%{version}.tar.gz
+Patch0: %{name}-8.5.4-64bit.patch
+Patch1: %{name}-8.5.4-s390.patch
URL: http://www.palermo.edu/ingenieria/uptools_ingles.html
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
@@ -39,6 +41,8 @@ and example code.
%prep
%setup -q
+%patch0 -p1 -b .64bit
+%patch1 -p1 -b .s390
iconv -f iso8859-1 -t utf-8 doc/tests/testUpTimer.cc > doc/tests/testUpTimer.cc.conv && touch -r doc/tests/testUpTimer.cc doc/tests/testUpTimer.cc.conv && mv -f doc/tests/testUpTimer.cc.conv doc/tests/testUpTimer.cc
mkdir doc/code_examples
@@ -79,6 +83,10 @@ rm -f %{buildroot}%{_libdir}/libUpTools.la
%doc LICENSE doc/README.FEDORA doc/code_examples
%changelog
+* Fri Mar 25 2011 Dan Horák <dan at danny.cz> - 8.5.4-13
+- fix build on 64-bit platforms (don't fiddle with libdir in configure)
+- fix build on s390 where size_t is unsigned long
+
* Wed Mar 23 2011 Dan Horák <dan at danny.cz> - 8.5.4-12
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
diff --git a/clog b/clog
index 2a72ec7..1a10ecc 100644
--- a/clog
+++ b/clog
@@ -1 +1,2 @@
-rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
+fix build on 64-bit platforms (don't fiddle with libdir in configure)
+fix build on s390 where size_t is unsigned long
More information about the scm-commits
mailing list