diff --git a/SOURCES/newt-radio.patch b/SOURCES/newt-radio.patch new file mode 100644 index 0000000..c060357 --- /dev/null +++ b/SOURCES/newt-radio.patch @@ -0,0 +1,25 @@ +commit ddc56f06b629aad44d0cf7e9d15a5cc1114b72c9 +Author: Miroslav Lichvar +Date: Mon May 27 13:34:54 2019 +0200 + + fix radio button selection check in snack + + https://pagure.io/newt/issue/1 + +diff --git a/snack.c b/snack.c +index 880a431..c253f0c 100644 +--- a/snack.c ++++ b/snack.c +@@ -1096,7 +1096,11 @@ static PyObject * widget_get_radioValue(PyObject *self, void *closure) + { + snackWidget *w = (snackWidget *)self; + +- return Py_BuildValue("i", newtRadioGetCurrent(w->co)); ++#if SIZEOF_VOID_P <= SIZEOF_LONG ++ return Py_BuildValue("l", (long)newtRadioGetCurrent(w->co)); ++#else ++ return Py_BuildValue("L", (long long)newtRadioGetCurrent(w->co)); ++#endif + } + + static void widgetDestructor(PyObject * o) { diff --git a/SOURCES/newt-snackflags.patch b/SOURCES/newt-snackflags.patch new file mode 100644 index 0000000..8df49b7 --- /dev/null +++ b/SOURCES/newt-snackflags.patch @@ -0,0 +1,24 @@ +commit 1321e6f91a45e1c06ad648b348503a7754be5b83 +Author: Miroslav Lichvar +Date: Tue Oct 1 16:37:55 2019 +0200 + + don't ignore CFLAGS when building snack + + In addition to the flags returned by python-config --cflags, use the + user-specified CFLAGS when building the snack object. + +diff --git a/Makefile.in b/Makefile.in +index f6df602..f991184 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -95,8 +95,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH) + PIFLAGS=`$$pyconfig --includes`; \ + PLDFLAGS=`$$pyconfig --ldflags`; \ + PLFLAGS=`$$pyconfig --libs`; \ +- echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ +- $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \ ++ 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); \ + done || : diff --git a/SPECS/newt.spec b/SPECS/newt.spec index e3ac177..87edcfa 100644 --- a/SPECS/newt.spec +++ b/SPECS/newt.spec @@ -5,17 +5,22 @@ Summary: A library for text mode user interfaces Name: newt Version: 0.52.20 -Release: 9%{?dist} +Release: 11%{?dist} License: LGPLv2 Group: System Environment/Libraries URL: https://pagure.io/newt Source: https://pagure.io/releases/newt/newt-%{version}.tar.gz + +# Fix radio button selection check in snack +Patch1: newt-radio.patch +# Don't ignore CFLAGS when building snack +Patch2: newt-snackflags.patch + BuildRequires: gcc popt-devel python3-devel slang-devel %{?with_python2:BuildRequires: python2-devel} BuildRequires: docbook-utils # Prefer lynx over other packages providing text-www-browser BuildRequires: lynx -Provides: snack = %{version}-%{release} # static subpackage was dropped in 0.52.20-8 Obsoletes: %{name}-static < 0.52.20-8 @@ -64,6 +69,7 @@ providing a python API for creating text mode interfaces. Provides: %{name}-python3 = %{version}-%{release} Provides: %{name}-python3%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python3 < %{version}-%{release} +Provides: snack = %{version}-%{release} Summary: Python 3 bindings for newt Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} @@ -74,6 +80,8 @@ providing a python API for creating text mode interfaces. %prep %setup -q +%patch1 -p1 -b .radio +%patch2 -p1 -b .snackflags %build # gpm support seems to smash the stack w/ we use help in anaconda?? @@ -117,6 +125,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libnewt.a %{python3_sitearch}/__pycache__/*.py* %changelog +* Wed Oct 02 2019 Miroslav Lichvar - 0.52.20-11 +- don't ignore CFLAGS when building snack (#1757093) + +* Mon Sep 30 2019 Miroslav Lichvar - 0.52.20-10 +- move snack provides to python3-newt subpackage (#1640153) +- fix radio button selection check in snack (#1714517) + * Mon Mar 26 2018 Miroslav Lichvar - 0.52.20-9 - don't build python2 subpackage on rhel >= 8