From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/, media-libs/fontconfig/files/
Date: Wed, 14 Feb 2024 18:22:18 +0000 (UTC) [thread overview]
Message-ID: <1707934923.ade3abb3586f5cd46401afa207c323a5e7e38169.sam@gentoo> (raw)
commit: ade3abb3586f5cd46401afa207c323a5e7e38169
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 18:21:06 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 18:22:03 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ade3abb3
media-libs/fontconfig: fix -lm linkage for `fabs`
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/fontconfig-2.14.2-math-fabs.patch | 42 ++++++++++++++++++++++
media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild | 3 +-
media-libs/fontconfig/fontconfig-2.15.0.ebuild | 3 +-
3 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/media-libs/fontconfig/files/fontconfig-2.14.2-math-fabs.patch b/media-libs/fontconfig/files/fontconfig-2.14.2-math-fabs.patch
new file mode 100644
index 000000000000..669e4ebbd65f
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.14.2-math-fabs.patch
@@ -0,0 +1,42 @@
+https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/309
+
+From 81d410310ffee8761819e72151ec25efde2f5b24 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 14 Feb 2024 18:12:46 +0000
+Subject: [PATCH] meson: detect-and-use `-lm` for `fabs` in fcmatch
+
+We had a bug report in Gentoo of a sparc64 build failure with -O0:
+```
+FAILED: src/libfontconfig.so.1.13.0
+sparc64-unknown-linux-gnu-gcc -o src/libfontconfig.so.1.13.0 src/libfontconfig.so.1.13.0.p/fcatomic.c.o src/libfontconfig.so.1.13.0.p/fccache.c.o src/libfontconfig.so.1.13.0.p/fccfg.c.o src/libfontconfig.so.1.13.0.p/fccharset.c.o src/libfontconfig.so.1.13.0.p/fccompat.c.o src/libfontconfig.so.1.13.0.p/fcdbg.c.o src/libfontconfig.so.1.13.0.p/fcdefault.c.o src/libfontconfig.so.1.13.0.p/fcdir.c.o src/libfontconfig.so.1.13.0.p/fcformat.c.o src/libfontconfig.so.1.13.0.p/fcfreetype.c.o src/libfontconfig.so.1.13.0.p/fcfs.c.o src/libfontconfig.so.1.13.0.p/fcptrlist.c.o src/libfontconfig.so.1.13.0.p/fchash.c.o src/libfontconfig.so.1.13.0.p/fcinit.c.o src/libfontconfig.so.1.13.0.p/fclang.c.o src/libfontconfig.so.1.13.0.p/fclist.c.o src/libfontconfig.so.1.13.0.p/fcmatch.c.o src/libfontconfig.so.1.13.0.p/fcmatrix.c.o src/libfontconfig.so.1.13.0.p/fcname.c.o src/libfontconfig.so.1.13.0.p/fcobjs.c.o src/libfontconfig.so.1.13.0.p/fcpat.c.o src/libfontconfig.so.1.13.0.p/fcrange.c.o src/libfontconf
ig.so.1.13.0.p/fcserialize.c.o src/libfontconfig.so.1.13.0.p/fcstat.c.o src/libfontconfig.so.1.13.0.p/fcstr.c.o src/libfontconfig.so.1.13.0.p/fcweight.c.o src/libfontconfig.so.1.13.0.p/fcxml.c.o src/libfontconfig.so.1.13.0.p/ftglue.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libfontconfig.so.1 -m64 -g -O0 -mno-app-regs -mcpu=ultrasparc -mtune=ultrasparc -mno-vis -mno-vis2 -mno-vis3 -mno-vis4 -mno-vis4b -mno-cbcond -mno-fmaf -mno-fsmuld -mno-popc -mno-subxc -fno-builtin -fno-fast-math -Wl,-O1 -Wl,--as-needed -Wl,--no-keep-memory /usr/lib64/libfreetype.so /usr/lib64/libexpat.so -Wl,--end-group -pthread
+/usr/lib/gcc/sparc64-unknown-linux-gnu/12/../../../../sparc64-unknown-linux-gnu/bin/ld: src/libfontconfig.so.1.13.0.p/fcmatch.c.o: in function `FcCompareRange':
+/var/tmp/portage/media-libs/fontconfig-2.14.2-r3/work/fontconfig-2.14.2-.sparc64/../fontconfig-2.14.2/src/fcmatch.c:220: undefined reference to `fabs'
+```
+
+Ask Meson to detect `-lm` and add the missing `-lm` for `fabs` usage.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/meson.build
++++ b/meson.build
+@@ -23,7 +23,7 @@ freetype_req = '>= 21.0.15'
+ freetype_req_cmake = '>= 2.8.1'
+
+ cc = meson.get_compiler('c')
+-
++math_dep = cc.find_library('m', required: false)
+
+ freetype_dep = dependency('freetype2', method: 'pkg-config', version: freetype_req, required: false)
+
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -65,7 +65,7 @@ libfontconfig = library('fontconfig',
+ fc_sources, alias_headers, ft_alias_headers, fclang_h, fccase_h, fcobjshash_h,
+ c_args: c_args + fc_extra_c_args,
+ include_directories: incbase,
+- dependencies: deps,
++ dependencies: [deps, math_dep],
+ install: true,
+ soversion: soversion,
+ version: libversion,
+--
+GitLab
diff --git a/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild b/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild
index 2d4a41d85739..1f3f04e3cc61 100644
--- a/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild
+++ b/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -66,6 +66,7 @@ PATCHES=(
# Patches from upstream (can usually be removed with next version bump)
"${FILESDIR}"/${P}-fix-sysroot-fc-cache.patch
+ "${FILESDIR}"/${PN}-2.14.2-math-fabs.patch
)
DOC_CONTENTS="Please make fontconfig configuration changes using
diff --git a/media-libs/fontconfig/fontconfig-2.15.0.ebuild b/media-libs/fontconfig/fontconfig-2.15.0.ebuild
index 01f18ac3a8ab..87e30591256d 100644
--- a/media-libs/fontconfig/fontconfig-2.15.0.ebuild
+++ b/media-libs/fontconfig/fontconfig-2.15.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -65,6 +65,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.14.0-skip-bubblewrap-tests.patch
# Patches from upstream (can usually be removed with next version bump)
+ "${FILESDIR}"/${PN}-2.14.2-math-fabs.patch
)
DOC_CONTENTS="Please make fontconfig configuration changes using
next reply other threads:[~2024-02-14 18:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 18:22 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-29 22:38 [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/, media-libs/fontconfig/files/ Sam James
2024-10-08 16:06 Sam James
2023-12-01 0:11 Matt Turner
2022-10-27 4:48 Sam James
2022-04-02 3:07 Sam James
2021-01-13 13:18 Lars Wendler
2021-01-13 13:18 Lars Wendler
2018-09-19 8:06 Lars Wendler
2018-04-20 11:13 Lars Wendler
2018-03-14 12:33 Ulrich Müller
2017-09-23 22:51 Lars Wendler
2017-06-02 20:49 Lars Wendler
2016-04-10 17:27 Lars Wendler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1707934923.ade3abb3586f5cd46401afa207c323a5e7e38169.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox