2021-04-26 19:28:21 +02:00
|
|
|
# port update requires rust/cargo
|
|
|
|
|
2023-09-26 08:47:35 +02:00
|
|
|
string(REGEX REPLACE "^([0-9]*[.][0-9]*)[.].*" "\\1" MAJOR_MINOR "${VERSION}")
|
2019-07-10 12:48:17 -06:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2023-09-26 08:47:35 +02:00
|
|
|
URLS "https://download.gnome.org/sources/librsvg/${MAJOR_MINOR}/librsvg-${VERSION}.tar.xz"
|
|
|
|
"https://www.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/sources/librsvg/${MAJOR_MINOR}/librsvg-${VERSION}.tar.xz"
|
|
|
|
FILENAME "librsvg-${VERSION}.tar.xz"
|
2024-12-12 12:24:27 -08:00
|
|
|
SHA512 db0563d8e0edaae642a6b2bcd239cf54191495058ac8c7ff614ebaf88c0e30bd58dbcd41f58d82a9d5ed200ced45fc5bae22f2ed3cf3826e9348a497009e1280
|
2019-07-10 12:48:17 -06:00
|
|
|
)
|
|
|
|
|
2023-04-13 18:13:15 +02:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2023-09-26 08:47:35 +02:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2024-12-12 12:24:27 -08:00
|
|
|
PATCHES
|
|
|
|
fix-libxml2-2.13.5.patch
|
2019-07-10 12:48:17 -06:00
|
|
|
)
|
|
|
|
|
2023-09-26 08:47:35 +02:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_LIST_DIR}/config.h.linux" DESTINATION "${SOURCE_PATH}")
|
2019-07-10 12:48:17 -06:00
|
|
|
|
2021-04-26 19:28:21 +02:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
2021-08-09 23:56:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-04-26 19:28:21 +02:00
|
|
|
OPTIONS
|
2023-09-26 08:47:35 +02:00
|
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
2019-07-10 12:48:17 -06:00
|
|
|
)
|
|
|
|
|
2021-08-09 23:56:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-06-11 10:13:11 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-07-25 02:58:08 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2023-09-26 08:47:35 +02:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
2023-08-04 01:19:44 +08:00
|
|
|
file(GLOB_RECURSE pc_files "${CURRENT_PACKAGES_DIR}/*.pc")
|
2023-09-26 08:47:35 +02:00
|
|
|
foreach(pc_file IN LISTS pc_files)
|
2023-08-04 01:19:44 +08:00
|
|
|
vcpkg_replace_string("${pc_file}" " -lm" "")
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
2021-08-09 23:56:04 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-07-10 12:48:17 -06:00
|
|
|
|
2023-09-26 08:47:35 +02:00
|
|
|
file(COPY "${CURRENT_PORT_DIR}/unofficial-librsvg-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-librsvg")
|
|
|
|
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-07-13 20:30:33 +02:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|