icu icon indicating copy to clipboard operation
icu copied to clipboard

ICU-22610 Use Requires.private and Libs.private

Open earlchew-aws opened this issue 1 year ago • 5 comments

To prevent overlinking when publishing shared libraries, specify internal dependencies using Requires.private and Libs.private.

Use Libs.private in icu-uc.pc for libicudata.so, and Requires.private in icu-i18n.pc, icu-io.pc, and icu-lx.pc, so that ICU internal dependencies will not be bound into clients.

The resulting *.pc files will produce the following output for icu-i18n and icu-lx, provided pkgconf has commit 78d53ea0 (2.2.0 or later) which de-duplicates multiple -L options:

commit 78d53ea012dfbaf397bf8e6907efac5b51abac56
Author: Kai Pastor <[email protected]>
Date:   Fri Feb 23 15:18:08 2024 +0100

    Revise serials, traversal, flattening

./configure --enable-shared ...

#
# icu-i18n
#

% pkgconf --libs  icu-i18n
-L/opt/local/lib -licui18n

% pkgconf --libs --static icu-i18n
-L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

#
# icu-lx
#

% pkgconf  --libs icu-lx
-L/opt/local/lib -liculx

% pkgconf  --libs --static icu-lx
-L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb -lharfbuzz -lm -licuuc -licudata -lpthread -lm

./configure --disable-shared --enable-static ...

#
# icu-i18n
#

% pkgconf --libs  icu-i18n
-L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

% pkgconf  --libs --static icu-i18n
-L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

#
# icu-lx
#

% pkgconf  --libs icu-lx
-L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb

% pkgconf  --libs --static icu-lx
-L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb -lharfbuzz -licuuc -licudata -lpthread -lm
Checklist
  • [x] Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22610
  • [x] Required: The PR title must be prefixed with a JIRA Issue number.
  • [x] Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • [x] Required: Each commit message must be prefixed with a JIRA Issue number.
  • [x] Issue accepted (done by Technical Committee after discussion)
  • [x] Tests included, if applicable
  • [ ] API docs and/or User Guide docs changed or added, if applicable

earlchew-aws avatar Apr 04 '24 21:04 earlchew-aws

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 04 '24 21:04 CLAassistant

Please sign the CLA using the CLA button. We need that signed and confirmed via the CLA Assistant checker before we can take a look.

echeran avatar Apr 18 '24 16:04 echeran

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@markusicu Mix up with CLA signing sorted out.

earlchew-aws avatar May 08 '24 14:05 earlchew-aws

@echeran @markusicu AFAICT CLA Assistant checker confirms the CLA.

earlchew-aws avatar May 14 '24 05:05 earlchew-aws

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot