Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2017 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=6 |
5 |
|
6 |
PYTHON_COMPAT=( python2_7 python3_4 python3_5 ) |
7 |
|
8 |
inherit python-r1 multilib autotools toolchain-funcs |
9 |
|
10 |
DESCRIPTION="Redhat's Newt windowing toolkit development files" |
11 |
HOMEPAGE="https://fedorahosted.org/newt/" |
12 |
SRC_URI="https://fedorahosted.org/releases/n/e/newt/${P}.tar.gz" |
13 |
|
14 |
LICENSE="LGPL-2" |
15 |
SLOT="0" |
16 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
17 |
IUSE="gpm tcl nls" |
18 |
|
19 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
20 |
|
21 |
RDEPEND="${PYTHON_DEPS} |
22 |
>=dev-libs/popt-1.6 |
23 |
=sys-libs/slang-2* |
24 |
elibc_uclibc? ( sys-libs/ncurses:0 ) |
25 |
gpm? ( sys-libs/gpm ) |
26 |
tcl? ( >=dev-lang/tcl-8.5:0 ) |
27 |
" |
28 |
DEPEND="${RDEPEND}" |
29 |
|
30 |
src_prepare() { |
31 |
# bug 73850 |
32 |
if use elibc_uclibc; then |
33 |
sed -i -e 's:-lslang:-lslang -lncurses:g' Makefile.in || die |
34 |
fi |
35 |
|
36 |
sed -i Makefile.in \ |
37 |
-e 's|$(SHCFLAGS) -o|$(LDFLAGS) &|g' \ |
38 |
-e 's|-g -o|$(CFLAGS) $(LDFLAGS) -o|g' \ |
39 |
-e 's|-shared -o|$(CFLAGS) $(LDFLAGS) &|g' \ |
40 |
-e 's|instroot|DESTDIR|g' \ |
41 |
-e 's| make | $(MAKE) |g' \ |
42 |
-e "s| ar | $(tc-getAR) |g" \ |
43 |
|| die "sed Makefile.in" |
44 |
|
45 |
local langs="" |
46 |
if [ -n "${LINGUAS}" ]; then |
47 |
for lang in ${LINGUAS}; do |
48 |
test -r po/${lang}.po && langs="${langs} ${lang}.po" |
49 |
done |
50 |
sed -i po/Makefile \ |
51 |
-e "/^CATALOGS = /cCATALOGS = ${langs}" \ |
52 |
|| die "sed po/Makefile" |
53 |
fi |
54 |
|
55 |
eapply "${FILESDIR}"/${PN}-0.52.13-gold.patch \ |
56 |
"${FILESDIR}"/${PN}-0.52.14-tcl.patch \ |
57 |
"${FILESDIR}"/${PN}-0.52.15-makefile.patch |
58 |
eapply_user |
59 |
eautoreconf |
60 |
} |
61 |
|
62 |
src_configure() { |
63 |
econf \ |
64 |
PYTHONVERS="${PYTHON}" \ |
65 |
$(use_with gpm gpm-support) \ |
66 |
$(use_with tcl) \ |
67 |
$(use_enable nls) |
68 |
} |
69 |
|
70 |
src_compile() { |
71 |
building() { |
72 |
emake PYTHONVERS="${EPYTHON}" |
73 |
} |
74 |
python_foreach_impl building |
75 |
} |
76 |
|
77 |
src_install() { |
78 |
installit() { |
79 |
emake \ |
80 |
DESTDIR="${D}" \ |
81 |
PYTHONVERS="${EPYTHON}" \ |
82 |
install |
83 |
python_optimize |
84 |
} |
85 |
python_foreach_impl installit |
86 |
dodoc peanuts.py popcorn.py tutorial.sgml |
87 |
doman whiptail.1 |
88 |
} |