Hi all,

I plan to fix #965695 and #999178

The debdiff is as attachment.

Will upload to delay/10 queue after 10 days

Yours,
Paul


diff -Nru libuninum-2.7/debian/changelog libuninum-2.7/debian/changelog
--- libuninum-2.7/debian/changelog      2022-12-12 21:19:30.000000000 +0800
+++ libuninum-2.7/debian/changelog      2022-12-12 17:56:29.000000000 +0800
@@ -1,3 +1,13 @@
+libuninum (2.7-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Bump debhelper compat to 12 (Closes: #965695)
+  * debian/rules: use dh. (Closes: #999178)
+  * Port to DebSrc3.0 (quilt) format.
+  * Add autopkgtest
+
+ -- Ying-Chun Liu (PaulLiu) <paul...@debian.org>  Mon, 12 Dec 2022 17:56:29 
+0800
+
 libuninum (2.7-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru libuninum-2.7/debian/compat libuninum-2.7/debian/compat
--- libuninum-2.7/debian/compat 2022-12-12 21:19:30.000000000 +0800
+++ libuninum-2.7/debian/compat 1970-01-01 08:00:00.000000000 +0800
@@ -1 +0,0 @@
-5
diff -Nru libuninum-2.7/debian/control libuninum-2.7/debian/control
--- libuninum-2.7/debian/control        2022-12-12 21:19:30.000000000 +0800
+++ libuninum-2.7/debian/control        2022-12-12 17:56:29.000000000 +0800
@@ -1,7 +1,7 @@
 Source: libuninum
-Priority: extra
+Priority: optional
 Maintainer: Bartosz Fenski <fe...@debian.org>
-Build-Depends: debhelper (>= 5), autotools-dev, libgmp3-dev
+Build-Depends: debhelper-compat (= 12), libgmp3-dev
 Standards-Version: 3.7.3
 Section: libs
 Homepage: http://billposer.org/Software/libuninum.html
@@ -9,7 +9,7 @@
 Package: libuninum-dev
 Section: libdevel
 Architecture: any
-Depends: libuninum5 (>= ${binary:Version})
+Depends: libuninum5 (= ${binary:Version}), ${misc:Depends}
 Description: development files for Libuninum library
  Libuninum is a library for converting Unicode strings to numbers and numbers 
to
  Unicode strings. Standard functions like strtoul, strtod, and sprintf do
@@ -24,7 +24,7 @@
 Package: libuninum5
 Section: libs
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: library for handling numbers as Unicode strings
  Libuninum is a library for converting Unicode strings to numbers and numbers 
to
  Unicode strings. Standard functions like strtoul, strtod, and sprintf do
@@ -36,7 +36,7 @@
 Package: numconv
 Section: utils
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: utility for conversion numbers as Unicode strings
  numconv is an utility handling number system conversions and provides 
  a convenient way to delimit numbers generated by other programs without 
diff -Nru libuninum-2.7/debian/libuninum5.install 
libuninum-2.7/debian/libuninum5.install
--- libuninum-2.7/debian/libuninum5.install     2022-12-12 21:19:30.000000000 
+0800
+++ libuninum-2.7/debian/libuninum5.install     2022-12-12 17:56:29.000000000 
+0800
@@ -1 +1 @@
-usr/lib/lib*.so.*
+usr/lib/*/lib*.so.*
diff -Nru libuninum-2.7/debian/libuninum-dev.install 
libuninum-2.7/debian/libuninum-dev.install
--- libuninum-2.7/debian/libuninum-dev.install  2022-12-12 21:19:30.000000000 
+0800
+++ libuninum-2.7/debian/libuninum-dev.install  2022-12-12 17:56:29.000000000 
+0800
@@ -1,3 +1,3 @@
 usr/include/uninum/*
-usr/lib/lib*.a
-usr/lib/lib*.so
+usr/lib/*/lib*.a
+usr/lib/*/lib*.so
diff -Nru libuninum-2.7/debian/patches/0001_uninum.patch 
libuninum-2.7/debian/patches/0001_uninum.patch
--- libuninum-2.7/debian/patches/0001_uninum.patch      1970-01-01 
08:00:00.000000000 +0800
+++ libuninum-2.7/debian/patches/0001_uninum.patch      2022-12-12 
17:52:42.000000000 +0800
@@ -0,0 +1,19 @@
+--- 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
+ 
diff -Nru libuninum-2.7/debian/patches/0002_unicode.patch 
libuninum-2.7/debian/patches/0002_unicode.patch
--- libuninum-2.7/debian/patches/0002_unicode.patch     1970-01-01 
08:00:00.000000000 +0800
+++ libuninum-2.7/debian/patches/0002_unicode.patch     2022-12-12 
17:52:57.000000000 +0800
@@ -0,0 +1,18 @@
+--- 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 -Nru libuninum-2.7/debian/patches/series 
libuninum-2.7/debian/patches/series
--- libuninum-2.7/debian/patches/series 1970-01-01 08:00:00.000000000 +0800
+++ libuninum-2.7/debian/patches/series 2022-12-12 17:55:24.000000000 +0800
@@ -0,0 +1,2 @@
+0001_uninum.patch
+0002_unicode.patch
diff -Nru libuninum-2.7/debian/rules libuninum-2.7/debian/rules
--- libuninum-2.7/debian/rules  2022-12-12 21:19:30.000000000 +0800
+++ libuninum-2.7/debian/rules  2022-12-12 17:56:29.000000000 +0800
@@ -7,15 +7,6 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
-
 # shared library versions, option 1
 version=2.0.5
 major=2
@@ -25,67 +16,8 @@
 #major=`ls src/.libs/lib*.so.* | \
 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
-config.status: configure
-       dh_testdir
-       # Add here commands to configure the package.
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-       cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-       cp -f /usr/share/misc/config.guess config.guess
-endif
-       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
-
-
-build: build-stamp
-build-stamp:  config.status
-       dh_testdir
-
-       $(MAKE)
-
-       touch $@
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp 
-
-       [ ! -f Makefile ] || $(MAKE) distclean
-       rm -f config.sub config.guess
-
-       dh_clean 
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
-
-       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs ChangeLog
-       dh_installdocs
-       dh_installexamples
-       dh_install --sourcedir=debian/tmp
-       dh_installman
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps -l debian/libuninum5/usr/lib
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+%:
+       dh $@
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+override_dh_auto_configure:
+       dh_auto_configure -- --prefix=/usr --mandir=\$${prefix}/share/man 
--infodir=\$${prefix}/share/info
diff -Nru libuninum-2.7/debian/source/format libuninum-2.7/debian/source/format
--- libuninum-2.7/debian/source/format  1970-01-01 08:00:00.000000000 +0800
+++ libuninum-2.7/debian/source/format  2022-12-12 17:51:08.000000000 +0800
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru libuninum-2.7/debian/tests/control libuninum-2.7/debian/tests/control
--- libuninum-2.7/debian/tests/control  1970-01-01 08:00:00.000000000 +0800
+++ libuninum-2.7/debian/tests/control  2022-12-12 17:56:29.000000000 +0800
@@ -0,0 +1,2 @@
+Tests: test-chinese-1
+Depends: @
diff -Nru libuninum-2.7/debian/tests/test-chinese-1 
libuninum-2.7/debian/tests/test-chinese-1
--- libuninum-2.7/debian/tests/test-chinese-1   1970-01-01 08:00:00.000000000 
+0800
+++ libuninum-2.7/debian/tests/test-chinese-1   2022-12-12 17:56:29.000000000 
+0800
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+testn=$(echo "一四五零四八七" | numconv)
+if [ "$testn" = "1450487" ]; then
+    echo $testn
+else
+    exit 1
+fi
diff -Nru libuninum-2.7/unicode.h libuninum-2.7/unicode.h
--- libuninum-2.7/unicode.h     2022-12-12 21:19:30.000000000 +0800
+++ libuninum-2.7/unicode.h     2007-03-21 18:27:18.000000000 +0800
@@ -1,10 +1,8 @@
-#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 */
+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 */
 
 #define UNI_MAX_ASCII (UTF32)0x0000007F 
 #define UNI_MAX_BMP   (UTF32)0x0000FFFF
diff -Nru libuninum-2.7/uninum.c libuninum-2.7/uninum.c
--- libuninum-2.7/uninum.c      2022-12-12 21:19:30.000000000 +0800
+++ libuninum-2.7/uninum.c      2007-12-09 04:42:26.000000000 +0800
@@ -35,11 +35,11 @@
  */
 
 
-#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 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 UNINUM
 

Attachment: OpenPGP_0x44173FA13D058888.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to