Skip to content

Commit

Permalink
[readline-unix] No empty tools dir; patch crash (microsoft#33830)
Browse files Browse the repository at this point in the history
* [readline-unix] No empty tools dir

* Raise patchlevel, cleanup
  • Loading branch information
dg0yt authored Sep 26, 2023
1 parent 1597438 commit a7d99a5
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
24 changes: 24 additions & 0 deletions ports/readline-unix/8.2p1.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/nls.c b/nls.c
index 5c6a13b..8c027d6 100644
--- a/nls.c
+++ b/nls.c
@@ -141,6 +141,10 @@ _rl_init_locale (void)
if (lspec == 0)
lspec = "";
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
+ if (ret == 0 || *ret == 0)
+ ret = setlocale (LC_CTYPE, (char *)NULL);
+ if (ret == 0 || *ret == 0)
+ ret = RL_DEFAULT_LOCALE;
#else
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
#endif
diff --git a/patchlevel b/patchlevel
index d8c9df7..fdf4740 100644
--- a/patchlevel
+++ b/patchlevel
@@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch

-0
+1
12 changes: 9 additions & 3 deletions ports/readline-unix/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
set(filename readline-${VERSION}.tar.gz)
vcpkg_download_distfile(
ARCHIVE
Expand All @@ -9,7 +8,11 @@ vcpkg_download_distfile(
SHA512 0a451d459146bfdeecc9cdd94bda6a6416d3e93abd80885a40b334312f16eb890f8618a27ca26868cebbddf1224983e631b1cbc002c1a4d1cd0d65fba9fea49a
)

vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}")
vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
8.2p1.diff
)

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
Expand All @@ -21,7 +24,10 @@ vcpkg_configure_make(

vcpkg_install_make()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/tools"
)

vcpkg_fixup_pkgconfig()

Expand Down
1 change: 1 addition & 0 deletions ports/readline-unix/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "readline-unix",
"version": "8.2",
"port-version": 1,
"description": "The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.",
"homepage": "https://tiswww.case.edu/php/chet/readline/rltop.html",
"license": "GPL-3.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7202,7 +7202,7 @@
},
"readline-unix": {
"baseline": "8.2",
"port-version": 0
"port-version": 1
},
"readline-win32": {
"baseline": "5.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/readline-unix.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4ad0f063e0bf86f7bfbf455e7a1f7f16883528f0",
"version": "8.2",
"port-version": 1
},
{
"git-tree": "19fcd2b764ea6d261dfbd80961833e807cf93ea0",
"version": "8.2",
Expand Down

0 comments on commit a7d99a5

Please sign in to comment.