Index: shells/Makefile =================================================================== --- shells/Makefile +++ shells/Makefile @@ -27,6 +27,7 @@ SUBDIR += ksh93-devel SUBDIR += lshell SUBDIR += mksh + SUBDIR += modernish SUBDIR += nologinmsg SUBDIR += oksh SUBDIR += osh Index: shells/modernish/Makefile =================================================================== --- /dev/null +++ shells/modernish/Makefile @@ -0,0 +1,55 @@ +# $FreeBSD$ + +PORTNAME= modernish +DISTVERSIONPREFIX= v +DISTVERSION= 0.14.3 +DISTVERSIONSUFFIX= -alpha +CATEGORIES= shells + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= POSIX shell feature detection and language extension library + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE + +# modernish refuses to install with FreeBSD's awk(1). It is probably better to just +# provide modernish with an awk implementation that fulfills its expecatations. +BUILD_DEPENDS= gawk:lang/gawk +RUN_DEPENDS= gawk:lang/gawk + +USE_GITHUB= yes + +NO_ARCH= yes +NO_BUILD= yes + +OPTIONS_DEFINE= DOCS EXAMPLES + +DOCS= CODINGSTYLE DESIGN HELP README.md showTODO + +do-install: + cd ${WRKSRC} && ./install.sh -d ${PREFIX} -D ${STAGEDIR} -n -s ${SH} + @${RM} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/LICENSE + +post-install-DOCS-off: +.for f in CODINGSTYLE DESIGN HELP showTODO + @${RM} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/${f} +.endfor + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} +.for f in CODINGSTYLE DESIGN HELP showTODO + @${MV} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/${f} ${STAGEDIR}${DOCSDIR} +.endfor + +post-install-EXAMPLES-off: + @${RM} -r ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + @${MV} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples/* ${STAGEDIR}${EXAMPLESDIR} + @${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples + +do-test: + ${PORTNAME} --test + +.include Index: shells/modernish/distinfo =================================================================== --- /dev/null +++ shells/modernish/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1551100760 +SHA256 (modernish-modernish-v0.14.3-alpha_GH0.tar.gz) = ea6885532a7155e184df293ca005bb6b5d1ec3b1204cfc62e0d4dd6e6aeb8f07 +SIZE (modernish-modernish-v0.14.3-alpha_GH0.tar.gz) = 269518 Index: shells/modernish/pkg-descr =================================================================== --- /dev/null +++ shells/modernish/pkg-descr @@ -0,0 +1,19 @@ +The programming/scripting language that incorporates the most frustrating +combination of deficiencies and awesome power is probably the POSIX shell with +accompanying utilities, which all exist in several variant implementations. Due +to said power, the shell refuses to die as a scripting language. But when +scripters are bitten by arcane grammar pitfalls, defective tutorials on the +web, or shell functionality deficits, then 'use a real programming language +instead' is generally the mantra. + +Enter modernish, a new vision on shell scripting. Modernish aims to provide a +standard library that allows for writing robust, portable, readable, and +powerful programs for POSIX-based shells and utilities. It can solve the shell +language problems mentioned above, and many more. With modernish, you'd almost +think the shell has become a modern programming language! + +The library builds on the POSIX 2018 Edition standard, so it should run on any +sufficiently POSIX-compliant shell and operating system. But it also takes +advantage of certain shell-specific enhancements if it detects them. + +WWW: https://github.com/modernish/modernish Index: shells/modernish/pkg-plist =================================================================== --- /dev/null +++ shells/modernish/pkg-plist @@ -0,0 +1,214 @@ +bin/modernish +lib/modernish/aux/fatal.sh +lib/modernish/aux/id.sh +lib/modernish/aux/var/loop/find.sh +lib/modernish/aux/var/mapr.awk +lib/modernish/cap/ADDASSIGN.t +lib/modernish/cap/ANONFUNC.t +lib/modernish/cap/ARITHCMD.t +lib/modernish/cap/ARITHFOR.t +lib/modernish/cap/ARITHPP.t +lib/modernish/cap/BUG_ALIASCSUB.t +lib/modernish/cap/BUG_APPENDC.t +lib/modernish/cap/BUG_ARITHINIT.t +lib/modernish/cap/BUG_ARITHLNNO.t +lib/modernish/cap/BUG_ARITHSPLIT.t +lib/modernish/cap/BUG_ARITHTYPE.t +lib/modernish/cap/BUG_ASGNCC01.t +lib/modernish/cap/BUG_BRACQUOT.t +lib/modernish/cap/BUG_CASELIT.t +lib/modernish/cap/BUG_CASESTAT.t +lib/modernish/cap/BUG_CMDEXEC.t +lib/modernish/cap/BUG_CMDOPTEXP.t +lib/modernish/cap/BUG_CMDPV.t +lib/modernish/cap/BUG_CMDSPASGN.t +lib/modernish/cap/BUG_CMDSPEXIT.t +lib/modernish/cap/BUG_CMDVRESV.t +lib/modernish/cap/BUG_CSNHDBKSL.t +lib/modernish/cap/BUG_CSUBSTDO.t +lib/modernish/cap/BUG_DOLRCSUB.t +lib/modernish/cap/BUG_DQGLOB.t +lib/modernish/cap/BUG_EVALCOBR.t +lib/modernish/cap/BUG_FNSUBSH.t +lib/modernish/cap/BUG_HDOCBKSL.t +lib/modernish/cap/BUG_HDOCMASK.t +lib/modernish/cap/BUG_IFSCC01PP.t +lib/modernish/cap/BUG_IFSGLOBC.t +lib/modernish/cap/BUG_IFSGLOBP.t +lib/modernish/cap/BUG_IFSGLOBS.t +lib/modernish/cap/BUG_ISSETLOOP.t +lib/modernish/cap/BUG_KUNSETIFS.t +lib/modernish/cap/BUG_LNNOALIAS.t +lib/modernish/cap/BUG_LNNOEVAL.t +lib/modernish/cap/BUG_MULTIBIFS.t +lib/modernish/cap/BUG_MULTIBYTE.t +lib/modernish/cap/BUG_NOCHCLASS.t +lib/modernish/cap/BUG_NOEXPRO.t +lib/modernish/cap/BUG_NOOCTAL.t +lib/modernish/cap/BUG_NOUNSETEX.t +lib/modernish/cap/BUG_OPTNOLOG.t +lib/modernish/cap/BUG_PFRPAD.t +lib/modernish/cap/BUG_PP_01.t +lib/modernish/cap/BUG_PP_02.t +lib/modernish/cap/BUG_PP_03.t +lib/modernish/cap/BUG_PP_03A.t +lib/modernish/cap/BUG_PP_03B.t +lib/modernish/cap/BUG_PP_03C.t +lib/modernish/cap/BUG_PP_04.t +lib/modernish/cap/BUG_PP_04A.t +lib/modernish/cap/BUG_PP_04D.t +lib/modernish/cap/BUG_PP_04E.t +lib/modernish/cap/BUG_PP_04_S.t +lib/modernish/cap/BUG_PP_05.t +lib/modernish/cap/BUG_PP_06.t +lib/modernish/cap/BUG_PP_06A.t +lib/modernish/cap/BUG_PP_07.t +lib/modernish/cap/BUG_PP_07A.t +lib/modernish/cap/BUG_PP_08.t +lib/modernish/cap/BUG_PP_08B.t +lib/modernish/cap/BUG_PP_09.t +lib/modernish/cap/BUG_PP_10.t +lib/modernish/cap/BUG_PP_10A.t +lib/modernish/cap/BUG_PP_1ARG.t +lib/modernish/cap/BUG_PSUBASNCC.t +lib/modernish/cap/BUG_PSUBBKSL1.t +lib/modernish/cap/BUG_PSUBEMIFS.t +lib/modernish/cap/BUG_PSUBEMPT.t +lib/modernish/cap/BUG_PSUBNEWLN.t +lib/modernish/cap/BUG_PSUBSQHD.t +lib/modernish/cap/BUG_PSUBSQUOT.t +lib/modernish/cap/BUG_READWHSP.t +lib/modernish/cap/BUG_REDIRIO.t +lib/modernish/cap/BUG_REDIRPOS.t +lib/modernish/cap/BUG_SCLOSEDFD.t +lib/modernish/cap/BUG_SELECTEOF.t +lib/modernish/cap/BUG_SELECTRPL.t +lib/modernish/cap/BUG_SETOUTVAR.t +lib/modernish/cap/BUG_SPCBILOC.t +lib/modernish/cap/BUG_TESTERR0.t +lib/modernish/cap/BUG_TESTERR1A.t +lib/modernish/cap/BUG_TESTERR1B.t +lib/modernish/cap/BUG_TESTILNUM.t +lib/modernish/cap/BUG_TESTONEG.t +lib/modernish/cap/BUG_TESTRMPAR.t +lib/modernish/cap/BUG_TRAPEMPT.t +lib/modernish/cap/BUG_TRAPEXIT.t +lib/modernish/cap/BUG_TRAPRETIR.t +lib/modernish/cap/BUG_TRAPSUB0.t +lib/modernish/cap/CESCQUOT.t +lib/modernish/cap/DBLBRACKET.t +lib/modernish/cap/DBLBRACKETERE.t +lib/modernish/cap/DBLBRACKETV.t +lib/modernish/cap/DOTARG.t +lib/modernish/cap/HERESTR.t +lib/modernish/cap/KSHARRAY.t +lib/modernish/cap/LEPIPEMAIN.t +lib/modernish/cap/LINENO.t +lib/modernish/cap/NONFORKSUBSH.t +lib/modernish/cap/OPTNOPREFIX.t +lib/modernish/cap/PRINTFV.t +lib/modernish/cap/PSREPLACE.t +lib/modernish/cap/QRK_32BIT.t +lib/modernish/cap/QRK_APIPEMAIN.t +lib/modernish/cap/QRK_ARITHEMPT.t +lib/modernish/cap/QRK_ARITHWHSP.t +lib/modernish/cap/QRK_BCDANGER.t +lib/modernish/cap/QRK_EMPTPPFLD.t +lib/modernish/cap/QRK_EMPTPPWRD.t +lib/modernish/cap/QRK_EVALNOOPT.t +lib/modernish/cap/QRK_EXECFNBI.t +lib/modernish/cap/QRK_HDPARQUOT.t +lib/modernish/cap/QRK_IFSFINAL.t +lib/modernish/cap/QRK_LOCALINH.t +lib/modernish/cap/QRK_LOCALSET.t +lib/modernish/cap/QRK_LOCALSET2.t +lib/modernish/cap/QRK_LOCALUNS.t +lib/modernish/cap/QRK_LOCALUNS2.t +lib/modernish/cap/QRK_OPTCASE.t +lib/modernish/cap/QRK_OPTDASH.t +lib/modernish/cap/QRK_OPTULINE.t +lib/modernish/cap/QRK_PPIPEMAIN.t +lib/modernish/cap/QRK_SPCBIXP.t +lib/modernish/cap/QRK_UNSETF.t +lib/modernish/cap/README.md +lib/modernish/cap/ROFUNC.t +lib/modernish/cap/TESTO.t +lib/modernish/cap/TRAPPRSUBSH.t +lib/modernish/cap/TRAPZERR.t +lib/modernish/mod/safe.mm +lib/modernish/mod/sys/base/mktemp.mm +lib/modernish/mod/sys/base/readlink.mm +lib/modernish/mod/sys/base/rev.mm +lib/modernish/mod/sys/base/seq.mm +lib/modernish/mod/sys/base/which.mm +lib/modernish/mod/sys/base/yes.mm +lib/modernish/mod/sys/cmd/extern.mm +lib/modernish/mod/sys/cmd/harden.mm +lib/modernish/mod/sys/dir/countfiles.mm +lib/modernish/mod/sys/dir/mkcd.mm +lib/modernish/mod/sys/term/readkey.mm +lib/modernish/mod/var/arith/cmp.mm +lib/modernish/mod/var/arith/ops.mm +lib/modernish/mod/var/genoptparser.mm +lib/modernish/mod/var/local.mm +lib/modernish/mod/var/loop.mm +lib/modernish/mod/var/loop/find.mm +lib/modernish/mod/var/loop/for.mm +lib/modernish/mod/var/loop/repeat.mm +lib/modernish/mod/var/loop/select.mm +lib/modernish/mod/var/mapr.mm +lib/modernish/mod/var/readf.mm +lib/modernish/mod/var/stack/extra/clearstack.mm +lib/modernish/mod/var/stack/extra/printstack.mm +lib/modernish/mod/var/stack/extra/stackempty.mm +lib/modernish/mod/var/stack/extra/stacksize.mm +lib/modernish/mod/var/stack/trap.mm +lib/modernish/mod/var/string/append.mm +lib/modernish/mod/var/string/replacein.mm +lib/modernish/mod/var/string/touplow.mm +lib/modernish/mod/var/string/trim.mm +lib/modernish/mod/var/unexport.mm +lib/modernish/tst/@sanitychecks.t +lib/modernish/tst/arith.t +lib/modernish/tst/insubshell.t +lib/modernish/tst/io.t +lib/modernish/tst/is.t +lib/modernish/tst/isset.t +lib/modernish/tst/local.t +lib/modernish/tst/loop_cond.t +lib/modernish/tst/mapr.t +lib/modernish/tst/match.t +lib/modernish/tst/posparam.t +lib/modernish/tst/posparam_spc.t +lib/modernish/tst/run.sh +lib/modernish/tst/shellquote.t +lib/modernish/tst/stack.t +lib/modernish/tst/string.t +lib/modernish/tst/trap.t +lib/modernish/tst/unexport.t +lib/modernish/tst/util.t +%%PORTDOCS%%%%DOCSDIR%%/CODINGSTYLE +%%PORTDOCS%%%%DOCSDIR%%/DESIGN +%%PORTDOCS%%%%DOCSDIR%%/HELP +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/showTODO +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copy-timestamps.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/die-bg-test +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/get-firefox.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/git_restore_timestamps.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/harden-test +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/local-test +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/01.while-test.msh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/02.while-test-fullarith.msh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/03.while-lt.msh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/04.cfor.msh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/05.basicfor.msh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/06.basicfor-step.msh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/loopspeed/loopspeed-test +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mktemp-stresstest +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mktoc.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/modules_unalias_update.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/resurrectjoe/SAMPLE_DEADJOE +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/resurrectjoe/resurrectjoe +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/testshells.sh