View | Details | Raw Unified | Return to bug 36001
Collapse All | Expand All

(-)newt/Makefile (-12 / +48 lines)
Lines 6-39 Link Here
6
#
6
#
7
7
8
PORTNAME=	newt
8
PORTNAME=	newt
9
PORTVERSION=	0.50.8.2
9
PORTVERSION=	${RPMVERSION}.${RPMREVISION}
10
CATEGORIES=	devel
10
CATEGORIES=	devel
11
MASTER_SITES=	ftp://ftp.redhat.com/pub/redhat/redhat-6.2-en/os/i386/SRPMS/
11
MASTER_SITES=	http://www.silug.org/%SUBDIR%/ \
12
12
		ftp://ftp.redhat.com/%SUBDIR%/ \
13
DISTNAME=	${PORTNAME}-0.50.8-2
13
		http://ftp.dulug.duke.edu/%SUBDIR%/ 
14
MASTER_SITE_SUBDIR=	pub/redhat/linux/rawhide/SRPMS/SRPMS
15
DISTNAME=	${PORTNAME}-${RPMVERSION}-${RPMREVISION}
14
EXTRACT_SUFX=	.src.rpm
16
EXTRACT_SUFX=	.src.rpm
17
PKGNAMESUFFIX=	${PYTHONSUFFIX}${TCLSUFFIX}
15
18
16
MAINTAINER=	ports@FreeBSD.org
19
MAINTAINER=	perky@fallin.lv
17
20
21
BUILD_DEPENDS=	rpm2cpio:${PORTSDIR}/archivers/rpm
18
LIB_DEPENDS=	slang.1:${PORTSDIR}/devel/libslang \
22
LIB_DEPENDS=	slang.1:${PORTSDIR}/devel/libslang \
19
		tcl82.1:${PORTSDIR}/lang/tcl82 \
20
		popt.0:${PORTSDIR}/devel/popt
23
		popt.0:${PORTSDIR}/devel/popt
21
BUILD_DEPENDS=	rpm2cpio:${PORTSDIR}/archivers/rpm \
22
		python1.5:${PORTSDIR}/lang/python15
23
24
24
USE_GMAKE=	yes
25
RPMVERSION=	0.50.33
26
RPMREVISION=	1
27
WRKSRC=		${WRKDIR}/newt-${RPMVERSION}
28
25
GNU_CONFIGURE=	yes
29
GNU_CONFIGURE=	yes
26
INSTALLS_SHLIB=	yes
30
INSTALLS_SHLIB=	yes
27
WRKSRC=		${WRKDIR}/newt-0.50.8
28
VERSION=	0
31
VERSION=	0
29
MAKE_ENV+=	prefix=${PREFIX} VERSION=${VERSION} CC=${CC} PCFLAGS="${CFLAGS}"
32
TCL_VERSION?=	tcl8.3
30
PLIST_SUB+=	VERSION="${VERSION}"
33
TCL_NODOT=	${TCL_VERSION:S/.//}
34
MAKE_ENV+=	VERSION=${VERSION} CC=${CC} PCFLAGS="${CFLAGS}" TCLVERSION="${TCL_VERSION}"
35
PLIST_SUB+=	VERSION=${VERSION} EXAMPLESDIR="${EXAMPLESDIR:S,${PREFIX}/,,}"
31
CPIO?=		/usr/bin/cpio
36
CPIO?=		/usr/bin/cpio
32
37
38
.if !defined(WITHOUT_PYTHON)
39
PYTHONSUFFIX=	-${PYTHON_PKGNAMEPREFIX:S/-//}
40
BUILD_DEPENDS+=	${PYDISTUTILS}
41
USE_PYTHON=	yes
42
MAKE_ENV+=	WITH_PYTHON=yes
43
PLIST_SUB+=	PYTHONOPT=""
44
.else
45
PLIST_SUB+=	PYTHONOPT="@comment "
46
.endif
47
48
.if !defined(WITHOUT_TCL)
49
TCLSUFFIX=	-${TCL_NODOT}
50
LIB_DEPENDS+=	${TCL_NODOT}:${PORTSDIR}/lang/${TCL_NODOT}
51
MAKE_ENV+=	WITH_TCL=yes
52
PLIST_SUB+=	TCLOPT=""
53
.else
54
PLIST_SUB+=	TCLOPT="@comment "
55
.endif
56
33
do-extract:
57
do-extract:
34
	@${RM} -rf ${WRKDIR}
58
	@${RM} -rf ${WRKDIR}
35
	@${MKDIR} ${WRKDIR}
59
	@${MKDIR} ${WRKDIR}
36
	@${LOCALBASE}/bin/rpm2cpio ${_DISTDIR}${DISTFILES} | (cd ${WRKDIR};${CPIO} -i)
60
	@${LOCALBASE}/bin/rpm2cpio ${_DISTDIR}${DISTFILES} | (cd ${WRKDIR};${CPIO} -i)
37
	@${TAR} xfz ${WRKSRC}.tar.gz -C ${WRKDIR}
61
	@${TAR} xfz ${WRKSRC}.tar.gz -C ${WRKDIR}
62
63
.if !defined(WITHOUT_PYTHON)
64
post-build:
65
	@cd ${WRKSRC} && ${MAKE_ENV} ${PYTHON_CMD} ${FILESDIR}/setup.py build
66
67
post-install:
68
	@cd ${WRKSRC} && ${MAKE_ENV} ${PYTHON_CMD} ${FILESDIR}/setup.py install
69
.if !defined(NOPORTDOCS)
70
	${MKDIR} ${EXAMPLESDIR}
71
	${INSTALL_SCRIPT} ${WRKSRC}/peanuts.py ${WRKSRC}/popcorn.py ${EXAMPLESDIR}
72
.endif
73
.endif
38
74
39
.include <bsd.port.mk>
75
.include <bsd.port.mk>
(-)newt/distinfo (-1 / +1 lines)
Line 1 Link Here
1
MD5 (newt-0.50.8-2.src.rpm) = e3af47fa49859b7a72ac03ab352c793f
1
MD5 (newt-0.50.33-1.src.rpm) = b8801b4aed32741859c061b791529159
(-)newt/files/patch-ab (-44 / +97 lines)
Lines 1-39 Link Here
1
--- Makefile.in.orig	Thu Feb  3 18:57:57 2000
1
--- Makefile.in.orig	Tue Jan 23 15:27:38 2001
2
+++ Makefile.in	Sat Jul 22 01:45:55 2000
2
+++ Makefile.in	Sun Mar 17 17:46:32 2002
3
@@ -1,16 +1,12 @@
3
@@ -1,18 +1,14 @@
4
-LIBS = -lslang -lm #-lefence
4
-LIBS = -lslang -lm #-lefence
5
-SHLIBS = -lslang -lm -lc
5
-SHLIBS = -lslang -lm -lc
6
+CC ?= cc
6
+CC ?= cc
7
+LIBS = -L$(PREFIX)/lib -lslang -ltcl82 -lpopt -lncurses -lm
7
+LIBS = -L$(PREFIX)/lib -lslang -lpopt -lncurses -lm
8
+TCLLIBS = -l${TCLVERSION:S/.//g}
8
+SHLIBS = $(LIBS)
9
+SHLIBS = $(LIBS)
9
 
10
 
10
-GPM_SUPPORT=@gpm_support@
11
-GPM_SUPPORT=@gpm_support@
11
+CFLAGS = $(PCFLAGS) -Wall -I$(prefix)/include -I$(prefix)/include/tcl8.2
12
+CFLAGS = $(PCFLAGS) -Wall -I$(prefix)/include -I$(prefix)/include/${TCLVERSION}
12
 
13
 
13
-CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang
14
-CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang
14
-ifeq ($(RPM_OPT_FLAGS),)
15
-ifeq ($(RPM_OPT_FLAGS),)
15
-CFLAGS += -g # -O2 -I/usr/include/slang
16
-CFLAGS += -g # -O2 -I/usr/include/slang
16
-endif
17
-endif
17
-
18
-VERSION = @VERSION@
19
+VERSION ?= 0
18
+VERSION ?= 0
20
 CVSTAG = r$(subst .,-,$(VERSION))
19
+SONAME = ${VERSION}
21
-SONAME = @SONAME@
22
+SONAME = $(VERSION)
23
 
20
 
24
 PROGS = test whiptail whiptcl.so testgrid testtree
21
-VERSION = @VERSION@
22
-CVSTAG = r$(subst .,-,$(VERSION))
23
-SONAME = @SONAME@
24
-
25
-PROGS = test whiptail whiptcl.so testgrid testtree
26
+PROGS = test whiptail testgrid testtree
25
 TESTOBJS = test.o
27
 TESTOBJS = test.o
26
@@ -25,7 +21,7 @@
28
 NDIALOGOBJS = whiptail.o dialogboxes.o
29
 WHIPTCLOBJS = whiptcl.o dialogboxes.o
30
@@ -25,51 +21,50 @@
27
 
31
 
28
 SHCFLAGS = -fPIC
32
 SHCFLAGS = -fPIC
29
 
33
 
30
-prefix = /usr
34
-prefix = /usr
31
+prefix ?= /usr/local
35
+prefix ?= ${PREFIX}
32
 includedir = $(prefix)/include
36
 includedir = $(prefix)/include
33
 libdir = $(prefix)/lib
37
 libdir = $(prefix)/lib
34
 bindir = $(prefix)/bin
38
 bindir = $(prefix)/bin
35
@@ -49,25 +45,25 @@
39
-ARCHNAME = $(shell uname -m | sed 's/i.86/i386/')
36
 all:	$(TARGET) _snackmodule.so
40
 pythondir = $(prefix)/lib/python1.5
41
 pythonbindir = $(prefix)/lib/python1.5/lib-dynload
42
 
43
 #--------------------------------------
44
 
45
-SOURCES = $(subst .o,.c,$(TESTOBJS) $(NDIALOGOBJS) $(LIBOBJS))
46
+SOURCES = ${TESTOBJS:S/.o/.c/g} ${NDIALOGOBJS:S/.o/.c/g} ${LIBOBJS:S/.o/.c/g}
47
 
48
 SHAREDDIR = shared
49
 SHAREDOBJS = $(patsubst %,$(SHAREDDIR)/%, $(LIBOBJS))
50
+.if defined(WITH_TCL)
51
+TCLTARGET=whiptcl.so
52
+.endif
53
+TARGET=${PROGS} ${TCLTARGET}
54
+
55
+.if !exists(.depend)
56
+TARGET+=depend
57
+.endif
58
 
59
-ifeq (.depend,$(wildcard .depend))
60
-TARGET=$(PROGS)
61
-else
62
-TARGET=depend $(PROGS)
63
-endif
64
-
65
-all:	$(TARGET) _snackmodule.so
66
+all:	$(TARGET)
37
 
67
 
38
 test:	$(TESTOBJS) $(LIBNEWT)
68
 test:	$(TESTOBJS) $(LIBNEWT)
39
-	gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
69
-	gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
Lines 45-71 Link Here
45
 
75
 
46
 testtree:	testtree.o $(LIBNEWT)
76
 testtree:	testtree.o $(LIBNEWT)
47
-	gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
77
-	gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
48
+	$(CC) -o testtree testtree.o $(LIBNEWT) $(LIBS)
78
-
49
 
79
-_snackmodule.so:   snackmodule.o $(LIBNEWTSH)
50
 _snackmodule.so:   snackmodule.o $(LIBNEWTSH)
80
-	gcc --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
51
-	gcc --shared -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
81
-
52
+	$(CC) --shared -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
82
-snackmodule.o:   snackmodule.c
53
 
54
 snackmodule.o:   snackmodule.c
55
-	gcc -I/usr/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c
83
-	gcc -I/usr/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c
56
+	$(CC) -I$(prefix)/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c
84
+	$(CC) -o testtree testtree.o $(LIBNEWT) $(LIBS)
57
 
85
 
58
 whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
86
 whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
59
-	gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
87
-	gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
60
+	$(CC) -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS)
88
+	$(CC) -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS)
61
 
89
 
90
+.if defined(WITH_TCL)
62
 whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
91
 whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
63
-	gcc -shared -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm
92
-	gcc -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm
64
+	$(CC) -shared -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) $(LIBS)
93
+	$(CC) -shared -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBS) $(TCLLIBS)
65
 
94
+.endif
66
 $(LIBNEWT): $(LIBNEWT)($(LIBOBJS))
95
 
67
 
96
-$(LIBNEWT): $(LIBNEWT)($(LIBOBJS))
68
@@ -90,7 +86,7 @@
97
+$(LIBNEWT): $(LIBOBJS)
98
+	ar q ${LIBNEWT} ${LIBOBJS}
99
+	ranlib ${LIBNEWT}
100
 
101
 newt.o: newt.c Makefile
102
 	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
103
@@ -82,7 +77,7 @@
104
 		$(SHAREDOBJS) *.so*
105
 
106
 depend:
107
-	$(CPP) $(CFLAGS) -M $(SOURCES) > .depend
108
+	mkdep $(CFLAGS) $(SOURCES)
109
 
110
 $(SHAREDDIR):
111
 	mkdir -p $(SHAREDDIR)
112
@@ -90,7 +85,7 @@
69
 sharedlib: $(LIBNEWTSH)
113
 sharedlib: $(LIBNEWTSH)
70
 
114
 
71
 $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
115
 $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
Lines 74-80 Link Here
74
 
118
 
75
 $(SHAREDDIR)/%.o : %.c
119
 $(SHAREDDIR)/%.o : %.c
76
 	$(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $<
120
 	$(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $<
77
@@ -100,21 +96,23 @@
121
@@ -100,21 +95,20 @@
78
 
122
 
79
 
123
 
80
 install: $(LIBNEWT) install-sh whiptail
124
 install: $(LIBNEWT) install-sh whiptail
Lines 84-98 Link Here
84
-	install -m 644 newt.h $(instroot)/$(includedir)
128
-	install -m 644 newt.h $(instroot)/$(includedir)
85
-	install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
129
-	install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
86
-	install -s -m 755 whiptail $(instroot)/$(bindir)
130
-	install -s -m 755 whiptail $(instroot)/$(bindir)
87
+	[ -d $(bindir) ] || install -m 755 -d $(bindir)
131
-
88
+	[ -d $(libdir) ] || install -m 755 -d $(libdir)
132
-install-sh: sharedlib whiptcl.so _snackmodule.so
89
+	[ -d $(includedir) ] || install -m 755 -d $(includedir)
90
+	install -c -m 644 newt.h $(includedir)
91
+	install -c -m 644 $(LIBNEWT) $(libdir)
92
+	install -c -s -m 755 whiptail $(bindir)
93
+
94
 
95
 install-sh: sharedlib whiptcl.so _snackmodule.so
96
-	[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
133
-	[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
97
-	install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
134
-	install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
98
-	ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so
135
-	ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so
Lines 100-113 Link Here
100
-	[ -d $(instroot)/$(pythonbindir) ] || install -m 755 -d $(instroot)/$(pythonbindir)
137
-	[ -d $(instroot)/$(pythonbindir) ] || install -m 755 -d $(instroot)/$(pythonbindir)
101
-	install -s -m 755 _snackmodule.so $(instroot)/$(pythonbindir)
138
-	install -s -m 755 _snackmodule.so $(instroot)/$(pythonbindir)
102
-	install -m 755 snack.py $(instroot)/$(pythondir)
139
-	install -m 755 snack.py $(instroot)/$(pythondir)
140
+	[ -d $(bindir) ] || install -m 755 -d $(bindir)
141
+	[ -d $(libdir) ] || install -m 755 -d $(libdir)
142
+	[ -d $(includedir) ] || install -m 755 -d $(includedir)
143
+	install -c -m 644 newt.h $(includedir)
144
+	install -c -m 644 $(LIBNEWT) $(libdir)
145
+	install -c -s -m 755 whiptail $(bindir)
146
+
147
+install-sh: sharedlib ${TCLTARGET}
103
+	[ -d $(libdir) ] || install -m 755 -d $(libdir)
148
+	[ -d $(libdir) ] || install -m 755 -d $(libdir)
104
+	install -c -m 755 $(LIBNEWTSH) $(libdir)
149
+	install -c -m 755 $(LIBNEWTSH) $(libdir)
105
+	ln -sf $(LIBNEWTSH) $(libdir)/libnewt.so
150
+	ln -sf $(LIBNEWTSH) $(libdir)/libnewt.so
151
+.if defined(WITH_TCL)
106
+	install -c -m 755 whiptcl.so $(libdir)
152
+	install -c -m 755 whiptcl.so $(libdir)
107
+	[ -d $(pythonbindir) ] || install -m 755 -d $(pythonbindir)
153
+.endif
108
+	install -c -m 755 _snackmodule.so $(pythonbindir)
109
+	install -c -m 755 snack.py $(pythondir)
110
+
111
 
154
 
112
 configure:  configure.in
155
 configure:  configure.in
113
 	autoconf
156
 	autoconf
157
@@ -133,6 +127,6 @@
158
 	@echo " "
159
 	@echo "The final archive is ./newt-$(VERSION).tar.gz."
160
 
161
-ifeq (.depend,$(wildcard .depend))
162
-include .depend
163
-endif
164
+.if exists(.depend)
165
+.include ".depend"
166
+.endif
(-)newt/files/setup.py (+15 lines)
Line 0 Link Here
1
# $FreeBSD$
2
import os
3
from distutils.core import setup, Extension
4
5
setup ( name = 'newt',
6
	version = '0.50.33',
7
	description = 'Python interface to Newt module',
8
	py_modules = ['snack'],
9
	ext_modules = [ Extension(
10
       		name='_snack',
11
		sources=['snackmodule.c'],
12
		include_dirs=['.', os.environ['PREFIX']+'/include'],
13
		library_dirs=['.', os.environ['PREFIX']+'/lib'],
14
		libraries=['newt', 'popt', 'slang', 'ncurses']
15
	)])
(-)newt/pkg-descr (-6 / +6 lines)
Lines 1-10 Link Here
1
   Newt is a windowing toolkit for text mode built from the slang
1
Newt is a windowing toolkit for text mode built from the slang
2
   library. It allows color text mode applications to easily use
2
library. It allows color text mode applications to easily use
3
   stackable windows, push buttons, check boxes, radio buttons, lists,   
3
stackable windows, push buttons, check boxes, radio buttons, lists,   
4
   entry fields, labels, and displayable text. Scrollbars are supported,
4
entry fields, labels, and displayable text. Scrollbars are supported,
5
   and forms may be nested to provide extra functionality.
5
and forms may be nested to provide extra functionality.
6
6
7
WWW: http://www.redhat.com/support/manuals/archive/RHL-5.1-Installation-Guide/ manual/doc102.html
7
WWW: http://www.msg.com.mx/Newt/
8
8
9
Besides the newt library, this port provides whiptail, which may
9
Besides the newt library, this port provides whiptail, which may
10
be used from shell scripts similarly to Savio Lam's "dialog". Newt
10
be used from shell scripts similarly to Savio Lam's "dialog". Newt
(-)newt/pkg-plist (-5 / +7 lines)
Lines 1-10 Link Here
1
bin/whiptail
1
bin/whiptail
2
lib/python1.5/lib-dynload/_snackmodule.so
2
%%PYTHONOPT%%lib/%%PYTHON_VERSION%%/site-packages/_snack.so
3
lib/python1.5/snack.py
3
%%PYTHONOPT%%lib/%%PYTHON_VERSION%%/site-packages/snack.py
4
lib/whiptcl.so
4
%%PYTHONOPT%%lib/%%PYTHON_VERSION%%/site-packages/snack.pyc
5
%%TCLOPT%%lib/whiptcl.so
5
lib/libnewt.a
6
lib/libnewt.a
6
lib/libnewt.so
7
lib/libnewt.so
7
lib/libnewt.so.%%VERSION%%
8
lib/libnewt.so.%%VERSION%%
8
include/newt.h
9
include/newt.h
9
@unexec rmdir %D/lib/python1.5/lib-dynload 2>/dev/null || true
10
%%PORTDOCS%%%%PYTHONOPT%%%%EXAMPLESDIR%%/peanuts.py
10
@unexec rmdir %D/lib/python1.5 2>/dev/null || true
11
%%PORTDOCS%%%%PYTHONOPT%%%%EXAMPLESDIR%%/popcorn.py
12
%%PORTDOCS%%%%PYTHONOPT%%@dirrm %%EXAMPLESDIR%%

Return to bug 36001