2023-08-24 02:44:53 +08:00
|
|
|
set(GM_VERSION 1.3.41)
|
2017-04-23 22:30:22 +08:00
|
|
|
|
2020-06-27 06:06:30 +08:00
|
|
|
vcpkg_from_sourceforge(
|
2018-09-05 07:20:46 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-27 06:06:30 +08:00
|
|
|
REPO graphicsmagick/graphicsmagick
|
|
|
|
REF ${GM_VERSION}
|
2021-12-17 14:45:50 +08:00
|
|
|
FILENAME "GraphicsMagick-${GM_VERSION}-windows.7z"
|
2023-08-24 02:44:53 +08:00
|
|
|
SHA512 4790081136af67bf406b94e3de88feff295cc98fd3b125776e014436b12dbb31331af4ee4f8497ccc39d4afda08145b5e4bfeb45b3210a50e17b14e4dc2a220d
|
2018-09-05 07:20:46 +08:00
|
|
|
PATCHES
|
|
|
|
# GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined
|
|
|
|
dynamic_bzip2.patch
|
|
|
|
|
|
|
|
# Bake GM's own modules into the .dll itself. This fixes a bug whereby
|
|
|
|
# 'vcpkg install graphicsmagick' did not lead to a copy of GM that could
|
|
|
|
# load either PNG or JPEG files (due to missing GM Modules, with names
|
|
|
|
# matching "IM_*.DLL").
|
|
|
|
disable_graphicsmagick_modules.patch
|
|
|
|
)
|
2017-04-23 22:30:22 +08:00
|
|
|
|
2023-04-22 05:48:12 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/magick_types.h" DESTINATION "${SOURCE_PATH}/magick")
|
2017-04-23 22:30:22 +08:00
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_cmake_configure(
|
2023-04-22 05:48:12 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-09-05 07:20:46 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DINSTALL_HEADERS=OFF
|
2017-04-23 22:30:22 +08:00
|
|
|
)
|
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-04-23 22:30:22 +08:00
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-graphicsmagick)
|
2018-09-12 04:11:51 +08:00
|
|
|
|
2017-04-23 22:30:22 +08:00
|
|
|
# copy license
|
2023-04-22 05:48:12 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2017-04-23 22:30:22 +08:00
|
|
|
|
|
|
|
# copy config
|
2023-04-22 05:48:12 +08:00
|
|
|
file(COPY "${SOURCE_PATH}/config/colors.mgk" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/config")
|
|
|
|
file(COPY "${SOURCE_PATH}/config/log.mgk" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/config")
|
|
|
|
file(COPY "${SOURCE_PATH}/config/modules.mgk" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/config")
|
2017-04-23 22:30:22 +08:00
|
|
|
|
2023-04-22 05:48:12 +08:00
|
|
|
file(READ "${SOURCE_PATH}/config/type-windows.mgk.in" TYPE_MGK)
|
2017-04-23 22:30:22 +08:00
|
|
|
string(REPLACE "@windows_font_dir@" "$ENV{SYSTEMROOT}/Fonts/" TYPE_MGK "${TYPE_MGK}")
|
2023-04-22 05:48:12 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config/type.mgk" "${TYPE_MGK}")
|
2017-04-23 22:30:22 +08:00
|
|
|
|
2023-04-22 05:48:12 +08:00
|
|
|
configure_file("${SOURCE_PATH}/config/delegates.mgk.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/config/delegates.mgk" @ONLY)
|
2017-04-23 22:30:22 +08:00
|
|
|
vcpkg_copy_pdbs()
|