From bf4b99eae51a06fe48032b2f4c1efa24f9905abc Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 4 Aug 2026 14:06:51 +0300 Subject: [PATCH 1/3] Add gif-load port with initial configuration and test setup --- ports/gif-load/portfile.cmake | 35 +++++++++++++++++++ .../gif-load/unofficial-gif-load-config.cmake | 5 +++ ports/gif-load/vcpkg.json | 7 ++++ .../vcpkg-ci-gif-load/portfile.cmake | 5 +++ .../vcpkg-ci-gif-load/project/CMakeLists.txt | 5 +++ .../vcpkg-ci-gif-load/project/main.c | 13 +++++++ .../test_ports/vcpkg-ci-gif-load/vcpkg.json | 12 +++++++ versions/baseline.json | 4 +++ versions/g-/gif-load.json | 9 +++++ 9 files changed, 95 insertions(+) create mode 100644 ports/gif-load/portfile.cmake create mode 100644 ports/gif-load/unofficial-gif-load-config.cmake create mode 100644 ports/gif-load/vcpkg.json create mode 100644 scripts/test_ports/vcpkg-ci-gif-load/portfile.cmake create mode 100644 scripts/test_ports/vcpkg-ci-gif-load/project/CMakeLists.txt create mode 100644 scripts/test_ports/vcpkg-ci-gif-load/project/main.c create mode 100644 scripts/test_ports/vcpkg-ci-gif-load/vcpkg.json create mode 100644 versions/g-/gif-load.json diff --git a/ports/gif-load/portfile.cmake b/ports/gif-load/portfile.cmake new file mode 100644 index 00000000000000..21d71e3705d200 --- /dev/null +++ b/ports/gif-load/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hidefromkgb/gif_load + REF 74b674de2704bc1b20fc3bf482a5ee3e774b67c5 + SHA512 f58b02ad62c0898865bb0c933711f52eb203c3e49b832847613a1de32330192636ddd31aacba2cefe7a7acde7c9be3c5edeea262b905b9a49bf05f4bbafddc21 + HEAD_REF master +) + +file(INSTALL "${SOURCE_PATH}/gif_load.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-gif-load-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-gif-load") + +file(WRITE "${SOURCE_PATH}/UNLICENSE" [[This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +]]) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/UNLICENSE") diff --git a/ports/gif-load/unofficial-gif-load-config.cmake b/ports/gif-load/unofficial-gif-load-config.cmake new file mode 100644 index 00000000000000..a388005f3acfa6 --- /dev/null +++ b/ports/gif-load/unofficial-gif-load-config.cmake @@ -0,0 +1,5 @@ +if(NOT TARGET unofficial::gif-load::gif-load) + add_library(unofficial::gif-load::gif-load INTERFACE IMPORTED) + set_target_properties(unofficial::gif-load::gif-load PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../../include") +endif() diff --git a/ports/gif-load/vcpkg.json b/ports/gif-load/vcpkg.json new file mode 100644 index 00000000000000..62390445c2e9c7 --- /dev/null +++ b/ports/gif-load/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "gif-load", + "version-date": "2019-01-06", + "description": "A slim, fast and header-only GIF loader written in C", + "homepage": "https://github.com/hidefromkgb/gif_load", + "license": "Unlicense" +} diff --git a/scripts/test_ports/vcpkg-ci-gif-load/portfile.cmake b/scripts/test_ports/vcpkg-ci-gif-load/portfile.cmake new file mode 100644 index 00000000000000..8a2079b2178d36 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-gif-load/portfile.cmake @@ -0,0 +1,5 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" +) +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-gif-load/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-gif-load/project/CMakeLists.txt new file mode 100644 index 00000000000000..c711c138c8bd83 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-gif-load/project/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.22) +project(gif-load-test LANGUAGES C) +find_package(unofficial-gif-load CONFIG REQUIRED) +add_executable(main main.c) +target_link_libraries(main PRIVATE unofficial::gif-load::gif-load) diff --git a/scripts/test_ports/vcpkg-ci-gif-load/project/main.c b/scripts/test_ports/vcpkg-ci-gif-load/project/main.c new file mode 100644 index 00000000000000..488861513417c6 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-gif-load/project/main.c @@ -0,0 +1,13 @@ +#include + +static const unsigned char gif_data[] = { 0x47 }; +static void frame_writer(void *anim, struct GIF_WHDR *whdr) +{ + (void)anim; (void)whdr; +} + +int main(void) +{ + bool success = GIF_Load((void *)gif_data, (long)sizeof(gif_data), frame_writer, 0, 0, 0) == 1 ? 0 : 1; + return 0; +} diff --git a/scripts/test_ports/vcpkg-ci-gif-load/vcpkg.json b/scripts/test_ports/vcpkg-ci-gif-load/vcpkg.json new file mode 100644 index 00000000000000..d6ac0208a0371f --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-gif-load/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "vcpkg-ci-gif-load", + "version-string": "ci", + "description": "Validates gif-load", + "dependencies": [ + "gif-load", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 1ad310b70a2fc4..ff72e380384ff6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3432,6 +3432,10 @@ "baseline": "2019-10-07", "port-version": 3 }, + "gif-load": { + "baseline": "2019-01-06", + "port-version": 0 + }, "giflib": { "baseline": "6.1.3", "port-version": 0 diff --git a/versions/g-/gif-load.json b/versions/g-/gif-load.json new file mode 100644 index 00000000000000..e8547c9fc86a01 --- /dev/null +++ b/versions/g-/gif-load.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b119d655f3d50a42fc103a2a97cdd830cf7ec678", + "version-date": "2019-01-06", + "port-version": 0 + } + ] +} From ea19f1502f7df83c0deef179e69083805f3ae77f Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 4 Aug 2026 14:15:36 +0300 Subject: [PATCH 2/3] Refactor success variable to be const --- scripts/test_ports/vcpkg-ci-gif-load/project/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/test_ports/vcpkg-ci-gif-load/project/main.c b/scripts/test_ports/vcpkg-ci-gif-load/project/main.c index 488861513417c6..337f53d903ede7 100644 --- a/scripts/test_ports/vcpkg-ci-gif-load/project/main.c +++ b/scripts/test_ports/vcpkg-ci-gif-load/project/main.c @@ -1,13 +1,15 @@ #include +#include static const unsigned char gif_data[] = { 0x47 }; static void frame_writer(void *anim, struct GIF_WHDR *whdr) { - (void)anim; (void)whdr; + (void)anim; + (void)whdr; } int main(void) { - bool success = GIF_Load((void *)gif_data, (long)sizeof(gif_data), frame_writer, 0, 0, 0) == 1 ? 0 : 1; + const bool success = GIF_Load((void *)gif_data, (long)sizeof(gif_data), frame_writer, 0, 0, 0) == 1; return 0; } From 44febf4536a7186cda0589b6246fa3c40ef88bdb Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Tue, 4 Aug 2026 15:10:41 -0700 Subject: [PATCH 3/3] gif-load: use upstream license notice Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ports/gif-load/portfile.cmake | 24 +----------------------- versions/g-/gif-load.json | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/ports/gif-load/portfile.cmake b/ports/gif-load/portfile.cmake index 21d71e3705d200..b4e6db95b566d2 100644 --- a/ports/gif-load/portfile.cmake +++ b/ports/gif-load/portfile.cmake @@ -10,26 +10,4 @@ file(INSTALL "${SOURCE_PATH}/gif_load.h" DESTINATION "${CURRENT_PACKAGES_DIR}/in file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-gif-load-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-gif-load") -file(WRITE "${SOURCE_PATH}/UNLICENSE" [[This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -]]) -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/UNLICENSE") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/gif_load.h") diff --git a/versions/g-/gif-load.json b/versions/g-/gif-load.json index e8547c9fc86a01..3942e4eb8a55d0 100644 --- a/versions/g-/gif-load.json +++ b/versions/g-/gif-load.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b119d655f3d50a42fc103a2a97cdd830cf7ec678", + "git-tree": "935cba3a1773d4c9f46d5a676ad4170bfa4cc132", "version-date": "2019-01-06", "port-version": 0 }