diff options
author | yuri <yuri@FreeBSD.org> | 2018-01-30 03:12:29 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-01-30 03:12:29 +0800 |
commit | 657383c08bd0e41e6faf4a26023e53b7a06b7735 (patch) | |
tree | 4aa2b524188388206752af13a331a65119a82666 /lang | |
parent | fea94c8366d0042fd6587c98ada497f24a7a5abd (diff) | |
download | freebsd-ports-gnome-657383c08bd0e41e6faf4a26023e53b7a06b7735.tar.gz freebsd-ports-gnome-657383c08bd0e41e6faf4a26023e53b7a06b7735.tar.zst freebsd-ports-gnome-657383c08bd0e41e6faf4a26023e53b7a06b7735.zip |
New port: lang/retro12: Clean, elegant, and pragmatic dialect of Forth
See details in https://forthworks.com/retro
PR: 225320
Submitted by: Mateusz Piotrowski <mpp302@gmail.com>
Approved by: tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D14102
Diffstat (limited to 'lang')
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/retro12/Makefile | 52 | ||||
-rw-r--r-- | lang/retro12/distinfo | 3 | ||||
-rw-r--r-- | lang/retro12/files/patch-build.sh | 48 | ||||
-rw-r--r-- | lang/retro12/pkg-descr | 16 |
5 files changed, 120 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index f4f282962a97..83763d58d514 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -293,6 +293,7 @@ SUBDIR += racket-minimal SUBDIR += ratfor SUBDIR += referenceassemblies-pcl + SUBDIR += retro12 SUBDIR += rexx-imc SUBDIR += rexx-regina SUBDIR += rexx-regutil diff --git a/lang/retro12/Makefile b/lang/retro12/Makefile new file mode 100644 index 000000000000..04caa7ff70ff --- /dev/null +++ b/lang/retro12/Makefile @@ -0,0 +1,52 @@ +# $FreeBSD$ + +PORTNAME= retro12 +DISTVERSION= 2018.1 +CATEGORIES= lang +MASTER_SITES= https://forthworks.com/retro/r/ +DISTNAME= ${PORTNAME:tu}-${DISTVERSION} + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Clean, elegant, and pragmatic dialect of Forth + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +PLIST_FILES= bin/embedimage \ + bin/extend \ + bin/listener \ + bin/muri \ + bin/repl \ + bin/rre \ + bin/unu +PORTDATA= glossary.forth \ + ngaImage \ + words.tsv + +OPTIONS_DEFINE= DOCS EXAMPLES + +PORTDOCS= doc \ + literate \ + README.md \ + RELEASE_NOTES.md + +PORTEXAMPLES= example + +do-build: + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build.sh + +do-install: +.for f in embedimage extend muri repl rre unu + ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/bin/${f} +.endfor + ${INSTALL_SCRIPT} ${WRKSRC}/bin/listener ${STAGEDIR}${PREFIX}/bin/listener + cd ${WRKSRC} && \ + ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR} + +do-install-DOCS-on: + cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR} + +do-install-EXAMPLES-on: + cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTEXAMPLES}" ${STAGEDIR}${EXAMPLESDIR} + +.include <bsd.port.mk> diff --git a/lang/retro12/distinfo b/lang/retro12/distinfo new file mode 100644 index 000000000000..7ba890d509b6 --- /dev/null +++ b/lang/retro12/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1517182308 +SHA256 (RETRO12-2018.1.tar.gz) = 00d2ecdf586ea183ff58a7586f66fa9b1906c25fff0d70fa8591ac7c50508937 +SIZE (RETRO12-2018.1.tar.gz) = 177247 diff --git a/lang/retro12/files/patch-build.sh b/lang/retro12/files/patch-build.sh new file mode 100644 index 000000000000..b11d93dc2f93 --- /dev/null +++ b/lang/retro12/files/patch-build.sh @@ -0,0 +1,48 @@ +--- build.sh.orig 2018-01-17 13:10:18 UTC ++++ build.sh +@@ -7,14 +7,14 @@ rm -f bin/extend + rm -f bin/muri + + cd tools +-cc -O3 -c embedimage.c -o embedimage.o +-cc -O3 -c extend.c -o extend.o +-cc -O3 -c unu.c -o unu.o +-cc -O3 -c muri.c -o muri.o +-cc unu.o -lm -o unu +-cc muri.o -lm -o muri +-cc embedimage.o -lm -o embedimage +-cc extend.o -lm -o extend ++$CC $CFLAGS -c embedimage.c -o embedimage.o ++$CC $CFLAGS -c extend.c -o extend.o ++$CC $CFLAGS -c unu.c -o unu.o ++$CC $CFLAGS -c muri.c -o muri.o ++$CC $LDFLAGS unu.o -lm -o unu ++$CC $LDFLAGS muri.o -lm -o muri ++$CC $LDFLAGS embedimage.o -lm -o embedimage ++$CC $LDFLAGS extend.o -lm -o extend + mv embedimage ../bin + mv extend ../bin + mv unu ../bin +@@ -45,16 +45,16 @@ cd interfaces + ../bin/extend rre.forth + ../bin/embedimage >image.c + rm ngaImage +-cc -O3 -c rre.c -o rre.o +-cc -O3 -c repl.c -o repl.o +-cc rre.o -lm -o rre +-cc repl.o -o repl ++$CC $CFLAGS -c rre.c -o rre.o ++$CC $CFLAGS -c repl.c -o repl.o ++$CC $LDFLAGS rre.o -lm -o rre ++$CC $LDFLAGS repl.o -o repl + mv rre ../bin + mv repl ../bin + rm *.o + cd .. + + echo "Update Glossary" +-cat words.tsv | sort >/tmp/words +-mv /tmp/words words.tsv ++cat words.tsv | sort >words.tmp ++mv words.tmp words.tsv + ./bin/rre glossary.forth export glossary >doc/Glossary.txt diff --git a/lang/retro12/pkg-descr b/lang/retro12/pkg-descr new file mode 100644 index 000000000000..54a5b192f616 --- /dev/null +++ b/lang/retro12/pkg-descr @@ -0,0 +1,16 @@ +RETRO is a clean, elegant, and pragmatic dialect of Forth. It provides +a simple alternative for those willing to make a break from legacy +systems. + +The language draws influences from many sources including traditional +Forth systems, cmForth, colorForth, Factor, and Parable. It was +designed to be easy to grasp and adapt to specific uses. + +The basic language is very portable. It runs on a tiny virtual +machine (Nga), which is written in C. There are multiple interface +options, the main one (rre) is buildable with just the standard C +compiler and libraries on most systems (tested at various points +on Linux, NetBSD, macOS, and Windows, on x86, x86-64, PPC [emulated], +and various ARM processors). + +WWW: https://forthworks.com/retro |