summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2022-02-23 10:21:25 -0600
committerBen Kohler <bkohler@gentoo.org>2022-02-24 10:55:06 -0600
commit92427bde4f9a7b28da667fe18bc59ab5a0bc82ab (patch)
treeabc12e2a33d9d5435308ddf4cf6ba27992716961 /dev-libs/newt
parentapp-editors/okteta: Drop 0.26.6-r1 (diff)
downloadgentoo-92427bde4f9a7b28da667fe18bc59ab5a0bc82ab.tar.gz
gentoo-92427bde4f9a7b28da667fe18bc59ab5a0bc82ab.tar.bz2
gentoo-92427bde4f9a7b28da667fe18bc59ab5a0bc82ab.zip
dev-libs/newt: new snapshot for bug fixes
Fixes 'respect cflags' bug and a few more. Closes: https://bugs.gentoo.org/832322 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'dev-libs/newt')
-rw-r--r--dev-libs/newt/Manifest1
-rw-r--r--dev-libs/newt/files/newt-0.52.21_p20210816-makefile-LDFLAGS-ordering.patch30
-rw-r--r--dev-libs/newt/newt-0.52.21_p20210816.ebuild104
3 files changed, 135 insertions, 0 deletions
diff --git a/dev-libs/newt/Manifest b/dev-libs/newt/Manifest
index ea14fe205752..0cd49159a543 100644
--- a/dev-libs/newt/Manifest
+++ b/dev-libs/newt/Manifest
@@ -1 +1,2 @@
DIST newt-0.52.21.tar.gz 174895 BLAKE2B a0d6a15f87fe04dc535e65fcd28606cd666142d006a53b6ee0c8387a6295215e44f1815ac56ceb56b561ca9b5bc8f3cab2d04b5decd62642f46b744333dc7e34 SHA512 d53d927996d17223e688bf54dccfabb2a3dc02bfe38ffc455964e86feaca3cd9f9ab5b19774433be430fa4d761cd9b6680b558f297acb86f80daeb6942f7d23c
+DIST newt-0.52.21_p20210816.tar.gz 128555 BLAKE2B 97c791d7301b657bec68045f2cd9bbe16eef0b099a6304e2336414837b36492bd794be04d0bbcd9eadc6fcd000ba2563a5ab90be5d61249390a6ea5435091f97 SHA512 06c1d5634d88a6126de5eddd1c4d436639a4d739b100f391638b0429a3941eabcaa0ff7398f498d735ec0af5e88deb14178110ab11bf5301ef661f7953692bc4
diff --git a/dev-libs/newt/files/newt-0.52.21_p20210816-makefile-LDFLAGS-ordering.patch b/dev-libs/newt/files/newt-0.52.21_p20210816-makefile-LDFLAGS-ordering.patch
new file mode 100644
index 000000000000..445637b7ca0d
--- /dev/null
+++ b/dev-libs/newt/files/newt-0.52.21_p20210816-makefile-LDFLAGS-ordering.patch
@@ -0,0 +1,30 @@
+From 22d44d2cbfcbec216d0028ebdf274247139a8045 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 14 Jul 2021 05:12:32 +0100
+Subject: [PATCH] Swap order of LDFLAGS and P*FLAGS
+
+Needed to respect as-needed.
+
+Bug: https://bugs.gentoo.org/798945
+---
+ Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 1047efc..f0bc417 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -97,8 +97,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH)
+ PLFLAGS=`$$pyconfig --libs`; \
+ echo $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+ $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+- echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+- $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
++ echo $(CC) --shared $(LDFLAGS) $$PLDFLAGS $$PLFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
++ $(CC) --shared $(LDFLAGS) $$PLDFLAGS $$PLFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+ done || :
+ touch $@
+
+--
+2.32.0
+
diff --git a/dev-libs/newt/newt-0.52.21_p20210816.ebuild b/dev-libs/newt/newt-0.52.21_p20210816.ebuild
new file mode 100644
index 000000000000..f38fc22cf2ff
--- /dev/null
+++ b/dev-libs/newt/newt-0.52.21_p20210816.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools python-r1 toolchain-funcs
+
+COMMIT=a7533580cd092e6a71c4ed722e830da4eb884d06
+
+DESCRIPTION="Redhat's Newt windowing toolkit development files"
+HOMEPAGE="https://pagure.io/newt"
+SRC_URI="https://github.com/mlichvar/newt/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="gpm nls tcl"
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-libs/popt-1.6
+ =sys-libs/slang-2*
+ gpm? ( sys-libs/gpm )
+ tcl? ( >=dev-lang/tcl-8.5:0 )
+ "
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.52.13-gold.patch
+ "${FILESDIR}"/${PN}-0.52.14-tcl.patch
+ "${FILESDIR}"/${PN}-0.52.21-python-sitedir.patch
+ "${FILESDIR}"/${P}-makefile-LDFLAGS-ordering.patch
+ "${FILESDIR}"/${PN}-0.52.21-fix-non-POSIX-backticks.patch
+)
+
+S=${WORKDIR}/${PN}-${COMMIT}
+
+src_prepare() {
+ sed -i Makefile.in \
+ -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' \
+ -e "s| ar | $(tc-getAR) |g" \
+ || die "sed Makefile.in"
+
+ if [[ -n ${LINGUAS} ]]; then
+ local lang langs
+ 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
+
+ default
+ eautoreconf
+
+ # can't build out-of-source
+ python_copy_sources
+}
+
+src_configure() {
+ configuring() {
+ econf \
+ PYTHONVERS="${PYTHON}" \
+ $(use_with gpm gpm-support) \
+ $(use_with tcl) \
+ $(use_enable nls)
+ }
+ python_foreach_impl run_in_build_dir configuring
+}
+
+src_compile() {
+ building() {
+ emake PYTHONVERS="${EPYTHON}"
+ }
+ python_foreach_impl run_in_build_dir building
+}
+
+src_install() {
+ installit() {
+ emake \
+ DESTDIR="${D}" \
+ PYTHON_SITEDIR="$(python_get_sitedir)" \
+ PYTHONVERS="${EPYTHON}" \
+ install
+ python_optimize
+ }
+ python_foreach_impl run_in_build_dir installit
+ dodoc peanuts.py popcorn.py tutorial.sgml
+ doman whiptail.1
+ einstalldocs
+
+ # don't want static archives
+ rm "${ED}"/usr/$(get_libdir)/libnewt.a || die
+}