summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2020-06-02 12:17:20 +0000
committerjperkin <jperkin@pkgsrc.org>2020-06-02 12:17:20 +0000
commitf1ef46c6583f32df6d2bb59b1dd11360accdaae8 (patch)
tree27f159292e0661e185a1995cfc572542f260ba34
parentb36f4d5214b554ccb1540fd7670838c2b1bde271 (diff)
downloadpkgsrc-f1ef46c6583f32df6d2bb59b1dd11360accdaae8.tar.gz
tnftp: Move editline support to a non-default option.
This code was very complicated and easily broke, for example when termcap is builtin but curses is not, resulting in circular dependencies. Such core packages should default to a safe set of build options, unless they can be reliably added to PKG_SUGGESTED_OPTIONS, to avoid a miserable first experience for users running on older or quirky platforms.
-rw-r--r--net/tnftp/Makefile27
-rw-r--r--net/tnftp/options.mk11
2 files changed, 10 insertions, 28 deletions
diff --git a/net/tnftp/Makefile b/net/tnftp/Makefile
index 9bd40777aac..465031ec025 100644
--- a/net/tnftp/Makefile
+++ b/net/tnftp/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2020/01/18 21:50:27 jperkin Exp $
+# $NetBSD: Makefile,v 1.43 2020/06/02 12:17:20 jperkin Exp $
DISTNAME= tnftp-20151004
PKGREVISION= 2
@@ -30,33 +30,8 @@ do-extract:
@${CP} -R ${FILESDIR} ${WRKSRC}
@${RM} -f ${WRKSRC}/INSTALL
-# Use mk/readline.builtin.mk to check for an editline library on the
-# system. If we use the system editline library, then use the built-in
-# termcap library.
-#
-CHECK_BUILTIN.editline:= yes
-.include "../../devel/editline/builtin.mk"
-CHECK_BUILTIN.editline:= no
-
-.if !empty(USE_BUILTIN.editline:M[yY][eE][sS])
-USE_BUILTIN.termcap?= yes
-.endif
-
-# Check usability of builtin termcap if FETCH_USING=ftp
-# to avoid circular dependency with termcap from pkgsrc (devel/ncurses).
-CHECK_BUILTIN.termcap:= yes
-.include "../../mk/termcap.builtin.mk"
-CHECK_BUILTIN.termcap:= no
-
-.if !empty(FETCH_USING:Mftp) && !empty(USE_BUILTIN.termcap:M[Nn][Oo])
-CONFIGURE_ARGS+= --disable-editcomplete
-.else
-.include "../../mk/termcap.buildlink3.mk"
-.endif
-
post-install:
${MV} -f ${DESTDIR}${PREFIX}/bin/tnftp ${DESTDIR}${PREFIX}/bin/ftp
${MV} -f ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/tnftp.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ftp.1
-
.include "../../mk/bsd.pkg.mk"
diff --git a/net/tnftp/options.mk b/net/tnftp/options.mk
index 17b6f72031c..c797b355b11 100644
--- a/net/tnftp/options.mk
+++ b/net/tnftp/options.mk
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.12 2019/11/03 11:45:55 rillig Exp $
+# $NetBSD: options.mk,v 1.13 2020/06/02 12:17:20 jperkin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.tnftp
-PKG_SUPPORTED_OPTIONS= inet6 ssl socks
+PKG_SUPPORTED_OPTIONS= editline inet6 ssl socks
PKG_SUGGESTED_OPTIONS= inet6
CHECK_BUILTIN.openssl:= yes
@@ -14,6 +14,13 @@ PKG_SUGGESTED_OPTIONS+= ssl
.include "../../mk/bsd.options.mk"
+.if !empty(PKG_OPTIONS:Meditline)
+CONFIGURE_ARGS+= --enable-editcomplete
+.include "../../mk/termcap.buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-editcomplete
+.endif
+
.if !empty(PKG_OPTIONS:Msocks)
CONFIGURE_ARGS+= --with-socks
.include "../../net/dante/buildlink3.mk"