Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/newt/files/, dev-libs/newt/
Date: Sat, 14 Dec 2019 13:03:35
Message-Id: 1576328595.642f9f19fac3771ff46a7eddbc540d4381a7564c.soap@gentoo
1 commit: 642f9f19fac3771ff46a7eddbc540d4381a7564c
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 14 13:03:15 2019 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 14 13:03:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=642f9f19
7
8 dev-libs/newt: Add py3.7 and 3.8
9
10 * Use the python sitedir, not just $(libdir), as the python
11 sitedir is not guaranteed to be nested in $(libdir).
12
13 Closes: https://bugs.gentoo.org/702436
14 Closes: https://github.com/gentoo/gentoo/pull/13980
15 Package-Manager: Portage-2.3.81, Repoman-2.3.20
16 Signed-off-by: David Seifert <soap <AT> gentoo.org>
17
18 .../newt/files/newt-0.52.21-python-sitedir.patch | 18 ++++
19 dev-libs/newt/newt-0.52.21-r1.ebuild | 100 +++++++++++++++++++++
20 2 files changed, 118 insertions(+)
21
22 diff --git a/dev-libs/newt/files/newt-0.52.21-python-sitedir.patch b/dev-libs/newt/files/newt-0.52.21-python-sitedir.patch
23 new file mode 100644
24 index 00000000000..6b535b683cd
25 --- /dev/null
26 +++ b/dev-libs/newt/files/newt-0.52.21-python-sitedir.patch
27 @@ -0,0 +1,18 @@
28 +It is not specified whether the python sitedir is located within the native
29 +ABI's $libdir folder. This breaks Gentoo's py3.7 and 3.8 installations.
30 +
31 +--- a/Makefile.in
32 ++++ b/Makefile.in
33 +@@ -154,9 +154,9 @@
34 + ln -sf $(LIBNEWTSH) $(DESTDIR)/$(libdir)/$(LIBNEWTSONAME)
35 + [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.$(SOEXT) $(DESTDIR)/$(libdir) || :
36 + [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
37 +- [ -d $(DESTDIR)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(DESTDIR)/$(libdir)/$$ver/site-packages ;\
38 +- install -m 755 $$ver/_snack.$(SOEXT) $(DESTDIR)/$(libdir)/$$ver/site-packages ;\
39 +- install -m 644 snack.py $(DESTDIR)/$(libdir)/$$ver/site-packages ;\
40 ++ [ -d $(DESTDIR)/$(PYTHON_SITEDIR) ] || install -m 755 -d $(DESTDIR)/$(PYTHON_SITEDIR) ;\
41 ++ install -m 755 $$ver/_snack.$(SOEXT) $(DESTDIR)/$(PYTHON_SITEDIR) ;\
42 ++ install -m 644 snack.py $(DESTDIR)/$(PYTHON_SITEDIR) ;\
43 + done || :
44 +
45 + Makefile: configure.ac
46
47 diff --git a/dev-libs/newt/newt-0.52.21-r1.ebuild b/dev-libs/newt/newt-0.52.21-r1.ebuild
48 new file mode 100644
49 index 00000000000..a7c6a11c04d
50 --- /dev/null
51 +++ b/dev-libs/newt/newt-0.52.21-r1.ebuild
52 @@ -0,0 +1,100 @@
53 +# Copyright 1999-2019 Gentoo Authors
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=7
57 +
58 +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} )
59 +
60 +inherit autotools python-r1 toolchain-funcs
61 +
62 +DESCRIPTION="Redhat's Newt windowing toolkit development files"
63 +HOMEPAGE="https://pagure.io/newt"
64 +SRC_URI="https://releases.pagure.org/newt/${P}.tar.gz"
65 +
66 +LICENSE="LGPL-2"
67 +SLOT="0"
68 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
69 +IUSE="gpm nls tcl"
70 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
71 +
72 +RDEPEND="
73 + ${PYTHON_DEPS}
74 + >=dev-libs/popt-1.6
75 + =sys-libs/slang-2*
76 + elibc_uclibc? ( sys-libs/ncurses:0= )
77 + gpm? ( sys-libs/gpm )
78 + tcl? ( >=dev-lang/tcl-8.5:0 )
79 + "
80 +DEPEND="${RDEPEND}"
81 +
82 +src_prepare() {
83 + # bug 73850
84 + if use elibc_uclibc; then
85 + sed -i -e 's:-lslang:-lslang -lncurses:g' Makefile.in || die
86 + fi
87 +
88 + sed -i Makefile.in \
89 + -e 's|$(SHCFLAGS) -o|$(LDFLAGS) &|g' \
90 + -e 's|-g -o|$(CFLAGS) $(LDFLAGS) -o|g' \
91 + -e 's|-shared -o|$(CFLAGS) $(LDFLAGS) &|g' \
92 + -e 's|instroot|DESTDIR|g' \
93 + -e 's| make | $(MAKE) |g' \
94 + -e "s| ar | $(tc-getAR) |g" \
95 + || die "sed Makefile.in"
96 +
97 + if [[ -n ${LINGUAS} ]]; then
98 + local lang langs
99 + for lang in ${LINGUAS}; do
100 + test -r po/${lang}.po && langs="${langs} ${lang}.po"
101 + done
102 + sed -i po/Makefile \
103 + -e "/^CATALOGS = /cCATALOGS = ${langs}" \
104 + || die "sed po/Makefile"
105 + fi
106 +
107 + eapply \
108 + "${FILESDIR}"/${PN}-0.52.13-gold.patch \
109 + "${FILESDIR}"/${PN}-0.52.14-tcl.patch \
110 + "${FILESDIR}"/${PN}-0.52.21-python-sitedir.patch
111 + eapply_user
112 + eautoreconf
113 +
114 + # can't build out-of-source
115 + python_copy_sources
116 +}
117 +
118 +src_configure() {
119 + configuring() {
120 + econf \
121 + PYTHONVERS="${PYTHON}" \
122 + $(use_with gpm gpm-support) \
123 + $(use_with tcl) \
124 + $(use_enable nls)
125 + }
126 + python_foreach_impl run_in_build_dir configuring
127 +}
128 +
129 +src_compile() {
130 + building() {
131 + emake PYTHONVERS="${EPYTHON}"
132 + }
133 + python_foreach_impl run_in_build_dir building
134 +}
135 +
136 +src_install() {
137 + installit() {
138 + python_export PYTHON_SITEDIR
139 + emake \
140 + DESTDIR="${D}" \
141 + PYTHONVERS="${EPYTHON}" \
142 + install
143 + python_optimize
144 + }
145 + python_foreach_impl run_in_build_dir installit
146 + dodoc peanuts.py popcorn.py tutorial.sgml
147 + doman whiptail.1
148 + einstalldocs
149 +
150 + # don't want static archives
151 + rm "${ED}"/usr/$(get_libdir)/libnewt.a || die
152 +}