mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 21:39:02 +08:00
6b3a1a2188
* Use VERSION * Update to 0.21.1 * Update win unicode paths patch * Revise uwp patches * Cleanup * Build tools for uwp in CI * tools not supported on uwp * Add license GPL3.0-or-later. gettext.c has: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. * Fix license, but better. * Version database --------- Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
49 lines
1.7 KiB
CMake
49 lines
1.7 KiB
CMake
function(install_autopoint)
|
|
# variables for configuring autopoint.in
|
|
set(PACKAGE "gettext-tools")
|
|
set(ARCHIVE_VERSION "${VERSION}")
|
|
set(ARCHIVE_FORMAT "dirgz")
|
|
set(bindir [[${prefix}/tools/gettext/bin]])
|
|
set(datadir [[${datarootdir}]])
|
|
set(exec_prefix [[${prefix}]])
|
|
set(PATH_SEPARATOR ":")
|
|
set(RELOCATABLE "yes")
|
|
|
|
file(STRINGS "${SOURCE_PATH}/gettext-tools/configure"
|
|
VERSIONS_FROM_CONFIGURE
|
|
REGEX "^ *(ARCHIVE_VERSION|VERSION)=.*$"
|
|
)
|
|
foreach(LINE IN LISTS VERSIONS_FROM_CONFIGURE)
|
|
if(LINE MATCHES "^ *(ARCHIVE_VERSION|VERSION)='?([0-9.]+)'?$")
|
|
set(${CMAKE_MATCH_1} "${CMAKE_MATCH_2}")
|
|
endif()
|
|
endforeach()
|
|
|
|
set(WORKING_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
|
file(MAKE_DIRECTORY "${WORKING_DIR}")
|
|
|
|
# autopoint script
|
|
configure_file("${SOURCE_PATH}/gettext-tools/misc/autopoint.in" "${WORKING_DIR}/autopoint" @ONLY)
|
|
|
|
# data tarball
|
|
if(WIN32)
|
|
vcpkg_acquire_msys(MSYS_ROOT PACKAGES gzip)
|
|
vcpkg_add_to_path("${MSYS_ROOT}/usr/bin")
|
|
endif()
|
|
file(COPY "${SOURCE_PATH}/gettext-tools/misc/archive.dir.tar" DESTINATION "${WORKING_DIR}")
|
|
vcpkg_execute_required_process(
|
|
COMMAND gzip -f archive.dir.tar
|
|
WORKING_DIRECTORY "${WORKING_DIR}"
|
|
LOGNAME gzip-${TARGET_TRIPLET}
|
|
)
|
|
|
|
# installation
|
|
file(INSTALL "${WORKING_DIR}/autopoint" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin"
|
|
FILE_PERMISSIONS
|
|
OWNER_WRITE OWNER_READ OWNER_EXECUTE
|
|
GROUP_READ GROUP_EXECUTE
|
|
WORLD_READ WORLD_EXECUTE
|
|
)
|
|
file(INSTALL "${WORKING_DIR}/archive.dir.tar.gz" DESTINATION "${CURRENT_PACKAGES_DIR}/share/gettext/gettext")
|
|
endfunction()
|