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

[ffmpeg] Use vcpkg_fixup_pkgconfig. #13919

Closed
wants to merge 9 commits into from
Closed

Conversation

Sibras
Copy link
Contributor

@Sibras Sibras commented Oct 7, 2020

Also contains several modifications required to get vcpkg_fixup_pkgconfig to work correctly when applied to ffmpeg:

  • Adds additional common windows libs to common_definitions.
  • [vcpkg_fixup_pkgconfig] Strip extensions from libs. This fixes passing errors when a pc file contains libs of the form "example.lib" by converting them to "-lexample". Note that it also ensures that a '-l' is prefixed to all libs.
  • [vcpkg_fixup_pkgconfig] Improve path detection and replacement. This strips cygdrive to make paths compatible. It also searches and replaces known lib paths by adding an additional lower case drive letter search and replacement (existing behavior fails with lower case windows driver letters). To handle mangled files with msvc linker commands "libpath:" is converted to standard "-L" syntax.
    [vcpkg_common_definitions] Make all windows libs have a capital leading character. This improves detection as the existing vcpkg_fixup_pkgconfig function checks for the libs in current case and then checks libs in all lower case. Changing to an upper case leading character fixes compatibility with several ports.
  • Adds additional common linux libs to common_definitions.

Fixes #12376

Sibras added 3 commits October 7, 2020 23:22
This fixes passing errors when a pc file contains libs of the form "example.lib" by converting them to "-lexample". Note that it also ensures that a '-l' is prefixed to all libs.
This strips cygdrive to make paths compatible. It also searches and replaces known lib paths by adding an additional lower case drive letter search and replacement.
To handle mangled files with msvc linker commands "libpath:" is converted to standard "-L" syntax.
Sibras added 2 commits October 8, 2020 11:18
…ng character.

This improves detection as the existing vcpkg_fixup_pkgconfig function checks for the libs in current case and then checks libs in all lower case. Changing to an upper case leading character fixes compatibility with several ports.
@Sibras Sibras force-pushed the master branch 3 times, most recently from fdc138d to 8288f21 Compare October 8, 2020 01:19
@Neumann-A
Copy link
Contributor

should probably wait until #13126 is merged. It changes the behavior a bit.
I also don't agree with most changes to the system libraries on linux due to #9966

@JackBoosY JackBoosY added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist depends:different-pr This PR or Issue depends on a PR which has been filed labels Oct 9, 2020
@Sibras
Copy link
Contributor Author

Sibras commented Oct 9, 2020

should probably wait until #13126 is merged. It changes the behavior a bit.

This is in part why I pushed this PR as #13126 does not work with ffmpeg so this PR shows what is required for ffmpeg. Seeing as how #13126 has been pending for some time having this PR already merged would update the CI to test ffmpeg to ensure it still works before applying #13126

I also don't agree with most changes to the system libraries on linux due to #9966

Fair enough, but they are required for ffmpeg and I figured that having them all in one easy to locate place would be easier than having them scattered through various port files so that when ever #9966 is actually applied then it would be easier to remove them from system libraries than check each port.

This PR is ready to go now, whereas It would appear that #13126 and #9966 are still a little ways off. When they are done then by all means replace what was done here but atleast in the mean time this fixes a known issue.

@traversaro
Copy link
Contributor

I guess this PR is now being superseded by #15127, given that #13126 was merged?

@Sibras Sibras closed this Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist depends:different-pr This PR or Issue depends on a PR which has been filed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ffmpeg on Windows is currently exporting malformed .pc files.
5 participants