summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-08-12 18:52:18 +0100
committerSam James <sam@gentoo.org>2022-08-12 19:16:24 +0100
commit6b958c3066d63c0aff06188e299454b7c3910390 (patch)
tree0167558a2ea0474c737fe4f3ab5d0b88b625e59a /sys-libs/slang/slang-2.3.3.ebuild
parentapp-shells/fzf: add 0.32.1 (diff)
downloadgentoo-6b958c3066d63c0aff06188e299454b7c3910390.tar.gz
gentoo-6b958c3066d63c0aff06188e299454b7c3910390.tar.bz2
gentoo-6b958c3066d63c0aff06188e299454b7c3910390.zip
sys-libs/slang: add 2.3.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/slang/slang-2.3.3.ebuild')
-rw-r--r--sys-libs/slang/slang-2.3.3.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/sys-libs/slang/slang-2.3.3.ebuild b/sys-libs/slang/slang-2.3.3.ebuild
new file mode 100644
index 000000000000..8332aeb6fc27
--- /dev/null
+++ b/sys-libs/slang/slang-2.3.3.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+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}"
+
+MAKEOPTS+=" -j1"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.3-slsh-libs.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
+
+ # 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 elf $(usex static-libs static '')
+ emake -C slsh slsh
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install $(usex 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
+}