* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libuninum/, dev-libs/libuninum/files/
@ 2024-01-05 21:07 Conrad Kostecki
0 siblings, 0 replies; only message in thread
From: Conrad Kostecki @ 2024-01-05 21:07 UTC (permalink / raw
To: gentoo-commits
commit: ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 5 21:04:36 2024 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 21:07:42 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba98e2ac
dev-libs/libuninum: fix incompatible pointer type
Closes: https://bugs.gentoo.org/920524
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
dev-libs/libuninum/files/libuninum-2.7-64bit.patch | 37 ++++++++++++++++++++++
dev-libs/libuninum/files/libuninum-2.7-c99.patch | 30 ++++++++++++++++++
...ninum-2.7-r2.ebuild => libuninum-2.7-r3.ebuild} | 10 +++++-
3 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/dev-libs/libuninum/files/libuninum-2.7-64bit.patch b/dev-libs/libuninum/files/libuninum-2.7-64bit.patch
new file mode 100644
index 000000000000..65a8b67389ba
--- /dev/null
+++ b/dev-libs/libuninum/files/libuninum-2.7-64bit.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/dev-libs/libuninum/files/libuninum-2.7-c99.patch b/dev-libs/libuninum/files/libuninum-2.7-c99.patch
new file mode 100644
index 000000000000..5e68d8bec148
--- /dev/null
+++ b/dev-libs/libuninum/files/libuninum-2.7-c99.patch
@@ -0,0 +1,30 @@
+Avoid an implicit declaration of exit in the configure script. This
+ensures that the package continues to build with future compilers
+which do not support such implicit declarations by default.
+
+diff --git a/configure b/configure
+index 8fd0eed37cb997de..f5ebc89db38d88f4 100755
+--- a/configure
++++ b/configure
+@@ -4323,8 +4323,8 @@ main ()
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+- exit(2);
+- exit (0);
++ return 2;
++ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+@@ -18747,8 +18747,8 @@ main ()
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+- exit(2);
+- exit (0);
++ return 2;
++ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
diff --git a/dev-libs/libuninum/libuninum-2.7-r2.ebuild b/dev-libs/libuninum/libuninum-2.7-r3.ebuild
similarity index 79%
rename from dev-libs/libuninum/libuninum-2.7-r2.ebuild
rename to dev-libs/libuninum/libuninum-2.7-r3.ebuild
index e908d0c3b217..1721edb6fe32 100644
--- a/dev-libs/libuninum/libuninum-2.7-r2.ebuild
+++ b/dev-libs/libuninum/libuninum-2.7-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,6 +13,14 @@ KEYWORDS="amd64 x86"
LICENSE="GPL-2 GPL-2+ LGPL-2 LGPL-2.1"
SLOT="0"
+RDEPEND="dev-libs/gmp:="
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.7-64bit.patch"
+ "${FILESDIR}/${PN}-2.7-c99.patch"
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-05 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 21:07 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libuninum/, dev-libs/libuninum/files/ Conrad Kostecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox