diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2021-05-14 04:16:46 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-13 13:16:46 -0700 |
| commit | ab364a7e5668dd28312e91cf153e97ac950d22b5 (patch) | |
| tree | 859282e190f2ffd5dcfce239f3e78ca8076c428a | |
| parent | 104b3c7625f168e1d8b11fda86bb4e208c64b060 (diff) | |
| download | vcpkg-ab364a7e5668dd28312e91cf153e97ac950d22b5.tar.gz vcpkg-ab364a7e5668dd28312e91cf153e97ac950d22b5.zip | |
[thor] Support UNIX, re-fix dependency sfml (#17766)
* [thor] Support UNIX, re-fix dependency sfml
* update baseline
* update version record
* improve portfile.cmake
* update version record
| -rw-r--r-- | ports/thor/CONTROL | 4 | ||||
| -rw-r--r-- | ports/thor/fix-dependency-sfml.patch | 31 | ||||
| -rw-r--r-- | ports/thor/portfile.cmake | 33 | ||||
| -rw-r--r-- | ports/thor/sfml-no-depend-libjpeg.patch | 16 | ||||
| -rw-r--r-- | ports/thor/vcpkg.json | 11 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 2 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/t-/thor.json | 5 |
8 files changed, 66 insertions, 40 deletions
diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL deleted file mode 100644 index 5391f5d62..000000000 --- a/ports/thor/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: thor -Version: 2.0-3 -Description: Extends the multimedia library SFML with higher-level features -Build-Depends: sfml, aurora diff --git a/ports/thor/fix-dependency-sfml.patch b/ports/thor/fix-dependency-sfml.patch new file mode 100644 index 000000000..8b6fb09da --- /dev/null +++ b/ports/thor/fix-dependency-sfml.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03536be..abcff44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -115,11 +115,10 @@ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/;${CMAKE_MODULE_PATH + if(NOT THOR_SHARED_LIBS) + set(SFML_STATIC_LIBRARIES TRUE) + endif() +-find_package(SFML 2 COMPONENTS audio graphics window system) ++find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED) ++set(SFML_LIBRARIES sfml-system sfml-network sfml-graphics sfml-window) + +-if(SFML_FOUND) +- include_directories(${SFML_INCLUDE_DIR}) +-else() ++if(0) + set(SFML_ROOT "" CACHE PATH "SFML top-level directory") + message("\n-> SFML directory not found. Set SFML_ROOT to SFML's top-level path (containing \"include\" and \"lib\" directories).") + message("-> Make sure the SFML libraries with the same configuration (Release/Debug, Static/Dynamic) exist.\n") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 75e118e..0f90ac8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -72,6 +72,7 @@ else() + add_library(${THOR_LIB} STATIC ${THOR_SRC}) + set_target_properties(${THOR_LIB} PROPERTIES DEBUG_POSTFIX -s-d) + set_target_properties(${THOR_LIB} PROPERTIES RELEASE_POSTFIX -s) ++ thor_link_sfml(${THOR_LIB}) + endif() + + diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 4a6a7a5dc..8371f1613 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -4,8 +4,9 @@ vcpkg_from_github(ARCHIVE REF v2.0 SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 HEAD_REF master - PATCHES "${CMAKE_CURRENT_LIST_DIR}/sfml-no-depend-libjpeg.patch" + PATCHES fix-dependency-sfml.patch ) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindSFML.cmake) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) @@ -24,15 +25,17 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -set(CONFIG_FILE "${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp") +vcpkg_copy_pdbs() -file(READ ${CONFIG_FILE} CONFIG_H) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined(SFML_STATIC)" "1" CONFIG_H "${CONFIG_H}") - else() - string(REPLACE "defined(SFML_STATIC)" "0" CONFIG_H "${CONFIG_H}") - endif() -file(WRITE ${CONFIG_FILE} "${CONFIG_H}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp" + "defined(SFML_STATIC)" "1" + ) +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp" + "defined(SFML_STATIC)" "0" + ) +endif() file(GLOB LICENSE "${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt" @@ -45,12 +48,10 @@ if(LICENSE) file(REMOVE ${LICENSE}) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/Aurora) -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) +if(NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/thor/sfml-no-depend-libjpeg.patch b/ports/thor/sfml-no-depend-libjpeg.patch deleted file mode 100644 index 7fcf73ff0..000000000 --- a/ports/thor/sfml-no-depend-libjpeg.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/cmake/Modules/FindSFML.cmake b/cmake/Modules/FindSFML.cmake
-index 48873ef..a1834f6 100644
---- a/cmake/Modules/FindSFML.cmake
-+++ b/cmake/Modules/FindSFML.cmake
-@@ -312,10 +312,9 @@ if(SFML_STATIC_LIBRARIES)
-
- # find libraries
- find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype)
-- find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg)
-
- # update the list
-- set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
-+ set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY})
- set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES})
- endif()
-
diff --git a/ports/thor/vcpkg.json b/ports/thor/vcpkg.json new file mode 100644 index 000000000..3b1c3cfee --- /dev/null +++ b/ports/thor/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "thor", + "version": "2.0", + "port-version": 4, + "description": "Extends the multimedia library SFML with higher-level features", + "homepage": "www.bromeon.ch/libraries/thor", + "dependencies": [ + "aurora", + "sfml" + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 166bebb11..7ee266418 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1570,8 +1570,6 @@ theia:x64-windows = skip theia:x64-windows-static = skip theia:x64-windows-static-md=skip theia:x86-windows = skip -thor:x64-linux=fail -thor:x64-osx=fail tidy-html5:arm-uwp=fail tidy-html5:x64-uwp=fail tinkerforge:arm-uwp=fail diff --git a/versions/baseline.json b/versions/baseline.json index e34f9a96d..f7419a614 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5997,8 +5997,8 @@ "port-version": 0 }, "thor": { - "baseline": "2.0-3", - "port-version": 0 + "baseline": "2.0", + "port-version": 4 }, "threadpool": { "baseline": "0.2.5", diff --git a/versions/t-/thor.json b/versions/t-/thor.json index d110348ab..708cdd803 100644 --- a/versions/t-/thor.json +++ b/versions/t-/thor.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "cada171d405874f848790c8e10a7f332bbed1e6c", + "version": "2.0", + "port-version": 4 + }, + { "git-tree": "99d8374185d4ab57f61811b3d65a2c542a8ad42e", "version-string": "2.0-3", "port-version": 0 |
