pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-newt



Module Name:    pkgsrc
Committed By:   vins
Date:           Tue May  6 20:35:02 UTC 2025

Modified Files:
        pkgsrc/devel/py-newt: Makefile PLIST buildlink3.mk distinfo
        pkgsrc/devel/py-newt/patches: patch-Makefile.in
Added Files:
        pkgsrc/devel/py-newt/patches: patch-snack.c patch-whiptcl.c

Log Message:
devel/py-newt: update to 0.52.25

0.52.25

- improve Makefile (Ryan Carsten Schmidt)
- fix "yes" in Spanish translation

0.52.24

- add support for python3.13
- fix compiler warnings

0.52.23

- fix automatic height of menu/list in whiptail (broken in 0.52.22)
- fix automatic width of whiptail --yesno box
- fix automatic width in whiptail with unicode characters
- fix automatic width with whiptail --noitem and --notags options
- fix spacing with longer tags in whiptail
- avoid overlapping backtitle in whiptail with automatic height

0.52.22

- fix crash in whiptail with new libpopt
- switch from usleep to nanosleep (Rosen Penev)
- fix libnewt.pc to enable static linking (Alexey Sheplyakov)
- fix LDFLAGS order in snack linking (Sam James)
- use CFLAGS when compiling snack
- improve configure.ac (Thomas Kuehne)
- install header and libnewt.pc with shared library (Michael Olbrich)

0.52.21

- define env NEWT_NOFLOWCTRL to disable flow control (Robert Gill)
- don't leak memory on errors in dialogboxes
- fix radio button selection check in snack
- fix plural forms in Lithuanian translation (#1568999)
- fix parallel build (Émeric Dupont)
- allow python versions to be specified with --with-python option

0.52.20

- improve handling of long strings in whiptail menu (#1353792)
- support screen resize as hotkey in form (#1432926)

0.52.19

- support --notags in whiptail checklist and radiolist (#1319794)
- don't hard-code -I/usr/include/slang in CPPFLAGS (Alex Suykov)
- use $(CC) instead of $(CPP) to generate .depend files (Samuel Martin)
- update translations from Zanata

0.52.18

- fix widget key collision in snack on 64-bit archs (#1151455)
- handle NEWT_EXIT_ERROR in snack
- fix preprocessor warnings in snack
- optimize textbox reflowing
- remove newtListitem declarations (#1074092)

0.52.17

- add python3 support (Matthias Klose) (#963839)
- implement newtComponentAddCallback() for forms as a focus-change
  callback (Dan Winship)
- add newtEntryGet/SetCursorPosition and newtFormGet/SetScrollPosition
  (Dan Winship)
- restore cursor position after changing help line (Dan Winship)
- rename snackmodule to snack (#963839)
- update CHANGES from spec changelog
- add AUTHORS and README


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/py-newt/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/py-newt/PLIST
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/py-newt/buildlink3.mk
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/py-newt/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/py-newt/patches/patch-Makefile.in
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-newt/patches/patch-snack.c \
    pkgsrc/devel/py-newt/patches/patch-whiptcl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-newt/Makefile
diff -u pkgsrc/devel/py-newt/Makefile:1.21 pkgsrc/devel/py-newt/Makefile:1.22
--- pkgsrc/devel/py-newt/Makefile:1.21  Mon Jan  6 21:49:04 2025
+++ pkgsrc/devel/py-newt/Makefile       Tue May  6 20:35:02 2025
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2025/01/06 21:49:04 ktnb Exp $
+# $NetBSD: Makefile,v 1.22 2025/05/06 20:35:02 vins Exp $
 
-DISTNAME=      newt-0.52.16
+DISTNAME=      newt-0.52.25
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   4
 CATEGORIES=    devel
 MASTER_SITES=  https://releases.pagure.org/newt/
 
@@ -12,24 +11,24 @@ COMMENT=    Windowing toolkit based on libs
 LICENSE=       gnu-lgpl-v2
 
 GNU_CONFIGURE=         yes
-USE_TOOLS+=            automake gmake pkg-config
+USE_TOOLS+=            automake aclocal autoconf \
+                       gmake pkg-config
 USE_PKGLOCALEDIR=      yes
 USE_LIBTOOL=           yes
 
 PKGCONFIG_OVERRIDE+=   libnewt.pc.in
 
 PY_PATCHPLIST=         yes
-PYTHON_VERSIONS_ACCEPTED= 27
+
+CONFIGURE_ENV+=                ac_cv_c_tclconfig=${BUILDLINK_PREFIX.tcl}/lib
+CONFIGURE_ARGS+=       --with-python=${PYVERSSUFFIX:Q}
+
+MAKE_ENV=              PCFLAGS=${CFLAGS:Q}
 
 pre-configure:
        cd ${WRKSRC}; \
        aclocal && autoconf
 
-SUBST_CLASSES+=                prefix
-SUBST_STAGE.prefix=    pre-configure
-SUBST_FILES.prefix=    configure.ac
-SUBST_VARS.prefix=     PREFIX
-
 SUBST_CLASSES+=                inst-po
 SUBST_STAGE.inst-po=   pre-build
 SUBST_FILES.inst-po=   po/Makefile

Index: pkgsrc/devel/py-newt/PLIST
diff -u pkgsrc/devel/py-newt/PLIST:1.3 pkgsrc/devel/py-newt/PLIST:1.4
--- pkgsrc/devel/py-newt/PLIST:1.3      Wed Jan  1 06:55:23 2014
+++ pkgsrc/devel/py-newt/PLIST  Tue May  6 20:35:02 2025
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.3 2014/01/01 06:55:23 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.4 2025/05/06 20:35:02 vins Exp $
 bin/whiptail
 include/newt.h
 lib/libnewt.la
 lib/pkgconfig/libnewt.pc
-${PYSITELIB}/_snackmodule.la
+${PYSITELIB}/_snack.la
 ${PYSITELIB}/snack.py
 lib/whiptcl.la
 man/man1/whiptail.1
@@ -40,6 +40,7 @@ share/locale/ia/LC_MESSAGES/newt.mo
 share/locale/id/LC_MESSAGES/newt.mo
 share/locale/it/LC_MESSAGES/newt.mo
 share/locale/ja/LC_MESSAGES/newt.mo
+share/locale/ka/LC_MESSAGES/newt.mo
 share/locale/km/LC_MESSAGES/newt.mo
 share/locale/kn/LC_MESSAGES/newt.mo
 share/locale/ko/LC_MESSAGES/newt.mo

Index: pkgsrc/devel/py-newt/buildlink3.mk
diff -u pkgsrc/devel/py-newt/buildlink3.mk:1.1 pkgsrc/devel/py-newt/buildlink3.mk:1.2
--- pkgsrc/devel/py-newt/buildlink3.mk:1.1      Wed Jan  1 06:55:23 2014
+++ pkgsrc/devel/py-newt/buildlink3.mk  Tue May  6 20:35:02 2025
@@ -1,13 +1,14 @@
-# $NetBSD: buildlink3.mk,v 1.1 2014/01/01 06:55:23 ryoon Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2025/05/06 20:35:02 vins Exp $
 
-BUILDLINK_TREE+=       ${PYPKGPREFIX}-newt
+BUILDLINK_TREE+=       py-newt
 
 .if !defined(PY_NEWT_BUILDLINK3_MK)
 PY_NEWT_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.${PYPKGPREFIX}-newt+=    ${PYPKGPREFIX}-newt>=0.52.16
-BUILDLINK_PKGSRCDIR.${PYPKGPREFIX}-newt?=      ../../devel/py-newt
+BUILDLINK_API_DEPENDS.py-newt+=        ${PYPKGPREFIX}-newt>=0.52.16
+BUILDLINK_ABI_DEPENDS.py-newt+=        ${PYPKGPREFIX}-newt>=0.52.25
+BUILDLINK_PKGSRCDIR.py-newt?=  ../../devel/py-newt
 
 .endif # PY_NEWT_BUILDLINK3_MK
 
-BUILDLINK_TREE+=       -${PYPKGPREFIX}-newt
+BUILDLINK_TREE+=       -py-newt

Index: pkgsrc/devel/py-newt/distinfo
diff -u pkgsrc/devel/py-newt/distinfo:1.7 pkgsrc/devel/py-newt/distinfo:1.8
--- pkgsrc/devel/py-newt/distinfo:1.7   Mon May 22 16:40:37 2023
+++ pkgsrc/devel/py-newt/distinfo       Tue May  6 20:35:02 2025
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.7 2023/05/22 16:40:37 schmonz Exp $
+$NetBSD: distinfo,v 1.8 2025/05/06 20:35:02 vins Exp $
 
-BLAKE2s (newt-0.52.16.tar.gz) = ef3dd1dab5ec4695901d21493661e5ff338a1267fdcdfb9b1eb479b324823e23
-SHA512 (newt-0.52.16.tar.gz) = 38cf5aa6660a3ee0409ed0767c02d777a4a2c28a000a359bb735da5abf8ee38f375ef333d10865a1eb3828497b6c58d2f3f6011c7b7e7c2360612b985dcf3d25
-Size (newt-0.52.16.tar.gz) = 183487 bytes
-SHA1 (patch-Makefile.in) = 6c029323ba411aff1f137149ee21cffb7decdb4a
-SHA1 (patch-configure.ac) = c3b51c273bb929eb8975e06ed990d342a37daf9c
+BLAKE2s (newt-0.52.25.tar.gz) = 96bbcfaadc241325bcbd871b84436d0574eaaef06e795b7243518e8f819ba30a
+SHA512 (newt-0.52.25.tar.gz) = 23f239ff599f63fdfec83ba32256a4b4e081d84fe7844a32a9770a0776df7e200315f794d031bca0f7c3526a9730fb3f62973bad40bf96618de6e336e97a8096
+Size (newt-0.52.25.tar.gz) = 176729 bytes
+SHA1 (patch-Makefile.in) = 8a96877b6b4c534a166a1b97e04f68a58c3da1e0
 SHA1 (patch-po_Makefile) = dfa6352d1f10246bd7d2f9cd4f256394dc1a674a
+SHA1 (patch-snack.c) = 73ba1715757100f684116e9638fb59cae3c8bf65
+SHA1 (patch-whiptcl.c) = f561861d87073bc1bab175a67643c742fca414fc

Index: pkgsrc/devel/py-newt/patches/patch-Makefile.in
diff -u pkgsrc/devel/py-newt/patches/patch-Makefile.in:1.2 pkgsrc/devel/py-newt/patches/patch-Makefile.in:1.3
--- pkgsrc/devel/py-newt/patches/patch-Makefile.in:1.2  Thu Jan 27 08:10:07 2022
+++ pkgsrc/devel/py-newt/patches/patch-Makefile.in      Tue May  6 20:35:02 2025
@@ -1,9 +1,9 @@
-$NetBSD: patch-Makefile.in,v 1.2 2022/01/27 08:10:07 wiz Exp $
+$NetBSD: patch-Makefile.in,v 1.3 2025/05/06 20:35:02 vins Exp $
 
 * Libtoolized
-* Use configure.ac's Python version
+* Use pkgsrc-defined python version
 
---- Makefile.in.orig   2013-08-06 15:46:42.000000000 +0000
+--- Makefile.in.orig   2025-03-10 13:29:06.000000000 +0000
 +++ Makefile.in
 @@ -2,7 +2,6 @@ LIBS = -lslang @LIBS@
  LIBTCL = @TCL_LIB_FLAG@
@@ -12,7 +12,7 @@ $NetBSD: patch-Makefile.in,v 1.2 2022/01
 -CPP = @CPP@
  CFLAGS = @CFLAGS@
  LDFLAGS = @LDFLAGS@
- CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ 
+ CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
 @@ -16,7 +15,7 @@ SOEXT = so
  PYTHONVERS = @PYTHONVERS@
  WHIPTCLLIB = @WHIPTCLLIB@
@@ -54,36 +54,38 @@ $NetBSD: patch-Makefile.in,v 1.2 2022/01
  SHAREDDIR = shared
  SHAREDOBJS = $(patsubst %,$(SHAREDDIR)/%, $(LIBOBJS))
  
-@@ -65,76 +62,76 @@ else
+@@ -65,82 +62,83 @@ else
  TARGET=depend $(PROGS)
  endif
  
--all:  $(TARGET) _snackmodule.$(SOEXT)
-+all:  $(TARGET) _snackmodule.la
+-all:  $(TARGET) _snack.$(SOEXT)
++all:   $(TARGET) _snack.la
  
  test: test.o $(LIBNEWT)
 -      $(CC) -g -o test test.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
-+      ${LIBTOOL} --mode=link $(CC) -g -o test test.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -g -o test test.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
++
  
  testgrid:     testgrid.o $(LIBNEWT)
 -      $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
-+      ${LIBTOOL} --mode=link $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
  
  testtree:     testtree.o $(LIBNEWT)
 -      $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
-+      ${LIBTOOL} --mode=link $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
  
  showchars:    showchars.o $(LIBNEWT)
 -      $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
-+      ${LIBTOOL} --mode=link $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
  
  showkey:      showkey.o $(LIBNEWT)
 -      $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
-+      ${LIBTOOL} --mode=link $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
  
--_snackmodule.$(SOEXT):   snackmodule.c $(LIBNEWTSH)
-+_snackmodule.la:   snackmodule.c $(LIBNEWT)
-       @[ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS); do \
+-_snack.$(SOEXT):   snack.c $(LIBNEWTSH)
++_snack.la:   snack.c $(LIBNEWT)
+ ifneq ($(PYTHONVERS),)
+       @for ver in $(PYTHONVERS); do \
 -              pyconfig=$$ver-config; \
 +              pyconfig=python$$ver-config; \
                if ! $$pyconfig --cflags > /dev/null 2>&1 && \
@@ -94,32 +96,31 @@ $NetBSD: patch-Makefile.in,v 1.2 2022/01
 -              mkdir -p $$ver; \
 +              mkdir -p python$$ver; \
                PCFLAGS=`$$pyconfig --cflags`; \
-               PIFLAGS=`$$pyconfig --includes`; \
-               PLDFLAGS=`$$pyconfig --ldflags`; \
-               PLFLAGS=`$$pyconfig --libs`; \
--              echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c; \
--              $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c; \
--              echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.$(SOEXT) $$ver/snackmodule.o -L.  -lnewt $(LIBS); \
--              $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.$(SOEXT) $$ver/snackmodule.o -L.  -lnewt $(LIBS); \
-+              ${LIBTOOL} --mode=compile $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o python$$ver/snackmodule.lo snackmodule.c; \
-+              ${LIBTOOL} --mode=link $(CC) -module -shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o python$$ver/_snackmodule.la python$$ver/snackmodule.lo libnewt.la $(LIBS) -rpath 
${PREFIX}/lib/python$$ver/site-packages ; \
-       done || :
+               PLDFLAGS=`$$pyconfig --ldflags --embed || $$pyconfig --ldflags`; \
+-              echo $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+-              $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+-              echo $(CC) --shared $(LDFLAGS) $$PLDFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+-              $(CC) --shared $(LDFLAGS) $$PLDFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
++              ${LIBTOOL} --mode=compile --tag=CC $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o python$$ver/snack.lo snack.c; \
++              ${LIBTOOL} --mode=link --tag=CC $(CC) -module -shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o python$$ver/_snack.la python$$ver/snack.lo libnewt.la $(LIBS) -rpath 
${PREFIX}/lib/python$$ver/site-packages ; \
+       done
+ endif
        touch $@
  
 -whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
 -      $(CC) -g -o whiptail $(NDIALOGOBJS) -L. $(LDFLAGS) -lnewt $(LIBS) -lpopt
 +whiptail: $(NDIALOGLOBJS) $(LIBNEWT)
-+      ${LIBTOOL} --mode=link $(CC) -g -o whiptail $(NDIALOGLOBJS) $(LDFLAGS) libnewt.la $(LIBS) -lpopt
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -g -o whiptail $(NDIALOGLOBJS) $(LDFLAGS) libnewt.la $(LIBS) -lpopt
  
 -whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH)
 -      $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt  $(LIBTCL) -lpopt $(LIBS)
 +whiptcl.la: $(WHIPTCLLOBJS) $(LIBNEWT)
-+      ${LIBTOOL} --mode=link $(CC) -module -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.la $(WHIPTCLLOBJS) libnewt.la  $(LIBTCL) -lpopt $(LIBS) -rpath ${PREFIX}/lib
++      ${LIBTOOL} --mode=link --tag=CC $(CC) -module -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.la $(WHIPTCLLOBJS) libnewt.la $(LIBTCL) -lpopt $(LIBS) -rpath ${PREFIX}/lib
  
 -$(LIBNEWT): $(LIBOBJS)
 -      ar rv $@ $^
 +$(LIBNEWT): $(LIBLOBJS)
-+      ${LIBTOOL} --mode=link \
++      ${LIBTOOL} --mode=link --tag=CC \
 +      ${CC} -o $@ \
 +      ${LIBLOBJS} \
 +      -rpath ${PREFIX}/lib \
@@ -137,57 +138,70 @@ $NetBSD: patch-Makefile.in,v 1.2 2022/01
                $(SHAREDDIR)/*.o *.$(SOEXT)*
  
  depend:
--      $(CPP) $(CFLAGS) $(CPPFLAGS) -M $(SOURCES) > .depend
-+      $(CC) $(CFLAGS) $(CPPFLAGS) -M $(SOURCES) > .depend
- 
- $(SHAREDDIR):
-       mkdir -p $(SHAREDDIR)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -M $(SOURCES) > .depend
  
 -sharedlib: $(LIBNEWTSH)
 +sharedlib: $(LIBNEWT)
  
--$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
+-$(LIBNEWTSH): $(SHAREDOBJS)
 -      $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
 -      ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT)
 -      ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
 +%.lo : %.c
-+      ${LIBTOOL} --mode=compile $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
++      ${LIBTOOL} --mode=compile --tag=CC $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
  
 -$(SHAREDDIR)/%.o : %.c
--      $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
 +$(SHAREDDIR)/%.lo : %.c
-+      ${LIBTOOL} --mode=compile $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+       @mkdir -p $(SHAREDDIR)
+-      $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
++      ${LIBTOOL} --mode=compile --tag=CC $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
++
  
  install: $(LIBNEWT) install-sh whiptail
        [ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
-@@ -143,22 +140,19 @@ install: $(LIBNEWT) install-sh whiptail
+       [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
        [ -d $(instroot)/$(man1dir) ] || install -m 755 -d $(instroot)/$(man1dir)
-       [ -d $(instroot)/$(pkgconfigdir) ] || install -m 755 -d $(instroot)/$(pkgconfigdir)
-       install -m 644 newt.h $(instroot)/$(includedir)
 -      install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
 -      install -m 755 whiptail $(instroot)/$(bindir)
 -      install -m 644 whiptail.1 $(instroot)/$(man1dir)
 +      ${LIBTOOL} --mode=install install -m 755 whiptail $(instroot)/$(bindir)
 +      ${LIBTOOL} --mode=install install -m 644 whiptail.1 $(instroot)/$(man1dir)
        make -C po datadir=$(instroot)/$(datadir) install
-       install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)
  
--install-sh: sharedlib $(WHIPTCLSO) _snackmodule.$(SOEXT)
-+install-sh: sharedlib $(WHIPTCLSO) _snackmodule.la
-       [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
+ install-sh: sharedlib install-tcl install-py
+@@ -148,28 +146,21 @@ install-sh: sharedlib install-tcl instal
+       [ -d $(instroot)/$(includedir) ] || install -m 755 -d $(instroot)/$(includedir)
+       [ -d $(instroot)/$(pkgconfigdir) ] || install -m 755 -d $(instroot)/$(pkgconfigdir)
+       install -m 644 newt.h $(instroot)/$(includedir)
 -      install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
 -      ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.$(SOEXT)
 -      ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
--      [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.$(SOEXT) $(instroot)/$(libdir) || :
 +      ${LIBTOOL} --mode=install install -m 755 $(LIBNEWT) $(instroot)/$(libdir)
-+      [ -n "$(WHIPTCLSO)" ] && ${LIBTOOL} --mode=install install -m 755 whiptcl.la $(instroot)/$(libdir) || :
-       [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
--         [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
--         install -m 755 $$ver/_snackmodule.$(SOEXT) $(instroot)/$(libdir)/$$ver/site-packages ;\
--         install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
-+         [ -d $(instroot)/$(libdir)/python$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/python$$ver/site-packages ;\
-+         ${LIBTOOL} --mode=install install -m 755 python$$ver/_snackmodule.la $(instroot)/$(libdir)/python$$ver/site-packages ;\
-+         install -m 644 snack.py $(instroot)/$(libdir)/python$$ver/site-packages ;\
-       done || :
+       install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)
+ 
+ install-tcl: $(WHIPTCLSO)
+ ifneq ($(WHIPTCLSO),)
+       [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
+-      install -m 755 $(WHIPTCLSO) $(instroot)/$(libdir)
++      ${LIBTOOL} --mode=install install -m 755 whiptcl.la $(instroot)/$(libdir)
+ endif
+ 
+-install-py: _snack.$(SOEXT)
+-ifneq ($(PYTHONVERS),)
+-      @for ver in $(PYTHONVERS); do \
+-              PLATLIB=`$$ver -c "import sysconfig; print(sysconfig.get_path('platlib'))"`; \
+-              [ -d $(instroot)/$$PLATLIB ] || install -m 755 -d $(instroot)/$$PLATLIB ;\
+-              echo install -m 755 $$ver/_snack.$(SOEXT) $(instroot)/$$PLATLIB;\
+-              install -m 755 $$ver/_snack.$(SOEXT) $(instroot)/$$PLATLIB;\
+-              echo install -m 644 snack.py $(instroot)/$$PLATLIB;\
+-              install -m 644 snack.py $(instroot)/$$PLATLIB;\
++install-py: _snack.la
++      [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
++              [ -d $(instroot)/$(libdir)/python$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/python$$ver/site-packages ;\
++              ${LIBTOOL} --mode=install install -m 755 python$$ver/_snack.la $(instroot)/$(libdir)/python$$ver/site-packages ;\
++              install -m 644 snack.py $(instroot)/$(libdir)/python$$ver/site-packages ;\
+       done
+-endif
  
- Makefile: newt.spec
+ Makefile: configure.ac
+       @echo "You need to rerun ./autogen.sh and ./configure before continuing"

Added files:

Index: pkgsrc/devel/py-newt/patches/patch-snack.c
diff -u /dev/null pkgsrc/devel/py-newt/patches/patch-snack.c:1.1
--- /dev/null   Tue May  6 20:35:02 2025
+++ pkgsrc/devel/py-newt/patches/patch-snack.c  Tue May  6 20:35:02 2025
@@ -0,0 +1,34 @@
+$NetBSD: patch-snack.c,v 1.1 2025/05/06 20:35:02 vins Exp $
+
+* newtInit() should only be called once.
+* PyObject_NEW does not check \var{type} for a NULL value
+
+--- snack.c.orig       2025-03-10 13:29:06.000000000 +0000
++++ snack.c
+@@ -366,7 +366,7 @@ static PyTypeObject snackWidgetType = {
+ static snackWidget * snackWidgetNew (void) {
+     snackWidget * widget;
+      
+-    widget = PyObject_NEW(snackWidget, &snackWidgetType);
++    widget = PyObject_New(snackWidget, &snackWidgetType);
+     if (!widget)
+       return NULL;
+ 
+@@ -932,7 +932,7 @@ static snackForm * formCreate(PyObject *
+     if (help == Py_None)
+       help = NULL;
+ 
+-    form = PyObject_NEW(snackForm, &snackFormType);
++    form = PyObject_New(snackForm, &snackFormType);
+     form->fo = newtForm(NULL, help, 0);
+ 
+     return form;
+@@ -944,7 +944,7 @@ static snackGrid * gridCreate(PyObject *
+ 
+     if (!PyArg_ParseTuple(args, "ii", &cols, &rows)) return NULL;
+ 
+-    grid = PyObject_NEW(snackGrid, &snackGridType);
++    grid = PyObject_New(snackGrid, &snackGridType);
+     grid->grid = newtCreateGrid(cols, rows);
+ 
+     return grid;
Index: pkgsrc/devel/py-newt/patches/patch-whiptcl.c
diff -u /dev/null pkgsrc/devel/py-newt/patches/patch-whiptcl.c:1.1
--- /dev/null   Tue May  6 20:35:02 2025
+++ pkgsrc/devel/py-newt/patches/patch-whiptcl.c        Tue May  6 20:35:02 2025
@@ -0,0 +1,128 @@
+$NetBSD: patch-whiptcl.c,v 1.1 2025/05/06 20:35:02 vins Exp $
+
+Use Tcl_* functions to fix compiler warnings. 
+
+--- whiptcl.c.orig     2025-03-10 13:29:06.000000000 +0000
++++ whiptcl.c
+@@ -138,45 +138,44 @@ static int wtCmd(ClientData clientData, 
+     
+     if (arg < -1) {
+       /* this could buffer oveflow, bug we're not setuid so I don't care */
+-      interp->result = malloc(200);
+-      interp->freeProc = TCL_DYNAMIC;
+-      sprintf(interp->result, "%s: %s\n", 
++        char *result = Tcl_Alloc(200);
++      sprintf(result, "%s: %s\n", 
+               poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
+               poptStrerror(arg));
+-
++        Tcl_SetResult(interp, result, TCL_DYNAMIC);
+       return TCL_ERROR;
+     }
+ 
+     if (mode == MODE_NONE) {
+-      interp->result = "no dialog mode was specified";
++        Tcl_SetResult(interp, "no dialog mode was specified", TCL_STATIC);
+       return TCL_ERROR;
+     } else if (rc) {
+-      interp->result = "multiple modes were specified";
++      Tcl_SetResult(interp, "multiple modes were specified", TCL_STATIC);
+       return TCL_ERROR;
+     }
+ 
+     if (!(text = poptGetArg(optCon))) {
+-      interp->result = "missing text parameter";
++      Tcl_SetResult(interp, "missing text parameter", TCL_STATIC);
+       return TCL_ERROR;
+     }
+ 
+     if (!(nextArg = poptGetArg(optCon))) {
+-      interp->result = "height missing";
++      Tcl_SetResult(interp,"height missing", TCL_STATIC);
+       return TCL_ERROR;
+     }
+     height = strtoul(nextArg, &end, 10);
+     if (*end) {
+-      interp->result = "height is not a number";
++      Tcl_SetResult(interp,"height is not a number", TCL_STATIC);
+       return TCL_ERROR;
+     }
+ 
+     if (!(nextArg = poptGetArg(optCon))) {
+-      interp->result = "width missing";
++      Tcl_SetResult(interp, "width missing", TCL_STATIC);
+       return TCL_ERROR;
+     }
+     width = strtoul(nextArg, &end, 10);
+     if (*end) {
+-      interp->result = "width is not a number";
++      Tcl_SetResult(interp, "width is not a number", TCL_STATIC);
+       return TCL_ERROR;
+     }
+ 
+@@ -185,12 +184,12 @@ static int wtCmd(ClientData clientData, 
+       case MODE_RADIOLIST:
+       case MODE_CHECKLIST:
+       if (!(nextArg = poptGetArg(optCon))) {
+-          interp->result = "list-height missing";
++            Tcl_SetResult(interp, "list-height missing",TCL_STATIC);
+           return TCL_ERROR;
+       }
+       listHeight = strtoul(nextArg, &end, 10);
+       if (*end) {
+-          interp->result = "list-height is not a number";
++            Tcl_SetResult(interp, "list-height is not a number",TCL_STATIC);
+           return TCL_ERROR;
+       }
+       break;
+@@ -212,18 +211,14 @@ static int wtCmd(ClientData clientData, 
+ 
+       case MODE_YESNO:
+       rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
+-      if (rc == DLG_OKAY)
+-          interp->result = "yes";
+-      else 
+-          interp->result = "no";
++        Tcl_SetResult( interp, rc == DLG_OKAY ? "yes " : "no" , TCL_STATIC);
+       if (rc == DLG_ERROR) rc = 0;
+       break;
+ 
+       case MODE_INPUTBOX:
+       rc = inputBox(text, height, width, optCon, flags, &result);
+       if (rc ==DLG_OKAY) {
+-          interp->result = result;
+-          interp->freeProc = TCL_DYNAMIC;
++            Tcl_SetResult(interp, result, TCL_DYNAMIC);
+       }
+       break;
+ 
+@@ -231,8 +226,7 @@ static int wtCmd(ClientData clientData, 
+       rc = listBox(text, height, width, listHeight, optCon, flags, default_item,
+                    &result);
+       if (rc==DLG_OKAY) {
+-          interp->result = result;
+-          interp->freeProc = TCL_DYNAMIC;
++            Tcl_SetResult(interp, result, TCL_DYNAMIC);
+       }
+       break;
+ 
+@@ -240,9 +234,7 @@ static int wtCmd(ClientData clientData, 
+       rc = checkList(text, height, width, listHeight, optCon, 1, flags,
+                      &selections);
+       if (rc==DLG_OKAY) {
+-          interp->result = selections[0];
+-          interp->freeProc = TCL_DYNAMIC;
+-
++          Tcl_SetResult( interp, selections[0], TCL_DYNAMIC);
+           free(selections);
+       }
+       break;
+@@ -267,7 +259,7 @@ static int wtCmd(ClientData clientData, 
+     newtPopWindow();
+ 
+     if (rc == DLG_ERROR) {
+-      interp->result = "bad paramter for whiptcl dialog box";
++        Tcl_SetResult(interp, "bad paramter for whiptcl dialog box", TCL_STATIC);
+       return TCL_ERROR;
+     } 
+ 



Home | Main Index | Thread Index | Old Index