-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[libarchive,lz4] Fix pc file, modernize portfile #20146
Conversation
Cflags.private: -DLIBARCHIVE_STATIC | ||
Libs: -L${libdir} -larchive | ||
Libs.private: @LIBS@ | ||
+Requires.private: @LIBARCHIVE_REQUIRES_PRIVATE@ |
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.
Could you please help submit the changes to upstream if possible?
There is also a similar issue from upstream libarchive/libarchive#1446
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.
I will try, as time permits.
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.
I would appreciate if someone could help us verify libarchive/libarchive#2253 which claims to be a fix for libarchive/libarchive#1446
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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout e201002b4f4827d7b7b672f0c5c672a77fc3b77d -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/l-/libarchive.json b/versions/l-/libarchive.json
index 030b766..43ae7f8 100644
--- a/versions/l-/libarchive.json
+++ b/versions/l-/libarchive.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "88d645389e5de66763a38b44824f027bd0afb28c",
+ "git-tree": "eb7c77caa0e229ab1135c93439e828fe817ead73",
"version-semver": "3.5.2",
"port-version": 1
},
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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 5d734efcef674dbf9b7b204484fc8f006101dcb5 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/l-/libarchive.json b/versions/l-/libarchive.json
index 030b766..43ae7f8 100644
--- a/versions/l-/libarchive.json
+++ b/versions/l-/libarchive.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "88d645389e5de66763a38b44824f027bd0afb28c",
+ "git-tree": "eb7c77caa0e229ab1135c93439e828fe817ead73",
"version-semver": "3.5.2",
"port-version": 1
},
Hm, there are no pc files for the MSVC builds of port openssl. |
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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 5d734efcef674dbf9b7b204484fc8f006101dcb5 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/l-/libarchive.json b/versions/l-/libarchive.json
index c2bd24a..db88d23 100644
--- a/versions/l-/libarchive.json
+++ b/versions/l-/libarchive.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "8969063703167d3f1f756d4e4150e73ba55399db",
+ "git-tree": "d2243554df7c2ea6e5ea0c0400c938906a5931aa",
"version-semver": "3.5.2",
"port-version": 1
},
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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 5d734efcef674dbf9b7b204484fc8f006101dcb5 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/l-/libarchive.json b/versions/l-/libarchive.json
index c2bd24a..44b6870 100644
--- a/versions/l-/libarchive.json
+++ b/versions/l-/libarchive.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "8969063703167d3f1f756d4e4150e73ba55399db",
+ "git-tree": "1b734af1229f28de971d85044a365fb7069b1975",
"version-semver": "3.5.2",
"port-version": 1
},
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.
You have modified or added at least one portfile where deprecated functions are used.
If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake
-> vcpkg_cmake_install
(from port vcpkg-cmake
)
vcpkg_build_cmake
-> vcpkg_cmake_build
(from port vcpkg-cmake
)
vcpkg_configure_cmake
-> vcpkg_cmake_configure
(Please remove the option PREFER_NINJA
) (from port vcpkg-cmake
)
vcpkg_fixup_cmake_targets
-> vcpkg_cmake_config_fixup
(from port vcpkg-cmake-config
)
In the ports that use the new function, you have to add the corresponding dependencies:
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
The following files are affected:
ports/libarchive/portfile.cmake
This is complete. If possible this should be tested with #20062 on windows, static and dynamic. |
include(SelectLibraryConfigurations) | ||
find_library(Z_VCPKG_LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) | ||
find_library(Z_VCPKG_LZO_LIBRARY_RELEASE NAMES lzo2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) | ||
select_library_configurations(Z_VCPKG_LZO) | ||
if(Z_VCPKG_LZO_LIBRARY) | ||
list(APPEND z_vcpkg_libarchive_libs ${Z_VCPKG_LZO_LIBRARY}) | ||
else() | ||
set(LibArchive_FOUND FALSE) | ||
endif() |
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.
Why Z_VCPKG
? Where is the conflict?
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.
Well, it is a wrapper. It is run in user project scope, isn't it?. And select_library_configurations
is know to set <PREFIX>_FOUND
. So this just tries to go out of the way of user projects.
The problem caused by CI pipeline line depends on PR #20236. |
Remark: This is how
It contains |
Thanks for the feedback @c72578. I assume it works now for #20062?
I don't think this is a problem for now. The library is added for each matching algorithm. This could be improved upstream, instead of adding complexity to the patch. Maybe when I upstream the patch... |
@dg0yt the situation concerning #20062 has improved, however it is still failing for This is how
See: |
@dg0yt The remaining issue is related to the port
The issue is resulting from here: vcpkg/ports/lz4/portfile.cmake Line 34 in 4428702
The file is called liblz4.pc
|
Thanks for reporting @c72578. I added a fix to this PR now. |
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.
@dg0yt Thanks. I have completed the testing and the PR LGTM now.
@NancyLi1013 PR #20236 has been merged in the meantime. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Thanks @dg0yt for the fixes, @c72578 @JonLiu1993 for testing, and @Neumann-A for the review! |
What does your PR fix?
find_dependency
in the wrapper ([libarchive] wrapper emits warnings and uses find_dependency #20182).Which triplets are supported/not supported? Have you updated the CI baseline?
unchanged, no
Does your PR follow the maintainer guide?
yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?yes
Features
pc file after
vcpkg install 'libarchive[*]'
on x64-osx:(Note that
libssl
andlibcrypto
are missing. That's how I found that libarchive doesn't use OpenSSL on 'Darwin'.)