1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
8 inherit autotools python-r1 toolchain-funcs
10 DESCRIPTION="Redhat's Newt windowing toolkit development files"
11 HOMEPAGE="https://pagure.io/newt"
12 SRC_URI="https://releases.pagure.org/newt/${P}.tar.gz"
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
26 elibc_uclibc? ( sys-libs/ncurses:0= )
28 tcl? ( >=dev-lang/tcl-8.5:0 )
34 if use elibc_uclibc; then
35 sed -i -e 's:-lslang:-lslang -lncurses:g' Makefile.in || die
39 -e 's|$(SHCFLAGS) -o|$(LDFLAGS) &|g' \
40 -e 's|-g -o|$(CFLAGS) $(LDFLAGS) -o|g' \
41 -e 's|-shared -o|$(CFLAGS) $(LDFLAGS) &|g' \
42 -e 's|instroot|DESTDIR|g' \
43 -e 's| make | $(MAKE) |g' \
44 -e "s| ar | $(tc-getAR) |g" \
45 || die "sed Makefile.in"
47 if [[ -n ${LINGUAS} ]]; then
49 for lang in ${LINGUAS}; do
50 test -r po/${lang}.po && langs="${langs} ${lang}.po"
53 -e "/^CATALOGS = /cCATALOGS = ${langs}" \
54 || die "sed po/Makefile"
58 "${FILESDIR}"/${PN}-0.52.13-gold.patch \
59 "${FILESDIR}"/${PN}-0.52.14-tcl.patch \
60 "${FILESDIR}"/${PN}-0.52.21-python-sitedir.patch
64 # can't build out-of-source
71 PYTHONVERS="${PYTHON}" \
72 $(use_with gpm gpm-support) \
76 python_foreach_impl run_in_build_dir configuring
81 emake PYTHONVERS="${EPYTHON}"
83 python_foreach_impl run_in_build_dir building
88 python_export PYTHON_SITEDIR
91 PYTHONVERS="${EPYTHON}" \
95 python_foreach_impl run_in_build_dir installit
96 dodoc peanuts.py popcorn.py tutorial.sgml
100 # don't want static archives
101 rm "${ED}"/usr/$(get_libdir)/libnewt.a || die