Bug 269846 - dns/c-ares: add option to build a static library
Summary: dns/c-ares: add option to build a static library
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 08:51 UTC by Dima Panov
Modified: 2024-04-06 14:19 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments
dns/c-ares: add option to build a static library (6.28 KB, application/mbox)
2023-02-27 08:51 UTC, Dima Panov
no flags Details
dns/c-ares: add option to build a static library (6.29 KB, patch)
2023-02-27 09:32 UTC, Dima Panov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Panov freebsd_committer freebsd_triage 2023-02-27 08:51:57 UTC
Created attachment 240438 [details]
dns/c-ares: add option to build a static library
Comment 1 Dima Panov freebsd_committer freebsd_triage 2023-02-27 09:32:04 UTC
Created attachment 240439 [details]
dns/c-ares: add option to build a static library

Oops, regen patch, forgot about OPTIONS_SUB

Prepared for 'git am'
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2023-02-27 12:50:16 UTC
Thanks!  Quick questions:
- Why the symlink?
- Are you OK with leaving this off by default, to match existing functionality?
Comment 3 Dima Panov freebsd_committer freebsd_triage 2023-02-27 18:46:02 UTC
(In reply to Ryan Steinmetz from comment #2)
I'm porting some commercial stuff which require static library with canonical name to use with engine under hood of electron UI, this is was reason to make in on by default and use symlink to get a proper name.


Sadly, cmake is not allowing same name for shared and static lib here due to link namespaces pollution and thus installs static as suffixed.

Howhever, I'll left decision to make it on or off to you, as always have a choice to get own package repo with options set :)
Comment 4 Ryan Steinmetz freebsd_committer freebsd_triage 2023-02-28 20:01:56 UTC
Are you ok with building the static library by default but leaving the symlink option out of the port?

I don't have a strong opinion on the symlink, but it sort of feels like the symlink shouldn't be there?
Comment 5 Dima Panov freebsd_committer freebsd_triage 2023-02-28 20:15:18 UTC
(In reply to Ryan Steinmetz from comment #4)
Here is some confusing settings. 
If c-ares builds only with static library, it always installs it with canonical name libcares.a. 
But if we request to build both shared and static, it rename static lib with suffix which is not expected by consumers. 
This was a reason to introduce symlink. Another way is rename at post-install stage.
Comment 6 Ryan Steinmetz freebsd_committer freebsd_triage 2023-03-03 00:24:16 UTC
Ah, thanks for the info.  Can you think of any risks of just adding both by default?
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2024-04-06 14:19:58 UTC
Closing this as it's added as of https://cgit.freebsd.org/ports/commit/?id=a15a6fa3a1d4f9b9a869e90bd6e3dc94cb9414ac