mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 02:53:02 +08:00
parent
99b3907744
commit
bba0b6b98d
74
ports/casclib/CMakeLists.txt
Normal file
74
ports/casclib/CMakeLists.txt
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.9)
|
||||||
|
project(CascLib)
|
||||||
|
|
||||||
|
set(HEADER_FILES
|
||||||
|
src/CascCommon.h
|
||||||
|
src/CascLib.h
|
||||||
|
src/CascLib.def
|
||||||
|
src/CascPort.h
|
||||||
|
src/common/Array.h
|
||||||
|
src/common/Common.h
|
||||||
|
src/common/Csv.h
|
||||||
|
src/common/FileStream.h
|
||||||
|
src/common/FileTree.h
|
||||||
|
src/common/ListFile.h
|
||||||
|
src/common/Map.h
|
||||||
|
src/jenkins/lookup.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SRC_FILES
|
||||||
|
src/CascCommon.cpp
|
||||||
|
src/CascDecompress.cpp
|
||||||
|
src/CascDecrypt.cpp
|
||||||
|
src/CascDumpData.cpp
|
||||||
|
src/CascFiles.cpp
|
||||||
|
src/CascFindFile.cpp
|
||||||
|
src/CascIndexFiles.cpp
|
||||||
|
src/CascOpenFile.cpp
|
||||||
|
src/CascOpenStorage.cpp
|
||||||
|
src/CascReadFile.cpp
|
||||||
|
src/CascRootFile_Diablo3.cpp
|
||||||
|
src/CascRootFile_Install.cpp
|
||||||
|
src/CascRootFile_MNDX.cpp
|
||||||
|
src/CascRootFile_OW.cpp
|
||||||
|
src/CascRootFile_Text.cpp
|
||||||
|
src/CascRootFile_TVFS.cpp
|
||||||
|
src/CascRootFile_WoW.cpp
|
||||||
|
src/common/Common.cpp
|
||||||
|
src/common/Csv.cpp
|
||||||
|
src/common/Directory.cpp
|
||||||
|
src/common/FileStream.cpp
|
||||||
|
src/common/FileTree.cpp
|
||||||
|
src/common/ListFile.cpp
|
||||||
|
src/common/RootHandler.cpp
|
||||||
|
src/jenkins/lookup3.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set(MD5_FILES
|
||||||
|
src/md5/md5.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(ZLIB_FILES
|
||||||
|
src/zlib/adler32.c
|
||||||
|
src/zlib/crc32.c
|
||||||
|
src/zlib/inffast.c
|
||||||
|
src/zlib/inflate.c
|
||||||
|
src/zlib/inftrees.c
|
||||||
|
src/zlib/zutil.c
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(CascLib ${SRC_FILES} ${HEADER_FILES} ${TOMCRYPT_FILES} ${ZLIB_FILES} ${MD5_FILES})
|
||||||
|
|
||||||
|
set_target_properties(CascLib PROPERTIES PUBLIC_HEADER "src/CascLib.h;src/CascPort.h")
|
||||||
|
|
||||||
|
install(TARGETS CascLib
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
FRAMEWORK DESTINATION /Library/Frameworks
|
||||||
|
PUBLIC_HEADER DESTINATION include
|
||||||
|
INCLUDES DESTINATION include)
|
4
ports/casclib/CONTROL
Normal file
4
ports/casclib/CONTROL
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Source: casclib
|
||||||
|
Version: 1.50
|
||||||
|
Build-Depends: zlib
|
||||||
|
Description: An open-source implementation of library for reading CASC storage from Blizzard games since 2014
|
27
ports/casclib/ctype_for_mac.patch
Normal file
27
ports/casclib/ctype_for_mac.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/src/CascPort.h b/src/CascPort.h
|
||||||
|
index 87a2f2f..da74aef 100644
|
||||||
|
--- a/src/CascPort.h
|
||||||
|
+++ b/src/CascPort.h
|
||||||
|
@@ -79,14 +79,19 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
- #include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
- #include <stdlib.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
- #include <errno.h>
|
||||||
|
+ #include <unistd.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
+ #include <stdint.h>
|
||||||
|
+ #include <stdlib.h>
|
||||||
|
+ #include <stdio.h>
|
||||||
|
+ #include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
+ #include <ctype.h>
|
||||||
|
+ #include <wchar.h>
|
||||||
|
#include <cassert>
|
||||||
|
+ #include <errno.h>
|
||||||
|
|
||||||
|
// Support for PowerPC on Max OS X
|
||||||
|
#if (__ppc__ == 1) || (__POWERPC__ == 1) || (_ARCH_PPC == 1)
|
23
ports/casclib/portfile.cmake
Normal file
23
ports/casclib/portfile.cmake
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
include(vcpkg_common_functions)
|
||||||
|
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO ladislav-zezula/CascLib
|
||||||
|
REF 1.50
|
||||||
|
SHA512 7e95e314f09e504566e6fa2b1742f986d17526fb0283af8ffb77681338c9a852d369cbd863512a20ddd3a277d10a9bf701d745f500a717826dd08e201eb6d80e
|
||||||
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
ctype_for_mac.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||||
|
|
||||||
|
vcpkg_configure_cmake(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PREFER_NINJA
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/casclib RENAME copyright)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
Loading…
Reference in New Issue
Block a user