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

[shiva_sfml] Portfile needs refactoring #6583

Closed
Neumann-A opened this issue May 23, 2019 · 7 comments · Fixed by #34419
Closed

[shiva_sfml] Portfile needs refactoring #6583

Neumann-A opened this issue May 23, 2019 · 7 comments · Fixed by #34419
Assignees
Labels
category:port-update The issue is with a library, which is requesting update new revision

Comments

@Neumann-A
Copy link
Contributor

Tries to manually link all dependencies from the portfile (although cmake port):

if (NOT VCPKG_CMAKE_SYSTEM_NAME)
find_file(LUADLL lua.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(FMTDLL fmt.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(FLACDLL FLAC.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(FREETYPEDLL freetype.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(LIBBZ2DLL libbz2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(LIBPNG16DLL libpng16.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(OGGDLL ogg.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(OPENAL32DLL OpenAL32.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(SFMLAUDIO2DLL sfml-audio-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(SFMLGRAPHICS2DLL sfml-graphics-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(SFMLSYSTEM2DLL sfml-system-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(SFMLWINDOW2DLL sfml-window-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(VORBISDLL vorbis.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(VORBISENCDLL vorbisenc.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(VORBISFILEDLL vorbisfile.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
find_file(ZLIB1DLL zlib1.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin)
set(DEPENDANCIES_RELEASE_DLL
${LUADLL}
${FMTDLL}
${FLACDLL}
${FREETYPEDLL}
${LIBBZ2DLL}
${LIBPNG16DLL}
${OGGDLL}
${OPENAL32DLL}
${SFMLAUDIO2DLL}
${SFMLGRAPHICS2DLL}
${SFMLSYSTEM2DLL}
${SFMLWINDOW2DLL}
${VORBISDLL}
${VORBISENCDLL}
${VORBISFILEDLL}
${ZLIB1DLL})
find_file(LUADLL_D lua.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(FMTDLL_D fmtd.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(FLACDLL_D FLAC.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(FREETYPEDLL_D freetyped.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(LIBBZ2DLL_D libbz2d.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(LIBPNG16DLL_D libpng16d.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(OGGDLL_D ogg.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(OPENAL32DLL_D OpenAL32.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(SFMLAUDIO2DLL_D sfml-audio-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(SFMLGRAPHICS2DLL_D sfml-graphics-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(SFMLSYSTEM2DLL_D sfml-system-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(SFMLWINDOW2DLL_D sfml-window-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(VORBISDLL_D vorbis.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(VORBISENCDLL_D vorbisenc.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(VORBISFILEDLL_D vorbisfile.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
find_file(ZLIB1DLL_D zlibd1.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin)
set(DEPENDANCIES_DEBUG_DLL
${LUADLL_D}
${FMTDLL_D}
${FLACDLL_D}
${FREETYPEDLL_D}
${LIBBZ2DLL_D}
${LIBPNG16DLL_D}
${OGGDLL_D}
${OPENAL32DLL}
${SFMLAUDIO2DLL_D}
${SFMLGRAPHICS2DLL_D}
${SFMLSYSTEM2DLL_D}
${SFMLWINDOW2DLL_D}
${VORBISDLL_D}
${VORBISENCDLL_D}
${VORBISFILEDLL_D}
${ZLIB1DLL_D}
)
file(COPY ${DEPENDANCIES_RELEASE_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release)
file(COPY ${DEPENDANCIES_DEBUG_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug)
endif()

Better:
Patch find_package und find_libraries call in shiva_sfml to do the right thing. The current way is probably also susceptible to OS changes and static/dynamic name changes in libraries.

@PhoebeHui PhoebeHui added the category:port-update The issue is with a library, which is requesting update new revision label May 24, 2019
@PhoebeHui PhoebeHui assigned FrankXie05 and unassigned NancyLi1013 Nov 23, 2021
@Thomas1664
Copy link
Contributor

@Neumann-A , @FrankXie05
It seems that the port shiva-sfml is kind of a duplicate of shiva. Both ports use the same repo and the same tag.
Because the portfile of shiva-sfml is ugly I suggest to remove this port. The description says that shiva-sfml contains plugins for shiva but I can't see that shiva-sfml adds any functionality.

@FrankXie05
Copy link
Contributor

@Neumann-A What do you think about what Thomas1664 said ?

@Neumann-A
Copy link
Contributor Author

@FrankXie05 I don't know anything about the details of shiva-sfml/shiva. I just observed the portfile and saw it did questionable stuff. Maybe the port was created when features in vcpkg were not yet available?

@FrankXie05
Copy link
Contributor

cc @BillyONeal Both port shiva and port shiva_sfml seem to be doing the same thing, is it necessary to keep two identical ports?

@dg0yt
Copy link
Contributor

dg0yt commented May 26, 2023

Both ports are unmaintained... and only ci.baseline.txt ensures that they are not build in the same triplet.
Now I have to add shiva-sfml fails for android.

@PhoebeHui
Copy link
Contributor

cc @BillyONeal Both port shiva and port shiva_sfml seem to be doing the same thing, is it necessary to keep two identical ports?

Hi @Milerius, since you are the author of this port, can we merge shiva and port shiva_sfml togather, is it possible to use SHIVA_USE_SFML_AS_RENDERER and SHIVA_INSTALL_PLUGINS as features in shiva instead?

@PhoebeHui
Copy link
Contributor

Related to #9116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants