summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz>2000-07-28 10:33:56 +0000
committerwiz <wiz>2000-07-28 10:33:56 +0000
commit46c4f8c2c2eed037fee73ca91838634011bbf1d4 (patch)
tree645721463659c2eb41c243dc65126304596e7750
parent6e71d0ba90b1f2c7464e5aa7cc5537586fb1f184 (diff)
downloadpkgsrc-46c4f8c2c2eed037fee73ca91838634011bbf1d4.tar.gz
Add USE_CURSES for packages that need curses functionality that only
got added in 1.4Y; on older version of NetBSD, ncurses will be used. Replace previous code that did the same, but wasn't shared.
-rw-r--r--devel/cscope/Makefile18
-rw-r--r--editors/vim-gtk/Makefile34
-rw-r--r--editors/vim-xaw/Makefile34
-rw-r--r--editors/vim/Makefile35
-rw-r--r--games/gnome-games/Makefile24
-rw-r--r--mail/mutt/Makefile27
-rw-r--r--mk/bsd.pkg.mk35
-rw-r--r--net/mtr/Makefile26
8 files changed, 81 insertions, 152 deletions
diff --git a/devel/cscope/Makefile b/devel/cscope/Makefile
index f0c5d1ec6c0..adbbb044603 100644
--- a/devel/cscope/Makefile
+++ b/devel/cscope/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2000/06/14 02:10:57 hubertf Exp $
+# $NetBSD: Makefile,v 1.8 2000/07/28 10:33:56 wiz Exp $
DISTNAME= cscope-15.0bl2
PKGNAME= cscope-15.0.2
@@ -9,19 +9,11 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://cscope.sourceforge.net/
GNU_CONFIGURE= YES
+USE_CURSES= YES
-.include "../../mk/bsd.prefs.mk"
-GOOD_CURSES= 1.4[S-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?=
-.endif
-.endfor
-
-.if !defined(CURSES_GOOD)
-DEPENDS+= ncurses>=5.0:../../devel/ncurses
+.include "../../mk/bsd.pkg.mk"
+.if ${NEED_NCURSES} == "YES"
CONFIGURE_ARGS+=--with-ncurses=${LOCALBASE}
post-extract:
@@ -32,5 +24,3 @@ post-extract:
< ${FILE}.orig > ${FILE}
.endfor
.endif
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/editors/vim-gtk/Makefile b/editors/vim-gtk/Makefile
index 0ba932dd201..79093e99e28 100644
--- a/editors/vim-gtk/Makefile
+++ b/editors/vim-gtk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2000/06/25 11:50:34 pooka Exp $
+# $NetBSD: Makefile,v 1.17 2000/07/28 10:33:57 wiz Exp $
.include "../vim-share/Makefile.common"
@@ -11,6 +11,7 @@ CONFLICTS= vim-[0-9]* vim-xaw-*
DISTFILES+= ${DISTNAME}-rt${EXTRACT_SUFX}
USE_X11= yes
+USE_CURSES= yes
CONFIGURE_ARGS+= --enable-gui=gtk
CPPFLAGS+= -I${LOCALBASE}/include # for ncurses' termcap.h
@@ -20,30 +21,6 @@ CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
ALL_TARGET= vim
INSTALL_TARGET= installvimbin
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "NetBSD"
-GOOD_CURSES= 1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?= #defined
-.endif
-.endfor
-.endif
-
-.if ${OPSYS} == "SunOS"
-CURSES_GOOD?= #defined
-.endif
-
-.if defined(CURSES_GOOD)
-CPPFLAGS=
-CONFIGURE_ARGS+= --with-tlib=curses
-.else
-DEPENDS+= ncurses>=4.2:../../devel/ncurses
-CONFIGURE_ARGS+= --with-tlib=ncurses
-.endif
-
post-install:
for f in gvim.1 gview.1 rgvim.1 rgview.1; do \
${RM} -f ${PREFIX}/man/man1/$$f; \
@@ -55,3 +32,10 @@ post-install:
done
.include "../../mk/bsd.pkg.mk"
+
+.if ${NEED_NCURSES} == "YES"
+CONFIGURE_ARGS+= --with-tlib=ncurses
+.else
+CPPFLAGS=
+CONFIGURE_ARGS+= --with-tlib=curses
+.endif
diff --git a/editors/vim-xaw/Makefile b/editors/vim-xaw/Makefile
index 7e90b9e3d37..15901ea6360 100644
--- a/editors/vim-xaw/Makefile
+++ b/editors/vim-xaw/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2000/06/25 11:50:40 pooka Exp $
+# $NetBSD: Makefile,v 1.8 2000/07/28 10:33:57 wiz Exp $
.include "../vim-share/Makefile.common"
@@ -9,6 +9,7 @@ CONFLICTS= vim-[0-9]* vim-gtk-*
USE_X11= yes
USE_XAW= yes
+USE_CURSES= yes
CONFIGURE_ARGS+= --enable-gui=athena
CPPFLAGS+= -I${LOCALBASE}/include # for ncurses' termcap.h
@@ -18,30 +19,6 @@ CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
ALL_TARGET= vim
INSTALL_TARGET= installvimbin
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "NetBSD"
-GOOD_CURSES= 1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?= #defined
-.endif
-.endfor
-.endif
-
-.if ${OPSYS} == "SunOS"
-CURSES_GOOD?= #defined
-.endif
-
-.if defined(CURSES_GOOD)
-CPPFLAGS=
-CONFIGURE_ARGS+= --with-tlib=curses
-.else
-DEPENDS+= ncurses>=4.2:../../devel/ncurses
-CONFIGURE_ARGS+= --with-tlib=ncurses
-.endif
-
post-install:
for f in gvim.1 gview.1 rgvim.1 rgview.1; do \
${RM} -f ${PREFIX}/man/man1/$$f; \
@@ -59,3 +36,10 @@ MAKE_ENV+= XAW_LIB=Xaw
.else
MAKE_ENV+= XAW_LIB=Xaw3d
.endif
+
+.if ${NEED_NCURSES} == "YES"
+CONFIGURE_ARGS+= --with-tlib=ncurses
+.else
+CPPFLAGS=
+CONFIGURE_ARGS+= --with-tlib=curses
+.endif
diff --git a/editors/vim/Makefile b/editors/vim/Makefile
index d22ba349717..e022dfdad6f 100644
--- a/editors/vim/Makefile
+++ b/editors/vim/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2000/06/25 11:50:32 pooka Exp $
+# $NetBSD: Makefile,v 1.34 2000/07/28 10:33:57 wiz Exp $
.include "../vim-share/Makefile.common"
@@ -13,33 +13,11 @@ CPPFLAGS+= -I${LOCALBASE}/include # for ncurses' termcap.h
LDFLAGS+= -L${LOCALBASE}/lib # for -lncurses
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
+USE_CURSES= yes
+
ALL_TARGET= vim
INSTALL_TARGET= installvimbin
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "NetBSD"
-GOOD_CURSES= 1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?= #defined
-.endif
-.endfor
-.endif
-
-.if ${OPSYS} == "SunOS"
-CURSES_GOOD?= #defined
-.endif
-
-.if defined(CURSES_GOOD)
-CPPFLAGS=
-CONFIGURE_ARGS+= --with-tlib=curses
-.else
-DEPENDS+= ncurses>=4.2:../../devel/ncurses
-CONFIGURE_ARGS+= --with-tlib=ncurses
-.endif
-
post-install:
for f in rvim rview ; do \
${RM} -f ${PREFIX}/bin/$$f; \
@@ -47,3 +25,10 @@ post-install:
done
.include "../../mk/bsd.pkg.mk"
+
+.if ${NEED_NCURSES} == "YES"
+CONFIGURE_ARGS+= --with-tlib=ncurses
+.else
+CPPFLAGS=
+CONFIGURE_ARGS+= --with-tlib=curses
+.endif
diff --git a/games/gnome-games/Makefile b/games/gnome-games/Makefile
index 223784652ff..1765f5f133e 100644
--- a/games/gnome-games/Makefile
+++ b/games/gnome-games/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2000/06/27 08:30:47 tron Exp $
+# $NetBSD: Makefile,v 1.10 2000/07/28 10:33:58 wiz Exp $
DISTNAME= gnome-games-1.2.0
CATEGORIES= games gnome
@@ -16,30 +16,18 @@ GNU_CONFIGURE= # defined
CONFIGURE_ARGS= --localstatedir=/var
USE_X11BASE= # defined
+USE_CURSES= # defined
USE_LIBTOOL= # defined
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
INSTALL_FILE= ${WRKDIR}/INSTALL
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "NetBSD"
-GOOD_CURSES= 1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?= # defined
-.endif
-.endfor
-
-.if !defined(CURSES_GOOD)
-DEPENDS+= ncurses>=5.0:../../devel/ncurses
-CONFIGURE_ARGS+=--with-ncurses=${LOCALBASE}
-.endif
-.endif
-
post-build:
${SED} -e 's#@@INSTALL@@#${INSTALL}#' \
${PKGDIR}/INSTALL >${INSTALL_FILE}
.include "../../mk/bsd.pkg.mk"
+
+.if ${NEED_NCURSES} == "YES"
+CONFIGURE_ARGS+=--with-ncurses=${LOCALBASE}
+.endif
diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile
index 854857b4316..ef3a3f7fbfe 100644
--- a/mail/mutt/Makefile
+++ b/mail/mutt/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2000/07/10 10:10:19 tron Exp $
+# $NetBSD: Makefile,v 1.54 2000/07/28 10:33:58 wiz Exp $
DISTNAME= mutt-1.2.4i
CATEGORIES= mail
@@ -19,6 +19,8 @@ USE_GMAKE= yes
CONFIGURE_ARGS+= --with-exec-shell=/bin/ksh \
--with-docdir=${PREFIX}/share/doc/mutt \
--enable-pop --enable-imap
+USE_CURSES= yes
+REPLACE_NCURSES= configure configure.in
ALL_TARGET= keymap_defs.h all
LDFLAGS+= -s
@@ -43,27 +45,8 @@ PLIST_SUBST+= LOCALEBASE=lib
PLIST_SUBST+= LOCALEBASE=share
.endif
-.if ${OPSYS} == "NetBSD"
-GOOD_CURSES= 1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?= # defined
-.endif
-.endfor
+.include "../../mk/bsd.pkg.mk"
-.if defined(CURSES_GOOD)
-# hack to allow compilation even if ncurses are installed
-pre-configure:
-.for FILE in configure configure.in
- cd ${WRKSRC}; ${SED} "s/-lncurses/-lcurses/" < ${FILE} \
- > ${FILE}.patched; ${MV} ${FILE}.patched ${FILE}
-.endfor
- ${CHMOD} 755 ${WRKSRC}/configure
-.else
-DEPENDS+= ncurses>=4.2:../../devel/ncurses
+.if defined(NEED_NCURSES) && ${NEED_NCURSES} == "YES"
CONFIGURE_ARGS+= --with-curses=${LOCALBASE}
.endif
-.endif
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 4171b0ce515..72cbcafefc4 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.521 2000/07/28 01:16:27 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.522 2000/07/28 10:33:59 wiz Exp $
#
# This file is in the public domain.
#
@@ -152,6 +152,25 @@ MAKE_ENV+= FC="${FC}"
USE_GTEXINFO= yes
.endif
+.if defined(USE_CURSES) && !defined(NEED_NCURSES)
+.if ${OPSYS} == "NetBSD"
+GOOD_CURSES= 1.4[YZ] 1.4Z[A-D] 1.[5-9]*
+NEED_NCURSES= YES
+.for PATTERN in ${GOOD_CURSES}
+.if ${OS_VERSION:M${PATTERN}} != ""
+NEED_NCURSES= NO
+.endif
+.endfor
+.else
+NEED_NCURSES= NO
+.endif
+MAKEFLAGS+= NEED_NCURSES=${NEED_NCURSES}
+.endif
+
+.if defined(NEED_NCURSES) && ${NEED_NCURSES} == "YES"
+DEPENDS+= ncurses>=5.0:../../devel/ncurses
+.endif
+
.if defined(USE_GTEXINFO) && !exists(/usr/bin/install-info)
DEPENDS+= gtexinfo-3.12:../../devel/gtexinfo
.endif
@@ -1322,6 +1341,20 @@ do-patch:
.if !target(do-configure)
do-configure:
+.if defined(REPLACE_NCURSES) && (!defined(NEED_NCURSES) || ${NEED_NCURSES} == "NO")
+.for f in ${REPLACE_NCURSES}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; if [ -f ${f} ]; then \
+ ${SED} -e "s/ncurses/curses/g" ${f} > ${f}.new; \
+ if [ -x ${f} ]; then \
+ ${MV} ${f}.new ${f}; \
+ ${CHMOD} a+x ${f}; \
+ else \
+ ${MV} ${f}.new ${f}; \
+ fi \
+ fi
+.endfor
+.endif
+
.if (defined(USE_LIBTOOL) || defined(USE_PKGLIBTOOL)) && defined(LTCONFIG_OVERRIDE) && !defined(LIBTOOL_OVERRIDE)
.for ltconfig in ${LTCONFIG_OVERRIDE}
${_PKG_SILENT}${_PKG_DEBUG}if [ -f ${ltconfig} ]; then \
diff --git a/net/mtr/Makefile b/net/mtr/Makefile
index 91fd21251ec..9a44b063aa4 100644
--- a/net/mtr/Makefile
+++ b/net/mtr/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2000/06/14 02:10:58 hubertf Exp $
+# $NetBSD: Makefile,v 1.10 2000/07/28 10:33:59 wiz Exp $
# $FreeBSD: ports/net/mtr/Makefile,v 1.16 1999/10/28 08:06:00 mharo Exp $
DISTNAME= mtr-0.42
@@ -13,29 +13,11 @@ DEPENDS+= gtk+>=1.2.7:../../x11/gtk
GNU_CONFIGURE= yes
USE_GMAKE= yes
+USE_CURSES= yes
+# next line only needed if ncurses are also installed
+REPLACE_NCURSES= configure configure.in
CONFIGURE_ENV+= CPPFLAGS=-I${PREFIX}/include
-.include "../../mk/bsd.prefs.mk"
-GOOD_CURSES= 1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*
-
-.for PATTERN in ${GOOD_CURSES}
-.if ${OS_VERSION:M${PATTERN}} != ""
-CURSES_GOOD?= # defined
-.endif
-.endfor
-
-.if defined(CURSES_GOOD)
-# hack to use curses even if ncurses are also installed
-pre-configure:
-.for FILE in configure configure.in
- cd ${WRKSRC}; ${SED} "s/ncurses/curses/" < ${FILE} \
- > ${FILE}.patched; ${MV} ${FILE}.patched ${FILE}
-.endfor
- ${CHMOD} 755 ${WRKSRC}/configure
-.else
-DEPENDS+= ncurses>=4.2:../../devel/ncurses
-.endif
-
do-install:
${INSTALL} -c -s -m 4755 -o root -g wheel ${WRKSRC}/mtr ${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/mtr.8 ${PREFIX}/man/man8