summaryrefslogtreecommitdiff
path: root/devel/newt/files
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-01-10 23:40:08 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-01-10 23:40:08 +0000
commit295a710b0ec58c19bae918a4abcc033b471dadae (patch)
tree6fabe5319f0c1e6663d2595afd9a0d5c3d1a71d1 /devel/newt/files
parent* Update to 1.8.5 (diff)
- Update to 0.5.11 [1]
- sort pkg-plist - bump PORTREVISION for SHLIB bump Submitted by: mi (via e-mail) [1] with minor changes
Notes
Notes: svn path=/head/; revision=247548
Diffstat (limited to 'devel/newt/files')
-rw-r--r--devel/newt/files/patch-ab198
-rw-r--r--devel/newt/files/patch-newt.c19
-rw-r--r--devel/newt/files/patch-whiptail8
-rw-r--r--devel/newt/files/patch-whiptcl74
-rw-r--r--devel/newt/files/pkgIndex.tcl.in2
-rw-r--r--devel/newt/files/setup.py18
-rw-r--r--devel/newt/files/setup.py.in30
7 files changed, 167 insertions, 182 deletions
diff --git a/devel/newt/files/patch-ab b/devel/newt/files/patch-ab
index 788978b5851b..8cec608542d4 100644
--- a/devel/newt/files/patch-ab
+++ b/devel/newt/files/patch-ab
@@ -1,170 +1,62 @@
---- Makefile.in.orig Thu Aug 15 13:18:11 2002
-+++ Makefile.in Fri Mar 19 03:29:21 2004
-@@ -1,36 +1,43 @@
--LIBS = -lslang -lm #-lefence
--SHLIBS = -lslang -lm -lc
-+LIBS = -lslang -lm -lpopt -lncurses #-lefence
-+SHLIBS = -lslang -lm -lc -lpopt -lncurses
-
- GPM_SUPPORT=@gpm_support@
-
--CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang -D_GNU_SOURCE
--ifeq ($(RPM_OPT_FLAGS),)
--CFLAGS += -g
--endif
-+CFLAGS += -I/usr/include -I${LOCALBASE}/include -I${PREFIX}/include
-+LDFLAGS += -L/usr/lib -L${LOCALBASE}/lib -L${PREFIX}/lib
-
- VERSION = @VERSION@
- CVSTAG = r$(subst .,-,$(VERSION))
- SONAME = @SONAME@
-
--PYTHONVERS = $(shell ls -d /usr/include/python* | sed "s|/usr/include/||g")
-+#PYTHONVERS = $(shell ls -d /usr/include/python* | sed "s|/usr/include/||g")
-
--WHIPTCLSO=
--#WHIPTCLSO=whiptcl.so
-+.if defined(WITH_TCL)
-+WHIPTCLSO=whiptcl.so
-+CFLAGS += -I${LOCALBASE}/include/${TCLVERSION}
-+LDFLAGS += -L${LOCALBASE}/lib/${TCLVERSION}
-+SHLIBS += -l${TCLVERSION:S,.,,}
-+.endif
-+TARGET=${LIBNEWT} ${PROGS} ${WHIPTCLSO}
-
--PROGS = test whiptail $(WHIPTCLSO) testgrid testtree
-+PROGS = test whiptail testgrid testtree
- TESTOBJS = test.o
- NDIALOGOBJS = whiptail.o dialogboxes.o
- WHIPTCLOBJS = whiptcl.o dialogboxes.o
- LIBNEWT = libnewt.a
--LIBNEWTSH = libnewt.so.$(VERSION)
-+LIBNEWTSH = libnewt.so.$(SONAME)
- LIBNEWTSONAME = libnewt.so.$(SONAME)
- LIBOBJS = newt.o button.o form.o checkbox.o entry.o label.o listbox.o \
- scrollbar.o textbox.o scale.o grid.o windows.o buttonbar.o \
- checkboxtree.o
-
--SHCFLAGS = -fPIC
-+LIBSHOBJS = newt.So button.So form.So checkbox.So entry.So label.So listbox.So \
-+ scrollbar.So textbox.So scale.So grid.So windows.So buttonbar.So \
-+ checkboxtree.So
-
--prefix = /usr
-+SHCFLAGS = ${CFLAGS} -fPIC
-+
-+prefix = ${PREFIX}
- includedir = $(prefix)/include
- libdir = $(prefix)/lib
- bindir = $(prefix)/bin
-@@ -38,44 +45,41 @@
-
- #--------------------------------------
-
--SOURCES = $(subst .o,.c,$(TESTOBJS) $(NDIALOGOBJS) $(LIBOBJS))
-+SOURCES = $(subst .o,.c,$(TESTOBJS) $(NDIALOGOBJS) $(LIBOBJS)) $(subst .So,.c,$(LIBSHOBJS))
-
--SHAREDDIR = shared
--SHAREDOBJS = $(patsubst %,$(SHAREDDIR)/%, $(LIBOBJS))
-+.SUFFIXES: .o .So
-
--ifeq (.depend,$(wildcard .depend))
--TARGET=$(PROGS)
--else
--TARGET=depend $(PROGS)
--endif
-+SHAREDOBJS = ${LIBSHOBJS}
+--- Makefile.in 2009-09-24 11:03:09.000000000 -0400
++++ Makefile.in 2010-01-06 01:33:55.000000000 -0500
+@@ -51,5 +51,5 @@
+ endif
-all: $(TARGET) _snackmodule.so
+all: $(TARGET)
- test: $(TESTOBJS) $(LIBNEWT)
-- gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
-+ ${CC} -g ${LDFLAGS} -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
-
- testgrid: testgrid.o $(LIBNEWT)
-- gcc -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
-+ ${CC} -g ${LDFLAGS} -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
-
- testtree: testtree.o $(LIBNEWT)
-- gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
-+ ${CC} -g ${LDFLAGS} -o testtree testtree.o $(LIBNEWT) $(LIBS)
+ test: test.o $(LIBNEWT)
+@@ -68,11 +68,11 @@
+ $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
++ifdef PYTHONVERS
++install-sh: _snackmodule.so
++all: _snackmodule.so
_snackmodule.so: snackmodule.c $(LIBNEWTSH)
- for ver in $(PYTHONVERS) ; do \
- if [ ! -f "$$ver/_snackmodule.so" -o $(LIBNEWTSH) -nt "$$ver/_snackmodule.so" ]; then \
- mkdir -p $$ver ;\
-- gcc $(CFLAGS) -I/usr/include/$$ver -fPIC -c -o $$ver/snackmodule.o snackmodule.c ;\
-- gcc --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . $(LIBNEWTSH) ;\
-+ ${CC} $(CFLAGS) -I/usr/include/$$ver -fPIC -c -o $$ver/snackmodule.o snackmodule.c ;\
-+ ${CC} --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . $(LIBNEWTSH) ;\
- fi ; \
- done
+- for ver in $(PYTHONVERS) ; do \
+- mkdir -p $$ver ;\
+- $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
+- $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . -lnewt ;\
+- done
+- touch $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -I${LOCALBASE}/include/python${PYTHONVERS} $(SHCFLAGS) -c -o snackmodule.o snackmodule.c
++ $(CC) --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . -lnewt
++endif
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
-- gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
-+ ${CC} -g ${LDFLAGS} -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
+@@ -80,5 +80,5 @@
whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
-- gcc -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm
-+ ${CC} -shared ${LDFLAGS} $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) ${LIBS}
-
--$(LIBNEWT): $(LIBNEWT)($(LIBOBJS))
-+$(LIBNEWT): $(LIBOBJS)
-+ ar q ${LIBNEWT} ${LIBOBJS}
-+ ranlib ${LIBNEWT}
-
- newt.o: newt.c Makefile
- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
-@@ -90,20 +94,16 @@
- depend:
- $(CPP) $(CFLAGS) -M $(SOURCES) > .depend
-
--$(SHAREDDIR):
-- mkdir -p $(SHAREDDIR)
--
- sharedlib: $(LIBNEWTSH)
-
--$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
-- gcc -shared -o $(LIBNEWTSH) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(SHLIBS)
-+$(LIBNEWTSH): $(SHAREDOBJS)
-+ ${CC} -shared ${LDFLAGS} -o $(LIBNEWTSH) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(SHLIBS)
-
--$(SHAREDDIR)/%.o : %.c
-+.c.So:
- $(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $<
-
--$(SHAREDDIR)/newt.o: newt.c Makefile
-- $(CC) $(SHCFLAGS) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
--
-+newt.So: newt.c Makefile
-+ $(CC) $(SHCFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
-
- install: $(LIBNEWT) install-sh whiptail
- [ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
-@@ -113,16 +113,11 @@
- install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
- install -s -m 755 whiptail $(instroot)/$(bindir)
+- $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lpopt
++ $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) $(LIBS) -lpopt
+
+ $(LIBNEWT): $(LIBOBJS)
+@@ -119,18 +119,18 @@
+ install -m 755 whiptail $(instroot)/$(bindir)
+ install -m 644 whiptail.1 $(instroot)/$(man1dir)
+- make -C po datadir=$(instroot)/$(datadir) install
+- install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
++ ${MAKE} -C po datadir=$(instroot)/$(datadir) install
++ install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
-install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
+install-sh: sharedlib $(WHIPTCLSO)
[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
- install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
- ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so
- [ -n "$(WHIPTCLSO)" ] && install -s -m 755 whiptcl.so $(instroot)/$(libdir) || :
+ install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
+ ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
+ ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
+- [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
- for ver in $(PYTHONVERS) ; do \
- [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
-- install -s -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
-- install -m 755 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
+- install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
+- install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
- done
-
- configure: configure.in
- autoconf
-@@ -140,7 +135,3 @@
- @rm -f /tmp/newt-$(VERSION).tar.gz
- @echo " "
- @echo "The final archive is ./newt-$(VERSION).tar.gz."
--
--ifeq (.depend,$(wildcard .depend))
--include .depend
--endif
++ [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so ${TCL_LIBDIR}/whip || :
++ifdef PYTHONVERS
++ [ -d $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
++ install -m 755 _snackmodule.so $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
++ install -m 644 snack.py $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
++endif
+
+ Makefile: newt.spec
diff --git a/devel/newt/files/patch-newt.c b/devel/newt/files/patch-newt.c
index bdf88775603e..28166be177e8 100644
--- a/devel/newt/files/patch-newt.c
+++ b/devel/newt/files/patch-newt.c
@@ -1,15 +1,12 @@
$FreeBSD$
---- newt.c
-+++ newt.c
-@@ -94,6 +94,9 @@
- { "\033[6~", NEWT_KEY_PGDN, NULL },
- { "\033V", NEWT_KEY_PGUP, "kH" },
- { "\033v", NEWT_KEY_PGUP, "kH" },
-+
-+ { "\033[G", NEWT_KEY_PGDN, NULL },
-+ { "\033[I", NEWT_KEY_PGUP, NULL },
+--- newt.c 2009-09-24 11:03:09.000000000 -0400
++++ newt.c 2010-01-06 01:04:01.000000000 -0500
+@@ -99,4 +99,6 @@
+ { "\033V", NEWT_KEY_PGUP, NULL },
+ { "\033v", NEWT_KEY_PGUP, NULL },
++ { "\033[G", NEWT_KEY_PGDN, NULL },
++ { "\033[I", NEWT_KEY_PGUP, NULL },
+ { "\026", NEWT_KEY_PGDN, NULL },
- { "\033[[A", NEWT_KEY_F1, NULL },
- { "\033[[B", NEWT_KEY_F2, NULL },
diff --git a/devel/newt/files/patch-whiptail b/devel/newt/files/patch-whiptail
new file mode 100644
index 000000000000..c6fd1f8bfec1
--- /dev/null
+++ b/devel/newt/files/patch-whiptail
@@ -0,0 +1,8 @@
+--- whiptail.c 2009-09-24 11:03:09.000000000 -0400
++++ whiptail.c 2010-01-06 01:17:31.000000000 -0500
+@@ -9,4 +9,5 @@
+ #include <wchar.h>
+ #include <slang.h>
++#include <sys/stat.h>
+
+ #include "nls.h"
diff --git a/devel/newt/files/patch-whiptcl b/devel/newt/files/patch-whiptcl
new file mode 100644
index 000000000000..e0b52e2afec0
--- /dev/null
+++ b/devel/newt/files/patch-whiptcl
@@ -0,0 +1,74 @@
+--- whiptcl.c 2009-09-24 11:03:09.000000000 -0400
++++ whiptcl.c 2010-01-06 02:44:52.000000000 -0500
+@@ -6,6 +6,6 @@
+ #include "dialogboxes.h"
+ #include "newt.h"
+-#include "popt.h"
+-#include "tcl.h"
++#include <popt.h>
++#include <tcl.h>
+
+ enum mode { MODE_NONE, MODE_MSGBOX, MODE_YESNO, MODE_CHECKLIST, MODE_INPUTBOX,
+@@ -20,12 +20,12 @@
+
+ static char * setBacktext(ClientData data, Tcl_Interp * interp,
+- char * name1, char * name2, int flags);
++ const char * name1, const char * name2, int flags);
+ static char * setHelptext(ClientData data, Tcl_Interp * interp,
+- char * name1, char * name2, int flags);
++ const char * name1, const char * name2, int flags);
+ static char * setFullButtons(ClientData data, Tcl_Interp * interp,
+- char * name1, char * name2, int flags);
++ const char * name1, const char * name2, int flags);
+
+ static int wtFinish(ClientData clientData, Tcl_Interp * interp, int argc,
+- char ** argv) {
++ const char ** argv) {
+ newtFinished();
+
+@@ -34,5 +34,5 @@
+
+ static int wtInit(ClientData clientData, Tcl_Interp * interp, int argc,
+- char ** argv) {
++ const char ** argv) {
+ newtInit();
+ newtCls();
+@@ -239,5 +239,5 @@
+
+ case MODE_NONE:
+- /* this can't happen */
++ ; /* this can't happen */
+ break;
+ }
+@@ -259,5 +259,5 @@
+
+ static char * setBacktext(ClientData data, Tcl_Interp * interp,
+- char * name1, char * name2, int flags) {
++ const char * name1, const char * name2, int flags) {
+ static char blankLine[81] = " "
+ " ";
+@@ -271,6 +271,6 @@
+
+ static char * setHelptext(ClientData data, Tcl_Interp * interp,
+- char * name1, char * name2, int flags) {
+- char * text = Tcl_GetVar(interp, "whiptcl_helpline", TCL_GLOBAL_ONLY);
++ const char * name1, const char * name2, int flags) {
++ const char * text = Tcl_GetVar(interp, "whiptcl_helpline", TCL_GLOBAL_ONLY);
+
+ if (!text)
+@@ -286,6 +286,6 @@
+
+ static char * setFullButtons(ClientData data, Tcl_Interp * interp,
+- char * name1, char * name2, int flags) {
+- char * val = Tcl_GetVar(interp, "whiptcl_fullbuttons", TCL_GLOBAL_ONLY);
++ const char * name1, const char * name2, int flags) {
++ const char * val = Tcl_GetVar(interp, "whiptcl_fullbuttons", TCL_GLOBAL_ONLY);
+ int rc;
+ int state;
+@@ -306,4 +306,6 @@
+ Tcl_CreateCommand(interp, "whiptcl_cmd", (Tcl_CmdProc *) wtCmd, NULL, NULL);
+
++ Tcl_PkgProvide(interp, "Whip", VERSION);
++
+ return TCL_OK;
+ }
diff --git a/devel/newt/files/pkgIndex.tcl.in b/devel/newt/files/pkgIndex.tcl.in
new file mode 100644
index 000000000000..5fc445258ff5
--- /dev/null
+++ b/devel/newt/files/pkgIndex.tcl.in
@@ -0,0 +1,2 @@
+package ifneeded Whip %%VERSION%% [list load [file join $dir whiptcl.so]]
+package ifneeded Whip %%VERSION%% [list load [file join $dir whiptcl.so]]
diff --git a/devel/newt/files/setup.py b/devel/newt/files/setup.py
deleted file mode 100644
index 6c5e3fe1f5b4..000000000000
--- a/devel/newt/files/setup.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# $FreeBSD$
-import os
-from distutils.core import setup, Extension
-
-LOCALBASE = os.environ['LOCALBASE']
-PREFIX = os.environ['PREFIX']
-
-setup ( name = 'newt',
- version = '0.50.33',
- description = 'Python interface to Newt module',
- py_modules = ['snack'],
- ext_modules = [ Extension(
- name='_snack',
- sources=['snackmodule.c'],
- include_dirs=['.', LOCALBASE+'/include', PREFIX+'/include'],
- library_dirs=['.', LOCALBASE+'/lib', PREFIX+'/lib'],
- libraries=['newt', 'popt', 'slang', 'ncurses']
- )])
diff --git a/devel/newt/files/setup.py.in b/devel/newt/files/setup.py.in
new file mode 100644
index 000000000000..a9b64f6a1f31
--- /dev/null
+++ b/devel/newt/files/setup.py.in
@@ -0,0 +1,30 @@
+# $FreeBSD: /tmp/pcvs/ports/devel/newt/files/setup.py.in,v 1.1 2010-01-10 23:40:05 pgollucci Exp $
+import os
+from distutils.core import setup, Extension
+
+setup ( name = 'newt',
+ version = '%%VERSION%%',
+ description = 'Python interface to Newt module',
+ py_modules = ['snack'],
+ ext_modules = [ Extension(
+ name='_snack',
+ sources=['snackmodule.c'],
+ include_dirs=['.', '%%LOCALBASE%%'+'/include', '%%PREFIX%%'+'/include'],
+ library_dirs=['.', '%%LOCALBASE%%'+'/lib', '%%PREFIX%%'+'/lib'],
+ libraries=['newt', 'popt', 'slang', 'ncurses']
+ )])
+# $FreeBSD: /tmp/pcvs/ports/devel/newt/files/setup.py.in,v 1.1 2010-01-10 23:40:05 pgollucci Exp $
+import os
+from distutils.core import setup, Extension
+
+setup ( name = 'newt',
+ version = '%%VERSION%%',
+ description = 'Python interface to Newt module',
+ py_modules = ['snack'],
+ ext_modules = [ Extension(
+ name='_snack',
+ sources=['snackmodule.c'],
+ include_dirs=['.', '%%LOCALBASE%%'+'/include', '%%PREFIX%%'+'/include'],
+ library_dirs=['.', '%%LOCALBASE%%'+'/lib', '%%PREFIX%%'+'/lib'],
+ libraries=['newt', 'popt', 'slang', 'ncurses']
+ )])