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

[vcpkg] how to disable default features #14491

Closed
rib opened this issue Nov 9, 2020 · 3 comments
Closed

[vcpkg] how to disable default features #14491

rib opened this issue Nov 9, 2020 · 3 comments
Assignees

Comments

@rib
Copy link

rib commented Nov 9, 2020

This is essentially a duplicate of #11097 (closed) since the answer there didn't appear to work for me.

I'm trying to build ffmpeg with with the gpl feature disabled. ffmpeg has over 30 features and to start with I wasn't sure how to get the list of default features so I ended up running ./vcpkg install ffmpeg waiting for the output that showed that it was actually building/installing:
ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,gpl,postproc,swresample,swscale]:x64-windows

I then stopped the build, copy & pasted the list of default features (except removing gpl), and ran:

.\vcpkg install ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,postproc,swresample,swscale]:x64-windows

I still see Building package ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,gpl,postproc,swresample,swscale]:x64-windows... in the output - so it looks like it's still including the gpl feature?

@vicroms
Copy link
Member

vicroms commented Nov 9, 2020

I looked into ffmpeg's control file and the postproc feature has a declared dependency on gpl. I don't know enough about ffmpeg to know if that dependency is correct.

You can manually modify the CONTROL file to remove the dependency, as there is now way to remove a feature that is required upon by another feature or package.

Feature: postproc
Build-Depends: ffmpeg[core,gpl]
Description: Postproc support in ffmpeg

@rib
Copy link
Author

rib commented Nov 10, 2020

Ah, ok, yeah it looks like that feature is a gpl feature itself.

In this case what's really desired is that I want the default features minus anything that depends on the gpl feature.

vcpkg is making it pretty hard to configure ffmpeg features here since I need to explicitly inspect the heirachy of dependencies and subtract anything depending on gpl. Ideally there could be some syntax like -gpl (as mentioned in #11097) that could solve this automatically. Any time there's an update to the ffmpeg package I currently need to remember to re-check the heirachy of dependencies to manually subtract gpl dependent features.

Thanks for helping me understand what's going on.

@NancyLi1013 NancyLi1013 self-assigned this Nov 10, 2020
@vicroms
Copy link
Member

vicroms commented Nov 10, 2020

@rib Thanks for the report.

@vicroms vicroms closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants