diff options
| author | Phil Christensen <philc@microsoft.com> | 2019-02-28 14:36:23 -0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-02-28 14:36:23 -0800 |
| commit | 773c8267dfb506f41c204f61042f30b6143a8095 (patch) | |
| tree | 5946d1526c3ad77a2df80786a1370d96389d931b /ports/bzip2 | |
| parent | 6afbceb27fd2aa39c66f810a22f5d4ad97575110 (diff) | |
| parent | 7859944528be28bee1fda9f325b78d6a7f02124e (diff) | |
| download | vcpkg-773c8267dfb506f41c204f61042f30b6143a8095.tar.gz vcpkg-773c8267dfb506f41c204f61042f30b6143a8095.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4564
Diffstat (limited to 'ports/bzip2')
| -rw-r--r-- | ports/bzip2/CMakeLists.txt | 21 | ||||
| -rw-r--r-- | ports/bzip2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/bzip2/portfile.cmake | 24 |
3 files changed, 24 insertions, 23 deletions
diff --git a/ports/bzip2/CMakeLists.txt b/ports/bzip2/CMakeLists.txt index d79c28818..e2da221d7 100644 --- a/ports/bzip2/CMakeLists.txt +++ b/ports/bzip2/CMakeLists.txt @@ -5,7 +5,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug) add_definitions(-DBZ_DEBUG) # enable extra assertions endif() -set(LIBBZ2_SOURCES +set(BZ2_SOURCES blocksort.c huffman.c crctable.c @@ -14,12 +14,13 @@ set(LIBBZ2_SOURCES decompress.c bzlib.c) -add_library(libbz2 ${LIBBZ2_SOURCES}) -set_target_properties(libbz2 PROPERTIES - ARCHIVE_OUTPUT_NAME bz2 # required for FindBzip2 to work - DEBUG_POSTFIX d) +add_library(bz2 ${BZ2_SOURCES}) +set_target_properties(bz2 PROPERTIES + DEBUG_POSTFIX d + VERSION 1.0.6 + SOVERSION 1.0) if(BUILD_SHARED_LIBS) - target_compile_definitions(libbz2 PRIVATE -DBZ_BUILD_DLL) + target_compile_definitions(bz2 PRIVATE -DBZ_BUILD_DLL) endif() if(MSVC) @@ -28,15 +29,15 @@ if(MSVC) add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) endif() -install(TARGETS libbz2 +install(TARGETS bz2 RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) 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) + add_executable(bzip2 bzip2.c ${BZ2_SOURCES}) + add_executable(bzip2recover bzip2recover.c ${BZ2_SOURCES}) + 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..00995aed9 100644 --- a/ports/bzip2/CONTROL +++ b/ports/bzip2/CONTROL @@ -1,3 +1,3 @@ Source: bzip2
-Version: 1.0.6-2
+Version: 1.0.6-4
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)
|
