diff options
| author | Jafar Abdi <cafer.abdi@gmail.com> | 2021-09-08 07:48:24 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-07 21:48:24 -0700 |
| commit | e8661320ba1ca4a67e5fa57d62a6b220731f0635 (patch) | |
| tree | b6e7ef8091a8ecb149723c6315e5918516c6e63f | |
| parent | d1657f4c9b0dedbfd917fc3ffba16f0e106b9fb5 (diff) | |
| download | vcpkg-e8661320ba1ca4a67e5fa57d62a6b220731f0635.tar.gz vcpkg-e8661320ba1ca4a67e5fa57d62a6b220731f0635.zip | |
[libharu] Fix renaming library when one of the build type is selected (#19979)
* libharu: Fix renaming library when build type is either release or debug
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
* Run vcpkg x-add-version --all
* Small changes
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
| -rw-r--r-- | ports/libharu/CONTROL | 10 | ||||
| -rw-r--r-- | ports/libharu/portfile.cmake | 40 | ||||
| -rw-r--r-- | ports/libharu/vcpkg.json | 26 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libharu.json | 5 |
5 files changed, 56 insertions, 29 deletions
diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL deleted file mode 100644 index 95e84e34a..000000000 --- a/ports/libharu/CONTROL +++ /dev/null @@ -1,10 +0,0 @@ -Source: libharu -Version: 2017-08-15-9 -Homepage: https://github.com/libharu/libharu -Description: libharu - free PDF library -Build-Depends: zlib, libpng -Default-Features: notiffsymbols - -Feature: notiffsymbols -Description: disable symbols also defined by the tiff port -Build-Depends: tiff
\ No newline at end of file diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index 7a9f6891c..20c595254 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -31,34 +31,41 @@ else() set(VCPKG_BUILD_STATIC_LIBS ON) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DLIBHPDF_STATIC=${VCPKG_BUILD_STATIC_LIBS} -DLIBHPDF_SHARED=${VCPKG_BUILD_SHARED_LIBS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib" "${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib") + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib") + endif() else() - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/lib/libhpdf.a) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a) + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a" "${CURRENT_PACKAGES_DIR}/lib/libhpdf.a") + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a" "${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a") + endif() endif() endif() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/README - ${CURRENT_PACKAGES_DIR}/debug/CHANGES - ${CURRENT_PACKAGES_DIR}/debug/INSTALL - ${CURRENT_PACKAGES_DIR}/README - ${CURRENT_PACKAGES_DIR}/CHANGES - ${CURRENT_PACKAGES_DIR}/INSTALL + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/README" + "${CURRENT_PACKAGES_DIR}/debug/CHANGES" + "${CURRENT_PACKAGES_DIR}/debug/INSTALL" + "${CURRENT_PACKAGES_DIR}/README" + "${CURRENT_PACKAGES_DIR}/CHANGES" + "${CURRENT_PACKAGES_DIR}/INSTALL" ) file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) @@ -77,6 +84,5 @@ else() endif() file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") -file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright) - vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libharu/vcpkg.json b/ports/libharu/vcpkg.json new file mode 100644 index 000000000..76537e89f --- /dev/null +++ b/ports/libharu/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "libharu", + "version-string": "2017-08-15", + "port-version": 10, + "description": "libharu - free PDF library", + "homepage": "https://github.com/libharu/libharu", + "dependencies": [ + "libpng", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ], + "default-features": [ + "notiffsymbols" + ], + "features": { + "notiffsymbols": { + "description": "disable symbols also defined by the tiff port", + "dependencies": [ + "tiff" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 528f2b2d1..9df7bc0ec 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3305,8 +3305,8 @@ "port-version": 0 }, "libharu": { - "baseline": "2017-08-15-9", - "port-version": 0 + "baseline": "2017-08-15", + "port-version": 10 }, "libhdfs3": { "baseline": "2019-11-05", diff --git a/versions/l-/libharu.json b/versions/l-/libharu.json index 6b3132ff4..e08b48e1b 100644 --- a/versions/l-/libharu.json +++ b/versions/l-/libharu.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "312f4b697d2f46818c218e270bd447cdeb76322c", + "version-string": "2017-08-15", + "port-version": 10 + }, + { "git-tree": "61662ee1cfa10c3e5244a43e24eb1f47e524c293", "version-string": "2017-08-15-9", "port-version": 0 |
