arc-unpacker: drop

Upstream archived it: https://github.com/vn-tools/arc_unpacker
This commit is contained in:
Ben Siraphob
2026-09-02 09:08:36 -07:00
parent 37cce951e5
commit b4191f4824
3 changed files with 2 additions and 220 deletions

View File

@@ -1,101 +0,0 @@
diff --git a/tests/test_support/audio_support.cc b/tests/test_support/audio_support.cc
index c26022e9..5f50d035 100644
--- a/tests/test_support/audio_support.cc
+++ b/tests/test_support/audio_support.cc
@@ -16,6 +16,7 @@
// along with arc_unpacker. If not, see <http://www.gnu.org/licenses/>.
#include "test_support/audio_support.h"
+#include <cstdlib>
#include "algo/format.h"
#include "algo/range.h"
#include "dec/microsoft/wav_audio_decoder.h"
@@ -44,13 +45,42 @@ res::Audio tests::get_test_audio()
void tests::compare_audio(
const res::Audio &actual, const res::Audio &expected)
{
+ // Allow for minor variances in audio samples within the specified
+ // threshold. Floating point calculations in some audio decoders yields
+ // slightly differing results across different CPU architectures.
+ //
+ // Affected tests:
+ // * tests/dec/cri/hca_audio_decoder_test.cc
+ // * tests/dec/entis/mio_audio_decoder_test.cc
+ static constexpr int tolerance = 1;
+
REQUIRE(actual.codec == expected.codec);
REQUIRE(actual.channel_count == expected.channel_count);
REQUIRE(actual.sample_rate == expected.sample_rate);
REQUIRE(actual.bits_per_sample == expected.bits_per_sample);
REQUIRE(actual.extra_codec_headers == expected.extra_codec_headers);
REQUIRE(actual.samples.size() == expected.samples.size());
+
+#ifdef __x86_64__
tests::compare_binary(actual.samples, expected.samples);
+#else
+ tests::compare_binary(
+ actual.samples,
+ expected.samples,
+ [](const bstr& bytes1, const bstr& bytes2) -> bool {
+ const auto samples1 = reinterpret_cast<const s16*>(bytes1.c_str());
+ const auto samples2 = reinterpret_cast<const s16*>(bytes2.c_str());
+ const auto n_samples = bytes1.size() / sizeof(*samples1);
+ // algo::range is a bit incomplete to work with std::all_of
+ for (const int i : algo::range(n_samples)) {
+ if (std::abs(samples1[i] - samples2[i]) > tolerance) {
+ return false;
+ }
+ }
+ return true;
+ }
+ );
+#endif
REQUIRE(actual.loops.size() == expected.loops.size());
for (const auto i : algo::range(expected.loops.size()))
diff --git a/tests/test_support/common.cc b/tests/test_support/common.cc
index b63ffa89..265ef7b1 100644
--- a/tests/test_support/common.cc
+++ b/tests/test_support/common.cc
@@ -40,3 +40,19 @@ void au::tests::compare_binary(const bstr &actual, const bstr &expected)
INFO(actual_dump << " != " << expected_dump);
REQUIRE(actual == expected);
}
+
+void au::tests::compare_binary(
+ const bstr &actual,
+ const bstr &expected,
+ std::function<bool(const bstr &, const bstr &)> compare)
+{
+ const auto max_size = 10000;
+ auto actual_dump = algo::hex(actual);
+ auto expected_dump = algo::hex(expected);
+ if (actual_dump.size() > max_size)
+ actual_dump = actual_dump.substr(0, max_size) + "(...)";
+ if (expected_dump.size() > max_size)
+ expected_dump = expected_dump.substr(0, max_size) + "(...)";
+ INFO(actual_dump << " != " << expected_dump);
+ REQUIRE(compare(actual, expected));
+}
diff --git a/tests/test_support/common.h b/tests/test_support/common.h
index 7d8be579..ecd5dcf8 100644
--- a/tests/test_support/common.h
+++ b/tests/test_support/common.h
@@ -17,6 +17,7 @@
#pragma once
+#include <functional>
#include "io/path.h"
#include "types.h"
@@ -27,4 +28,9 @@ namespace tests {
void compare_binary(const bstr &actual, const bstr &expected);
+ void compare_binary(
+ const bstr &actual,
+ const bstr &expected,
+ std::function<bool(const bstr &, const bstr &)> compare);
+
} }

View File

@@ -1,118 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
makeWrapper,
ninja,
boost,
libpng,
libiconv,
libjpeg,
zlib,
openssl,
libwebp,
catch2,
}:
stdenv.mkDerivation {
pname = "arc-unpacker";
version = "0.11-unstable-2021-09-06";
strictDeps = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "vn-tools";
repo = "arc_unpacker";
rev = "456834ecf2e5686813802c37efd829310485c57d";
hash = "sha256-STbdWH7Mr3gpOrZvujblYrIIKEWBHzy1/BaNuh4teI8=";
};
patches = [ ./fix-test-float-variance.patch ];
postPatch = ''
cp ${catch2}/include/catch2/catch.hpp tests/test_support/catch.h
# missing includes
sed '1i#include <limits>' -i src/dec/eagls/pak_archive_decoder.cc # gcc12
sed '1i#include <cstdint>' -i src/types.h # gcc13
sed '1i#include <vector>' -i src/flow/cli_facade.h # gcc14
# cmake-4 support
substituteInPlace CMakeLists.txt --replace-fail \
'cmake_minimum_required(VERSION 2.8.8)' \
'cmake_minimum_required(VERSION 3.10)'
# boost 1.89 no longer provides boost_system as a separate CMake component
substituteInPlace CMakeLists.txt --replace-fail \
'find_package(Boost COMPONENTS filesystem system REQUIRED)' \
'find_package(Boost COMPONENTS filesystem REQUIRED)'
'';
nativeBuildInputs = [
cmake
makeWrapper
ninja
catch2
];
buildInputs = [
boost
libiconv
libjpeg
libpng
libwebp
openssl
zlib
];
checkPhase =
let
checkTarget = [
"~CatSystem INT archives"
]
++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [ "~Ivory WADY audio" ];
in
''
# Specify test targets
# https://catch2-temp.readthedocs.io/en/latest/command-line.html#specifying-which-tests-to-run
checkTarget=(${lib.escapeShellArgs checkTarget})
runHook preCheck
local flagsArray=()
concatTo flagsArray checkFlags checkFlagsArray checkTarget
pushd ..
echoCmd 'check flags' "''${flagsArray[@]}"
./build/run_tests "''${flagsArray[@]}"
popd
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/doc/arc_unpacker $out/libexec/arc_unpacker
cp arc_unpacker $out/libexec/arc_unpacker/arc_unpacker
cp ../GAMELIST.{htm,js} $out/share/doc/arc_unpacker
cp -r ../etc $out/libexec/arc_unpacker
makeWrapper $out/libexec/arc_unpacker/arc_unpacker $out/bin/arc_unpacker
runHook postInstall
'';
doCheck = true;
meta = {
description = "Tool to extract files from visual novel archives";
homepage = "https://github.com/vn-tools/arc_unpacker";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ midchildan ];
platforms = lib.platforms.all;
mainProgram = "arc_unpacker";
};
}

View File

@@ -333,7 +333,8 @@ mapAliases {
appthreat-depscan = throw "'appthreat-depscan' has been renamed to/replaced by 'dep-scan'"; # Converted to throw 2025-10-27
arangodb = throw "arangodb has been removed, as it was unmaintained and the packaged version does not build with supported GCC versions"; # Added 2025-08-12
arc-browser = throw "arc-browser was removed due to being unmaintained"; # Added 2025-09-03
arc_unpacker = throw "'arc_unpacker' has been moved to 'arc-unpacker'"; # Added 2026-07-28
arc-unpacker = throw "'arc-unpacker' has been removed because upstream archived the project in April 2022."; # Added 2026-09-02
arc_unpacker = throw "'arc_unpacker' has been removed because upstream archived the project in April 2022."; # Added 2026-09-02
archi = throw "'archi' has been removed, since its upstream maintainers do not want it packaged"; # Added 2025-11-18
archipelago-minecraft = throw "archipelago-minecraft has been removed, as upstream no longer ships minecraft as a default APWorld."; # Added 2025-07-15
ArchiSteamFarm = warnAlias "ArchiSteamFarm has been renamed to/replaced by 'archisteamfarm'" archisteamfarm; # Added 2026-01-31