From c929acd0831aa3e50729a4af6516fc94f779d3ce Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 11 May 2025 02:28:13 -0400 Subject: [PATCH] media-libs/libcdr: make sure elibtoolize is applied ... and not just when building live. Needed to e.g. pass LTO warning flags through to the linker. Also needed to pass through --as-needed correctly to the linker, which has the practical effect of pruning a link to some unused lcms plugins. lcms provides its plugins in the main .pc file by design to "simplify usage", if configuring to build the plugin at all, and expects --as-needed to strip those out if you don't call `cmsPlugin`. But that relies on libtool doing its job... (We unconditionally package the plugins, so this is just an optimization.) Signed-off-by: Eli Schwartz --- media-libs/libcdr/libcdr-0.1.8.ebuild | 7 ++++++- media-libs/libcdr/libcdr-9999.ebuild | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/media-libs/libcdr/libcdr-0.1.8.ebuild b/media-libs/libcdr/libcdr-0.1.8.ebuild index dc4381008e73f..2060cf7cef6e8 100644 --- a/media-libs/libcdr/libcdr-0.1.8.ebuild +++ b/media-libs/libcdr/libcdr-0.1.8.ebuild @@ -9,6 +9,7 @@ if [[ ${PV} == *9999* ]]; then else SRC_URI="https://dev-www.libreoffice.org/src/libcdr/${P}.tar.xz" KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86" + inherit libtool fi DESCRIPTION="Library parsing the Corel cdr documents" @@ -39,7 +40,11 @@ BDEPEND=" src_prepare() { default [[ -d m4 ]] || mkdir "m4" - [[ ${PV} == *9999* ]] && eautoreconf + if [[ ${PV} == *9999* ]]; then + eautoreconf + else + elibtoolize + fi } src_configure() { diff --git a/media-libs/libcdr/libcdr-9999.ebuild b/media-libs/libcdr/libcdr-9999.ebuild index c12b0b13e2e6a..8ee60ab5a5df2 100644 --- a/media-libs/libcdr/libcdr-9999.ebuild +++ b/media-libs/libcdr/libcdr-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -9,6 +9,7 @@ if [[ ${PV} == *9999* ]]; then else SRC_URI="https://dev-www.libreoffice.org/src/libcdr/${P}.tar.xz" KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + inherit libtool fi DESCRIPTION="Library parsing the Corel cdr documents" @@ -39,7 +40,11 @@ BDEPEND=" src_prepare() { default [[ -d m4 ]] || mkdir "m4" - [[ ${PV} == *9999* ]] && eautoreconf + if [[ ${PV} == *9999* ]]; then + eautoreconf + else + elibtoolize + fi } src_configure() {