pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/59510: Wine's sfnt2font doesn't run due to broken `pkg-config --libs freetype2` output.



>Number:         59510
>Category:       pkg
>Synopsis:       Wine's sfnt2font doesn't run due to broken `pkg-config --libs freetype2` output.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 05 05:20:00 +0000 2025
>Originator:     Akihiro Sagawa
>Release:        NetBSD 10.1
>Organization:
>Environment:
NetBSD lihua.local 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
sfnt2font is a font file converter in Wine source tree.
It doesn't run as follows:
% ./sfnt2font
./sfnt2font: Shared object "libfreetype.so.6" not found

>From my point of view, `pkg-config --libs freetype2` output doesn't contain `-Wl,-R/usr/pkg/lib` option. As a result, the executable doesn't run.
>How-To-Repeat:
# pkgin -y in pkg-config freetype2
% pkg-config --libs freetype2
-L/usr/pkg/lib -lfreetype

Here is how to make and run sfnt2font:
# pkgin -y in bison
% ftp https://dl.winehq.org/wine/source/10.x/wine-10.11.tar.xz
% tar -xf ./wine-10.11.tar.xz
% cd wine-10.11
% ./configure --enable-win64
% make tools/sfnt2font/sfnt2fon
% cd tools/sfnt2font
% ./sfnt2font
>Fix:
PKGCONFIG_OVERRIDE usage is inappropriate. It tries to override 'Libs:' line before replacing %PKGCONFIG_LIBS%.

Here is the patch I propose to fix the issue:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/freetype2/Makefile,v
retrieving revision 1.136
diff -u -r1.136 Makefile
--- Makefile	18 Aug 2024 19:54:53 -0000	1.136
+++ Makefile	4 Jul 2025 14:26:55 -0000
@@ -29,7 +29,8 @@
 LDFLAGS+=	-framework Carbon
 .endif
 
-PKGCONFIG_OVERRIDE=	builds/unix/freetype2.in
+PKGCONFIG_OVERRIDE=	builds/unix/freetype2.pc
+PKGCONFIG_OVERRIDE_STAGE=	post-build
 
 .include "../../mk/bsd.prefs.mk"
 .include "../../mk/compiler.mk"


Home | Main Index | Thread Index | Old Index