diff options
author | 2024-01-05 22:04:36 +0100 | |
---|---|---|
committer | 2024-01-05 22:07:42 +0100 | |
commit | ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5 (patch) | |
tree | 1dc78935267107a84ffdc495a148c02d8f4b6725 | |
parent | games-puzzle/gnome-sudoku: drop 45.1, 45.2 (diff) | |
download | gentoo-ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5.tar.gz gentoo-ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5.tar.bz2 gentoo-ba98e2ac86e6d89a887e49539aa1ec2f0733b6e5.zip |
dev-libs/libuninum: fix incompatible pointer type
Closes: https://bugs.gentoo.org/920524
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
-rw-r--r-- | dev-libs/libuninum/files/libuninum-2.7-64bit.patch | 37 | ||||
-rw-r--r-- | dev-libs/libuninum/files/libuninum-2.7-c99.patch | 30 | ||||
-rw-r--r-- | dev-libs/libuninum/libuninum-2.7-r3.ebuild (renamed from dev-libs/libuninum/libuninum-2.7-r2.ebuild) | 10 |
3 files changed, 76 insertions, 1 deletions
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 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 |