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

add vcpkg-qmake for qt6 #20963

Merged
merged 28 commits into from
Nov 23, 2021
Merged

add vcpkg-qmake for qt6 #20963

merged 28 commits into from
Nov 23, 2021

Conversation

Neumann-A
Copy link
Contributor

@Neumann-A Neumann-A commented Oct 24, 2021

QMake for Qt6 (untested since no dependent port so far.)

Copy link

@github-actions github-actions bot left a 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 2169ab765b49cfc5cd7eddfc8ff3e579326776f8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 08c5a89..3d3816e 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -6972,6 +6972,10 @@
       "baseline": "2021-04-02",
       "port-version": 1
     },
+    "vcpkg-qmake": {
+      "baseline": "2021-10-23",
+      "port-version": 0
+    },
     "vcpkg-tool-nodejs": {
       "baseline": "14.17.4",
       "port-version": 0

@MehdiChinoune

This comment has been minimized.

@Neumann-A
Copy link
Contributor Author

@MehdiChinoune
can you attach a ready to test vcpkg.json and portfile.cmake so i can test the code here better?

Copy link

@github-actions github-actions bot left a 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 2169ab765b49cfc5cd7eddfc8ff3e579326776f8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 08c5a89..3d3816e 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -6972,6 +6972,10 @@
       "baseline": "2021-04-02",
       "port-version": 1
     },
+    "vcpkg-qmake": {
+      "baseline": "2021-10-23",
+      "port-version": 0
+    },
     "vcpkg-tool-nodejs": {
       "baseline": "14.17.4",
       "port-version": 0

@MehdiChinoune
Copy link
Contributor

qwt:
portfile.cmake:

vcpkg_from_sourceforge(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO qwt/qwt
    REF 6.2.0
    FILENAME "qwt-6.2.0.zip"
    SHA512 a3946c6e23481b5a2193819a1c1298db5a069d514ca60de54accb3a249403f5acd778172ae6fae24fae252767b1e58deba524de6225462f1bafd7c947996aae9
)

vcpkg_qmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
)

if (VCPKG_TARGET_IS_WINDOWS)
    vcpkg_install_qmake(
        RELEASE_TARGETS sub-src-release_ordered
        DEBUG_TARGETS sub-src-debug_ordered
    )
else ()
    vcpkg_install_qmake(
        RELEASE_TARGETS sub-src-all-ordered
        DEBUG_TARGETS sub-src-all-ordered
    )
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
        file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

#Install the header files
file(GLOB HEADER_FILES "${SOURCE_PATH}/src/*.h")
file(INSTALL ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")

# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg.json:

{
  "name": "qwt",
  "version-semver": "6.2.0",
  "port-version": 1,
  "description": "qt widgets library for technical applications",
  "homepage": "https://sourceforge.net/projects/qwt",
  "dependencies": [
    {
      "name": "vcpkg-qmake",
      "host": true,
      "default-features": false
    },
    {
      "name": "qtbase",
      "default-features": false
    },
    "qtsvg",
    "qttools"
  ]
}

@JackBoosY
Copy link
Contributor

What's the different between vcpkg-qmake and vcpkg_*_qmake?
I think we will turn the latter into a port in the near future.

Copy link

@github-actions github-actions bot left a 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!

All manifest files must be formatted

./vcpkg format-manifest ports/*/vcpkg.json

Diff
diff --git a/ports/qwt/vcpkg.json b/ports/qwt/vcpkg.json
index 96dca1b..862195e 100644
--- a/ports/qwt/vcpkg.json
+++ b/ports/qwt/vcpkg.json
@@ -5,16 +5,16 @@
   "description": "qt widgets library for technical applications",
   "homepage": "https://sourceforge.net/projects/qwt",
   "dependencies": [
-    {
-      "name": "vcpkg-qmake",
-      "host": true,
-      "default-features": false
-    },
     {
       "name": "qtbase",
       "default-features": false
     },
     "qtsvg",
-    "qttools"
+    "qttools",
+    {
+      "name": "vcpkg-qmake",
+      "host": true,
+      "default-features": false
+    }
   ]
-}
\ No newline at end of file
+}
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 2169ab765b49cfc5cd7eddfc8ff3e579326776f8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 08c5a89..d426982 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5762,7 +5762,7 @@
     },
     "qwt": {
       "baseline": "6.2.0",
-      "port-version": 0
+      "port-version": 1
     },
     "qwtw": {
       "baseline": "3.1.0",
@@ -6972,6 +6972,10 @@
       "baseline": "2021-04-02",
       "port-version": 1
     },
+    "vcpkg-qmake": {
+      "baseline": "2021-10-23",
+      "port-version": 0
+    },
     "vcpkg-tool-nodejs": {
       "baseline": "14.17.4",
       "port-version": 0
diff --git a/versions/q-/qwt.json b/versions/q-/qwt.json
index 21451b5..34545e3 100644
--- a/versions/q-/qwt.json
+++ b/versions/q-/qwt.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "cbbcd74a4148208919161e2e3152d7d407f8869b",
+      "version-semver": "6.2.0",
+      "port-version": 1
+    },
     {
       "git-tree": "e7204097fda082c43e704e356702fd77aa3c9a52",
       "version-semver": "6.2.0",

Copy link

@github-actions github-actions bot left a 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!

All manifest files must be formatted

./vcpkg format-manifest ports/*/vcpkg.json

Diff
diff --git a/ports/qwt/vcpkg.json b/ports/qwt/vcpkg.json
index 96dca1b..862195e 100644
--- a/ports/qwt/vcpkg.json
+++ b/ports/qwt/vcpkg.json
@@ -5,16 +5,16 @@
   "description": "qt widgets library for technical applications",
   "homepage": "https://sourceforge.net/projects/qwt",
   "dependencies": [
-    {
-      "name": "vcpkg-qmake",
-      "host": true,
-      "default-features": false
-    },
     {
       "name": "qtbase",
       "default-features": false
     },
     "qtsvg",
-    "qttools"
+    "qttools",
+    {
+      "name": "vcpkg-qmake",
+      "host": true,
+      "default-features": false
+    }
   ]
-}
\ No newline at end of file
+}
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 2169ab765b49cfc5cd7eddfc8ff3e579326776f8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 08c5a89..d426982 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5762,7 +5762,7 @@
     },
     "qwt": {
       "baseline": "6.2.0",
-      "port-version": 0
+      "port-version": 1
     },
     "qwtw": {
       "baseline": "3.1.0",
@@ -6972,6 +6972,10 @@
       "baseline": "2021-04-02",
       "port-version": 1
     },
+    "vcpkg-qmake": {
+      "baseline": "2021-10-23",
+      "port-version": 0
+    },
     "vcpkg-tool-nodejs": {
       "baseline": "14.17.4",
       "port-version": 0
diff --git a/versions/q-/qwt.json b/versions/q-/qwt.json
index 21451b5..34545e3 100644
--- a/versions/q-/qwt.json
+++ b/versions/q-/qwt.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "cbbcd74a4148208919161e2e3152d7d407f8869b",
+      "version-semver": "6.2.0",
+      "port-version": 1
+    },
     {
       "git-tree": "e7204097fda082c43e704e356702fd77aa3c9a52",
       "version-semver": "6.2.0",

@Neumann-A
Copy link
Contributor Author

@MehdiChinoune could you fix the static build issues? It seems like your dependencies in vcpkg.json are incorrect which is why CI fails here. (I was able to build it locally successfully).

@MehdiChinoune
Copy link
Contributor

@MehdiChinoune could you fix the static build issues? It seems like your dependencies in vcpkg.json are incorrect which is why CI fails here. (I was able to build it locally successfully).

The dependencies are the same as before, I have just replaced the qt5-* with qt* .
You Could ignore qwt for now, It has Its own PR #20921

@Neumann-A
Copy link
Contributor Author

The dependencies are the same as before, I have just replaced the qt5-* with qt* .

qt6 has a lot more features than qt5 which are off by default.

@Neumann-A
Copy link
Contributor Author

cc @strega-nil-ms please check scripts for cmake guidelines
cc @ras0219-msft please check if the vcpkg-port-config.cmake is the correct way to chain port configs without requiring an explicit dependencies in dependent ports.

@JackBoosY
Copy link
Contributor

Can this replace my PR #20322?

@Neumann-A
Copy link
Contributor Author

Can this replace my PR #20322?

No, this PR is only about Qt6 and not Qt5. You could copy the code over and change it to use Qt5 though.

@JackBoosY JackBoosY added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Oct 27, 2021
Copy link

@github-actions github-actions bot left a 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!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

Error: Local changes detected for qtbase but no changes to version or port version.
-- Version: 6.2.1
-- Old SHA: 85405a7d213571f8da152112d436292099c5a4ab
-- New SHA: 5a3585832a53ae3c6dda810dc921e9ff33fde98c
-- Did you remember to update the version or port version?
-- Pass `--overwrite-version` to bypass this check.
***No files were updated.***

@JackBoosY JackBoosY added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 8, 2021
@MehdiChinoune
Copy link
Contributor

Any news?

@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Nov 17, 2021
ports/vcpkg-qmake/vcpkg-port-config.cmake Outdated Show resolved Hide resolved
ports/vcpkg-qmake/vcpkg.json Outdated Show resolved Hide resolved
@@ -0,0 +1,23 @@
Copyright (c) Microsoft Corporation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to just provide a file that says "This helper port is part of vcpkg and is under the vcpkg license terms" instead of a duplicate license.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just copied over from vcpkg-cmake. I don't even now why you require this for the vcpkg scripts. (just touch the file vcpkg-tool wants to see)

"dependencies": [
{
"name": "pkgconf",
"host": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to make all these dependencies non-host and require this port to always be natively compiled. Then, you know you can use relative paths for host dependencies and ${CURRENT_INSTALLED_DIR} for target dependencies.

Copy link
Contributor Author

@Neumann-A Neumann-A Nov 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the command paths still need to be absolute. (Or i need to calculate the relative path from the working dir to the executable - wherever that might be.)

include_guard(GLOBAL)
function(vcpkg_qmake_configure)
cmake_parse_arguments(PARSE_ARGV 0 arg "" "SOURCE_PATH" "QMAKE_OPTIONS;QMAKE_OPTIONS_RELEASE;QMAKE_OPTIONS_DEBUG;OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the dependencies are converted to native dependencies, it might make sense to calculate a "QMAKE_HOST_DIR" from ${CMAKE_CURRENT_LIST_DIR} and use that for all host dependencies in this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the added benefit of that. CURRENT_HOST_INSTALLED_DIR and QMAKE_HOST_DIR will point to the same directory however it is calculated

@JackBoosY JackBoosY added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. labels Nov 18, 2021
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Copy link

@github-actions github-actions bot left a 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!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

Error: Local changes detected for vcpkg-qmake but no changes to version or port version.
-- Version: 2021-10-23
-- Old SHA: 2cd969cb31fe15b86008720c8539be521f07e1c6
-- New SHA: 98523aed5a3e3367fee4e5d54fc663da90e76dbc
-- Did you remember to update the version or port version?
-- Pass `--overwrite-version` to bypass this check.
***No files were updated.***

@JackBoosY
Copy link
Contributor

Ping @ras0219-msft for response.

@ras0219-msft ras0219-msft merged commit 64e658f into microsoft:master Nov 23, 2021
@ras0219-msft
Copy link
Contributor

LGTM, thanks for making the changes!

@Neumann-A Neumann-A deleted the vcpkg-qmake branch November 23, 2021 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! category:scripts-audit Part of the scripts audit effort.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants