From 43888ff91e1579a14a887c7d99bd86b369707836 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 10 May 2017 18:18:37 +0200 Subject: [bzip2] add debug suffix --- ports/bzip2/CMakeLists.txt | 6 ++++-- ports/bzip2/CONTROL | 2 +- ports/bzip2/auto-define-import-macro.patch | 13 ------------- ports/bzip2/portfile.cmake | 13 ++++++++----- 4 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 ports/bzip2/auto-define-import-macro.patch 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) -- cgit v1.2.3 From 61766d1dc9e356f5cb533b49beab35b84fceb473 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 10 May 2017 18:19:35 +0200 Subject: [boost] use 'd' suffixed bzip2 library in debug build --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 73a8f0a87..308879e46 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.64-2 +Version: 1.64-3 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 6ce79afe6..1f442ac7a 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -168,7 +168,7 @@ set(B2_OPTIONS_DBG ${B2_OPTIONS} -sZLIB_BINARY=zlibd -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - -sBZIP2_BINARY=bz2 + -sBZIP2_BINARY=bz2d -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" ) -- cgit v1.2.3 From b1110308f609b73ee57bcbe6720bdbb24e64de9a Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 10 May 2017 18:20:37 +0200 Subject: [libarchive] fix list of dependencies --- ports/libarchive/CONTROL | 2 +- ports/libarchive/fix-dependencies.patch | 13 +++++++++++++ ports/libarchive/portfile.cmake | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 ports/libarchive/fix-dependencies.patch diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index ff9669fc7..f4f9b8cdd 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,4 @@ Source: libarchive -Version: 3.3.1 +Version: 3.3.1-1 Description: Library for reading and writing streaming archives Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl diff --git a/ports/libarchive/fix-dependencies.patch b/ports/libarchive/fix-dependencies.patch new file mode 100644 index 000000000..2a18d55a5 --- /dev/null +++ b/ports/libarchive/fix-dependencies.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 61c3b2a..c47b5b4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -783,7 +783,7 @@ main(int argc, char **argv) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES}) +- LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) ++ #LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) + ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index c63bb3b56..72958dfda 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -15,7 +15,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch) + ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 69514e6330431df421517ada64194de4c3c1ab2b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 10 May 2017 15:55:18 -0700 Subject: Fix typo --- ports/bzip2/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/bzip2/CMakeLists.txt b/ports/bzip2/CMakeLists.txt index 729588451..d79c28818 100644 --- a/ports/bzip2/CMakeLists.txt +++ b/ports/bzip2/CMakeLists.txt @@ -15,8 +15,8 @@ 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 # required for FindBzip2 to work DEBUG_POSTFIX d) if(BUILD_SHARED_LIBS) target_compile_definitions(libbz2 PRIVATE -DBZ_BUILD_DLL) -- cgit v1.2.3