Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libunistring] Update, fix cross builds #27677

Merged
merged 1 commit into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ports/libunistring/disable-gnulib-fetch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/autogen.sh b/autogen.sh
index 3e89ebe..8dade84 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -44,6 +44,7 @@ while :; do
*) break ;;
esac
done
+skip_gnulib=true

TEXINFO_VERSION=6.5

13 changes: 13 additions & 0 deletions ports/libunistring/disable-subdirs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile.am b/Makefile.am
index 8c05275..f27b232 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4 -I gnulib-m4

-SUBDIRS = doc gnulib-local lib tests
+SUBDIRS = gnulib-local lib

EXTRA_DIST = \
version.sh BUGS DEPENDENCIES HACKING JOIN-GNU \
53 changes: 0 additions & 53 deletions ports/libunistring/libunistring-msys-msvc-build.patch

This file was deleted.

31 changes: 19 additions & 12 deletions ports/libunistring/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
set(LIBUNISTRING_VERSION 0.9.10)
set(LIBUNISTRING_FILENAME libunistring-${LIBUNISTRING_VERSION}.tar.gz)
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}

set(LIBUNISTRING_FILENAME libunistring-${VERSION}.tar.xz)

vcpkg_download_distfile(ARCHIVE
URLS
"https://ftp.gnu.org/gnu/libunistring/${LIBUNISTRING_FILENAME}"
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libunistring/${LIBUNISTRING_FILENAME}"
FILENAME "${LIBUNISTRING_FILENAME}"
SHA512 690082732fbbd47ab4ffbd6f21d85afece0f8e2ded24982f949f4ae52bf0a981b75ea9bc14ab289e0954cde07f31a7a4c2bb65615a8eb5b2bfa65720310b6fc9
SHA512 01a4267bbd301ea5c389b17ee918ae5b7d645da8b2c6c6f0f004ff2dead9f8e50cda2c6047358890a5fceadc8820ffc5154879193b9bb8970f3fb1fea1f411d6
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
REF ${LIBUNISTRING_VERSION}
PATCHES libunistring-msys-msvc-build.patch
SOURCE_BASE "v${VERSION}"
PATCHES
disable-gnulib-fetch.patch
disable-subdirs.patch
)

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
COPY_SOURCE
AUTOCONFIG
USE_WRAPPERS
OPTIONS
"--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}"
Expand All @@ -28,7 +30,12 @@ vcpkg_install_make()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

# copyright excerpt from README, to cover dual license under "LGPLv3+ or GPLv2".
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(
COMMENT [[
The libunistring library and its header files are dual-licensed under
"the GNU LGPLv3+ or the GNU GPLv2+".
]]
FILE_LIST
"${SOURCE_PATH}/COPYING.LIB"
"${SOURCE_PATH}/COPYING"
)
4 changes: 2 additions & 2 deletions ports/libunistring/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "libunistring",
"version": "0.9.10",
"port-version": 3,
"version": "1.1",
"description": "GNU libunistring provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.",
"homepage": "https://www.gnu.org/software/libunistring/",
"license": "LGPL-3.0-or-later OR GPL-2.0-or-later",
"supports": "!uwp",
"dependencies": [
"libiconv"
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4313,8 +4313,8 @@
"port-version": 1
},
"libunistring": {
"baseline": "0.9.10",
"port-version": 3
"baseline": "1.1",
"port-version": 0
},
"liburing": {
"baseline": "2.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libunistring.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6ebb68b893ecddce91b3370a72e5575b8895a7df",
"version": "1.1",
"port-version": 0
},
{
"git-tree": "2ae1c5ae3927f718073792b5cb86fa434b5c8c49",
"version": "0.9.10",
Expand Down