diff options
| author | codicodi <rob.ceglinski@gmail.com> | 2017-05-10 18:18:37 +0200 |
|---|---|---|
| committer | codicodi <rob.ceglinski@gmail.com> | 2017-05-10 18:18:37 +0200 |
| commit | 43888ff91e1579a14a887c7d99bd86b369707836 (patch) | |
| tree | 1f24b80defdfd7fb40242c4a525bdd9d5005cc2d | |
| parent | add92555384f59ab10b6f551db0b685f8e9e5323 (diff) | |
| download | vcpkg-43888ff91e1579a14a887c7d99bd86b369707836.tar.gz vcpkg-43888ff91e1579a14a887c7d99bd86b369707836.zip | |
[bzip2] add debug suffix
| -rw-r--r-- | ports/bzip2/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | ports/bzip2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/bzip2/auto-define-import-macro.patch | 13 | ||||
| -rw-r--r-- | ports/bzip2/portfile.cmake | 13 |
4 files changed, 13 insertions, 21 deletions
diff --git a/ports/bzip2/CMakeLists.txt b/ports/bzip2/CMakeLists.txt index d5407cc5f..729588451 100644 --- a/ports/bzip2/CMakeLists.txt +++ b/ports/bzip2/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(bzip2) +project(bzip2 C) if(CMAKE_BUILD_TYPE STREQUAL Debug) add_definitions(-DBZ_DEBUG) # enable extra assertions @@ -15,7 +15,9 @@ set(LIBBZ2_SOURCES bzlib.c) add_library(libbz2 ${LIBBZ2_SOURCES}) -set_target_properties(libbz2 PROPERTIES ARCHIVE_OUTPUT_NAME bz2) # reqiured for FindBzip2 to work +set_target_properties(libbz2 PROPERTIES + ARCHIVE_OUTPUT_NAME bz2 # reqiured for FindBzip2 to work + DEBUG_POSTFIX d) if(BUILD_SHARED_LIBS) target_compile_definitions(libbz2 PRIVATE -DBZ_BUILD_DLL) endif() diff --git a/ports/bzip2/CONTROL b/ports/bzip2/CONTROL index 365527454..1c7303c22 100644 --- a/ports/bzip2/CONTROL +++ b/ports/bzip2/CONTROL @@ -1,3 +1,3 @@ Source: bzip2
-Version: 1.0.6
+Version: 1.0.6-1
Description: High-quality data compressor.
diff --git a/ports/bzip2/auto-define-import-macro.patch b/ports/bzip2/auto-define-import-macro.patch deleted file mode 100644 index b0eae0796..000000000 --- a/ports/bzip2/auto-define-import-macro.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/bzlib.h b/bzlib.h -index e3ba1d6..d3bed44 100644 ---- a/bzlib.h -+++ b/bzlib.h -@@ -26,6 +26,8 @@ - extern "C" { - #endif - -+#define BZ_IMPORT -+ - #define BZ_RUN 0 - #define BZ_FLUSH 1 - #define BZ_FINISH 2 diff --git a/ports/bzip2/portfile.cmake b/ports/bzip2/portfile.cmake index 67f56b6d8..f5823fb94 100644 --- a/ports/bzip2/portfile.cmake +++ b/ports/bzip2/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS_DEBUG
-DBZIP2_SKIP_HEADERS=ON
-DBZIP2_SKIP_TOOLS=ON)
@@ -24,12 +25,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
vcpkg_copy_pdbs()
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/auto-define-import-macro.patch)
+file(READ ${CURRENT_PACKAGES_DIR}/include/bzlib.h BZLIB_H)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ string(REPLACE "defined(BZ_IMPORT)" "0" BZLIB_H "${BZLIB_H}")
+else()
+ string(REPLACE "defined(BZ_IMPORT)" "1" BZLIB_H "${BZLIB_H}")
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)
|
