2015-03-03 15:02:00 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2013-05-04 14:36:00 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-10 23:59:40 +03:00
|
|
|
# $Id$
|
2013-05-04 14:36:00 +04:00
|
|
|
|
|
|
|
EAPI="5"
|
2013-05-30 12:56:05 +04:00
|
|
|
|
2015-04-09 09:06:51 +03:00
|
|
|
PYTHON_COMPAT=( python2_7 )
|
2013-05-04 14:36:00 +04:00
|
|
|
|
2014-03-05 09:15:24 +04:00
|
|
|
inherit python-r1 eutils multilib autotools toolchain-funcs
|
2013-05-04 14:36:00 +04:00
|
|
|
|
|
|
|
DESCRIPTION="Redhat's Newt windowing toolkit development files"
|
|
|
|
HOMEPAGE="https://fedorahosted.org/newt/"
|
|
|
|
SRC_URI="https://fedorahosted.org/releases/n/e/newt/${P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="LGPL-2"
|
|
|
|
SLOT="0"
|
2015-03-03 15:02:00 +03:00
|
|
|
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
|
2013-05-04 14:36:00 +04:00
|
|
|
IUSE="gpm tcl nls"
|
|
|
|
|
2013-05-30 12:56:05 +04:00
|
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
|
|
|
2013-07-01 01:16:55 +04:00
|
|
|
RDEPEND="${PYTHON_DEPS}
|
2013-05-04 14:36:00 +04:00
|
|
|
>=dev-libs/popt-1.6
|
2013-05-30 12:56:05 +04:00
|
|
|
=sys-libs/slang-2*
|
2013-05-04 14:36:00 +04:00
|
|
|
elibc_uclibc? ( sys-libs/ncurses )
|
|
|
|
gpm? ( sys-libs/gpm )
|
2015-03-21 00:03:17 +03:00
|
|
|
tcl? ( >=dev-lang/tcl-8.5:0 )
|
2013-05-04 14:36:00 +04:00
|
|
|
"
|
2013-07-01 01:16:55 +04:00
|
|
|
DEPEND="${RDEPEND}"
|
2013-05-04 14:36:00 +04:00
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
# bug 73850
|
|
|
|
if use elibc_uclibc; then
|
|
|
|
sed -i -e 's:-lslang:-lslang -lncurses:g' Makefile.in || die
|
|
|
|
fi
|
|
|
|
|
|
|
|
sed -i Makefile.in \
|
|
|
|
-e 's|-ltcl8.4|-ltcl|g' \
|
|
|
|
-e 's|$(SHCFLAGS) -o|$(LDFLAGS) &|g' \
|
|
|
|
-e 's|-g -o|$(CFLAGS) $(LDFLAGS) -o|g' \
|
|
|
|
-e 's|-shared -o|$(CFLAGS) $(LDFLAGS) &|g' \
|
|
|
|
-e 's|instroot|DESTDIR|g' \
|
|
|
|
-e 's| make | $(MAKE) |g' \
|
2013-10-03 19:15:01 +04:00
|
|
|
-e "s| ar | $(tc-getAR) |g" \
|
2013-05-04 14:36:00 +04:00
|
|
|
|| die "sed Makefile.in"
|
|
|
|
|
|
|
|
local langs=""
|
|
|
|
if [ -n "${LINGUAS}" ]; then
|
|
|
|
for lang in ${LINGUAS}; do
|
|
|
|
test -r po/${lang}.po && langs="${langs} ${lang}.po"
|
|
|
|
done
|
|
|
|
sed -i po/Makefile \
|
|
|
|
-e "/^CATALOGS = /cCATALOGS = ${langs}" \
|
|
|
|
|| die "sed po/Makefile"
|
|
|
|
fi
|
|
|
|
|
|
|
|
epatch "${FILESDIR}"/${PN}-0.52.13-gold.patch \
|
|
|
|
"${FILESDIR}"/${PN}-0.52.15-snack.patch \
|
2015-06-30 08:57:47 +03:00
|
|
|
"${FILESDIR}"/${PN}-0.52.14-tcl.patch \
|
|
|
|
"${FILESDIR}"/${PN}-0.52.15-makefile.patch
|
2013-05-04 14:36:00 +04:00
|
|
|
eautoreconf
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
econf \
|
2014-03-05 09:15:24 +04:00
|
|
|
PYTHONVERS="${PYTHON}" \
|
2013-05-04 14:36:00 +04:00
|
|
|
$(use_with gpm gpm-support) \
|
|
|
|
$(use_with tcl) \
|
|
|
|
$(use_enable nls)
|
|
|
|
}
|
|
|
|
|
2014-03-05 09:15:24 +04:00
|
|
|
src_compile() {
|
|
|
|
building() {
|
|
|
|
emake PYTHONVERS="${EPYTHON}"
|
|
|
|
}
|
|
|
|
python_foreach_impl building
|
2013-05-04 14:36:00 +04:00
|
|
|
}
|
|
|
|
|
2014-03-05 09:15:24 +04:00
|
|
|
src_install() {
|
|
|
|
installit() {
|
|
|
|
emake \
|
|
|
|
DESTDIR="${D}" \
|
|
|
|
PYTHONVERS="${EPYTHON}" \
|
|
|
|
install
|
|
|
|
python_optimize
|
|
|
|
}
|
|
|
|
python_foreach_impl installit
|
2013-05-04 14:36:00 +04:00
|
|
|
dodoc peanuts.py popcorn.py tutorial.sgml
|
|
|
|
doman whiptail.1
|
|
|
|
}
|