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

[kissnet] create a new port #27529

Merged
merged 12 commits into from
Nov 15, 2022
Merged

[kissnet] create a new port #27529

merged 12 commits into from
Nov 15, 2022

Conversation

BullyWiiPlaza
Copy link
Contributor

This adds the new port kissnet.

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/kissnet/vcpkg.json b/ports/kissnet/vcpkg.json
index 9c2a8fb..3e8b55c 100644
--- a/ports/kissnet/vcpkg.json
+++ b/ports/kissnet/vcpkg.json
@@ -6,6 +6,6 @@
   "license": "MIT",
   "dependencies": [
     "vcpkg-cmake",
-	"vcpkg-cmake-config"
+    "vcpkg-cmake-config"
   ]
 }

Use the version scheme "version-date" instead of "version-string" in port "kissnet".

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 2de7f388c5aac1f7d63c5986fe9b1b60e7d6bbb5 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index a10aafd..2ebad6e 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3432,6 +3432,10 @@
       "baseline": "2021-11-14",
       "port-version": 0
     },
+    "kissnet": {
+      "baseline": "2022-10-18",
+      "port-version": 0
+    },
     "klein": {
       "baseline": "2021-05-09",
       "port-version": 0

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)
vcpkg_extract_source_archive_ex -> vcpkg_extract_source_archive
vcpkg_build_msbuild -> vcpkg_install_msbuild
vcpkg_copy_tool_dependencies -> vcpkg_copy_tools
vcpkg_apply_patches should be replaced by the PATCHES arguments to the "extract" helpers (e.g. vcpkg_from_github())

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/kissnet/portfile.cmake

@BullyWiiPlaza BullyWiiPlaza changed the title Add port kissnet [kissnet] create a new port Oct 28, 2022
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 2de7f388c5aac1f7d63c5986fe9b1b60e7d6bbb5 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 2adee1d..ca2bf4a 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3432,6 +3432,10 @@
       "baseline": "2021-11-14",
       "port-version": 0
     },
+    "kissnet": {
+      "baseline": "2022-10-18",
+      "port-version": 0
+    },
     "klein": {
       "baseline": "2021-05-09",
       "port-version": 0

@FrankXie05 FrankXie05 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Oct 31, 2022
@BullyWiiPlaza
Copy link
Contributor Author

Hello @FrankXie05, is there any comment yet regarding the addition of this new port?

@FrankXie05
Copy link
Contributor

FrankXie05 commented Nov 7, 2022

@BullyWiiPlaza Please bump the port version. See documentation.
Also please run command vcpkg x-add-version kissnet then commit the changes.

ports/kissnet/portfile.cmake Show resolved Hide resolved
ports/kissnet/vcpkg.json Show resolved Hide resolved
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 2de7f388c5aac1f7d63c5986fe9b1b60e7d6bbb5 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 6764d8e..4800cb8 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3432,6 +3432,10 @@
       "baseline": "2021-11-14",
       "port-version": 0
     },
+    "kissnet": {
+      "baseline": "2022-10-18",
+      "port-version": 0
+    },
     "klein": {
       "baseline": "2021-05-09",
       "port-version": 0

github-actions[bot]
github-actions bot previously approved these changes Nov 7, 2022
@BullyWiiPlaza
Copy link
Contributor Author

BullyWiiPlaza commented Nov 7, 2022

@BullyWiiPlaza Please bump the port version. See documentation. Also please run command vcpkg x-add-version kissnet then commit the changes.

Okay, it's finished.

ports/kissnet/portfile.cmake Outdated Show resolved Hide resolved
@FrankXie05
Copy link
Contributor

@BullyWiiPlaza If we use cmake, we need to export xxx-config.cmake files. If not, vcpkg will automatically provide the find_library() method for header only ports (of course we can add usage ourselves). :)
https://github.com/Ybalrid/kissnet/blob/6c2bbbc1a114d83f11cea86d4370766ac12fbbd0/CMakeLists.txt#L48

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: checked-in files for kissnet have changed but the version was not updated
version: 2022-10-18
old SHA: 8b809b957ce07b9f184f877f0de9aba146a6fe3e
new SHA: 9c40840472f4c0cdd58f87052f30af7fac13bddd
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@BullyWiiPlaza
Copy link
Contributor Author

BullyWiiPlaza commented Nov 8, 2022

@BullyWiiPlaza If we use cmake, we need to export xxx-config.cmake files. If not, vcpkg will automatically provide the find_library() method for header only ports (of course we can add usage ourselves). :) https://github.com/Ybalrid/kissnet/blob/6c2bbbc1a114d83f11cea86d4370766ac12fbbd0/CMakeLists.txt#L48

Hi, I already used CMake with this port and it worked fine out-of-the-box since it's just a header only library.
Which change to the port should still be performed regarding CMake support or is it fine?

github-actions[bot]
github-actions bot previously approved these changes Nov 8, 2022
@FrankXie05
Copy link
Contributor

@BullyWiiPlaza If you use cmake, kissnetConfig.cmake or kissnet-config.cmake must be provided.
image

@dg0yt
Copy link
Contributor

dg0yt commented Nov 9, 2022

The port is said to be header-only. Does it really need patching for unofficial config, when it is enough to provide usage with find_path(...) target_include_directories(...)to document official usage?

@FrankXie05
Copy link
Contributor

For the header-only port, we actually only need the install header files.

@BullyWiiPlaza
Copy link
Contributor Author

So, how do we proceed here to finish the port? I managed to use the port without specifying it in the CMakeLists.txt at all.

@FrankXie05
Copy link
Contributor

FrankXie05 commented Nov 11, 2022

  1. Do not export the cmake configuration. https://github.com/Ybalrid/kissnet/blob/6c2bbbc1a114d83f11cea86d4370766ac12fbbd0/CMakeLists.txt#L41
  2. Just install the header file.
  3. Provide usage files without modifying upstream files.

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: checked-in files for kissnet have changed but the version was not updated
version: 2022-10-18
old SHA: 9c40840472f4c0cdd58f87052f30af7fac13bddd
new SHA: b711745f3e0d529e5d641e280af4d5a270d09dd9
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@BullyWiiPlaza
Copy link
Contributor Author

@FrankXie05 The changes are applied now, I considered zstr as an example project which just uses header only files.

github-actions[bot]
github-actions bot previously approved these changes Nov 11, 2022
@FrankXie05
Copy link
Contributor

New port checklist:

  • Review the code ✅

  • Check the name against https://repology.org/

  • Check the name against Bing/Google. (If the first results aren't C++ related, try "name C++") ✅

  • Check that the versioning scheme matches what upstream says ✅

  • Check that the license in vcpkg.json matches what upstream says ✅

  • Check that the license installed by the port matches what upstream says
    file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) ✅

  • Check that the source code comes from the upstream project's authoritative source. ✅

  • Check that the generated usage is accurate.
    file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") ✅

  • Check for issues that are resolved. ✅

FrankXie05
FrankXie05 previously approved these changes Nov 14, 2022
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: checked-in files for kissnet have changed but the version was not updated
version: 2022-10-18
old SHA: b711745f3e0d529e5d641e280af4d5a270d09dd9
new SHA: cbe9ef2ee8a59255a8e5d9e79a81db7bfa3927b4
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

github-actions[bot]
github-actions bot previously approved these changes Nov 14, 2022
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Nov 14, 2022
@BillyONeal BillyONeal merged commit 41b95a3 into microsoft:master Nov 15, 2022
@BillyONeal
Copy link
Member

Thanks!

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! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants