[libidn2] Fix linking static libidn2 into shared library (#29749)

This commit is contained in:
Alexey Rochev 2023-02-21 19:47:24 +03:00 committed by GitHub
parent bd17df4b33
commit e94dfc2b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 2 deletions

View File

@ -0,0 +1,30 @@
--- a/lib/puny_decode.c
+++ b/lib/puny_decode.c
@@ -242,12 +242,3 @@
/* cannot overflow because out <= old value of *output_length */
return punycode_success;
}
-
-/* Create a compatibility symbol if supported. Hidden references make
- the target symbol hidden, hence the alias. */
-#ifdef HAVE_SYMVER_ALIAS_SUPPORT
-__typeof__ (_idn2_punycode_decode_internal) _idn2_punycode_decode
- __attribute__((visibility ("default"),
- alias ("_idn2_punycode_decode_internal")));
-__asm__ (".symver _idn2_punycode_decode, _idn2_punycode_decode@IDN2_0.0.0");
-#endif
--- a/lib/puny_encode.c
+++ b/lib/puny_encode.c
@@ -243,12 +243,3 @@
*output_length = out;
return punycode_success;
}
-
-/* Create a compatibility symbol if supported. Hidden references make
- the target symbol hidden, hence the alias. */
-#ifdef HAVE_SYMVER_ALIAS_SUPPORT
-__typeof__ (_idn2_punycode_encode_internal) _idn2_punycode_encode
- __attribute__((visibility ("default"),
- alias ("_idn2_punycode_encode_internal")));
-__asm__ (".symver _idn2_punycode_encode, _idn2_punycode_encode@IDN2_0.0.0");
-#endif

View File

@ -8,10 +8,18 @@ vcpkg_download_distfile(ARCHIVE
SHA512 a6e90ccef56cfd0b37e3333ab3594bb3cec7ca42a138ca8c4f4ce142da208fa792f6c78ca00c01001c2bc02831abcbaf1cf9bcc346a5290fd7b30708f5a462f3
)
vcpkg_list(SET patches)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Fix linking static libidn2 into shared library
# https://gitlab.com/libidn/libidn2/-/issues/80
vcpkg_list(APPEND patches "fix-static-into-shared-linking.patch")
endif()
vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
SOURCE_BASE "v${VERSION}"
PATCHES
${patches}
disable-subdirs.patch
fix-msvc.patch
fix-uwp.patch

View File

@ -1,7 +1,7 @@
{
"name": "libidn2",
"version": "2.3.4",
"port-version": 1,
"port-version": 2,
"description": "GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names.",
"homepage": "https://www.gnu.org/software/libidn/",
"license": null,

View File

@ -4010,7 +4010,7 @@
},
"libidn2": {
"baseline": "2.3.4",
"port-version": 1
"port-version": 2
},
"libigl": {
"baseline": "2.3.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4784d5f7f99d7ea1ebe6f1ef01943e402e7bfddf",
"version": "2.3.4",
"port-version": 2
},
{
"git-tree": "111b9ff4af9664333f73344385dfbbfa40d9bc20",
"version": "2.3.4",