diff options
| author | Kyle Benesch <4b796c65+github@gmail.com> | 2021-03-29 10:11:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-29 10:11:07 -0700 |
| commit | cda58bef39757452778a4c81470623a29905a0cb (patch) | |
| tree | 119a4a8a8291419c5ed081ba25ee90f1583fef6c | |
| parent | aaa6a031ced87d5b2c04023029bc5746dac52cb4 (diff) | |
| download | vcpkg-cda58bef39757452778a4c81470623a29905a0cb.tar.gz vcpkg-cda58bef39757452778a4c81470623a29905a0cb.zip | |
[libtcod] Add new port. (#16408)
* [libtcod] Add new port.
* [lodepng-c] Add port lodepng-c, conflict with lodepng
* [libtcode] Fix dependencies
* [libtcod] Re-fix dependency utf8proc
* update version record
* [lodepng-c/lodepng] Add conflict message
* add baseline
* remove port-version
* update port-version
* update version record
* [libtcod] Update to 1.16.6.
Patches applied upstream.
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
| -rw-r--r-- | ports/libtcod/portfile.cmake | 34 | ||||
| -rw-r--r-- | ports/libtcod/vcpkg.json | 16 | ||||
| -rw-r--r-- | ports/lodepng-c/CMakeLists.txt | 23 | ||||
| -rw-r--r-- | ports/lodepng-c/portfile.cmake | 32 | ||||
| -rw-r--r-- | ports/lodepng-c/vcpkg.json | 6 | ||||
| -rw-r--r-- | ports/lodepng/CONTROL | 4 | ||||
| -rw-r--r-- | ports/lodepng/portfile.cmake | 3 | ||||
| -rw-r--r-- | ports/lodepng/vcpkg.json | 7 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 10 | ||||
| -rw-r--r-- | versions/baseline.json | 8 | ||||
| -rw-r--r-- | versions/l-/libtcod.json | 14 | ||||
| -rw-r--r-- | versions/l-/lodepng-c.json | 9 | ||||
| -rw-r--r-- | versions/l-/lodepng.json | 5 |
13 files changed, 167 insertions, 4 deletions
diff --git a/ports/libtcod/portfile.cmake b/ports/libtcod/portfile.cmake new file mode 100644 index 000000000..fad5c0df8 --- /dev/null +++ b/ports/libtcod/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtcod/libtcod + REF 1.16.6 + SHA512 88777acd89d5ab2541d8b5d2f6db966059b76501b591d6e1d782d0d39b0adbcb38be25c49716b6e581b4b0488bf2dbfc5b07452b80495365861cee97e5279bfd + HEAD_REF develop +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DCMAKE_INSTALL_INCLUDEDIR=${CURRENT_PACKAGES_DIR}/include + -DCMAKE_INSTALL_CONFIGDIR=share/libtcod + -DLIBTCOD_SDL2=find_package + -DLIBTCOD_ZLIB=find_package + -DLIBTCOD_GLAD=find_package + -DLIBTCOD_LODEPNG=find_package + -DLIBTCOD_UTF8PROC=vcpkg + -DLIBTCOD_STB=vcpkg +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file( + INSTALL "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/libtcod/vcpkg.json b/ports/libtcod/vcpkg.json new file mode 100644 index 000000000..4b28151a8 --- /dev/null +++ b/ports/libtcod/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "libtcod", + "version-string": "1.16.6", + "maintainers": "Kyle Benesch <4b796c65+github@gmail.com>", + "description": "Common algorithms and tools for roguelikes.", + "homepage": "https://github.com/libtcod/libtcod", + "documentation": "https://libtcod.readthedocs.io/en/latest/", + "dependencies": [ + "glad", + "lodepng-c", + "sdl2", + "stb", + "utf8proc", + "zlib" + ] +} diff --git a/ports/lodepng-c/CMakeLists.txt b/ports/lodepng-c/CMakeLists.txt new file mode 100644 index 000000000..bd58c435e --- /dev/null +++ b/ports/lodepng-c/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.8.0) +project(lodepng-c C) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/lodepng.cpp ${CMAKE_CURRENT_LIST_DIR}/lodepng.c COPYONLY) +add_library(lodepng-c lodepng.c) +target_include_directories(lodepng-c PUBLIC + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> +) + +file(WRITE "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-c-targets.cmake\")") +install(FILES "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" DESTINATION "share/lodepng-c/") + +install(TARGETS lodepng-c EXPORT lodepng-c-targets) + +install(EXPORT lodepng-c-targets DESTINATION share/lodepng-c/) + +if(NOT DDISABLE_INSTALL_EXAMPLES) + install(DIRECTORY examples DESTINATION share/lodepng-c/) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES lodepng.h DESTINATION include) +endif() diff --git a/ports/lodepng-c/portfile.cmake b/ports/lodepng-c/portfile.cmake new file mode 100644 index 000000000..166cd525f --- /dev/null +++ b/ports/lodepng-c/portfile.cmake @@ -0,0 +1,32 @@ +if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng/copyright) + message(FATAL_ERROR "${PORT} conflict with lodepng, please remove lodepng before install ${PORT}.") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lvandeve/lodepng + REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1 + SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON + -DDDISABLE_INSTALL_EXAMPLES=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/ +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/lodepng-c/vcpkg.json b/ports/lodepng-c/vcpkg.json new file mode 100644 index 000000000..111190d1d --- /dev/null +++ b/ports/lodepng-c/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "lodepng-c", + "version-string": "2021-03-01", + "description": "PNG encoder and decoder in C", + "homepage": "https://github.com/lvandeve/lodepng" +} diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL deleted file mode 100644 index b9238548f..000000000 --- a/ports/lodepng/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: lodepng
-Version: 2020-03-15
-Homepage: https://github.com/lvandeve/lodepng
-Description: PNG encoder and decoder in C and C++
diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 680c04d71..2075d6789 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -1,3 +1,6 @@ +if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng-c/copyright) + message(FATAL_ERROR "${PORT} conflict with lodepng-c, please remove lodepng-c before install ${PORT}.") +endif() vcpkg_check_linkage(ONLY_STATIC_LIBRARY) diff --git a/ports/lodepng/vcpkg.json b/ports/lodepng/vcpkg.json new file mode 100644 index 000000000..7a004463c --- /dev/null +++ b/ports/lodepng/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lodepng", + "version-string": "2020-03-15", + "port-version": 1, + "description": "PNG encoder and decoder in C++", + "homepage": "https://github.com/lvandeve/lodepng" +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index d335811ae..2d52fbcbe 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -852,6 +852,16 @@ llvm:arm64-windows=fail llvm:x64-uwp=fail lmdb:arm-uwp=fail lmdb:x64-uwp=fail +# Conflict with loadpng-c +lodepng:arm64-windows = skip +lodepng:arm-uwp = skip +lodepng:x64-linux = skip +lodepng:x64-osx = skip +lodepng:x64-uwp = skip +lodepng:x64-windows = skip +lodepng:x64-windows-static = skip +lodepng:x64-windows-static-md=skip +lodepng:x86-windows = skip log4cplus:arm-uwp=fail log4cplus:x64-uwp=fail log4cxx:arm-uwp=fail diff --git a/versions/baseline.json b/versions/baseline.json index 87e63c500..bdc051ef7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3496,6 +3496,10 @@ "baseline": "4.16.0", "port-version": 0 }, + "libtcod": { + "baseline": "1.16.6", + "port-version": 0 + }, "libtheora": { "baseline": "1.2.0alpha1-20170719", "port-version": 2 @@ -3670,6 +3674,10 @@ }, "lodepng": { "baseline": "2020-03-15", + "port-version": 1 + }, + "lodepng-c": { + "baseline": "2021-03-01", "port-version": 0 }, "log4cplus": { diff --git a/versions/l-/libtcod.json b/versions/l-/libtcod.json new file mode 100644 index 000000000..6f09bea3b --- /dev/null +++ b/versions/l-/libtcod.json @@ -0,0 +1,14 @@ +{ + "versions": [ + { + "git-tree": "e2de0a47f3776252b6e04681c92d67b0730587ef", + "version-string": "1.16.6", + "port-version": 0 + }, + { + "git-tree": "b4899dcf1740634e91d040b66259568ecafaa1b6", + "version-string": "1.16.4", + "port-version": 0 + } + ] +} diff --git a/versions/l-/lodepng-c.json b/versions/l-/lodepng-c.json new file mode 100644 index 000000000..82133d047 --- /dev/null +++ b/versions/l-/lodepng-c.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "588b315ea040b1a598929e86260dadaec3cb15d0", + "version-string": "2021-03-01", + "port-version": 0 + } + ] +} diff --git a/versions/l-/lodepng.json b/versions/l-/lodepng.json index f23516767..842901158 100644 --- a/versions/l-/lodepng.json +++ b/versions/l-/lodepng.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "c80237ed99bb9821134df9802930c54fd8c8ee90", + "version-string": "2020-03-15", + "port-version": 1 + }, + { "git-tree": "b7471b62d6bfd4288987cca4eb3d37b8eb287ed1", "version-string": "2020-03-15", "port-version": 0 |
