diff options
author | kim <kim@pkgsrc.org> | 2021-11-15 17:11:57 +0000 |
---|---|---|
committer | kim <kim@pkgsrc.org> | 2021-11-15 17:11:57 +0000 |
commit | 9f5bce2d0dd90acb0028197dfd92b76712767dcf (patch) | |
tree | 195b518fcd205312cf0d39b9b5cf1078349f1bea /shells | |
parent | 6aee3af3117f735f2a2e1f167ce587195aa38d26 (diff) | |
download | pkgsrc-9f5bce2d0dd90acb0028197dfd92b76712767dcf.tar.gz |
{,standalone-,static-}tcsh: Add build options for nls and static. Cleanup.
For tcsh and defaults for other variants, unless otherwise noted:
- Option nls enables building of NLS catalogs. Enabled by default.
- Option static enables static linking. Disabled by default.
For standalone-tcsh:
- Option static is enabled by default, except on SunOS.
- Fix building of NLS catalogs, which possibly worked at some point
in time given the existence of the NLSDIR variable in Makefile.
- Use PLIST from tcsh, with some awk to transform the entries.
- Use DESCR from tcsh as base, with an additional local DESCR. Adjust the
local DESCR to not say that the package is static, as that is controlled
by an option now (and never was true for all platforms).
- Remove unnecessary DISTINFO_FILE, INSTALLATION_DIRS, and WRKSRC.
For static-tcsh:
- Option static is not available: the package is always built like tcsh
with the static option enabled.
- Remove unnecessary DISTINFO_FILE.
Diffstat (limited to 'shells')
-rw-r--r-- | shells/standalone-tcsh/DESCR | 5 | ||||
-rw-r--r-- | shells/standalone-tcsh/Makefile | 28 | ||||
-rw-r--r-- | shells/standalone-tcsh/PLIST | 5 | ||||
-rw-r--r-- | shells/standalone-tcsh/plist-examples.awk | 3 | ||||
-rw-r--r-- | shells/standalone-tcsh/plist-nls.awk | 3 | ||||
-rw-r--r-- | shells/static-tcsh/Makefile | 16 | ||||
-rw-r--r-- | shells/tcsh/Makefile | 4 | ||||
-rw-r--r-- | shells/tcsh/Makefile.common | 17 | ||||
-rw-r--r-- | shells/tcsh/PLIST | 26 | ||||
-rw-r--r-- | shells/tcsh/options.mk | 31 |
10 files changed, 82 insertions, 56 deletions
diff --git a/shells/standalone-tcsh/DESCR b/shells/standalone-tcsh/DESCR index 6894bee0893..26a7047cb07 100644 --- a/shells/standalone-tcsh/DESCR +++ b/shells/standalone-tcsh/DESCR @@ -1,5 +1,2 @@ -TCSH is an extended C-shell with many useful features like -filename completion, history editing, etc. -This version installs a statically-linked version of tcsh into -/bin, for use as a standalone shell. +This version installs tcsh into /bin, for use as a standalone shell. diff --git a/shells/standalone-tcsh/Makefile b/shells/standalone-tcsh/Makefile index 6f08b3c7840..4a4ae2af7ff 100644 --- a/shells/standalone-tcsh/Makefile +++ b/shells/standalone-tcsh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2021/11/14 22:36:12 kim Exp $ +# $NetBSD: Makefile,v 1.35 2021/11/15 17:11:57 kim Exp $ # # FIXME: This is because of PREFIX=/ below. @@ -6,10 +6,11 @@ CHECK_FILES_SUPPORTED= no NOT_FOR_UNPRIVILEGED= yes PKGNAME= standalone-${DISTNAME} -PKGREVISION= 1 +PKGREVISION= 2 -WRKSRC= ${WRKDIR}/${DISTNAME} PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches +PKGDIR= ${.CURDIR}/../../shells/tcsh +DESCR_SRC= ${.CURDIR}/../../shells/tcsh/DESCR ${.CURDIR}/DESCR # This package only makes sense on platforms that don't themselves ship tcsh # in /bin. Otherwise it clobbers the native copy, which really isn't what @@ -25,24 +26,23 @@ NOT_FOR_PLATFORM+= SunOS-*-* .include "../../shells/tcsh/Makefile.common" .include "../../mk/bsd.pkg.mk" -INSTALLATION_DIRS+= usr/share/man/man1 - COMMENT:= Standalone version of the Extended C-shell MAINTAINER= agc@NetBSD.org # FIXME: Packages shall only install into ${LOCALBASE} or a subdirectory. PREFIX= / -EGDIR= /usr/share/examples/tcsh +PKGMANDIR= usr/share/man +EGDIR= usr/share/examples/tcsh +NLSDIR= usr/share/nls NOT_FOR_BULK_PLATFORM= *-*-* -NLSDIR= usr/share/nls CONFIGURE_ARGS+= --prefix=${PREFIX:Q} -CONFIGURE_ARGS+= --bindir=/bin -CONFIGURE_ARGS+= --mandir=/usr/share/man -CONFIGURE_ARGS+= --disable-nls-catalogs +CONFIGURE_ARGS+= --bindir=${PREFIX:S/\/$//:Q}/bin +CONFIGURE_ARGS+= --localedir=${PREFIX:S/\/$//:Q}/${NLSDIR} +CONFIGURE_ARGS+= --mandir=${PREFIX:S/\/$//:Q}/${PKGMANDIR} -DISTINFO_FILE= ${.CURDIR}/../../shells/tcsh/distinfo +PLIST_AWK+= -f ${.CURDIR}/plist-examples.awk +PLIST_AWK_ENV+= EGDIR=${EGDIR} -.if ${OPSYS} != "SunOS" -LDFLAGS+= -static -.endif +PLIST_AWK+= -f ${.CURDIR}/plist-nls.awk +PLIST_AWK_ENV+= NLSDIR=${NLSDIR} diff --git a/shells/standalone-tcsh/PLIST b/shells/standalone-tcsh/PLIST deleted file mode 100644 index 0f941c98037..00000000000 --- a/shells/standalone-tcsh/PLIST +++ /dev/null @@ -1,5 +0,0 @@ -@comment $NetBSD: PLIST,v 1.5 2021/11/14 22:36:12 kim Exp $ -bin/tcsh -usr/share/examples/tcsh/complete.tcsh -usr/share/examples/tcsh/csh-mode.el -usr/share/man/man1/tcsh.1 diff --git a/shells/standalone-tcsh/plist-examples.awk b/shells/standalone-tcsh/plist-examples.awk new file mode 100644 index 00000000000..09da38949d6 --- /dev/null +++ b/shells/standalone-tcsh/plist-examples.awk @@ -0,0 +1,3 @@ +# $NetBSD: plist-examples.awk,v 1.1 2021/11/15 17:11:57 kim Exp $ +BEGIN { EGDIR = getenv_or_die("EGDIR") } +{ sub(/^share\/examples\/tcsh\//, EGDIR "/") } diff --git a/shells/standalone-tcsh/plist-nls.awk b/shells/standalone-tcsh/plist-nls.awk new file mode 100644 index 00000000000..71c64610cde --- /dev/null +++ b/shells/standalone-tcsh/plist-nls.awk @@ -0,0 +1,3 @@ +# $NetBSD: plist-nls.awk,v 1.1 2021/11/15 17:11:57 kim Exp $ +BEGIN { NLSDIR = getenv_or_die("NLSDIR") } +{ sub(/^share\/locale\//, NLSDIR "/") } diff --git a/shells/static-tcsh/Makefile b/shells/static-tcsh/Makefile index b79e2a142be..180f3205a6c 100644 --- a/shells/static-tcsh/Makefile +++ b/shells/static-tcsh/Makefile @@ -1,25 +1,19 @@ -# $NetBSD: Makefile,v 1.13 2021/11/14 22:15:13 kim Exp $ +# $NetBSD: Makefile,v 1.14 2021/11/15 17:11:58 kim Exp $ # +PKGNAME= static-${DISTNAME} +PKGREVISION= 2 + .include "../../shells/tcsh/Makefile.common" MAINTAINER= agc@NetBSD.org -DISTINFO_FILE= ${.CURDIR}/../../shells/tcsh/distinfo PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches PKGDIR= ${.CURDIR}/../../shells/tcsh DESCR_SRC= ${.CURDIR}/../../shells/tcsh/DESCR ${.CURDIR}/DESCR CONFLICTS= tcsh-[0-9]* -PKGNAME= static-${DISTNAME} -PKGREVISION= 1 - -# SunOS 5.10 stopped shipping static libraries. -NOT_FOR_PLATFORM+= SunOS-5.1[0-9]-* - -COMMENT:= Statically-linked version of the ${COMMENT} - -LDFLAGS+= -static +COMMENT= Statically-linked version of the Extended C-shell .include "../../mk/bsd.pkg.mk" diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile index 9692ad94597..ee881018292 100644 --- a/shells/tcsh/Makefile +++ b/shells/tcsh/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.101 2021/11/14 22:15:13 kim Exp $ +# $NetBSD: Makefile,v 1.102 2021/11/15 17:11:58 kim Exp $ .include "../../shells/tcsh/Makefile.common" -PKGREVISION=1 +PKGREVISION= 2 .include "../../mk/bsd.pkg.mk" diff --git a/shells/tcsh/Makefile.common b/shells/tcsh/Makefile.common index c83ea005eee..02b7de9929a 100644 --- a/shells/tcsh/Makefile.common +++ b/shells/tcsh/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.1 2021/11/11 22:47:55 kim Exp $ +# $NetBSD: Makefile.common,v 1.2 2021/11/15 17:11:58 kim Exp $ # # used by shells/standalone-tcsh/Makefile # used by shells/static-tcsh/Makefile @@ -19,9 +19,10 @@ CONFLICTS= static-tcsh-[0-9]* GNU_CONFIGURE= yes USE_TOOLS+= autoconf:test perl:test -EGDIR= ${PREFIX}/share/examples/tcsh +EGDIR= share/examples/tcsh .include "../../mk/bsd.prefs.mk" +.include "options.mk" .if ${OPSYS} == "SunOS" LOWER_OPSYS_VERSUFFIX= ${OS_VERSION:S/5./2./} @@ -37,11 +38,13 @@ TEST_TARGET= check PKG_SHELL= bin/tcsh -INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 - post-install: - ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} - ${INSTALL_DATA} ${WRKSRC}/complete.tcsh ${DESTDIR}${EGDIR} - ${INSTALL_DATA} ${WRKSRC}/csh-mode.el ${DESTDIR}${EGDIR} + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX:S/\/$//:Q}/${EGDIR} + ${INSTALL_DATA} \ + ${WRKSRC}/complete.tcsh \ + ${DESTDIR}${PREFIX:S/\/$//:Q}/${EGDIR} + ${INSTALL_DATA} \ + ${WRKSRC}/csh-mode.el \ + ${DESTDIR}${PREFIX:S/\/$//:Q}/${EGDIR} .include "../../mk/termcap.buildlink3.mk" diff --git a/shells/tcsh/PLIST b/shells/tcsh/PLIST index be14c5137f9..f77f53d1a3d 100644 --- a/shells/tcsh/PLIST +++ b/shells/tcsh/PLIST @@ -1,17 +1,17 @@ -@comment $NetBSD: PLIST,v 1.5 2015/05/22 08:03:43 kim Exp $ +@comment $NetBSD: PLIST,v 1.6 2021/11/15 17:11:58 kim Exp $ bin/tcsh man/man1/tcsh.1 share/examples/tcsh/complete.tcsh share/examples/tcsh/csh-mode.el -share/locale/C/LC_MESSAGES/tcsh.cat -share/locale/de/LC_MESSAGES/tcsh.cat -share/locale/es/LC_MESSAGES/tcsh.cat -share/locale/et/LC_MESSAGES/tcsh.cat -share/locale/fi/LC_MESSAGES/tcsh.cat -share/locale/fr/LC_MESSAGES/tcsh.cat -share/locale/gr/LC_MESSAGES/tcsh.cat -share/locale/it/LC_MESSAGES/tcsh.cat -share/locale/ja/LC_MESSAGES/tcsh.cat -share/locale/pl/LC_MESSAGES/tcsh.cat -share/locale/ru/LC_MESSAGES/tcsh.cat -share/locale/ru_UA/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/C/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/de/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/es/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/et/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/fi/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/fr/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/gr/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/it/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/ja/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/pl/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/ru/LC_MESSAGES/tcsh.cat +${PLIST.nls}share/locale/ru_UA/LC_MESSAGES/tcsh.cat diff --git a/shells/tcsh/options.mk b/shells/tcsh/options.mk new file mode 100644 index 00000000000..385dad31958 --- /dev/null +++ b/shells/tcsh/options.mk @@ -0,0 +1,31 @@ +# $NetBSD: options.mk,v 1.1 2021/11/15 17:11:58 kim Exp $ + +PKG_OPTIONS_VAR?= PKG_OPTIONS.tcsh + +PKG_SUPPORTED_OPTIONS= nls +PKG_SUGGESTED_OPTIONS= nls +.if empty(PKGNAME:Mstatic-tcsh-[0-9]*) +PKG_SUPPORTED_OPTIONS+= static +. if !empty(PKGNAME:Mstandalone-tcsh-[0-9]*) && ${OPSYS} != "SunOS" +PKG_SUGGESTED_OPTIONS+= static +. endif +.endif + +PLIST_VARS+= nls + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mnls) +PLIST.nls= yes +.else +CONFIGURE_ARGS+= --disable-nls-catalogs +.endif + +.if !empty(PKG_OPTIONS:Mstatic) || !empty(PKGNAME:Mstatic-tcsh-[0-9]*) +LDFLAGS+= -static + +# SunOS 5.10 stopped shipping static libraries. +NOT_FOR_PLATFORM+= SunOS-5.1[0-9]-* +.endif + +PRINT_PLIST_AWK+= {if ($$0 ~ /\.cat$$/) {$$0 = "$${PLIST.nls}" $$0;}} |