dev-libs/cdk: fix handling of -lcdk or -lcdkw

lib name is depend on USE flag 'unicode', but for unknown reason,
upstream remove XLIB in release 5.0.20240619 (always -lcdk instead
of -lcdkw if unicode is enabled), which cause link failed if
USE="unicode".

Closes: https://bugs.gentoo.org/831226
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39795
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Z. Liu
2024-12-20 22:36:48 +08:00
committed by Sam James
parent ffc6daa556
commit 723ef79cdb
3 changed files with 40 additions and 1 deletions

View File

@@ -26,6 +26,10 @@ BDEPEND="
verify-sig? ( sec-keys/openpgp-keys-thomasdickey )
"
PATCHES=(
"${FILESDIR}/${PN}-5.0.20240619-xlib.patch"
)
src_configure() {
if [[ ${CHOST} == *-*-darwin* ]] ; then
export ac_cv_prog_LIBTOOL=glibtool

View File

@@ -0,0 +1,28 @@
https://bugs.gentoo.org/831226
lib name is depend on USE flag 'unicode', but for unknown reason,
upstream remove XLIB in release 5.0.20240619 (always -lcdk instead
of -lcdkw if unicode is enabled), which cause link failed if
USE="unicode".
diff --git a/cdk-config.in b/cdk-config.in
index 19b2972..aa0b2c8 100644
--- a/cdk-config.in
+++ b/cdk-config.in
@@ -41,6 +41,7 @@ same_prefix=yes
same_exec_prefix=yes
THIS="@PACKAGE@"
+XLIB="@LIB_ROOTNAME@"
[ $# = 0 ] && exec @SHELL@ "$0" --error
@@ -66,7 +67,7 @@ while [ $# -gt 0 ]; do
eval LDFLAGS='"@LDFLAGS@"'
eval LIBS='"@LIBS@"'
- LIBS="-l${THIS} $LIBS"
+ LIBS="-l${XLIB} $LIBS"
# If the directory given by --libdir is not in the LDFLAGS+LIBS set,
# prepend it to LDFLAGS to help link this application's library.

View File

@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person" proxied="yes">
<email>zhixu.liu@gmail.com</email>
<name>Z. Liu</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<changelog>https://dickey.his.com/cdk/CHANGES.html</changelog>
<remote-id type="github">ThomasDickey/cdk-snapshots</remote-id>