pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/shells



Module Name:    pkgsrc
Committed By:   kim
Date:           Mon Nov 15 17:11:58 UTC 2021

Modified Files:
        pkgsrc/shells/standalone-tcsh: DESCR Makefile
        pkgsrc/shells/static-tcsh: Makefile
        pkgsrc/shells/tcsh: Makefile Makefile.common PLIST
Added Files:
        pkgsrc/shells/standalone-tcsh: plist-examples.awk plist-nls.awk
        pkgsrc/shells/tcsh: options.mk
Removed Files:
        pkgsrc/shells/standalone-tcsh: PLIST

Log Message:
{,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.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/shells/standalone-tcsh/DESCR
cvs rdiff -u -r1.34 -r1.35 pkgsrc/shells/standalone-tcsh/Makefile
cvs rdiff -u -r1.5 -r0 pkgsrc/shells/standalone-tcsh/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/shells/standalone-tcsh/plist-examples.awk \
    pkgsrc/shells/standalone-tcsh/plist-nls.awk
cvs rdiff -u -r1.13 -r1.14 pkgsrc/shells/static-tcsh/Makefile
cvs rdiff -u -r1.101 -r1.102 pkgsrc/shells/tcsh/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/shells/tcsh/Makefile.common
cvs rdiff -u -r1.5 -r1.6 pkgsrc/shells/tcsh/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/shells/tcsh/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/shells/standalone-tcsh/DESCR
diff -u pkgsrc/shells/standalone-tcsh/DESCR:1.3 pkgsrc/shells/standalone-tcsh/DESCR:1.4
--- pkgsrc/shells/standalone-tcsh/DESCR:1.3     Sun Jan 11 23:06:54 2004
+++ pkgsrc/shells/standalone-tcsh/DESCR Mon Nov 15 17:11:57 2021
@@ -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.

Index: pkgsrc/shells/standalone-tcsh/Makefile
diff -u pkgsrc/shells/standalone-tcsh/Makefile:1.34 pkgsrc/shells/standalone-tcsh/Makefile:1.35
--- pkgsrc/shells/standalone-tcsh/Makefile:1.34 Sun Nov 14 22:36:12 2021
+++ pkgsrc/shells/standalone-tcsh/Makefile      Mon Nov 15 17:11:57 2021
@@ -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@localhost
 
 # 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}

Index: pkgsrc/shells/static-tcsh/Makefile
diff -u pkgsrc/shells/static-tcsh/Makefile:1.13 pkgsrc/shells/static-tcsh/Makefile:1.14
--- pkgsrc/shells/static-tcsh/Makefile:1.13     Sun Nov 14 22:15:13 2021
+++ pkgsrc/shells/static-tcsh/Makefile  Mon Nov 15 17:11:58 2021
@@ -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@localhost
 
-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"

Index: pkgsrc/shells/tcsh/Makefile
diff -u pkgsrc/shells/tcsh/Makefile:1.101 pkgsrc/shells/tcsh/Makefile:1.102
--- pkgsrc/shells/tcsh/Makefile:1.101   Sun Nov 14 22:15:13 2021
+++ pkgsrc/shells/tcsh/Makefile Mon Nov 15 17:11:58 2021
@@ -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"

Index: pkgsrc/shells/tcsh/Makefile.common
diff -u pkgsrc/shells/tcsh/Makefile.common:1.1 pkgsrc/shells/tcsh/Makefile.common:1.2
--- pkgsrc/shells/tcsh/Makefile.common:1.1      Thu Nov 11 22:47:55 2021
+++ pkgsrc/shells/tcsh/Makefile.common  Mon Nov 15 17:11:58 2021
@@ -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"

Index: pkgsrc/shells/tcsh/PLIST
diff -u pkgsrc/shells/tcsh/PLIST:1.5 pkgsrc/shells/tcsh/PLIST:1.6
--- pkgsrc/shells/tcsh/PLIST:1.5        Fri May 22 08:03:43 2015
+++ pkgsrc/shells/tcsh/PLIST    Mon Nov 15 17:11:58 2021
@@ -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

Added files:

Index: pkgsrc/shells/standalone-tcsh/plist-examples.awk
diff -u /dev/null pkgsrc/shells/standalone-tcsh/plist-examples.awk:1.1
--- /dev/null   Mon Nov 15 17:11:58 2021
+++ pkgsrc/shells/standalone-tcsh/plist-examples.awk    Mon Nov 15 17:11:57 2021
@@ -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 "/") }
Index: pkgsrc/shells/standalone-tcsh/plist-nls.awk
diff -u /dev/null pkgsrc/shells/standalone-tcsh/plist-nls.awk:1.1
--- /dev/null   Mon Nov 15 17:11:58 2021
+++ pkgsrc/shells/standalone-tcsh/plist-nls.awk Mon Nov 15 17:11:57 2021
@@ -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 "/") }

Index: pkgsrc/shells/tcsh/options.mk
diff -u /dev/null pkgsrc/shells/tcsh/options.mk:1.1
--- /dev/null   Mon Nov 15 17:11:58 2021
+++ pkgsrc/shells/tcsh/options.mk       Mon Nov 15 17:11:58 2021
@@ -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;}}



Home | Main Index | Thread Index | Old Index