@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.71 2017/01/05 12:37:08 roy Exp $
+# $NetBSD: Makefile,v 1.72 2017/01/11 02:15:56 roy Exp $
#
DISTNAME= tin-2.2.1
-PKGREVISION= 10
+PKGREVISION= 11
CATEGORIES= news
MASTER_SITES= ftp://ftp.tin.org/pub/news/clients/tin/stable/ \
ftp://ftp.funet.fi/pub/unix/news/tin-unoff/ \
@@ -47,9 +47,6 @@
CONFIGURE_ARGS+= --enable-mh-mail-handling
CONFIGURE_ARGS+= --with-coffee
-CONFIGURE_ARGS+= --with-screen=${CURSES_TYPE}
-CONFIGURE_ARGS+= --with-curses-dir=${BUILDLINK_PREFIX.curses}
-
SUBST_CLASSES+= tin
SUBST_STAGE.tin= pre-configure
SUBST_MESSAGE.tin= Adjusting path to the configuration directory.
@@ -68,5 +65,4 @@
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/libidn/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
-.include "../../mk/curses.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@@ -1,12 +1,22 @@
-# $NetBSD: options.mk,v 1.16 2017/01/05 12:37:08 roy Exp $
+# $NetBSD: options.mk,v 1.17 2017/01/11 02:15:56 roy Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.tin
+PKG_OPTIONS_REQUIRED_GROUPS= display
+PKG_OPTIONS_GROUP.display= curses wide-curses termcap
PKG_SUPPORTED_OPTIONS= icu inet6 tin-use-inn-spool
-PKG_SUGGESTED_OPTIONS= inet6
+PKG_SUGGESTED_OPTIONS= inet6 termcap # see PR #51819
# untested
#PKG_SUPPORTED_OPTIONS+= socks
.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mcurses) || !empty(PKG_OPTIONS:Mwide-curses)
+.include "../../mk/curses.buildlink3.mk"
+CONFIGURE_ARGS+= --with-screen=${CURSES_TYPE}
+CONFIGURE_ARGS+= --with-curses-dir=${BUILDLINK_PREFIX.curses}
+.else
+.include "../../mk/termcap.buildlink3.mk"
+.endif
.if !empty(PKG_OPTIONS:Micu)
.include "../../textproc/icu/buildlink3.mk"