aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsukasa Sugiura <t.sugiura0204@gmail.com>2018-11-09 16:46:54 +0900
committerRobert Schumacher <roschuma@microsoft.com>2018-11-08 23:46:54 -0800
commit3f5835d5c4ddc65444cb5973021601f04f30d45e (patch)
tree8f0d1d6a7b8e5e02d7c5ae1eeebdc09356170e5e
parentf7f06c516d5c7b6e5ff48db3452bdf2c744f02a4 (diff)
downloadvcpkg-3f5835d5c4ddc65444cb5973021601f04f30d45e.tar.gz
vcpkg-3f5835d5c4ddc65444cb5973021601f04f30d45e.zip
[bzip2] Fix tools install directory (#4682)
* [bzip2] Fix tools install directory Change to install tools in port name directory. (vcpkg/installed/<triplet>/tools/bzip2) * [bzip2] Modernize and bump control version
-rw-r--r--ports/bzip2/CMakeLists.txt2
-rw-r--r--ports/bzip2/CONTROL2
-rw-r--r--ports/bzip2/portfile.cmake24
3 files changed, 14 insertions, 14 deletions
diff --git a/ports/bzip2/CMakeLists.txt b/ports/bzip2/CMakeLists.txt
index d79c28818..2f70c5404 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 613d3f251..fad303399 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 00d92c90a..25e3df10f 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)