{,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.diff -r1.3 -r1.4 pkgsrc/shells/standalone-tcsh/DESCR
(kim)
@@ -1,5 +1,2 @@ | @@ -1,5 +1,2 @@ | |||
1 | TCSH is an extended C-shell with many useful features like | |||
2 | filename completion, history editing, etc. | |||
3 | 1 | |||
4 | This version installs a statically-linked version of tcsh into | 2 | This version installs tcsh into /bin, for use as a standalone shell. | |
5 | /bin, for use as a standalone shell. |
@@ -1,48 +1,48 @@ | @@ -1,48 +1,48 @@ | |||
1 | # $NetBSD: Makefile,v 1.34 2021/11/14 22:36:12 kim Exp $ | 1 | # $NetBSD: Makefile,v 1.35 2021/11/15 17:11:57 kim Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | # FIXME: This is because of PREFIX=/ below. | 4 | # FIXME: This is because of PREFIX=/ below. | |
5 | CHECK_FILES_SUPPORTED= no | 5 | CHECK_FILES_SUPPORTED= no | |
6 | NOT_FOR_UNPRIVILEGED= yes | 6 | NOT_FOR_UNPRIVILEGED= yes | |
7 | 7 | |||
8 | PKGNAME= standalone-${DISTNAME} | 8 | PKGNAME= standalone-${DISTNAME} | |
9 | PKGREVISION= 1 | 9 | PKGREVISION= 2 | |
10 | 10 | |||
11 | WRKSRC= ${WRKDIR}/${DISTNAME} | |||
12 | PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches | 11 | PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches | |
12 | PKGDIR= ${.CURDIR}/../../shells/tcsh | |||
13 | DESCR_SRC= ${.CURDIR}/../../shells/tcsh/DESCR ${.CURDIR}/DESCR | |||
13 | 14 | |||
14 | # This package only makes sense on platforms that don't themselves ship tcsh | 15 | # This package only makes sense on platforms that don't themselves ship tcsh | |
15 | # in /bin. Otherwise it clobbers the native copy, which really isn't what | 16 | # in /bin. Otherwise it clobbers the native copy, which really isn't what | |
16 | # anyone wants. | 17 | # anyone wants. | |
17 | ONLY_FOR_PLATFORM+= NetBSD-*-* OpenBSD-*-* SunOS-*-* | 18 | ONLY_FOR_PLATFORM+= NetBSD-*-* OpenBSD-*-* SunOS-*-* | |
18 | 19 | |||
19 | .include "../../mk/bsd.prefs.mk" | 20 | .include "../../mk/bsd.prefs.mk" | |
20 | 21 | |||
21 | .if ${OS_VARIANT} == "OmniOS" | 22 | .if ${OS_VARIANT} == "OmniOS" | |
22 | NOT_FOR_PLATFORM+= SunOS-*-* | 23 | NOT_FOR_PLATFORM+= SunOS-*-* | |
23 | .endif | 24 | .endif | |
24 | 25 | |||
25 | .include "../../shells/tcsh/Makefile.common" | 26 | .include "../../shells/tcsh/Makefile.common" | |
26 | .include "../../mk/bsd.pkg.mk" | 27 | .include "../../mk/bsd.pkg.mk" | |
27 | 28 | |||
28 | INSTALLATION_DIRS+= usr/share/man/man1 | |||
29 | ||||
30 | COMMENT:= Standalone version of the Extended C-shell | 29 | COMMENT:= Standalone version of the Extended C-shell | |
31 | MAINTAINER= agc@NetBSD.org | 30 | MAINTAINER= agc@NetBSD.org | |
32 | 31 | |||
33 | # FIXME: Packages shall only install into ${LOCALBASE} or a subdirectory. | 32 | # FIXME: Packages shall only install into ${LOCALBASE} or a subdirectory. | |
34 | PREFIX= / | 33 | PREFIX= / | |
35 | EGDIR= /usr/share/examples/tcsh | 34 | PKGMANDIR= usr/share/man | |
35 | EGDIR= usr/share/examples/tcsh | |||
36 | NLSDIR= usr/share/nls | |||
36 | NOT_FOR_BULK_PLATFORM= *-*-* | 37 | NOT_FOR_BULK_PLATFORM= *-*-* | |
37 | 38 | |||
38 | NLSDIR= usr/share/nls | |||
39 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} | 39 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} | |
40 | CONFIGURE_ARGS+= --bindir=/bin | 40 | CONFIGURE_ARGS+= --bindir=${PREFIX:S/\/$//:Q}/bin | |
41 | CONFIGURE_ARGS+= --mandir=/usr/share/man | 41 | CONFIGURE_ARGS+= --localedir=${PREFIX:S/\/$//:Q}/${NLSDIR} | |
42 | CONFIGURE_ARGS+= --disable-nls-catalogs | 42 | CONFIGURE_ARGS+= --mandir=${PREFIX:S/\/$//:Q}/${PKGMANDIR} | |
43 | 43 | |||
44 | DISTINFO_FILE= ${.CURDIR}/../../shells/tcsh/distinfo | 44 | PLIST_AWK+= -f ${.CURDIR}/plist-examples.awk | |
45 | PLIST_AWK_ENV+= EGDIR=${EGDIR} | |||
45 | 46 | |||
46 | .if ${OPSYS} != "SunOS" | 47 | PLIST_AWK+= -f ${.CURDIR}/plist-nls.awk | |
47 | LDFLAGS+= -static | 48 | PLIST_AWK_ENV+= NLSDIR=${NLSDIR} | |
48 | .endif |
# $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 "/") }
# $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 "/") }
@@ -1,25 +1,19 @@ | @@ -1,25 +1,19 @@ | |||
1 | # $NetBSD: Makefile,v 1.13 2021/11/14 22:15:13 kim Exp $ | 1 | # $NetBSD: Makefile,v 1.14 2021/11/15 17:11:58 kim Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | PKGNAME= static-${DISTNAME} | |||
5 | PKGREVISION= 2 | |||
6 | ||||
4 | .include "../../shells/tcsh/Makefile.common" | 7 | .include "../../shells/tcsh/Makefile.common" | |
5 | 8 | |||
6 | MAINTAINER= agc@NetBSD.org | 9 | MAINTAINER= agc@NetBSD.org | |
7 | 10 | |||
8 | DISTINFO_FILE= ${.CURDIR}/../../shells/tcsh/distinfo | |||
9 | PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches | 11 | PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches | |
10 | PKGDIR= ${.CURDIR}/../../shells/tcsh | 12 | PKGDIR= ${.CURDIR}/../../shells/tcsh | |
11 | DESCR_SRC= ${.CURDIR}/../../shells/tcsh/DESCR ${.CURDIR}/DESCR | 13 | DESCR_SRC= ${.CURDIR}/../../shells/tcsh/DESCR ${.CURDIR}/DESCR | |
12 | 14 | |||
13 | CONFLICTS= tcsh-[0-9]* | 15 | CONFLICTS= tcsh-[0-9]* | |
14 | 16 | |||
15 | PKGNAME= static-${DISTNAME} | 17 | COMMENT= Statically-linked version of the Extended C-shell | |
16 | PKGREVISION= 1 | |||
17 | ||||
18 | # SunOS 5.10 stopped shipping static libraries. | |||
19 | NOT_FOR_PLATFORM+= SunOS-5.1[0-9]-* | |||
20 | ||||
21 | COMMENT:= Statically-linked version of the ${COMMENT} | |||
22 | ||||
23 | LDFLAGS+= -static | |||
24 | 18 | |||
25 | .include "../../mk/bsd.pkg.mk" | 19 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | # $NetBSD: Makefile,v 1.101 2021/11/14 22:15:13 kim Exp $ | 1 | # $NetBSD: Makefile,v 1.102 2021/11/15 17:11:58 kim Exp $ | |
2 | 2 | |||
3 | .include "../../shells/tcsh/Makefile.common" | 3 | .include "../../shells/tcsh/Makefile.common" | |
4 | 4 | |||
5 | PKGREVISION=1 | 5 | PKGREVISION= 2 | |
6 | 6 | |||
7 | .include "../../mk/bsd.pkg.mk" | 7 | .include "../../mk/bsd.pkg.mk" |
@@ -1,47 +1,50 @@ | @@ -1,47 +1,50 @@ | |||
1 | # $NetBSD: Makefile.common,v 1.1 2021/11/11 22:47:55 kim Exp $ | 1 | # $NetBSD: Makefile.common,v 1.2 2021/11/15 17:11:58 kim Exp $ | |
2 | # | 2 | # | |
3 | # used by shells/standalone-tcsh/Makefile | 3 | # used by shells/standalone-tcsh/Makefile | |
4 | # used by shells/static-tcsh/Makefile | 4 | # used by shells/static-tcsh/Makefile | |
5 | # used by shells/tcsh/Makefile | 5 | # used by shells/tcsh/Makefile | |
6 | 6 | |||
7 | DISTNAME= tcsh-6.23.00 | 7 | DISTNAME= tcsh-6.23.00 | |
8 | CATEGORIES= shells | 8 | CATEGORIES= shells | |
9 | MASTER_SITES= ftp://ftp.astron.com/pub/tcsh/ | 9 | MASTER_SITES= ftp://ftp.astron.com/pub/tcsh/ | |
10 | MASTER_SITES+= http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/ | 10 | MASTER_SITES+= http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/ | |
11 | 11 | |||
12 | MAINTAINER= pkgsrc-users@NetBSD.org | 12 | MAINTAINER= pkgsrc-users@NetBSD.org | |
13 | HOMEPAGE= https://www.tcsh.org/ | 13 | HOMEPAGE= https://www.tcsh.org/ | |
14 | COMMENT= Extended C-shell with many useful features | 14 | COMMENT= Extended C-shell with many useful features | |
15 | LICENSE= original-bsd | 15 | LICENSE= original-bsd | |
16 | 16 | |||
17 | CONFLICTS= static-tcsh-[0-9]* | 17 | CONFLICTS= static-tcsh-[0-9]* | |
18 | 18 | |||
19 | GNU_CONFIGURE= yes | 19 | GNU_CONFIGURE= yes | |
20 | USE_TOOLS+= autoconf:test perl:test | 20 | USE_TOOLS+= autoconf:test perl:test | |
21 | 21 | |||
22 | EGDIR= ${PREFIX}/share/examples/tcsh | 22 | EGDIR= share/examples/tcsh | |
23 | 23 | |||
24 | .include "../../mk/bsd.prefs.mk" | 24 | .include "../../mk/bsd.prefs.mk" | |
25 | .include "options.mk" | |||
25 | 26 | |||
26 | .if ${OPSYS} == "SunOS" | 27 | .if ${OPSYS} == "SunOS" | |
27 | LOWER_OPSYS_VERSUFFIX= ${OS_VERSION:S/5./2./} | 28 | LOWER_OPSYS_VERSUFFIX= ${OS_VERSION:S/5./2./} | |
28 | .endif | 29 | .endif | |
29 | 30 | |||
30 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) | 31 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) | |
31 | # XXX Should use CONFIGURE_ENV, but the configure script disregards | 32 | # XXX Should use CONFIGURE_ENV, but the configure script disregards | |
32 | # $CC_FOR_GETHOST in the environment and sets it to cc. | 33 | # $CC_FOR_GETHOST in the environment and sets it to cc. | |
33 | MAKE_FLAGS+= CC_FOR_GETHOST=${NATIVE_CC:Q} | 34 | MAKE_FLAGS+= CC_FOR_GETHOST=${NATIVE_CC:Q} | |
34 | .endif | 35 | .endif | |
35 | 36 | |||
36 | TEST_TARGET= check | 37 | TEST_TARGET= check | |
37 | 38 | |||
38 | PKG_SHELL= bin/tcsh | 39 | PKG_SHELL= bin/tcsh | |
39 | 40 | |||
40 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 | |||
41 | ||||
42 | post-install: | 41 | post-install: | |
43 | ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} | 42 | ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX:S/\/$//:Q}/${EGDIR} | |
44 | ${INSTALL_DATA} ${WRKSRC}/complete.tcsh ${DESTDIR}${EGDIR} | 43 | ${INSTALL_DATA} \ | |
45 | ${INSTALL_DATA} ${WRKSRC}/csh-mode.el ${DESTDIR}${EGDIR} | 44 | ${WRKSRC}/complete.tcsh \ | |
45 | ${DESTDIR}${PREFIX:S/\/$//:Q}/${EGDIR} | |||
46 | ${INSTALL_DATA} \ | |||
47 | ${WRKSRC}/csh-mode.el \ | |||
48 | ${DESTDIR}${PREFIX:S/\/$//:Q}/${EGDIR} | |||
46 | 49 | |||
47 | .include "../../mk/termcap.buildlink3.mk" | 50 | .include "../../mk/termcap.buildlink3.mk" |
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.5 2015/05/22 08:03:43 kim Exp $ | 1 | @comment $NetBSD: PLIST,v 1.6 2021/11/15 17:11:58 kim Exp $ | |
2 | bin/tcsh | 2 | bin/tcsh | |
3 | man/man1/tcsh.1 | 3 | man/man1/tcsh.1 | |
4 | share/examples/tcsh/complete.tcsh | 4 | share/examples/tcsh/complete.tcsh | |
5 | share/examples/tcsh/csh-mode.el | 5 | share/examples/tcsh/csh-mode.el | |
6 | share/locale/C/LC_MESSAGES/tcsh.cat | 6 | ${PLIST.nls}share/locale/C/LC_MESSAGES/tcsh.cat | |
7 | share/locale/de/LC_MESSAGES/tcsh.cat | 7 | ${PLIST.nls}share/locale/de/LC_MESSAGES/tcsh.cat | |
8 | share/locale/es/LC_MESSAGES/tcsh.cat | 8 | ${PLIST.nls}share/locale/es/LC_MESSAGES/tcsh.cat | |
9 | share/locale/et/LC_MESSAGES/tcsh.cat | 9 | ${PLIST.nls}share/locale/et/LC_MESSAGES/tcsh.cat | |
10 | share/locale/fi/LC_MESSAGES/tcsh.cat | 10 | ${PLIST.nls}share/locale/fi/LC_MESSAGES/tcsh.cat | |
11 | share/locale/fr/LC_MESSAGES/tcsh.cat | 11 | ${PLIST.nls}share/locale/fr/LC_MESSAGES/tcsh.cat | |
12 | share/locale/gr/LC_MESSAGES/tcsh.cat | 12 | ${PLIST.nls}share/locale/gr/LC_MESSAGES/tcsh.cat | |
13 | share/locale/it/LC_MESSAGES/tcsh.cat | 13 | ${PLIST.nls}share/locale/it/LC_MESSAGES/tcsh.cat | |
14 | share/locale/ja/LC_MESSAGES/tcsh.cat | 14 | ${PLIST.nls}share/locale/ja/LC_MESSAGES/tcsh.cat | |
15 | share/locale/pl/LC_MESSAGES/tcsh.cat | 15 | ${PLIST.nls}share/locale/pl/LC_MESSAGES/tcsh.cat | |
16 | share/locale/ru/LC_MESSAGES/tcsh.cat | 16 | ${PLIST.nls}share/locale/ru/LC_MESSAGES/tcsh.cat | |
17 | share/locale/ru_UA/LC_MESSAGES/tcsh.cat | 17 | ${PLIST.nls}share/locale/ru_UA/LC_MESSAGES/tcsh.cat |
# $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;}}