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

[7zip] restore missing sources and fix compilation on android #42911

Merged
merged 11 commits into from
Jan 3, 2025
24 changes: 10 additions & 14 deletions ports/7zip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ target_sources(7zip PRIVATE
CPP/7zip/Common/UniqBlocks.cpp
CPP/7zip/Common/VirtThread.cpp

CPP/Windows/FileDir.cpp
CPP/Windows/FileFind.cpp
CPP/Windows/FileIO.cpp
CPP/Windows/FileName.cpp
CPP/Windows/PropVariant.cpp
CPP/Windows/PropVariantUtils.cpp
CPP/Windows/Synchronization.cpp
CPP/Windows/System.cpp
CPP/Windows/TimeUtils.cpp

CPP/7zip/Archive/ApmHandler.cpp
CPP/7zip/Archive/ArHandler.cpp
CPP/7zip/Archive/ArjHandler.cpp
Expand Down Expand Up @@ -300,20 +310,6 @@ target_sources(7zip PRIVATE
C/Util/LzmaLib/LzmaLib.def
)

if(WIN32)
target_sources(7zip PRIVATE
CPP/Windows/FileDir.cpp
CPP/Windows/FileFind.cpp
CPP/Windows/FileIO.cpp
CPP/Windows/FileName.cpp
CPP/Windows/PropVariant.cpp
CPP/Windows/PropVariantUtils.cpp
CPP/Windows/Synchronization.cpp
CPP/Windows/System.cpp
CPP/Windows/TimeUtils.cpp
)
endif()

# 7zCrcOpt
if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
Expand Down
11 changes: 11 additions & 0 deletions ports/7zip/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ vcpkg_from_github(
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/7zip-config.cmake.in" DESTINATION "${SOURCE_PATH}")

vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")

msclock marked this conversation as resolved.
Show resolved Hide resolved
if(VCPKG_TARGET_IS_ANDROID)
message(STATUS "Disable TIME_UTC on android")
vcpkg_replace_string("${SOURCE_PATH}/CPP/Windows/TimeUtils.cpp"
[[if defined(TIME_UTC)]]
[[if defined(TIME_UTC) && !defined(__ANDROID__)]]
)
endif()

msclock marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
Expand Down
5 changes: 5 additions & 0 deletions ports/7zip/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "7zip",
"version-string": "24.09",
"port-version": 1,
"description": "Library for archiving file with a high compression ratio.",
"homepage": "https://www.7-zip.org",
"license": "LGPL-2.1-or-later",
Expand All @@ -13,6 +14,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-cmake-get-vars",
"host": true
msclock marked this conversation as resolved.
Show resolved Hide resolved
}
]
}
5 changes: 5 additions & 0 deletions versions/7-/7zip.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8ed8294e7f88b2298a05eef56cdd6f8361aa1509",
"version-string": "24.09",
"port-version": 1
},
{
"git-tree": "29a42acc927078e1dc58fbbf354d1c59e01d0a03",
"version-string": "24.09",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"7zip": {
"baseline": "24.09",
"port-version": 0
"port-version": 1
},
"ableton": {
"baseline": "3.0.6",
Expand Down