aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/rsm-bsa
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/rsm-bsa
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/rsm-bsa')
-rw-r--r--vcpkg/ports/rsm-bsa/DirectXTexUint8Byte.patch16
-rw-r--r--vcpkg/ports/rsm-bsa/portfile.cmake39
-rw-r--r--vcpkg/ports/rsm-bsa/vcpkg.json34
3 files changed, 89 insertions, 0 deletions
diff --git a/vcpkg/ports/rsm-bsa/DirectXTexUint8Byte.patch b/vcpkg/ports/rsm-bsa/DirectXTexUint8Byte.patch
new file mode 100644
index 0000000..586c0d5
--- /dev/null
+++ b/vcpkg/ports/rsm-bsa/DirectXTexUint8Byte.patch
@@ -0,0 +1,16 @@
+diff --git a/src/bsa/fo4.cpp b/src/bsa/fo4.cpp
+index 5484f13..2d9bbf3 100644
+--- a/src/bsa/fo4.cpp
++++ b/src/bsa/fo4.cpp
+@@ -677,7 +677,7 @@ namespace bsa::fo4
+ }
+
+ a_out.write_bytes({ //
+- static_cast<const std::byte*>(blob.GetBufferPointer()),
++ reinterpret_cast<const std::byte*>(blob.GetBufferPointer()),
+ blob.GetBufferSize() });
+ std::vector<std::byte> buffer;
+ for (const auto& chunk : *this) {
+--
+2.47.0.windows.1
+
diff --git a/vcpkg/ports/rsm-bsa/portfile.cmake b/vcpkg/ports/rsm-bsa/portfile.cmake
new file mode 100644
index 0000000..26685db
--- /dev/null
+++ b/vcpkg/ports/rsm-bsa/portfile.cmake
@@ -0,0 +1,39 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Ryan-rsm-McKenzie/bsa
+ REF 4.1.0
+ SHA512 c488a4f7cffa59064baafd429cf118a8f8a7b5594a0bd49a0ed468572b37af2e7428a83ad83cc7b13b556744a444cb7b8a4591c7018e49cadb1c5d42ae780f51
+ HEAD_REF master
+ PATCHES
+ DirectXTexUint8Byte.patch
+)
+
+if (VCPKG_TARGET_IS_LINUX)
+ message(WARNING "Build ${PORT} requires at least gcc 10.")
+endif()
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ xmem BSA_SUPPORT_XMEM
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTING=OFF
+ ${FEATURE_OPTIONS}
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME bsa
+ CONFIG_PATH "lib/cmake/bsa"
+)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/share
+)
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/rsm-bsa/vcpkg.json b/vcpkg/ports/rsm-bsa/vcpkg.json
new file mode 100644
index 0000000..9851c26
--- /dev/null
+++ b/vcpkg/ports/rsm-bsa/vcpkg.json
@@ -0,0 +1,34 @@
+{
+ "name": "rsm-bsa",
+ "version-semver": "4.1.0",
+ "port-version": 1,
+ "description": "A C++ library for working with the Bethesda archive file format",
+ "homepage": "https://github.com/Ryan-rsm-McKenzie/bsa",
+ "documentation": "https://ryan-rsm-mckenzie.github.io/bsa/",
+ "license": "MIT",
+ "supports": "!x86 & !osx & !uwp",
+ "dependencies": [
+ "directxtex",
+ "lz4",
+ "rsm-binary-io",
+ "rsm-mmio",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ },
+ "zlib"
+ ],
+ "features": {
+ "xmem": {
+ "description": "Compression support for the xmem codec",
+ "supports": "windows",
+ "dependencies": [
+ "reproc"
+ ]
+ }
+ }
+}