From fd99b73f963f109d12f2faa20b9ea7c2c1266bac Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Sun, 20 Jan 2019 15:11:48 -0700 Subject: [PATCH] New package: libuninum-2.7 --- common/shlibs | 1 + srcpkgs/libuninum-devel | 1 + srcpkgs/libuninum/patches/fix-unicode.patch | 37 +++++++++++++++++++++ srcpkgs/libuninum/template | 31 +++++++++++++++++ srcpkgs/numconv | 1 + 5 files changed, 71 insertions(+) create mode 120000 srcpkgs/libuninum-devel create mode 100644 srcpkgs/libuninum/patches/fix-unicode.patch create mode 100644 srcpkgs/libuninum/template create mode 120000 srcpkgs/numconv diff --git a/common/shlibs b/common/shlibs index be6f9fc3676..2dec43f9edc 100644 --- a/common/shlibs +++ b/common/shlibs @@ -558,6 +558,7 @@ libpackagekit-glib2.so.18 PackageKit-1.1.12_1 libpsl.so.5 libpsl-0.20.2_1 libsoup-2.4.so.1 libsoup-2.34.0_1 libsoup-gnome-2.4.so.1 libsoup-gnome-2.34.0_1 +libuninum.so.5 libuninum-2.7_1 libunique-3.0.so.0 libunique-2.91.4_1 libwebkit2gtk-4.0.so.37 webkit2gtk-2.6.2_1 libjavascriptcoregtk-4.0.so.18 webkit2gtk-2.6.2_1 diff --git a/srcpkgs/libuninum-devel b/srcpkgs/libuninum-devel new file mode 120000 index 00000000000..7e5cfee93cd --- /dev/null +++ b/srcpkgs/libuninum-devel @@ -0,0 +1 @@ +libuninum \ No newline at end of file diff --git a/srcpkgs/libuninum/patches/fix-unicode.patch b/srcpkgs/libuninum/patches/fix-unicode.patch new file mode 100644 index 00000000000..5e4828987a0 --- /dev/null +++ b/srcpkgs/libuninum/patches/fix-unicode.patch @@ -0,0 +1,37 @@ +--- uninum.c.orig ++++ 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 + +--- unicode.h.orig ++++ 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 ++ ++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/srcpkgs/libuninum/template b/srcpkgs/libuninum/template new file mode 100644 index 00000000000..e66a1df67ec --- /dev/null +++ b/srcpkgs/libuninum/template @@ -0,0 +1,31 @@ +# Template file for 'libuninum' +pkgname=libuninum +version=2.7 +revision=1 +build_style=gnu-configure +makedepends="gmp-devel" +short_desc="Library for converting between numbers and strings" +maintainer="Andrew Benson " +license="LGPL-2.1-only" +homepage="http://billposer.org/Software/libuninum.html" +distfiles="http://billposer.org/Software/Downloads/libuninum-${version}.tar.bz2" +checksum=e704983c3c00e9b76bd836b8b83ce31bfe4eb1752eee8be123cf97c1275076ea + +libuninum-devel_package() { + short_desc+=" - development files" + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove "usr/lib/*.a" + } +} + +numconv_package() { + short_desc="Utility for converting between numbers and strings" + license="GPL-2.0-only" + pkg_install() { + vmove usr/bin + vmove usr/share + } +} diff --git a/srcpkgs/numconv b/srcpkgs/numconv new file mode 120000 index 00000000000..7e5cfee93cd --- /dev/null +++ b/srcpkgs/numconv @@ -0,0 +1 @@ +libuninum \ No newline at end of file