Skip to content
Closed
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
2 changes: 2 additions & 0 deletions scripts/azure-pipelines/osx/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
clean: resources
timeoutInMinutes: 1440 # 1 day
variables:
- name: LC_ALL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like maybe vcpkg itself should be setting this rather than hiding it in CI? It would be in keeping with other environment variable handling we do....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to set this variable in general; I don't even know if it's possible. Perhaps we could do some locale parsing; however, for CI, it makes sense that we set it to en_US.UTF-8.

value: en_US.UTF-8
- name: WORKING_ROOT
value: /Users/vagrant/Data
- name: VCPKG_DOWNLOADS
Expand Down
55 changes: 55 additions & 0 deletions scripts/test_ports/utf8-tarball-test/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

if(NOT VCPKG_HOST_IS_WINDOWS)
vcpkg_execute_required_process(
COMMAND locale
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME locale
)
endif()

set(ascii_tarball_directory "${CURRENT_BUILDTREES_DIR}/ascii-tarball")
set(bmp_tarball_directory "${CURRENT_BUILDTREES_DIR}/bmp-tarball")
set(nonbmp_tarball_directory "${CURRENT_BUILDTREES_DIR}/nonbmp-tarball")

file(REMOVE_RECURSE
"${ascii_tarball_directory}"
"${bmp_tarball_directory}"
"${nonbmp_tarball_directory}"
)
file(MAKE_DIRECTORY
"${ascii_tarball_directory}"
"${bmp_tarball_directory}"
"${nonbmp_tarball_directory}"
)

file(TOUCH
"${ascii_tarball_directory}/foo"
"${ascii_tarball_directory}/bar"
"${ascii_tarball_directory}/baz"
)
file(TOUCH
"${bmp_tarball_directory}/foo"
"${bmp_tarball_directory}/βαρ"
"${bmp_tarball_directory}/包子"
)
file(TOUCH
"${nonbmp_tarball_directory}/foo"
"${nonbmp_tarball_directory}/𐌁𐌀𐌓"
"${nonbmp_tarball_directory}/🙈🤟🏼"
)

foreach(dir IN ITEMS ascii bmp nonbmp)
vcpkg_execute_required_process(
COMMAND "${CMAKE_COMMAND}" -E tar czf
"${${dir}_tarball_directory}.tar.gz"
"${${dir}_tarball_directory}"
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "compress-${dir}"
)

vcpkg_extract_source_archive(source_path
ARCHIVE "${${dir}_tarball_directory}.tar.gz"
)
endforeach()

4 changes: 4 additions & 0 deletions scripts/test_ports/utf8-tarball-test/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "utf8-tarball-test",
"version": "0"
}