Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sdl3-image] Add new port sdl3-image #42849

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

shybovycha
Copy link
Contributor

Add SDL3-image port. There already is an SDL3 port, but none for the relevant components (mixer, ttf, image). Used the latest 3.x release tag (preview-3.1.0)

  • Changes comply with the maintainer guide.
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@shybovycha shybovycha marked this pull request as draft December 22, 2024 03:25
@shybovycha shybovycha marked this pull request as ready for review December 22, 2024 03:46
@Mengna-Li Mengna-Li self-assigned this Dec 23, 2024
@Mengna-Li Mengna-Li changed the title Sdl3 image [sdl3-image] Add new port sdl3-image Dec 23, 2024
@Mengna-Li Mengna-Li added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Dec 23, 2024
ports/sdl3-image/portfile.cmake Show resolved Hide resolved
versions/s-/sdl3-image.json Outdated Show resolved Hide resolved
@Mengna-Li
Copy link
Contributor

Note: I will be converting your PR to draft status. When you're ready, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@Mengna-Li Mengna-Li marked this pull request as draft December 23, 2024 08:33
@shybovycha shybovycha requested a review from Mengna-Li December 23, 2024 09:12
@shybovycha shybovycha marked this pull request as ready for review December 23, 2024 09:12
"${CURRENT_PACKAGES_DIR}/debug/SDL3_image.framework"
)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary, you should remove this and your usage file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the usage file, I think that it is useful, but it needs to be redacted.

"${CURRENT_PACKAGES_DIR}/debug/SDL3_image.framework"
)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the usage file, I think that it is useful, but it needs to be redacted.

Comment on lines +3 to +5
# this is heuristically generated, and may not be correct
find_package(SDL3_image CONFIG REQUIRED)
target_link_libraries(main PRIVATE CMath::CMath SDL3_image::SDL3_image-shared)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that reasonable usage would be like this:

Suggested change
# this is heuristically generated, and may not be correct
find_package(SDL3_image CONFIG REQUIRED)
target_link_libraries(main PRIVATE CMath::CMath SDL3_image::SDL3_image-shared)
find_package(SDL3_image CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SDL3_image::SDL3_image-shared>,SDL3_image::SDL3_image-shared,???????>)

... with the appropriate target name for static builds in place of ????????.

sdl3-image provides pkg-config modules:

# image loading library for Simple DirectMedia Layer
sdl3-image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lacking a line break at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants