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] create pkg-config files #7129

Closed
wants to merge 21 commits into from
Closed

Conversation

isanych
Copy link
Contributor

@isanych isanych commented Jul 2, 2019

When I was building non vcpkg Qt using vcpkg dependencies, I was struggling until I created pkg-config files for vcpkg libs, so I decided to automate this process. Change should not affect cmake usage of vcpkg, but help to use vcpkg created libs as non cmake dependencies. As a side effect port version could be used in cmake files, one place less to change during version change process.

vcpkg_pkgconfig cmake function generates pkgconfig file, next cmake variables added:
PORT_FULL_VERSION - Version from CONTROL file
PORT_VERSION - PORT_FULL_VERSION without vcpkg version suffix
PORT_CMAKE_VERSION - cmake compatible version, 4 version components max, numbers only
PORT_DESCRIPTION - Description from CONTROL file
PORT_HOMEPAGE - Homepage from CONTROL file
PORT_DEPENDENCIES - list of port dependencies

Closes #7162

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2019

)) windows?

@isanych
Copy link
Contributor Author

isanych commented Jul 2, 2019

)) windows?

I'm not sure if pkgconfig files are needed on windows, removing 3 lines here -

if(CMAKE_HOST_WIN32)
will create them on windows too

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2019

I'm not sure if pkgconfig files are needed on windows

meson works tight with pkgconfig

@isanych
Copy link
Contributor Author

isanych commented Jul 2, 2019

I'm not sure if pkgconfig files are needed on windows

meson works tight with pkgconfig

ok, removed windows check - should work on windows too now

@MVoz
Copy link
Contributor

MVoz commented Jul 2, 2019

@isanych Игорь, верните, пока vcpkg для виндовс не работает с pkgconfig. я спросил про запас, так сказать на будущее
но вот для примера проект по сборке GTK
https://github.com/wingtk/gvsbuild

там плотно meson + pkgconfig связаны

@isanych isanych changed the title create pkg-config files WIP: create pkg-config files Jul 9, 2019
@cbezault
Copy link
Contributor

cbezault commented Jul 9, 2019

Closes #7162

@PhoebeHui
Copy link
Contributor

@isanych, Is work still being done for this PR? Could you please resolve the conflicts?

@isanych
Copy link
Contributor Author

isanych commented May 12, 2020

@PhoebeHui, ok I'll give it another go - last time build server was failing without obvious reason for me - so I'm just using own branch, but it would be nice to have less differences with upstream

@isanych
Copy link
Contributor Author

isanych commented May 12, 2020

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 7129 in repo microsoft/vcpkg

@PhoebeHui
Copy link
Contributor

@isanych, I test the changes locally, and it failed with following failure, it looks a vcpkg bug in this change:

PS F:\vcpkg\7129\vcpkg> ./vcpkg install libmediainfo
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
Computing installation plan...
The following packages will be built and installed:

  • curl[core,non-http,ssl,sspi,winssl]:x86-windows
    libmediainfo[core]:x86-windows
  • libzen[core]:x86-windows
  • zlib[core]:x86-windows
    Additional packages (*) will be modified to complete this operation.
    Starting package 1/4: zlib:x86-windows
    Building package zlib[core]:x86-windows...
    CMake Error at scripts/ports.cmake:47 (message):
    Unsupported target triplet. Triplet file does not exist:
    F:vcpkg7129vcpkgtripletsx86-windows.cmake

@isanych
Copy link
Contributor Author

isanych commented May 13, 2020

@PhoebeHui, thank you - I see the issue, I'm passing description (beside other variables) to cmake - blosc has backticks there which was causing shell attempt to execute sting between them - so I've removed dangerous characters, but went too far there as I've done that for all cmake variables - will do it for description field only

@cbezault
Copy link
Contributor

If you truly want a full-rebuild modifying the vcpkg_fixup_cmake_targets.cmake file will do it. See 4dd67c2.

@isanych
Copy link
Contributor Author

isanych commented May 14, 2020

@cbezault full rebuild helped thank you
@PhoebeHui issues which supposed to be gone are gone now, from latest failures I could only reproduce llvm on windows and parallelstl , but they are failing on master too, not sure what are my next steps should be

@PhoebeHui PhoebeHui removed the wip label May 15, 2020
@PhoebeHui
Copy link
Contributor

PhoebeHui commented May 18, 2020

The failures doesn't related to this change, @isanych, could you also update the Version in CONTROL file in related ports?

I will ask team member help to do feature review.

@PhoebeHui
Copy link
Contributor

@isanych, could you please resolve the conflicts?

@strega-nil, could you help review this feature?

@PhoebeHui PhoebeHui changed the title create pkg-config files [vcpkg] create pkg-config files May 20, 2020
# Conflicts:
#	ports/harfbuzz/CONTROL
#	ports/harfbuzz/portfile.cmake
#	toolsrc/src/vcpkg-test/strings.cpp
@PhoebeHui
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

PhoebeHui and others added 2 commits June 3, 2020 10:38
@PhoebeHui
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vicroms vicroms self-requested a review July 2, 2020 21:53
@vicroms vicroms added category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed and removed requires:discussion labels Jul 2, 2020
@isanych isanych closed this Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow portfile.cmake to get information defined in CONTROL file
7 participants