Skip to content

chore: support building libstrophe as a subproject#2141

Merged
jubalh merged 1 commit intoprofanity-im:masterfrom
paulfertser:allow_libstrophe_as_subproject
Apr 2, 2026
Merged

chore: support building libstrophe as a subproject#2141
jubalh merged 1 commit intoprofanity-im:masterfrom
paulfertser:allow_libstrophe_as_subproject

Conversation

@paulfertser
Copy link
Copy Markdown
Contributor

When pkg-config doesn't find usable libstrophe this will download and build it automatically.

@paulfertser paulfertser force-pushed the allow_libstrophe_as_subproject branch from 45ebd0f to 9e55deb Compare April 1, 2026 14:11
@sjaeckel
Copy link
Copy Markdown
Member

sjaeckel commented Apr 1, 2026

Huge 👎 from me on this.

Only because one can do something doesn't necessarily mean it's a good idea.

Next step would then be if there's no compiler you download the GCC sources and build that one?

@paulfertser
Copy link
Copy Markdown
Contributor Author

Yes, I'm not sure. You have automatic dependency resolution and installation for binary packages in most GNU/Linux distros.
Here I feel like it might be nicer for development when everything is self-contained, kind of like maintenance-free git submodules, and you can go and build right away with whatever changes in one copy and with different changes in another copy and not worry about setting PKG_CONFIG_PATH manually or polluting your /usr/local etc, and run directly from this build dir and remove it all in one go when done.

@jubalh
Copy link
Copy Markdown
Member

jubalh commented Apr 1, 2026

I like the change.
Because libstrophe and Profanity are so tightly connected.

Sometimes it happens that we need a change on libstrophe. Usually then jaeckel implemented in there.
With this change it would be very easy for people to test it without the need to learn how to setup libstrophe git independently on their system.

We have had this a couple of times in the past, probably the issues are tagged depends-on-libstrophe.

So we get a new feature request/bug -> it needs a change in libstrophe -> change is implemented there but only on master -> people can use this feature to build profanity with latest git libstrophe -> people can easily test and give feedback/use the new feature.

What I'm unsure about is the When pkg-config doesn't find usable libstrophe part.
Like this it really can be confusing that people might just have forgotten to install libstrophe on their system via the package manager and by accident use libstrophe git.
Also developers who have libstrophe installed can't decide "I want to test with libstrophe git now" without uninstalling their system libstrophe first.

So I think I would prefer to have this via a switch?
What do you guys think?

Allow building the latest libstrophe from upstream Git automatically when
-Dforce_fallback_for=libstrophe is passed.

Default to find and link against system-provided libstrophe stays the same.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
@paulfertser paulfertser force-pushed the allow_libstrophe_as_subproject branch from 9e55deb to 5670ccb Compare April 2, 2026 10:07
@jubalh jubalh merged commit 37463c0 into profanity-im:master Apr 2, 2026
9 checks passed
@jubalh jubalh added this to the 0.18.0 milestone Apr 2, 2026
@jubalh jubalh assigned jubalh and paulfertser and unassigned jubalh Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants