mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-10 08:12:35 +02:00
112 lines
3.3 KiB
Diff
112 lines
3.3 KiB
Diff
From 8cb69b38329525ed9def8d53cc16ef6e5804242d Mon Sep 17 00:00:00 2001
|
|
From: Witold Filipczyk <witekfl@poczta.onet.pl>
|
|
Date: Mon, 2 Jan 2023 17:09:24 +0100
|
|
Subject: [PATCH] [meson] libidn2
|
|
|
|
---
|
|
config2.h.in | 6 +++---
|
|
meson.build | 10 +++++-----
|
|
src/config/cmdline.c | 10 +++++-----
|
|
src/protocol/test/meson.build | 2 +-
|
|
4 files changed, 14 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/config2.h.in b/config2.h.in
|
|
index 09774a4b0..2a445eb3a 100644
|
|
--- a/config2.h.in
|
|
+++ b/config2.h.in
|
|
@@ -117,7 +117,7 @@
|
|
#mesondefine CONFIG_HTML_HIGHLIGHT
|
|
|
|
/* Define if you want: idn support */
|
|
-#mesondefine CONFIG_IDN
|
|
+#mesondefine CONFIG_IDN2
|
|
|
|
/* Define if you want: interlinking support */
|
|
#mesondefine CONFIG_INTERLINK
|
|
@@ -461,8 +461,8 @@
|
|
/* Define if you have the iconv() function. */
|
|
#mesondefine HAVE_ICONV
|
|
|
|
-/* Define to 1 if you have the <idna.h> header file. */
|
|
-#mesondefine HAVE_IDNA_H
|
|
+/* Define to 1 if you have the <idn2.h> header file. */
|
|
+#mesondefine HAVE_IDN2_H
|
|
|
|
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
|
#mesondefine HAVE_IFADDRS_H
|
|
diff --git a/meson.build b/meson.build
|
|
index d0d6652ab..eae6ebfa4 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -67,7 +67,7 @@ conf_data.set('CONFIG_BZIP2', get_option('bzlib'))
|
|
conf_data.set('CONFIG_BROTLI', get_option('brotli'))
|
|
|
|
conf_data.set('CONFIG_ZSTD', get_option('zstd'))
|
|
-conf_data.set('CONFIG_IDN', get_option('idn'))
|
|
+conf_data.set('CONFIG_IDN2', get_option('idn'))
|
|
conf_data.set('CONFIG_LZMA', get_option('lzma'))
|
|
conf_data.set('CONFIG_GSSAPI', get_option('gssapi'))
|
|
conf_data.set('CONFIG_ECMASCRIPT_SMJS', get_option('spidermonkey'))
|
|
@@ -283,8 +283,8 @@ if compiler.has_header('gpm.h')
|
|
conf_data.set('HAVE_GPM_H', 1)
|
|
endif
|
|
|
|
-if compiler.has_header('idna.h')
|
|
- conf_data.set('HAVE_IDNA_H', 1)
|
|
+if compiler.has_header('idn2.h')
|
|
+ conf_data.set('HAVE_IDN2_H', 1)
|
|
endif
|
|
|
|
if compiler.has_header('event.h')
|
|
@@ -368,8 +368,8 @@ if conf_data.get('CONFIG_LZMA')
|
|
deps += lzmadeps
|
|
endif
|
|
|
|
-if conf_data.get('CONFIG_IDN')
|
|
- idndeps = dependency('libidn', static: st)
|
|
+if conf_data.get('CONFIG_IDN2')
|
|
+ idndeps = dependency('libidn2', static: st)
|
|
deps += idndeps
|
|
endif
|
|
|
|
diff --git a/src/config/cmdline.c b/src/config/cmdline.c
|
|
index 424bde6ab..37a8da53a 100644
|
|
--- a/src/config/cmdline.c
|
|
+++ b/src/config/cmdline.c
|
|
@@ -16,8 +16,8 @@
|
|
#include <netdb.h>
|
|
#endif
|
|
|
|
-#ifdef HAVE_IDNA_H
|
|
-#include <idna.h>
|
|
+#ifdef HAVE_IDN2_H
|
|
+#include <idn2.h>
|
|
#endif
|
|
|
|
/* We need to have it here. Stupid BSD. */
|
|
@@ -168,11 +168,11 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
|
|
|
|
idname = *(*argv - 1);
|
|
|
|
-#ifdef CONFIG_IDN
|
|
+#ifdef CONFIG_IDN2
|
|
if (idname) {
|
|
- int code = idna_to_ascii_lz(idname, &idname2, 0);
|
|
+ int code = idn2_to_ascii_lz(idname, &idname2, 0);
|
|
|
|
- if (code == IDNA_SUCCESS) {
|
|
+ if (code == IDN2_OK) {
|
|
idname = idname2;
|
|
allocated = 1;
|
|
}
|
|
diff --git a/src/protocol/test/meson.build b/src/protocol/test/meson.build
|
|
index b34b5199e..bdcf8ee08 100644
|
|
--- a/src/protocol/test/meson.build
|
|
+++ b/src/protocol/test/meson.build
|
|
@@ -1,4 +1,4 @@
|
|
-idna_dep = dependency('libidn')
|
|
+idna_dep = dependency('libidn2')
|
|
|
|
uri_test_files = files('uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c')
|
|
|