[libuninum] fix breakage on x86_64

terjeros terjeros at fedoraproject.org
Tue Oct 25 16:44:57 UTC 2011


commit deff038c379da71528da118e1cd3eb1cb6b8a298
Author: Michael J Gruber <mjg at fedoraproject.org>
Date:   Tue Oct 25 16:58:02 2011 +0200

    fix breakage on x86_64
    
    libuninum is completely broken on x86_64:
    
    echo 42 | numconv -t Roman_Upper
    Cannot identify input number system.
    
    Use the fix as per the debian bug report
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607737
    resulting in:
    
    echo 42 | numconv -t Roman_Upper
    XLII

 libuninum-2.7-64bit-clean.patch |   37 +++++++++++++++++++++++++++++++++++++
 libuninum.spec                  |    9 ++++++++-
 2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/libuninum-2.7-64bit-clean.patch b/libuninum-2.7-64bit-clean.patch
new file mode 100644
index 0000000..65a8b67
--- /dev/null
+++ b/libuninum-2.7-64bit-clean.patch
@@ -0,0 +1,37 @@
+--- libuninum-2.7.orig/uninum.c
++++ libuninum-2.7/uninum.c
+@@ -35,11 +35,11 @@
+  */
+ 
+ 
+-#define ucslen(x) wcslen((signed long *) x)
+-#define ucscpy(x,y) (UTF32 *)wcscpy((signed long *)x,(signed long *)y)
+-#define ucscat(x,y) (UTF32 *)wcscat((signed long *)x,(signed long *)y)
+-#define ucschr(x,y) (UTF32 *)wcschr((signed long *)x,(signed long)y)
+-#define ucsrchr(x,y) (UTF32 *)wcsrchr((signed long *)x,(signed long)y)
++#define ucslen(x) wcslen((wchar_t *) x)
++#define ucscpy(x,y) (UTF32 *)wcscpy((wchar_t *)x,(wchar_t *)y)
++#define ucscat(x,y) (UTF32 *)wcscat((wchar_t *)x,(wchar_t *)y)
++#define ucschr(x,y) (UTF32 *)wcschr((wchar_t *)x,(wchar_t)y)
++#define ucsrchr(x,y) (UTF32 *)wcsrchr((wchar_t *)x,(wchar_t)y)
+ 
+ #define UNINUM
+ 
+--- libuninum-2.7.orig/unicode.h
++++ libuninum-2.7/unicode.h
+@@ -1,8 +1,10 @@
+-typedef unsigned long	UTF32;	/* at least 32 bits */
+-typedef unsigned short	UTF16;	/* at least 16 bits */
+-typedef unsigned short	UCS2;	/* at least 16 bits */
+-typedef unsigned char	UTF8;	/* 8 bits */
+-typedef unsigned char	Boolean; /* 0 or 1 */
++#include <stdint.h>
++
++typedef uint32_t	UTF32;	/* 32 bits */
++typedef uint16_t	UTF16;	/* 16 bits */
++typedef uint16_t	UCS2;	/* 16 bits */
++typedef uint8_t	UTF8;	/* 8 bits */
++typedef uint8_t	Boolean; /* 0 or 1 */
+ 
+ #define UNI_MAX_ASCII (UTF32)0x0000007F 
+ #define UNI_MAX_BMP   (UTF32)0x0000FFFF
diff --git a/libuninum.spec b/libuninum.spec
index aa32e7d..9283b28 100644
--- a/libuninum.spec
+++ b/libuninum.spec
@@ -1,12 +1,13 @@
 Summary:       Library for converting unicode strings to numbers
 Name:          libuninum
 Version:       2.7
-Release:       7%{?dist}.1
+Release:       8%{?dist}
 # numconv is GPLv2, lib is LGPLv2
 License:       GPLv2 and LGPLv2
 Group:         Development/Libraries
 URL:           http://billposer.org/Software/libuninum.html
 Source0:       http://billposer.org/Software/Downloads/%{name}-%{version}.tar.bz2
+Patch0:        libuninum-2.7-64bit-clean.patch
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: gmp-devel
 
@@ -35,6 +36,7 @@ using %{name}, you will need to install %{name}-devel.
 
 %prep
 %setup -q
+%patch0 -p1 -b .64bit-clean
 
 %build
 %configure --disable-static --disable-rpath
@@ -69,6 +71,11 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 %exclude %{_libdir}/libuninum.la
 
 %changelog
+* Tue Oct 25 2011 Michael J Gruber <mjg at fedoraproject.org> - 2.8
+- remove rpath for good
+- remove unnecessary build link
+- fix breakage on x86_64
+
 * Wed Oct 12 2011 Peter Schiffer <pschiffe at redhat.com> - 2.7-7.1
 - rebuild with new gmp
 


More information about the scm-commits mailing list