From ee42c44b39505b9bb2718009ec4260c05fc63fbc Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Sun, 13 Aug 2017 00:08:47 -0400 Subject: chmlib --- ports/chmlib/CONTROL | 3 + ports/chmlib/chm.vcxproj | 205 ++++++++++++++++++++++++++++++++++++++++++++ ports/chmlib/portfile.cmake | 57 ++++++++++++ 3 files changed, 265 insertions(+) create mode 100644 ports/chmlib/CONTROL create mode 100644 ports/chmlib/chm.vcxproj create mode 100644 ports/chmlib/portfile.cmake diff --git a/ports/chmlib/CONTROL b/ports/chmlib/CONTROL new file mode 100644 index 000000000..22680db33 --- /dev/null +++ b/ports/chmlib/CONTROL @@ -0,0 +1,3 @@ +Source: chmlib +Version: 0.40 +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. \ No newline at end of file diff --git a/ports/chmlib/chm.vcxproj b/ports/chmlib/chm.vcxproj new file mode 100644 index 000000000..61955291e --- /dev/null +++ b/ports/chmlib/chm.vcxproj @@ -0,0 +1,205 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {3bafee52-fe1a-494e-ab46-89bf77ed63a7} + chmLibExe1 + chm + 10.0.14393.0 + + + + StaticLibrary + true + v141 + + + StaticLibrary + false + v141 + true + + + StaticLibrary + true + v141 + + + StaticLibrary + false + v141 + true + + + + + + + + + + + + + + + + + + + + + + ..\..\..\x86-windows-static-dbg\ + ..\..\..\x86-windows-static-dbg\ + + + + ..\..\..\x86-windows-static-rel\ + ..\..\..\x86-windows-static-rel\ + + + + ..\..\..\x64-windows-static-dbg\ + ..\..\..\x64-windows-static-dbg\ + + + + ..\..\..\x64-windows-static-rel\ + ..\..\..\x64-windows-static-rel\ + + + + Disabled + true + false + WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreadedDebug + true + CompileAsC + OldStyle + false + + + + + Console + LinkVerbose + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + true + MachineX86 + Windows + true + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + + + Disabled + true + false + WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreadedDebug + true + CompileAsC + OldStyle + false + + + + + Console + LinkVerbose + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + Windows + true + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + + + true + true + true + false + CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreaded + CompileAsC + + + true + true + + + Console + LinkVerbose + + + MachineX86 + Windows + true + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + true + true + true + false + CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreaded + CompileAsC + + + true + true + + + Console + LinkVerbose + + + Windows + true + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake new file mode 100644 index 000000000..cb2f2cf96 --- /dev/null +++ b/ports/chmlib/portfile.cmake @@ -0,0 +1,57 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +#message("VCPKG_TARGET_ARCHITECTURE" ${VCPKG_TARGET_ARCHITECTURE}) +#if(NOT ${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x86") +# message(FATAL_ERROR "chmlib only supports x86") +#endif() + +if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic") + message(FATAL_ERROR "chmlib supports static linking only.") +endif() + +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + message(FATAL_ERROR "chmlib supports static linking only.") +endif() + +set(CHMLIB_VERSION chmlib-0.40) +set(CHMLIB_FILENAME ${CHMLIB_VERSION}.zip) +set(CHMLIB_URL http://www.jedrea.com/chmlib/${CHMLIB_FILENAME}) +set(CHMLIB_SRC ${CURRENT_BUILDTREES_DIR}/src/${CHMLIB_VERSION}/src) +include(vcpkg_common_functions) + +vcpkg_download_distfile( + ARCHIVE + URLS ${CHMLIB_URL} + FILENAME ${CHMLIB_FILENAME} + SHA512 ad3b0d49fcf99e724c0c38b9c842bae9508d0e4ad47122b0f489c113160f5344223d311abb79f25cbb0b662bb00e2925d338d60dd20a0c309bda2822cda4cd24 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY "${VCPKG_ROOT_DIR}/ports/${PORT}/chm.vcxproj" + DESTINATION ${CHMLIB_SRC}) + +vcpkg_build_msbuild( + PROJECT_PATH ${CHMLIB_SRC}/chm.vcxproj + RELEASE_CONFIGURATION Release + DEBUG_CONFIGURATION Debug + OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true +) + +file(INSTALL ${CHMLIB_SRC}/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(COPY ${CURRENT_BUILDTREES_DIR}/src/chmlib-0.40/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) \ No newline at end of file -- cgit v1.2.3