diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL index 16b36bc8af..5cd10f63db 100644 --- a/ports/ccfits/CONTROL +++ b/ports/ccfits/CONTROL @@ -1,4 +1,4 @@ Source: ccfits -Version: 2.5-1 +Version: 2.5-2 Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. Build-Depends: cfitsio diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake index 6bd9bd170c..6aeecfd629 100644 --- a/ports/ccfits/portfile.cmake +++ b/ports/ccfits/portfile.cmake @@ -1,19 +1,6 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) #removes current source to prevent static builds from using patched source code -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits-2.5.tar.gz.extracted) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits) @@ -31,18 +18,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) ) endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DCFITSIO_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/cfitsio ) vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll) @@ -52,5 +37,13 @@ endif() # Remove duplicate include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Patch installed headers to look in the correct subdirectory +file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/CCfits/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "\"fitsio.h\"" "\"cfitsio/fitsio.h\"" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + # Handle copyright file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright) diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL index b25eb80263..7c50b295d0 100644 --- a/ports/cfitsio/CONTROL +++ b/ports/cfitsio/CONTROL @@ -1,3 +1,3 @@ Source: cfitsio -Version: 3.410-1 +Version: 3.410-2 Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index 2490beb800..e9caf61d16 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -15,14 +15,19 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Remove duplicate include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h) + +# cfitsio uses very common names for its headers, so they must be moved to a subdirectory +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/cfitsio) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/cfitsio ${CURRENT_PACKAGES_DIR}/include/cfitsio) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # move DLLs to bin directories for dynamic builds - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) + # move DLLs to bin directories for dynamic builds + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) endif() # Handle copyright diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index cefd6bb879..1acf080ff2 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: 1.2.0-2 -Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things +Version: 1.2.0-3 +Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things Build-Depends: openssl diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 3d0fc12e95..19629b92c5 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -48,7 +48,6 @@ file(GLOB DEBUG_LIBS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" ) -file(GLOB HEADERS "${SOURCE_PATH}/*/*.h") if(DLLS) file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() @@ -61,7 +60,7 @@ endif() if(DEBUG_LIBS) file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) endif() -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/src/MQTTAsync.h ${SOURCE_PATH}/src/MQTTClient.h ${SOURCE_PATH}/src/MQTTClientPersistence.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)