aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2014-02-27 17:02:56 +0800
committermiwi <miwi@FreeBSD.org>2014-02-27 17:02:56 +0800
commit4d2f810b1cfcddc43854456ec43d251f16528d81 (patch)
tree2344184b6b2f51e7f27f2a06d21f0063567c3a0c
parent7c1dc91344c9f9552885821240512002cfe053d2 (diff)
downloadfreebsd-ports-gnome-4d2f810b1cfcddc43854456ec43d251f16528d81.tar.gz
freebsd-ports-gnome-4d2f810b1cfcddc43854456ec43d251f16528d81.tar.zst
freebsd-ports-gnome-4d2f810b1cfcddc43854456ec43d251f16528d81.zip
-- Update to version 0.52.17
PR: 187053
-rw-r--r--devel/newt/Makefile51
-rw-r--r--devel/newt/distinfo4
-rw-r--r--devel/newt/files/patch-whiptcl.c106
-rw-r--r--devel/newt/pkg-plist10
4 files changed, 133 insertions, 38 deletions
diff --git a/devel/newt/Makefile b/devel/newt/Makefile
index 572b1c645763..fb17fc150ff6 100644
--- a/devel/newt/Makefile
+++ b/devel/newt/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= newt
-PORTVERSION= 0.52.16
+PORTVERSION= 0.52.17
CATEGORIES= devel
MASTER_SITES= https://fedorahosted.org/releases/n/e/newt/
@@ -11,11 +11,9 @@ COMMENT= Not Eriks Windowing Toolkit: console I/O handling library
LIB_DEPENDS= libslang.so:${PORTSDIR}/devel/libslang2 \
libpopt.so:${PORTSDIR}/devel/popt
-OPTIONS_DEFINE= TCL NLS
-
-USES+= gmake
+USES= gmake
GNU_CONFIGURE= yes
-MAKE_ENV= PCFLAGS="${CFLAGS}" TCLVERSION="tcl${TCL_VER}"
+MAKE_ENV= PCFLAGS="${CFLAGS}"
USE_LDCONFIG= yes
MAKE_JOBS_UNSAFE= yes
@@ -25,34 +23,27 @@ LDFLAGS+= -L${LOCALBASE}/lib -lcurses
PLIST_SUB= SOVERSION="${SOVERSION}" \
VERSION="${PORTVERSION}"
+SUB_FILES= pkgIndex.tcl
SUB_LIST= VERSION="${PORTVERSION}"
-SOVERSION= ${PORTVERSION:R:E}
+OPTIONS_DEFINE= NLS TCL
+OPTIONS_SUB= yes
-.include <bsd.port.options.mk>
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
+TCL_USES= tcl
+TCL_CONFIGURE_ENV= ac_cv_c_tclconfig=${TCL_LIBDIR:Q}
+TCL_CONFIGURE_WITH= tcl
+TCL_CPPFLAGS= -I${TCL_INCLUDEDIR:Q}
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-PLIST_SUB+= NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.endif
+SOVERSION= ${PORTVERSION:R:E}
-.if ${PORT_OPTIONS:MTCL}
-USES+= tcl
-MAKE_ENV+= TCL_LIBDIR=${TCL_LIBDIR:Q}
-CPPFLAGS+= -I${TCL_INCLUDEDIR:Q}
-SUB_FILES+= pkgIndex.tcl
-PLIST_SUB+= TCLOPT="" TCL_LIBDIR=${TCL_LIBDIR:S,${PREFIX}/,,}
-.else
-CONFIGURE_ARGS+=--without-tcl
-PLIST_SUB+= TCLOPT="@comment "
-.endif
+.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e \
- '/^SONAME/s|=.*|=${SOVERSION}|' ${WRKSRC}/configure
+ '/^SONAME/s|=.*|=${SOVERSION}| ; \
+ s|-DUSE_INTERP_RESULT||' ${WRKSRC}/configure
@${REINPLACE_CMD} -e \
's|@CPP@|@CC@ -E| ; \
s|-I/usr/include/slang|| ; \
@@ -61,19 +52,19 @@ post-patch:
/make -C/s|^|#| ; \
/whiptcl.$$(SOEXT)/s|install|${TRUE}|' ${WRKSRC}/Makefile.in
-post-build: apply-slist
-
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/whiptail
.if ${PORT_OPTIONS:MNLS}
- @(cd ${WRKSRC}/po && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
+ @(cd ${WRKSRC}/po && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
${MAKEFILE} ${MAKE_ARGS} datadir=${STAGEDIR}${PREFIX}/share \
${INSTALL_TARGET})
.endif
.if ${PORT_OPTIONS:MTCL}
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION}
- (cd ${WRKSRC} && ${INSTALL_DATA} whiptcl.so ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
- (cd ${WRKDIR} && ${INSTALL_DATA} pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
+ (cd ${WRKSRC} && ${INSTALL_LIB} whiptcl.so \
+ ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
+ (cd ${WRKDIR} && ${INSTALL_DATA} pkgIndex.tcl \
+ ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION})
.endif
.include <bsd.port.mk>
diff --git a/devel/newt/distinfo b/devel/newt/distinfo
index ea4758162722..41048abefb0e 100644
--- a/devel/newt/distinfo
+++ b/devel/newt/distinfo
@@ -1,2 +1,2 @@
-SHA256 (newt-0.52.16.tar.gz) = 1b9574bc9c8fb7b25cd26e5c3f2840e8c17fde5dd09c759604925919b3589cd3
-SIZE (newt-0.52.16.tar.gz) = 183487
+SHA256 (newt-0.52.17.tar.gz) = 69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b
+SIZE (newt-0.52.17.tar.gz) = 178920
diff --git a/devel/newt/files/patch-whiptcl.c b/devel/newt/files/patch-whiptcl.c
new file mode 100644
index 000000000000..857a7c689c51
--- /dev/null
+++ b/devel/newt/files/patch-whiptcl.c
@@ -0,0 +1,106 @@
+--- whiptcl.c.orig
++++ whiptcl.c
+@@ -137,45 +137,45 @@
+
+ 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 *tmp = malloc(200);
++ sprintf(tmp, "%s: %s\n",
+ poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
+ poptStrerror(arg));
++ Tcl_SetResult(interp, tmp, 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;
+ }
+
+@@ -196,33 +196,30 @@
+ case MODE_YESNO:
+ rc = messageBox(text, height, width, MSGBOX_YESNO, flags);
+ if (rc == DLG_OKAY)
+- interp->result = "yes";
++ Tcl_SetResult(interp, "yes", TCL_STATIC);
+ else
+- interp->result = "no";
++ Tcl_SetResult(interp, "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, strdup(result), TCL_DYNAMIC);
+ }
+ break;
+
+ case MODE_MENU:
+ rc = listBox(text, height, width, optCon, flags, default_item, &result);
+ if (rc==DLG_OKAY) {
+- interp->result = result;
+- interp->freeProc = TCL_DYNAMIC;
++ Tcl_SetResult(interp, strdup(result), TCL_DYNAMIC);
+ }
+ break;
+
+ case MODE_RADIOLIST:
+ rc = checkList(text, height, width, optCon, 1, flags, &selections);
+ if (rc==DLG_OKAY) {
+- interp->result = selections[0];
+- interp->freeProc = TCL_DYNAMIC;
++ Tcl_SetResult(interp, strdup(selections[0]), TCL_DYNAMIC);
+
+ free(selections);
+ }
+@@ -247,7 +244,7 @@
+ 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;
+ }
+
diff --git a/devel/newt/pkg-plist b/devel/newt/pkg-plist
index 1bfcd233cabe..aaa1bf0f0caa 100644
--- a/devel/newt/pkg-plist
+++ b/devel/newt/pkg-plist
@@ -4,10 +4,10 @@ lib/libnewt.a
lib/libnewt.so
lib/libnewt.so.%%SOVERSION%%
lib/libnewt.so.%%VERSION%%
-man/man1/whiptail.1.gz
-%%TCLOPT%%lib/whip%%VERSION%%/pkgIndex.tcl
-%%TCLOPT%%lib/whip%%VERSION%%/whiptcl.so
+%%TCL%%lib/whip%%VERSION%%/pkgIndex.tcl
+%%TCL%%lib/whip%%VERSION%%/whiptcl.so
libdata/pkgconfig/libnewt.pc
+man/man1/whiptail.1.gz
%%NLS%%share/locale/ar/LC_MESSAGES/newt.mo
%%NLS%%share/locale/as/LC_MESSAGES/newt.mo
%%NLS%%share/locale/ast/LC_MESSAGES/newt.mo
@@ -97,8 +97,6 @@ libdata/pkgconfig/libnewt.pc
%%NLS%%@dirrmtry share/locale/mr
%%NLS%%@dirrmtry share/locale/mg/LC_MESSAGES
%%NLS%%@dirrmtry share/locale/mg
-%%NLS%%@dirrmtry share/locale/lv/LC_MESSAGES
-%%NLS%%@dirrmtry share/locale/lv
%%NLS%%@dirrmtry share/locale/ku/LC_MESSAGES
%%NLS%%@dirrmtry share/locale/ku
%%NLS%%@dirrmtry share/locale/km/LC_MESSAGES
@@ -115,4 +113,4 @@ libdata/pkgconfig/libnewt.pc
%%NLS%%@dirrmtry share/locale/ast
%%NLS%%@dirrmtry share/locale/as/LC_MESSAGES
%%NLS%%@dirrmtry share/locale/as
-%%TCLOPT%%@dirrm lib/whip%%VERSION%%
+%%TCL%%@dirrm lib/whip%%VERSION%%