-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[lodepng,lodepng-c, libjxl] Update, merge lodepng-c into lodepng #21846
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ee387b1
Modernize lodepng portfile
dg0yt 58e3e65
Update to 8c6a9e30
dg0yt 6da574f
Install LICENSE as copyright
dg0yt e539f5f
Don't install examples
dg0yt 42d8857
Remove unused parameter
dg0yt 94371ae
Merge lodepng-c into lodepng
dg0yt d1405ac
Add usage
dg0yt 462de14
Omit lodepng-util: not official API
dg0yt 47266a4
Update versions
dg0yt 4ad5c4e
[gdal] Don't use lz4: not a dependency
dg0yt e04662b
[libjxl] Fix link flags
dg0yt b6f7a38
Revise install cleanup, handle .dylib
dg0yt 97fa26d
Add extra flags for uwp
dg0yt 812e42c
Workaround uwp toolchain quirks
dg0yt c91b2e1
More dependency control, jxl_extras for tools only
dg0yt 1d12e76
Pass the version to the build
dg0yt a6a7c92
Update versions
dg0yt 77ab710
Skip CI for libjxl:arm-uwp
dg0yt a9664e7
Install usage file
dg0yt bd5f7ed
Update versions
dg0yt 3acbc05
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal ad5a968
Use version-date for lodepng, mark lodepng-c as deprecated, and updat…
BillyONeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
| index a366e51..257f87d 100644 | ||
| --- a/lib/CMakeLists.txt | ||
| +++ b/lib/CMakeLists.txt | ||
| @@ -132,7 +132,9 @@ endif() #!MSVC | ||
| include(jxl.cmake) | ||
|
|
||
| # Other libraries outside the core jxl library. | ||
| +if(JPEGXL_ENABLE_TOOLS) | ||
| include(jxl_extras.cmake) | ||
| +endif() | ||
| include(jxl_threads.cmake) | ||
|
|
||
| # Install all the library headers from the source and the generated ones. There |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| diff --git a/lib/jxl.cmake b/lib/jxl.cmake | ||
| index 63539cc..2e1d617 100644 | ||
| --- a/lib/jxl.cmake | ||
| +++ b/lib/jxl.cmake | ||
| @@ -551,8 +551,10 @@ foreach(target IN ITEMS jxl jxl_dec) | ||
| # This hides the default visibility symbols from static libraries bundled into | ||
| # the shared library. In particular this prevents exposing symbols from hwy | ||
| # and skcms in the shared library. | ||
| + if(NOT APPLE AND NOT MSVC) | ||
| set_property(TARGET ${target} APPEND_STRING PROPERTY | ||
| LINK_FLAGS " -Wl,--exclude-libs=ALL") | ||
| + endif() | ||
| endforeach() | ||
|
|
||
| # Only install libjxl shared library. The libjxl_dec is not installed since it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,29 @@ | ||
| { | ||
| "name": "libjxl", | ||
| "version-semver": "0.6.1", | ||
| "port-version": 1, | ||
| "description": "JPEG XL image format reference implementation", | ||
| "homepage": "https://github.com/libjxl/libjxl", | ||
| "license": "BSD-3-Clause", | ||
| "dependencies": [ | ||
| "brotli", | ||
| "highway", | ||
| "lcms", | ||
| "lodepng", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| } | ||
| ], | ||
| "features": { | ||
| "tools": { | ||
| "description": "Build user tools: cjxl and djxl" | ||
| "description": "Build user tools: cjxl and djxl", | ||
| "dependencies": [ | ||
| "giflib", | ||
| "libjpeg-turbo", | ||
| "libpng", | ||
| "lodepng", | ||
| "zlib" | ||
| ] | ||
| } | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1 @@ | ||
| 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 | ||
| DISABLE_PARALLEL_CONFIGURE | ||
| 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) | ||
| SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| { | ||
| "name": "lodepng-c", | ||
| "version-date": "2021-03-01", | ||
| "port-version": 1, | ||
| "description": "PNG encoder and decoder in C", | ||
| "homepage": "https://github.com/lvandeve/lodepng" | ||
| "version-string": "deprecated", | ||
| "description": "Legacy port. Use port lodepng instead.", | ||
| "dependencies": [ | ||
| "lodepng" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| The package lodepng provides CMake targets: | ||
|
|
||
| # C API | ||
| find_package(lodepng-c CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE lodepng-c) | ||
|
|
||
| # C++ API | ||
| find_package(lodepng CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE lodepng) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage is not installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder. I see the benefit. However:
vpkg install lodepng, it makes no difference. The usage file is also displayed when installing a cached binary artifact which does not contain the installed file. This is worrying, due to a possible version mismatch.vcpkg installdoesn't indicate the errror, it is no surprise that there are more ports which don't seem install the usage file:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vcpkg should print the cmake usage automaticly. If not, we should add usage such like this and install it. Otherwise it will not be printed.
I think they are left over from history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is: vcpkg should print the installed file, not the source file. Then there can't be a version mismatch, and the maintainer would notice the issue befroe committing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://github.com/microsoft/vcpkg-tool/blob/56228f80dcf757494a8dc45b206fe224a23c2129/include/vcpkg/installedpaths.h#L25:
That's correct, see https://github.com/microsoft/vcpkg-tool/blob/56228f80dcf757494a8dc45b206fe224a23c2129/src/vcpkg/install.cpp#L613.
vcpkg will extract the target in
add_libraryaccording to the generatedtarget.cmakecontent, and combine to generate the prompt information offind_package/target_link_libraries.