commit: 516d922e0fad74c63340e814c00ae511f7ea37aa Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Sep 14 07:32:41 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Sep 14 07:33:01 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=516d922e
sys-libs/slang: fix --Wl,--dynamic-linker typo Signed-off-by: Sam James <sam <AT> gentoo.org> sys-libs/slang/files/slang-2.3.3-ld-typo.patch | 45 +++++++++++++ sys-libs/slang/slang-2.3.3-r2.ebuild | 89 ++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/sys-libs/slang/files/slang-2.3.3-ld-typo.patch b/sys-libs/slang/files/slang-2.3.3-ld-typo.patch new file mode 100644 index 000000000000..9f2a67c0ac2c --- /dev/null +++ b/sys-libs/slang/files/slang-2.3.3-ld-typo.patch @@ -0,0 +1,45 @@ +Sent upstream by email. + +Subject: [PATCH] Fix -Wl,--export-dynamic typo +Date: Sun, 14 Sep 2025 08:24:48 +0100 +Message-ID: <743ab0056b4284bca1415fffe8cba323efeb8084.1757834688.git....@gentoo.org> +--- a/autoconf/aclocal.m4 ++++ b/autoconf/aclocal.m4 +@@ -617,7 +617,7 @@ M_LIB="-lm" + + case "$host_os" in + *linux*|*gnu*|k*bsd*-gnu ) +- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic" ++ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic" + ELF_CC="\$(CC)" + ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC" + ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)" +@@ -739,7 +739,7 @@ case "$host_os" in + ;; + *haiku* ) + M_LIB="" +- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic" ++ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic" + ELF_CC="\$(CC)" + ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC" + ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)" +--- a/configure ++++ b/configure +@@ -6060,7 +6060,7 @@ M_LIB="-lm" + + case "$host_os" in + *linux*|*gnu*|k*bsd*-gnu ) +- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic" ++ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic" + ELF_CC="\$(CC)" + ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC" + ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)" +@@ -6181,7 +6181,7 @@ case "$host_os" in + ;; + *haiku* ) + M_LIB="" +- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic" ++ DYNAMIC_LINK_FLAGS="-Wl,--export-dynamic" + ELF_CC="\$(CC)" + ELF_CFLAGS="\$(CFLAGS) \$(CPPFLAGS) -fPIC" + ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)" diff --git a/sys-libs/slang/slang-2.3.3-r2.ebuild b/sys-libs/slang/slang-2.3.3-r2.ebuild new file mode 100644 index 000000000000..00d1be43a17c --- /dev/null +++ b/sys-libs/slang/slang-2.3.3-r2.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal + +DESCRIPTION="Multi-platform library designed to allow a developer to create robust software" +HOMEPAGE="https://www.jedsoft.org/slang/" + +if [[ ${PV} == *_pre* ]] ; then + MY_P="${PN}-pre${PV/_pre/-}" + SRC_URI="https://www.jedsoft.org/snapshots/${MY_P}.tar.gz" + S="${WORKDIR}/${MY_P}" +else + SRC_URI=" + https://www.jedsoft.org/releases/${PN}/${P}.tar.bz2 + https://www.jedsoft.org/releases/${PN}/old/${P}.tar.bz2 + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="cjk pcre png readline static-libs zlib" + +# ncurses for ncurses5-config to get terminfo directory +RDEPEND=" + sys-libs/ncurses:= + cjk? ( >=dev-libs/oniguruma-5.9.5:=[${MULTILIB_USEDEP}] ) + pcre? ( >=dev-libs/libpcre-8.33-r1[${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.6.10:=[${MULTILIB_USEDEP}] ) + readline? ( >=sys-libs/readline-6.2_p5-r1:=[${MULTILIB_USEDEP}] ) + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.3-slsh-libs.patch + "${FILESDIR}"/${PN}-2.3.3-remove-undefined-symbol-from-version-script.patch + "${FILESDIR}"/${PN}-2.3.3-ld-typo.patch +) + +src_prepare() { + default + + # Avoid linking to -ltermcap race with some systems + sed -i -e '/^TERMCAP=/s:=.*:=:' configure || die + # We use the GNU linker also on Solaris + sed -i -e 's/-G -fPIC/-shared -fPIC/g' \ + -e 's/-Wl,-h,/-Wl,-soname,/g' configure || die + + # Loads of blatant aliasing violations, bug #880589 + append-flags -fno-strict-aliasing + filter-lto + + # slang does not support configuration from another dir + multilib_copy_sources +} + +multilib_src_configure() { + local myeconfargs=( + --with-readline=$(usex readline gnu slang) + $(use_with pcre) + $(use_with cjk onig) + $(use_with png) + $(use_with zlib z) + ) + + econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake -j1 elf $(usev static-libs static) + emake -j1 -C slsh slsh +} + +multilib_src_install() { + emake -j1 DESTDIR="${D}" install $(usev static-libs install-static) +} + +multilib_src_install_all() { + rm -r "${ED}"/usr/share/doc/{slang,slsh} || die + + local -a DOCS=( NEWS README *.txt doc/{,internal,text}/*.txt ) + local -a HTML_DOCS=( doc/slangdoc.html slsh/doc/html/*.html ) + + einstalldocs +}
