Skip to content

[ktexttemplate] add new port and deprecate grantlee - #53512

Draft
Jack·Boos·Yu (JackBoosY) wants to merge 16 commits into
microsoft:masterfrom
JackBoosY:jack/41818
Draft

Jack·Boos·Yu (JackBoosY) wants to merge 16 commits into
microsoft:masterfrom
JackBoosY:jack/41818

Conversation

@JackBoosY

@JackBoosY Jack·Boos·Yu (JackBoosY) commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor
  • Changes comply with the maintainer guide.
  • The packaged project is mature and ready for broad sharing with vcpkg users
    • Has a release at least 6 months old or 6 months of demonstrated public development
    • Is an official component of something else meeting that criteria
    • Some other reason (please explain)
  • The packaged project shows strong association with the chosen port name. Check this box if at least one of the following criteria is met:
    • The project is in Repology: https://repology.org/project//versions
    • The project is amongst the first web search results for "" or " C++". Include a screenshot of the search engine results in the PR.
    • The port name follows the 'GitHubOrg-GitHubRepo' form or equivalent Owner-Project form.
  • Optional dependencies of the build are all controlled by the port. A dependency is controlled if it is declared an unconditional dependency in vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGE
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is brief and accurate. See adding-usage for context. Don't add a usage file if the automatically generated usage is correct.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

Fixes #41818

"homepage": "https://github.com/steveire/grantlee",
"homepage": "https://invent.kde.org/frameworks/ktexttemplate",
"license": "LGPL-2.1-or-later",
"supports": "!staticcrt & !xbox",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

grantlee was renamed to ktexttemplate so I think the support field should be keep.

@JackBoosY

Jack·Boos·Yu (JackBoosY) commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Never mind, it's just a test case.

@JackBoosY

Copy link
Copy Markdown
Contributor Author
Error: After committing all other changes, the version database must be updated.
This can be done by running the following commands:

PowerShell

git fetch https://github.com/microsoft/vcpkg master
$merge_base = git merge-base HEAD FETCH_HEAD
git restore --source=$merge_base --staged --worktree -- versions
git clean -fd -- versions
./vcpkg x-add-version --all


bash

git fetch https://github.com/microsoft/vcpkg master
merge_base="$(git merge-base HEAD FETCH_HEAD)"
git restore --source="$merge_base" --staged --worktree -- versions
git clean -fd -- versions
./vcpkg x-add-version --all

Warning: If you feel able to do so, please consider adding a "license" field to the following files:
070	ports/grantlee/vcpkg.json	ports/ktexttemplate/vcpkg.json

Valid values for the license field can be found at https://learn.microsoft.com/vcpkg/reference/vcpkg-json#license

Billy O'Neal (@BillyONeal) I don't get this point, I have already updated all the baseline versions, is this related to the deleted port grantlee?

@JackBoosY
Jack·Boos·Yu (JackBoosY) marked this pull request as ready for review August 22, 2026 02:05
@JackBoosY

Copy link
Copy Markdown
Contributor Author

Billy O'Neal (@BillyONeal) Ready for review now.

@BillyONeal Billy O'Neal (BillyONeal) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi there, thanks for the "new" port :) GPT 5.6 Sol found:

Unfortunately I don't think there's a good fix for this right now; vcpkg really needs a better hook for z-applocal to make this doable.

  • Replace generated usage with accurate custom usage. vcpkg print-usage ktexttemplate advertises KF6::i18ntags, KF6::loadertags, and KF6::defaulttags, which are imported module DLLs and cannot be linked on Windows. Although this target-export shape is inherited from Grantlee, Grantlee's config location was not recognized by the heuristic and generated no usage text. KTextTemplate's recognized config now exposes a command that fails exactly as printed. The usage should link only KF6::TextTemplate.

I think it would be good to fix the usage before merging this, but otherwise I think this is ready to go.

Comment on lines +9 to +10
-set( KTextTemplate_INSTALL_PLUGINDIR ${KDE_INSTALL_PLUGINDIR}/kf6/ktexttemplate )
+set( KTextTemplate_INSTALL_PLUGINDIR bin )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI GPT 5.6 thinks this doesn't actually work

@BillyONeal
Billy O'Neal (BillyONeal) marked this pull request as draft August 30, 2026 19:55
@dg0yt

Copy link
Copy Markdown
Contributor

FTR we put Qt plugins into /plugins/<group>. With KF6 being based on Qt, shouldn't it align with that standard? And there is:
https://learn.microsoft.com/en-us/vcpkg/reference/installation-tree-layout#triplet-directories

@BillyONeal

Copy link
Copy Markdown
Member

FTR we put Qt plugins into /plugins/. With KF6 being based on Qt, shouldn't it align with that standard?

If the other kf6-whatever-actually-named-kwhatever entries are doing it we should, yes.

@JackBoosY

Copy link
Copy Markdown
Contributor Author

I'm so busy recently, forgive I paused this PR progress.

@JackBoosY

Copy link
Copy Markdown
Contributor Author
D:\a\_work\1\s\ports\ktexttemplate\portfile.cmake: warning: The following dlls were found in ${CURRENT_PACKAGES_DIR}/lib or ${CURRENT_PACKAGES_DIR}/debug/lib. Please move them to ${CURRENT_PACKAGES_DIR}/bin or ${CURRENT_PACKAGES_DIR}/debug/bin, respectively.
D:\p\ktexttemplate_x64-windows: note: the DLLs are relative to ${CURRENT_PACKAGES_DIR} here
note: debug/lib/plugins/kf6/ktexttemplate/ktexttemplate_defaultfiltersd.dll
note: debug/lib/plugins/kf6/ktexttemplate/ktexttemplate_defaulttagsd.dll
note: debug/lib/plugins/kf6/ktexttemplate/ktexttemplate_i18ntagsd.dll
note: debug/lib/plugins/kf6/ktexttemplate/ktexttemplate_loadertagsd.dll
note: debug/lib/plugins/kf6/ktexttemplate/ktexttemplate_scriptabletagsd.dll
note: lib/plugins/kf6/ktexttemplate/ktexttemplate_defaultfilters.dll
note: lib/plugins/kf6/ktexttemplate/ktexttemplate_defaulttags.dll
note: lib/plugins/kf6/ktexttemplate/ktexttemplate_i18ntags.dll
note: lib/plugins/kf6/ktexttemplate/ktexttemplate_loadertags.dll
note: lib/plugins/kf6/ktexttemplate/ktexttemplate_scriptabletags.dll

Okay so those dlls should be moved to debug/plugins or plugins.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

[grantlee] development is taken over by the KDE project under the new name KTextTemplate

3 participants