Skip to content

Commit

Permalink
deps: update libzip to version 1.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam authored and flyinghead committed Feb 15, 2024
1 parent 6cb9299 commit eb2826f
Show file tree
Hide file tree
Showing 850 changed files with 14,703 additions and 6,230 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,7 @@ if(NOT LIBZIP_FOUND OR NINTENDO_SWITCH)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(LIBZIP_DO_INSTALL "Install libzip and the related files" OFF)
add_subdirectory(core/deps/libzip)
target_include_directories(${PROJECT_NAME} PRIVATE core/deps/libzip/lib)
target_link_libraries(${PROJECT_NAME} PRIVATE zip)
target_link_libraries(${PROJECT_NAME} PRIVATE libzip::zip)
endif()

if(WIN32)
Expand Down
12 changes: 12 additions & 0 deletions core/deps/libzip/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 2000
AlwaysBreakAfterReturnType: TopLevelDefinitions
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
BreakBeforeBraces: Custom
BraceWrapping:
BeforeElse: true
AlignEscapedNewlines: Left
UseTab: Never
#PPDirectiveIndentStyle: AfterHash
32 changes: 32 additions & 0 deletions core/deps/libzip/.github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Report where libzip didn't behave like you expected.
title: ''
labels: bug
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**Expected Behavior**
A clear and concise description of what you expected to happen.

**Observed Behavior**
A clear and concise description of what actually happened.

**To Reproduce**
Short program or code snippet that reproduces the problem.

**libzip Version**
Version of libzip or revision repository used.

**Operating System**
Operating system and version, used compiler.

**Test Files**
If applicable, attach and describe zip archives that trigger the problem.

**Additional context**
Add any other context about the problem here.
25 changes: 25 additions & 0 deletions core/deps/libzip/.github/ISSUE_TEMPLATE/compile-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Compile Error
about: Report when libzip does not compile.
title: ''
labels: compile
assignees: ''

---

**Compiler Error**
Output from the compiler, including exact and complete error message, file name and line number.

**libzip Version**
Version of libzip or revision repository used.

**Operating System and Compiler**
The operating system and compiler used, including version number.

Also, any flags passed to `cmake`.

**Autodetected Configuration**
Attach `CmakeCache.txt` from your build directory. This list everything `cmake` detected on your system.

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions core/deps/libzip/.github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature Request
about: Suggest an idea for this project.
title: ''
labels: enhancement
assignees: ''

---

**Description**
A clear and concise description of what you want to achieve, why the current features are insufficient, and why you think it is generally useful.

Also, have you checked whether the feature is already mentioned in TODO.md? If so, only submit a new issue if you expand on it.

**Solution**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context about the feature request here.
25 changes: 25 additions & 0 deletions core/deps/libzip/.github/workflows/CIFuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CIFuzz
on: [pull_request]
permissions:
contents: read
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'libzip'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'libzip'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure()
with:
name: artifacts
path: ./out/artifacts
65 changes: 65 additions & 0 deletions core/deps/libzip/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build
on: [push]
permissions:
contents: read
jobs:
all:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}${{ matrix.name_extra }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
cmake_extra: [""]
name_extra: [""]
include:
- os: windows-latest
cmake_extra: "-T ClangCl"
name_extra: " clang-cl"
steps:
- name: checkout
uses: actions/checkout@v3
- name: install python and pip
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: install dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install libzstd-dev
- name: install dependencies (Windows)
if: ${{ runner.os == 'Windows' }}
uses: lukka/run-vcpkg@v7
id: runvcpkg
with:
vcpkgGitCommitId: f93ba152d55e1d243160e690bc302ffe8638358e
vcpkgTriplet: x64-windows
vcpkgArguments: zlib bzip2 liblzma zstd
- name: prepare build directory and install nihtest
run: |
cmake -E make_directory ${{runner.workspace}}/build
pip install nihtest
- name: configure (Unix)
if: ${{ runner.os != 'Windows' }}
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ matrix.cmake_extra }} ${{github.workspace}}
- name: configure (Windows)
if: ${{ runner.os == 'Windows' }}
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ matrix.cmake_extra }} -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ${{github.workspace}}
- name: build
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config Release
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: regress-directory
path: |
${{runner.workspace}}/build/regress
- name: test
working-directory: ${{runner.workspace}}/build
run: |
ctest --output-on-failure -v -C Release
74 changes: 74 additions & 0 deletions core/deps/libzip/.github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 10 * * 4'

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
12 changes: 12 additions & 0 deletions core/deps/libzip/API-CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ You can define `ZIP_DISABLE_DEPRECATED` before including `<zip.h>` to hide
prototypes for deprecated functions, to find out about functions that
might be removed at some point.

## Changed in libzip-1.10.0

### deprecated `zip_source_zip` and `zip_source_zip_create`

These functions were replaced with `zip_source_zip_file` and `zip_source_zip_file_create`. The implicit handling of the flag `ZIP_FL_COMPRESSED` was removed, the flag can now be specified explicitly.

If you want to get the compressed data for the whole file, use

```C
zip_source_zip_file(za, source_archive, source_index, ZIP_FL_COMPRESSED, 0, -1, NULL)
```
## Changed in libzip-1.0
### new type `zip_error_t`
Expand Down
Loading

0 comments on commit eb2826f

Please sign in to comment.