mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 09:49:07 +08:00
[casclib] Update to 2021-11-16 (#21472)
* Update casclib to 2021-11-16 * Update CI baseline * Add patch for shared Windows builds * Update CI baseline * Fix find_package * Update CI baseline Co-authored-by: chausner <chausner@users.noreply.github.com>
This commit is contained in:
parent
4b38e91e6d
commit
95dad17807
@ -1,83 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
project(casclib)
|
||||
set(PROJECT_VERSION_MAJOR 1)
|
||||
set(PROJECT_VERSION_MINOR 50)
|
||||
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
|
||||
set(SRC_FILES
|
||||
src/CascLib.def
|
||||
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
|
||||
)
|
||||
|
||||
add_library(casclib ${SRC_FILES} ${ZLIB_FILES} ${MD5_FILES})
|
||||
target_include_directories(casclib
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
$<INSTALL_INTERFACE:include/casclib>)
|
||||
if(WIN32)
|
||||
target_compile_definitions(casclib PRIVATE UNICODE _UNICODE)
|
||||
endif()
|
||||
|
||||
install(TARGETS casclib
|
||||
EXPORT casclibTargets
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
set(VERSION_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/temp/casclibConfigVersion.cmake")
|
||||
set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/temp/casclibConfig.cmake")
|
||||
set(INSTALL_DIR "share/casclib")
|
||||
|
||||
write_basic_package_version_file("${VERSION_CONFIG}" VERSION 1.50 COMPATIBILITY SameMajorVersion)
|
||||
configure_package_config_file("Config.cmake.in"
|
||||
"${PROJECT_CONFIG}"
|
||||
INSTALL_DESTINATION "${INSTALL_DIR}")
|
||||
|
||||
install(FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" DESTINATION "${INSTALL_DIR}")
|
||||
install(EXPORT casclibTargets DESTINATION "${INSTALL_DIR}")
|
||||
|
||||
if(INSTALL_HEADERS)
|
||||
install(FILES "src/CascLib.h" "src/CascPort.h" DESTINATION include/casclib)
|
||||
endif()
|
@ -1,7 +0,0 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(ZLIB REQUIRED)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
@ -1,22 +0,0 @@
|
||||
diff --git a/src/CascPort.h b/src/CascPort.h
|
||||
index 3bd08d4..201f7dd 100644
|
||||
--- a/src/CascPort.h
|
||||
+++ b/src/CascPort.h
|
||||
@@ -85,10 +85,17 @@
|
||||
#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)
|
20
ports/casclib/fix-shared-windows-builds.patch
Normal file
20
ports/casclib/fix-shared-windows-builds.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -51,8 +51,15 @@ set(SRC_FILES
|
||||
src/CascRootFile_WoW.cpp
|
||||
)
|
||||
|
||||
+if(WIN32)
|
||||
+ set(SRC_FILES ${SRC_FILES}
|
||||
+ src/DllMain.c
|
||||
+ src/DllMain.def
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
set(LINK_LIBS)
|
||||
-find_package(ZLIB)
|
||||
+find_package(ZLIB REQUIRED)
|
||||
if (ZLIB_FOUND)
|
||||
set(LINK_LIBS ${LINK_LIBS} ZLIB::ZLIB)
|
||||
add_definitions(-DCASC_USE_SYSTEM_ZLIB)
|
@ -1,31 +1,28 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ladislav-zezula/CascLib
|
||||
REF 1.50b
|
||||
SHA512 f32cc592f454db4815c0dfd18a9c0076d85b1582e6974d241d1d4094269c42a978fa42186504988ced2c8f4a0b598f41e3ec8a95ddc3c0551af997e37708b1f5
|
||||
REF 07bfe85fd0804cba49f072819af716274d82b855
|
||||
SHA512 b333fe6318aa95629aa67613287ac71b1931c6443985e7e52412066d769f7996bffca1c19e890851eba976f572c7a11f14a8ff5fb95433577e1c9af8de0f34af
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
ctype_for_mac.patch
|
||||
fix-shared-windows-builds.patch
|
||||
)
|
||||
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in
|
||||
DESTINATION
|
||||
${SOURCE_PATH}
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CASC_BUILD_SHARED_LIB)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CASC_BUILD_STATIC_LIB)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCASC_BUILD_SHARED_LIB=${CASC_BUILD_SHARED_LIB}
|
||||
-DCASC_BUILD_STATIC_LIB=${CASC_BUILD_STATIC_LIB}
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DINSTALL_HEADERS=OFF
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CascLib)
|
||||
|
||||
vcpkg_fixup_cmake_targets()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/casclib
|
||||
RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,9 +1,17 @@
|
||||
{
|
||||
"name": "casclib",
|
||||
"version-string": "1.50b",
|
||||
"port-version": 2,
|
||||
"version-date": "2021-11-16",
|
||||
"description": "An open-source implementation of library for reading CASC storage from Blizzard games since 2014",
|
||||
"homepage": "http://www.zezula.net/en/casc/casclib.html",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
|
@ -1237,8 +1237,8 @@
|
||||
"port-version": 4
|
||||
},
|
||||
"casclib": {
|
||||
"baseline": "1.50b",
|
||||
"port-version": 2
|
||||
"baseline": "2021-11-16",
|
||||
"port-version": 0
|
||||
},
|
||||
"catch": {
|
||||
"baseline": "alias",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "20768d4f95c896b3b416aab76cc04c8dfa6e1244",
|
||||
"version-date": "2021-11-16",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "b0e61662e214e54008bdc8842b865a3f3fccb821",
|
||||
"version-string": "1.50b",
|
||||
|
Loading…
Reference in New Issue
Block a user