1From 40ec04a8bf36dd8d0aa3da98b167792ce2dcd114 Mon Sep 17 00:00:00 2001
2From: Silvan Scherrer <silvan.scherrer@aroa.ch>
3Date: Sun, 20 Sep 2020 12:52:08 +0200
4Subject: [PATCH] add pthread as a dependency of a static lib
5
6Downloaded from https://trac.netlabs.org/ports/changeset/2220
7
8Patch sent upstream:
9https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/121
10
11Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
12---
13 configure.ac     | 2 ++
14 fontconfig.pc.in | 4 ++--
15 2 files changed, 4 insertions(+), 2 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index f3189a7..594d6fd 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -690,6 +690,8 @@ fi
22 have_pthread=false
23 if test "$os_win32" = no; then
24 	AX_PTHREAD([have_pthread=true])
25+	AC_SUBST(PTHREAD_CFLAGS)
26+	AC_SUBST(PTHREAD_LIBS)
27 fi
28 if $have_pthread; then
29 	LIBS="$PTHREAD_LIBS $LIBS"
30diff --git a/fontconfig.pc.in b/fontconfig.pc.in
31index 61b35fb..f823bac 100644
32--- a/fontconfig.pc.in
33+++ b/fontconfig.pc.in
34@@ -14,5 +14,5 @@ Version: @VERSION@
35 Requires: @PKGCONFIG_REQUIRES@
36 Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@
37 Libs: -L${libdir} -lfontconfig
38-Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@
39-Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@
40+Libs.private: @ICONV_LIBS@ @PKG_EXPAT_LIBS@ @PTHREAD_LIBS@
41+Cflags: -I${includedir} @ICONV_CFLAGS@ @PKG_EXPAT_CFLAGS@ @PTHREAD_CFLAGS@
42--
432.27.0
44
45