mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 00:38:59 +08:00
59 lines
2.0 KiB
CMake
59 lines
2.0 KiB
CMake
vcpkg_download_distfile(tarball
|
|
URLS
|
|
"https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${VERSION}.tar.bz2"
|
|
"https://mirrors.dotsrc.org/gcrypt/libgpg-error/libgpg-error-${VERSION}.tar.bz2"
|
|
"https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${VERSION}.tar.bz2"
|
|
FILENAME "libgpg-error-${VERSION}.tar.bz2"
|
|
SHA512 bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30
|
|
)
|
|
vcpkg_extract_source_archive(
|
|
SOURCE_PATH
|
|
ARCHIVE "${tarball}"
|
|
PATCHES
|
|
cross-tools.patch
|
|
gpgrt-config.patch
|
|
pkgconfig-libintl.patch
|
|
)
|
|
|
|
vcpkg_list(SET options)
|
|
if("nls" IN_LIST FEATURES)
|
|
vcpkg_list(APPEND options "--enable-nls")
|
|
else()
|
|
set(ENV{AUTOPOINT} true) # true, the program
|
|
vcpkg_list(APPEND options "--disable-nls")
|
|
endif()
|
|
|
|
if(VCPKG_CROSSCOMPILING)
|
|
set(ENV{HOST_TOOLS_PREFIX} "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}")
|
|
endif()
|
|
|
|
vcpkg_configure_make(
|
|
AUTOCONFIG
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
${options}
|
|
--disable-tests
|
|
--disable-doc
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_copy_pdbs()
|
|
|
|
if(NOT VCPKG_CROSSCOMPILING)
|
|
file(INSTALL
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/mkerrcodes${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/mkheader${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}"
|
|
USE_SOURCE_PERMISSIONS
|
|
)
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
if(NOT "nls" IN_LIST FEATURES)
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/locale")
|
|
endif()
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|