mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 17:19:00 +08:00
89a2b29130
* Use VERSION * Add nls feature and gettext deps * Fix export of libintl dep * Fix mingw on windows * Fix crossbuilds * Cleanup * Keep translations for nls * Add license * [shiftmedia-libgpg-error] Split from pristine source port, update * [libgpg-error] Update, official tarballs, cross builds * [libgcrypt] Official tarballs, fix cross builds * [libgcrypt] Update copyright * [libassuan] Update, official tarballs, cross builds * [gpgme] Update, cleanup * [gpgme] Update copyright * Update versions * [shiftmedia-libgcrypt] Update * No port libgpg * Add missing version file * Use make OPTIONS * Update versions * Revise build-tools pattern
67 lines
2.4 KiB
CMake
67 lines
2.4 KiB
CMake
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
|
|
|
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 b06223bb2b0f67d3db5d0d9ab116361a0eda175d4667352b5c0941408d37f2b0ba8e507297e480ccebb88cbba9d0a133820b896914b07d264fb3edaac7b8c99d
|
|
)
|
|
vcpkg_extract_source_archive(
|
|
SOURCE_PATH
|
|
ARCHIVE "${tarball}"
|
|
PATCHES
|
|
cross-tools.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
|
|
--disable-silent-rules
|
|
--enable-install-gpg-error-config # still used downstream
|
|
)
|
|
|
|
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_SUFFIX}"
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/mkheader${VCPKG_TARGET_SUFFIX}"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}"
|
|
USE_SOURCE_PERMISSIONS
|
|
)
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
|
|
endif()
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/gpg-error-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/gpg-error-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../..")
|
|
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)
|