diff --git a/ports/chmlib/all-platforms.patch b/ports/chmlib/all-platforms.patch new file mode 100644 index 00000000000000..62dca58ec21331 --- /dev/null +++ b/ports/chmlib/all-platforms.patch @@ -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 */ diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake index 32ac77243b491c..7559b7c077e290 100644 --- a/ports/chmlib/portfile.cmake +++ b/ports/chmlib/portfile.cmake @@ -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) diff --git a/ports/chmlib/vcpkg.json b/ports/chmlib/vcpkg.json index f3fcf3d84c7e16..1abad01f8dbeb3 100644 --- a/ports/chmlib/vcpkg.json +++ b/ports/chmlib/vcpkg.json @@ -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 + } + ] } diff --git a/versions/baseline.json b/versions/baseline.json index c46d44f525bbe2..74a521cb671e18 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1402,7 +1402,7 @@ }, "chmlib": { "baseline": "0.40", - "port-version": 5 + "port-version": 6 }, "chromaprint": { "baseline": "1.5.0", diff --git a/versions/c-/chmlib.json b/versions/c-/chmlib.json index 1986f3145af10e..4b0e16833c8b70 100644 --- a/versions/c-/chmlib.json +++ b/versions/c-/chmlib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "eb8f888eae3c5747154d09844daadc5c117a8c38", + "version": "0.40", + "port-version": 6 + }, { "git-tree": "44371d51f30e27d0ccda47b2069b194c3c570ea4", "version-string": "0.40",