[chmlib] support on arm (#27064)

This commit is contained in:
autoantwort 2022-10-09 06:27:45 +02:00 committed by GitHub
parent 2909a549a9
commit 5a9f73ae88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 13 deletions

View File

@ -0,0 +1,20 @@
diff --git a/src/chm_lib.c b/src/chm_lib.c
index 6c6736c..d532691 100644
--- a/src/chm_lib.c
+++ b/src/chm_lib.c
@@ -175,8 +175,13 @@ typedef unsigned long UInt64;
#else
-/* yielding an error is preferable to yielding incorrect behavior */
-#error "Please define the sized types for your platform in chm_lib.c"
+typedef unsigned char UChar;
+typedef int16_t Int16;
+typedef uint16_t UInt16;
+typedef int32_t Int32;
+typedef uint32_t UInt32;
+typedef int64_t Int64;
+typedef uint64_t UInt64;
#endif
/* GCC */

View File

@ -13,21 +13,21 @@ vcpkg_download_distfile(
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
ARCHIVE "${ARCHIVE}"
PATCHES
all-platforms.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_RELEASE -DBUILD_TOOLS=ON
OPTIONS_DEBUG -DBUILD_TOOLS=OFF
)
vcpkg_install_cmake()
vcpkg_cmake_install()
file(INSTALL ${SOURCE_PATH}/src/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL "${SOURCE_PATH}/src/chm_lib.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,14 @@
{
"name": "chmlib",
"version-string": "0.40",
"port-version": 5,
"version": "0.40",
"port-version": 6,
"description": "CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives.",
"homepage": "https://www.jedrea.com/chmlib/"
"homepage": "http://www.jedrea.com/chmlib/",
"license": "LGPL-2.1-or-later",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}

View File

@ -1402,7 +1402,7 @@
},
"chmlib": {
"baseline": "0.40",
"port-version": 5
"port-version": 6
},
"chromaprint": {
"baseline": "1.5.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "eb8f888eae3c5747154d09844daadc5c117a8c38",
"version": "0.40",
"port-version": 6
},
{
"git-tree": "44371d51f30e27d0ccda47b2069b194c3c570ea4",
"version-string": "0.40",