From 3f5835d5c4ddc65444cb5973021601f04f30d45e Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Fri, 9 Nov 2018 16:46:54 +0900 Subject: [PATCH] [bzip2] Fix tools install directory (#4682) * [bzip2] Fix tools install directory Change to install tools in port name directory. (vcpkg/installed//tools/bzip2) * [bzip2] Modernize and bump control version --- ports/bzip2/CMakeLists.txt | 2 +- ports/bzip2/CONTROL | 2 +- ports/bzip2/portfile.cmake | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ports/bzip2/CMakeLists.txt b/ports/bzip2/CMakeLists.txt index d79c288185..2f70c54045 100644 --- a/ports/bzip2/CMakeLists.txt +++ b/ports/bzip2/CMakeLists.txt @@ -36,7 +36,7 @@ install(TARGETS libbz2 if(NOT BZIP2_SKIP_TOOLS) add_executable(bzip2 bzip2.c ${LIBBZ2_SOURCES}) add_executable(bzip2recover bzip2recover.c ${LIBBZ2_SOURCES}) - install(TARGETS bzip2 bzip2recover DESTINATION tools) + install(TARGETS bzip2 bzip2recover DESTINATION tools/bzip2) endif() if(NOT BZIP2_SKIP_HEADERS) diff --git a/ports/bzip2/CONTROL b/ports/bzip2/CONTROL index 613d3f2517..fad3033997 100644 --- a/ports/bzip2/CONTROL +++ b/ports/bzip2/CONTROL @@ -1,3 +1,3 @@ Source: bzip2 -Version: 1.0.6-2 +Version: 1.0.6-3 Description: High-quality data compressor. diff --git a/ports/bzip2/portfile.cmake b/ports/bzip2/portfile.cmake index 00d92c90a1..25e3df10f1 100644 --- a/ports/bzip2/portfile.cmake +++ b/ports/bzip2/portfile.cmake @@ -1,26 +1,27 @@ - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bzip2-1.0.6) +set(BZIP2_VERSION 1.0.6) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/past-due/bzip2-mirror/releases/download/v1.0.6/bzip2-1.0.6.tar.gz" - FILENAME "bzip2-1.0.6.tar.gz" + URLS "https://github.com/past-due/bzip2-mirror/releases/download/v${BZIP2_VERSION}/bzip2-${BZIP2_VERSION}.tar.gz" + FILENAME "bzip2-${BZIP2_VERSION}.tar.gz" SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${BZIP2_VERSION} + PATCHES + fix-import-export-macros.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-import-export-macros.patch) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG -DBZIP2_SKIP_HEADERS=ON - -DBZIP2_SKIP_TOOLS=ON) + -DBZIP2_SKIP_TOOLS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() @@ -33,7 +34,6 @@ else() endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/bzlib.h "${BZLIB_H}") - file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bzip2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/bzip2/LICENSE ${CURRENT_PACKAGES_DIR}/share/bzip2/copyright)