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

(-)devel/newt/Makefile (-30 / +21 lines)
Lines 1-7 Link Here
1
# $FreeBSD: head/devel/newt/Makefile 336856 2013-12-18 18:57:48Z wg $
1
# $FreeBSD: head/devel/newt/Makefile 336856 2013-12-18 18:57:48Z wg $
2
2
3
PORTNAME=	newt
3
PORTNAME=	newt
4
PORTVERSION=	0.52.16
4
PORTVERSION=	0.52.17
5
CATEGORIES=	devel
5
CATEGORIES=	devel
6
MASTER_SITES=	https://fedorahosted.org/releases/n/e/newt/
6
MASTER_SITES=	https://fedorahosted.org/releases/n/e/newt/
7
7
Lines 11-21 Link Here
11
LIB_DEPENDS=	libslang.so:${PORTSDIR}/devel/libslang2 \
11
LIB_DEPENDS=	libslang.so:${PORTSDIR}/devel/libslang2 \
12
		libpopt.so:${PORTSDIR}/devel/popt
12
		libpopt.so:${PORTSDIR}/devel/popt
13
13
14
OPTIONS_DEFINE=	TCL NLS
14
USES=		gmake
15
16
USES+=		gmake
17
GNU_CONFIGURE=	yes
15
GNU_CONFIGURE=	yes
18
MAKE_ENV=	PCFLAGS="${CFLAGS}" TCLVERSION="tcl${TCL_VER}"
16
MAKE_ENV=	PCFLAGS="${CFLAGS}"
19
USE_LDCONFIG=	yes
17
USE_LDCONFIG=	yes
20
MAKE_JOBS_UNSAFE=	yes
18
MAKE_JOBS_UNSAFE=	yes
21
19
Lines 25-58 Link Here
25
PLIST_SUB=	SOVERSION="${SOVERSION}" \
23
PLIST_SUB=	SOVERSION="${SOVERSION}" \
26
		VERSION="${PORTVERSION}"
24
		VERSION="${PORTVERSION}"
27
25
26
SUB_FILES=	pkgIndex.tcl
28
SUB_LIST=	VERSION="${PORTVERSION}"
27
SUB_LIST=	VERSION="${PORTVERSION}"
29
28
30
SOVERSION=	${PORTVERSION:R:E}
29
OPTIONS_DEFINE=		NLS TCL
30
OPTIONS_SUB=		yes
31
31
32
.include <bsd.port.options.mk>
32
NLS_USES=		gettext
33
NLS_CONFIGURE_ENABLE=	nls
34
TCL_USES=		tcl
35
TCL_CONFIGURE_ENV=	ac_cv_c_tclconfig=${TCL_LIBDIR:Q}
36
TCL_CONFIGURE_WITH=	tcl
37
TCL_CPPFLAGS=		-I${TCL_INCLUDEDIR:Q}
33
38
34
.if ${PORT_OPTIONS:MNLS}
39
SOVERSION=	${PORTVERSION:R:E}
35
USES+=		gettext
36
PLIST_SUB+=	NLS=""
37
.else
38
CONFIGURE_ARGS+=--disable-nls
39
PLIST_SUB+=	NLS="@comment "
40
.endif
41
40
42
.if ${PORT_OPTIONS:MTCL}
41
.include <bsd.port.options.mk>
43
USES+=		tcl
44
MAKE_ENV+=	TCL_LIBDIR=${TCL_LIBDIR:Q}
45
CPPFLAGS+=	-I${TCL_INCLUDEDIR:Q}
46
SUB_FILES+=	pkgIndex.tcl
47
PLIST_SUB+=	TCLOPT="" TCL_LIBDIR=${TCL_LIBDIR:S,${PREFIX}/,,}
48
.else
49
CONFIGURE_ARGS+=--without-tcl
50
PLIST_SUB+=	TCLOPT="@comment "
51
.endif
52
42
53
post-patch:
43
post-patch:
54
	@${REINPLACE_CMD} -e \
44
	@${REINPLACE_CMD} -e \
55
		'/^SONAME/s|=.*|=${SOVERSION}|' ${WRKSRC}/configure
45
		'/^SONAME/s|=.*|=${SOVERSION}| ; \
46
		 s|-DUSE_INTERP_RESULT||' ${WRKSRC}/configure
56
	@${REINPLACE_CMD} -e \
47
	@${REINPLACE_CMD} -e \
57
		's|@CPP@|@CC@ -E| ; \
48
		's|@CPP@|@CC@ -E| ; \
58
		 s|-I/usr/include/slang|| ; \
49
		 s|-I/usr/include/slang|| ; \
Lines 61-79 Link Here
61
		 /make -C/s|^|#| ; \
52
		 /make -C/s|^|#| ; \
62
		 /whiptcl.$$(SOEXT)/s|install|${TRUE}|' ${WRKSRC}/Makefile.in
53
		 /whiptcl.$$(SOEXT)/s|install|${TRUE}|' ${WRKSRC}/Makefile.in
63
54
64
post-build:	apply-slist
65
66
post-install:
55
post-install:
67
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/whiptail
56
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/whiptail
68
.if ${PORT_OPTIONS:MNLS}
57
.if ${PORT_OPTIONS:MNLS}
69
	@(cd ${WRKSRC}/po && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
58
	@(cd ${WRKSRC}/po && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
70
		${MAKEFILE} ${MAKE_ARGS} datadir=${STAGEDIR}${PREFIX}/share \
59
		${MAKEFILE} ${MAKE_ARGS} datadir=${STAGEDIR}${PREFIX}/share \
71
		${INSTALL_TARGET})
60
		${INSTALL_TARGET})
72
.endif
61
.endif
73
.if ${PORT_OPTIONS:MTCL}
62
.if ${PORT_OPTIONS:MTCL}
74
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION}
63
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION}
75
	(cd ${WRKSRC} && ${INSTALL_DATA} whiptcl.so ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
64
	(cd ${WRKSRC} && ${INSTALL_LIB} whiptcl.so \
76
	(cd ${WRKDIR} && ${INSTALL_DATA} pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
65
		${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
66
	(cd ${WRKDIR} && ${INSTALL_DATA} pkgIndex.tcl \
67
		${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
77
.endif
68
.endif
78
69
79
.include <bsd.port.mk>
70
.include <bsd.port.mk>
(-)devel/newt/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (newt-0.52.16.tar.gz) = 1b9574bc9c8fb7b25cd26e5c3f2840e8c17fde5dd09c759604925919b3589cd3
1
SHA256 (newt-0.52.17.tar.gz) = 69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b
2
SIZE (newt-0.52.16.tar.gz) = 183487
2
SIZE (newt-0.52.17.tar.gz) = 178920
(-)devel/newt/files/patch-whiptcl.c (+106 lines)
Line 0 Link Here
1
--- whiptcl.c.orig
2
+++ whiptcl.c
3
@@ -137,45 +137,45 @@
4
     
5
     if (arg < -1) {
6
 	/* this could buffer oveflow, bug we're not setuid so I don't care */
7
-	interp->result = malloc(200);
8
-	interp->freeProc = TCL_DYNAMIC;
9
-	sprintf(interp->result, "%s: %s\n", 
10
+	char *tmp = malloc(200);
11
+	sprintf(tmp, "%s: %s\n", 
12
 		poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
13
 		poptStrerror(arg));
14
+	Tcl_SetResult(interp, tmp, TCL_DYNAMIC);
15
 
16
 	return TCL_ERROR;
17
     }
18
 
19
     if (mode == MODE_NONE) {
20
-	interp->result = "no dialog mode was specified";
21
+	Tcl_SetResult(interp, "no dialog mode was specified", TCL_STATIC);
22
 	return TCL_ERROR;
23
     } else if (rc) {
24
-	interp->result = "multiple modes were specified";
25
+	Tcl_SetResult(interp, "multiple modes were specified", TCL_STATIC);
26
 	return TCL_ERROR;
27
     }
28
 
29
     if (!(text = poptGetArg(optCon))) {
30
-	interp->result = "missing text parameter";
31
+	Tcl_SetResult(interp, "missing text parameter", TCL_STATIC);
32
 	return TCL_ERROR;
33
     }
34
 
35
     if (!(nextArg = poptGetArg(optCon))) {
36
-	interp->result = "height missing";
37
+	Tcl_SetResult(interp, "height missing", TCL_STATIC);
38
 	return TCL_ERROR;
39
     }
40
     height = strtoul(nextArg, &end, 10);
41
     if (*end) {
42
-	interp->result = "height is not a number";
43
+	Tcl_SetResult(interp, "height is not a number", TCL_STATIC);
44
 	return TCL_ERROR;
45
     }
46
 
47
     if (!(nextArg = poptGetArg(optCon))) {
48
-	interp->result = "width missing";
49
+	Tcl_SetResult(interp, "width missing", TCL_STATIC);
50
 	return TCL_ERROR;
51
     }
52
     width = strtoul(nextArg, &end, 10);
53
     if (*end) {
54
-	interp->result = "width is not a number";
55
+	Tcl_SetResult(interp, "width is not a number", TCL_STATIC);
56
 	return TCL_ERROR;
57
     }
58
 
59
@@ -196,33 +196,30 @@
60
       case MODE_YESNO:
61
 	rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
62
 	if (rc == DLG_OKAY)
63
-	    interp->result = "yes";
64
+	    Tcl_SetResult(interp, "yes", TCL_STATIC);
65
 	else 
66
-	    interp->result = "no";
67
+	    Tcl_SetResult(interp, "no", TCL_STATIC);
68
 	if (rc == DLG_ERROR) rc = 0;
69
 	break;
70
 
71
       case MODE_INPUTBOX:
72
 	rc = inputBox(text, height, width, optCon, flags, &result);
73
 	if (rc ==DLG_OKAY) {
74
-	    interp->result = result;
75
-	    interp->freeProc = TCL_DYNAMIC;
76
+	    Tcl_SetResult(interp, strdup(result), TCL_DYNAMIC);
77
 	}
78
 	break;
79
 
80
       case MODE_MENU:
81
 	rc = listBox(text, height, width, optCon, flags, default_item, &result);
82
 	if (rc==DLG_OKAY) {
83
-	    interp->result = result;
84
-	    interp->freeProc = TCL_DYNAMIC;
85
+	    Tcl_SetResult(interp, strdup(result), TCL_DYNAMIC);
86
 	}
87
 	break;
88
 
89
       case MODE_RADIOLIST:
90
 	rc = checkList(text, height, width, optCon, 1, flags, &selections);
91
 	if (rc==DLG_OKAY) {
92
-	    interp->result = selections[0];
93
-	    interp->freeProc = TCL_DYNAMIC;
94
+	    Tcl_SetResult(interp, strdup(selections[0]), TCL_DYNAMIC);
95
 
96
 	    free(selections);
97
 	}
98
@@ -247,7 +244,7 @@
99
     newtPopWindow();
100
 
101
     if (rc == DLG_ERROR) {
102
-	interp->result = "bad paramter for whiptcl dialog box";
103
+	Tcl_SetResult(interp, "bad paramter for whiptcl dialog box", TCL_STATIC);
104
 	return TCL_ERROR;
105
     } 
106
 
(-)devel/newt/pkg-plist (-6 / +4 lines)
Lines 4-13 Link Here
4
lib/libnewt.so
4
lib/libnewt.so
5
lib/libnewt.so.%%SOVERSION%%
5
lib/libnewt.so.%%SOVERSION%%
6
lib/libnewt.so.%%VERSION%%
6
lib/libnewt.so.%%VERSION%%
7
man/man1/whiptail.1.gz
7
%%TCL%%lib/whip%%VERSION%%/pkgIndex.tcl
8
%%TCLOPT%%lib/whip%%VERSION%%/pkgIndex.tcl
8
%%TCL%%lib/whip%%VERSION%%/whiptcl.so
9
%%TCLOPT%%lib/whip%%VERSION%%/whiptcl.so
10
libdata/pkgconfig/libnewt.pc
9
libdata/pkgconfig/libnewt.pc
10
man/man1/whiptail.1.gz
11
%%NLS%%share/locale/ar/LC_MESSAGES/newt.mo
11
%%NLS%%share/locale/ar/LC_MESSAGES/newt.mo
12
%%NLS%%share/locale/as/LC_MESSAGES/newt.mo
12
%%NLS%%share/locale/as/LC_MESSAGES/newt.mo
13
%%NLS%%share/locale/ast/LC_MESSAGES/newt.mo
13
%%NLS%%share/locale/ast/LC_MESSAGES/newt.mo
Lines 97-104 Link Here
97
%%NLS%%@dirrmtry share/locale/mr
97
%%NLS%%@dirrmtry share/locale/mr
98
%%NLS%%@dirrmtry share/locale/mg/LC_MESSAGES
98
%%NLS%%@dirrmtry share/locale/mg/LC_MESSAGES
99
%%NLS%%@dirrmtry share/locale/mg
99
%%NLS%%@dirrmtry share/locale/mg
100
%%NLS%%@dirrmtry share/locale/lv/LC_MESSAGES
101
%%NLS%%@dirrmtry share/locale/lv
102
%%NLS%%@dirrmtry share/locale/ku/LC_MESSAGES
100
%%NLS%%@dirrmtry share/locale/ku/LC_MESSAGES
103
%%NLS%%@dirrmtry share/locale/ku
101
%%NLS%%@dirrmtry share/locale/ku
104
%%NLS%%@dirrmtry share/locale/km/LC_MESSAGES
102
%%NLS%%@dirrmtry share/locale/km/LC_MESSAGES
Lines 115-118 Link Here
115
%%NLS%%@dirrmtry share/locale/ast
113
%%NLS%%@dirrmtry share/locale/ast
116
%%NLS%%@dirrmtry share/locale/as/LC_MESSAGES
114
%%NLS%%@dirrmtry share/locale/as/LC_MESSAGES
117
%%NLS%%@dirrmtry share/locale/as
115
%%NLS%%@dirrmtry share/locale/as
118
%%TCLOPT%%@dirrm lib/whip%%VERSION%%
116
%%TCL%%@dirrm lib/whip%%VERSION%%

Return to bug 187053