Skip to content

Commit

Permalink
[tinyfiledialogs] Change repo to sourceforge
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBoosY committed Aug 2, 2021
1 parent 261c458 commit 549bcf0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
5 changes: 0 additions & 5 deletions ports/tinyfiledialogs/CONTROL

This file was deleted.

18 changes: 11 additions & 7 deletions ports/tinyfiledialogs/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@ vcpkg_fail_port_install(ON_TARGET "uwp")

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_git(
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
URL "https://git.code.sf.net/p/tinyfiledialogs/code"
REF "8e966d92d0e772b5e34ffc3d8ec1559731a07ccb"
REPO tinyfiledialogs
SHA512 d63d6dd847d6bbd1f252c8fbd228086381af7189ac71afc97bd57e06badd1d3f4d90c6aab6207191ae7253d5a71fc44636cf8e33714089d5b478dd2714f59376
FILENAME "tinyfiledialogs-current.zip"
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_cmake_install()

vcpkg_cmake_config_fixup()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_fixup_cmake_targets()
file(READ "${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs/tinyfiledialogs.h" _contents)
# reads between the line "- License -" and a closing "*/"
if (NOT _contents MATCHES [[- License -(([^*]|\*[^/])*)\*/]])
message(FATAL_ERROR "Failed to parse license from tinyfiledialogs.h")
endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${CMAKE_MATCH_1}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
18 changes: 18 additions & 0 deletions ports/tinyfiledialogs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "tinyfiledialogs",
"version-semver": "3.8.8",
"port-version": 1,
"description": "Highly portable and cross-platform dialogs for native inputbox, passwordbox, colorpicker and more",
"homepage": "https://sourceforge.net/projects/tinyfiledialogs/",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

0 comments on commit 549bcf0

Please sign in to comment.