diff options
author | gahr <gahr@FreeBSD.org> | 2013-01-22 01:04:13 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2013-01-22 01:04:13 +0800 |
commit | a5f96e289f23d39f1f750b04089cd9dabaef2bd6 (patch) | |
tree | 6dcaa4d93f41556805c096ccbe6cfce5dba0f9e4 /lang | |
parent | cb3dd9b7d244eb70374be7a9a66f6d9dc1be1d8d (diff) | |
download | freebsd-ports-gnome-a5f96e289f23d39f1f750b04089cd9dabaef2bd6.tar.gz freebsd-ports-gnome-a5f96e289f23d39f1f750b04089cd9dabaef2bd6.tar.zst freebsd-ports-gnome-a5f96e289f23d39f1f750b04089cd9dabaef2bd6.zip |
- Update to 05_20130120
Changes:
* Interpreter and compiler have been improved to support the option
*l. This option allows adding a directory to the include library
search path (e.g.: -l ../lib).
* The compiler (s7c) has been improved to support the option -b.
With -b the directory of the Seed7 runtime libraries can be
specified (e.g.: -b ../bin).
* The target s7c in the makefiles has been changed to take advantage
of the options -l and -b. Now packages can compile the Seed7
compiler without a post install step.
* Additional function variants of parseFile, parseStri and execute
have been added to the library progs.s7i. The new functions allow
a detailed specification of parse and execution options.
* The library gzip.s7c has been improved to decode also blocks with
fixed Huffman codes. This type of block is almost never used since
dynamic Huffman codes compress better.
* The parsing of bigInteger literals has been improved to support
literals with bases other than 10 (e.g.: 16#FEDCBA98765434210_).
* The integer and bigInteger functions str (conversion to string)
have been changed to use lower case characters for digits larger
than 9. Now str(48879, 16) returns "beef" instead of "BEEF".
* The program make7.sd7 and the library make.s7i have been improved
to support multiple targets and the option -C.
* The Seed7 compiler has been improved to generate special inline
code for the case that the C floating point division by zero does
not result in Infinity, -Infinity or NaN (not a number).
* The functions chkLiteral and chkBitLength as well as checks for
shifts with negative shift count have been added to the program
chkbig.sd7.
* The function check_division as well as has checks for the operator
/:= (in check_nan) have been added to the program chkflt.sd7.
* The function check_str in chkint.sd7 has been improved to check
the new behaviour of the function str with a give base.
* The makefile mk_clang.mak has been added to support compilation
with the clang C compiler.
* The explanations of possible compilation errors in src/read_me.txt
have been improved.
* The functions interpreterPath and callOwnProgram have been removed
from the libraries environment.s7i respectively shell.s7i. This
functions were not used in any example program.
* The support for the interpreter option -m (use less memory during
the analyzing phase) has been removed. On many systems it was a
noop anyway.
* Result variables have been renamed in various libraries and example
programs.
* The functions find_include_file, print_lib_path, append_to_lib_path
and init_lib_path have been moved from infile.c to the new file
libpath.c.
* The function gen_rtl_array has been defined in the new file
arrutl.c. The function is used in the files cmdlib.c (functions
cmd_pipe2, cmd_pty, cmd_start_process) and prglib.c (functions
prg_exec, prg_fil_parse, prg_str_parse).
* The interpreter/compiler improvements (option -l) and the new
function variants in progs.s7i have been realized with changes in
prg_comp.c, analyze.c, data.h, infile.c, infile.h, info.c, option.h
and s7.c.
* The functions prgExec, prgFilParse and prgStrParse in prg_comp.c
have been improved to support additional parse and execution
options.
* The function interpr has been renamed to interpret and moved from
exec.c to prg_comp.c.
* The function copy_args has been moved from prclib.c to prg_comp.c.
* In traceutl.c the function set_trace has been changed and the
function set_trace2 has been removed. The functions mapTraceFlags,
mapTraceFlags2 and set_protfile_name have been added.
* The functions uBigMultiplyAndAdd and bigParseBased have been added
to big_rtl.c:
* In big_gmp.c the functions bigBitLength, bigLShift, bigRShift,
bigLShiftAssign, bigRShiftAssign, bigParse, and bigToInt32 have
been improved and bigParseBased has been added.
* To support bigInteger literals with base the file numlit.c has been
Diffstat (limited to 'lang')
-rw-r--r-- | lang/seed7/Makefile | 25 | ||||
-rw-r--r-- | lang/seed7/distinfo | 4 | ||||
-rw-r--r-- | lang/seed7/files/patch-mk_clang.mak | 29 | ||||
-rw-r--r-- | lang/seed7/files/patch-prg_chk_all.sd7 | 92 |
4 files changed, 137 insertions, 13 deletions
diff --git a/lang/seed7/Makefile b/lang/seed7/Makefile index 57e686fe3340..92f0c78bd04f 100644 --- a/lang/seed7/Makefile +++ b/lang/seed7/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= seed7 -DISTVERSION= 05_20130105 +DISTVERSION= 05_20130120 CATEGORIES= lang MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTNAME}/ DISTNAME= ${PORTNAME}_${DISTVERSION} @@ -24,7 +24,7 @@ MAKE_ENV+= S7_LIB_DIR=${S7_LIB_DIR} \ SEED7_LIBRARY=${SEED7_LIBRARY} \ C_COMPILER=${CC} \ CPLUSPLUS_COMPILER=${CPP} -ALL_TARGET= depend s7 +ALL_TARGET= depend s7 s7c SEED7_LIBRARY= ${PREFIX}/lib/${PORTNAME}/lib S7_LIB_DIR= ${PREFIX}/lib/${PORTNAME}/bin @@ -41,14 +41,21 @@ PORTDOCS= * BROKEN= does not compile .endif +.if ${OSVERSION} >= 1000024 || ${CC} == clang +MAKEFILE= mk_clang.mak +.else +MAKEFILE= makefile +.endif + post-patch: - ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g;' ${WRKSRC}/makefile + ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g;' ${WRKSRC}/makefile ${WRKSRC}/mk_clang.mak ${REINPLACE_CMD} -e '/FLOATTYPE_DOUBLE/s|undef|define|' ${WRKSRC}/config.h - ${REINPLACE_CMD} -i '' -e 's|./s7|${PREFIX}/bin/s7|g' ${WRKSRC}/../prg/chk_all.sd7 +# ${REINPLACE_CMD} -i '' -e 's|./s7|${PREFIX}/bin/s7|g' ${WRKSRC}/../prg/chk_all.sd7 do-install: -# install interpreter +# install interpreter and compiler ${INSTALL_PROGRAM} ${WRKSRC}/../bin/s7 ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/../prg/s7c ${PREFIX}/bin # install seed7 library ${INSTALL} -d ${SEED7_LIBRARY} cd ${WRKSRC}/../lib && ${COPYTREE_SHARE} '*.s7i' ${SEED7_LIBRARY} @@ -57,10 +64,6 @@ do-install: .for s7_lib in ${S7_LIBS} ${INSTALL_DATA} ${WRKSRC}/../bin/${s7_lib} ${S7_LIB_DIR} .endfor -# compile the seed7 compiler (needs the libraries to be installed) - cd ${WRKSRC} && ${GMAKE} s7c - ${INSTALL_PROGRAM} ${WRKSRC}/../prg/s7c ${PREFIX}/bin/s7c - ${RM} ${WRKSRC}/../prg/tmp_s7c.c ${WRKSRC}/../prg/s7c # install PORTDOCS .if ${PORT_OPTIONS:MDOCS} ${INSTALL} -d ${DOCSDIR} @@ -72,9 +75,9 @@ do-install: cd ${WRKSRC}/../prg && ${COPYTREE_SHARE} '*.dna *.sd7 *.dat *.s7i' ${EXAMPLESDIR} .endif -regression-test: ${INSTALL_TARGET} +regression-test: build @echo "" @echo "Testing the ${PORTNAME} installation" - @(cd ${WRKSRC}/../prg && ${PREFIX}/bin/s7 chk_all) + @(cd ${WRKSRC}/../prg && ${WRKSRC}/../bin/s7 -l ${WRKSRC}/../lib chk_all build) .include <bsd.port.post.mk> diff --git a/lang/seed7/distinfo b/lang/seed7/distinfo index 684952da5539..6190ad20b14d 100644 --- a/lang/seed7/distinfo +++ b/lang/seed7/distinfo @@ -1,2 +1,2 @@ -SHA256 (seed7_05_20130105.tgz) = 72c166e1854acc4b424b512a44793c8f7ad392e710274a44aacbd2dcc9f5f28b -SIZE (seed7_05_20130105.tgz) = 1806154 +SHA256 (seed7_05_20130120.tgz) = ddf142b0f79e0ff2cd6d25472bf39f2389bf42f01686d2e6d25c9f6f267c8142 +SIZE (seed7_05_20130120.tgz) = 1821907 diff --git a/lang/seed7/files/patch-mk_clang.mak b/lang/seed7/files/patch-mk_clang.mak new file mode 100644 index 000000000000..f5ac65ff5aee --- /dev/null +++ b/lang/seed7/files/patch-mk_clang.mak @@ -0,0 +1,29 @@ +--- mk_clang.mak.orig 2013-01-21 11:50:32.000000000 +0100 ++++ mk_clang.mak 2013-01-21 11:52:56.000000000 +0100 +@@ -10,7 +10,7 @@ + # CFLAGS = -O2 -g -Wall -Wextra -Wswitch-default -Wswitch-enum -Wcast-qual -Waggregate-return -Wwrite-strings -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith -Wmissing-noreturn -Wno-multichar -Wc++-compat + # CFLAGS = -O2 -g -x c++ -Wall -Wextra -Wswitch-default -Wswitch-enum -Wcast-qual -Waggregate-return -Wwrite-strings -Winline -Wconversion -Wshadow -Wpointer-arith -Wmissing-noreturn -Wno-multichar + # CFLAGS = -O2 -fomit-frame-pointer -Wall -Wextra -Wswitch-default -Wcast-qual -Waggregate-return -Wwrite-strings -Winline -Wconversion -Wshadow -Wpointer-arith -Wmissing-noreturn -Wno-multichar +-CFLAGS = -O2 -g -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith -ftrapv ++CFLAGS += -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith -ftrapv -I%%LOCALBASE%%/include + # CFLAGS = -O2 -g -x c++ -Wall -Winline -Wconversion -Wshadow -Wpointer-arith -ftrapv + # CFLAGS = -O2 -g -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith + # CFLAGS = -O2 -g -Wall -Winline -Wconversion -Wshadow -Wpointer-arith +@@ -18,7 +18,7 @@ + # CFLAGS = -O2 -g -pg -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith + # CFLAGS = -O2 -fomit-frame-pointer -funroll-loops -Wall + # CFLAGS = -O2 -funroll-loops -Wall -pg +-LDFLAGS = ++LDFLAGS = -L%%LOCALBASE%%/lib + # LDFLAGS = -pg + # LDFLAGS = -pg -lc_p + SYSTEM_LIBS = -lm +@@ -37,7 +37,7 @@ + COMPILER_LIB = s7_comp.a + ALL_S7_LIBS = ../bin/$(COMPILER_LIB) ../bin/$(COMP_DATA_LIB) ../bin/$(DRAW_LIB) ../bin/$(CONSOLE_LIB) ../bin/$(SEED7_LIB) + # CC = g++ +-CC = clang ++CC ?= clang + GET_CC_VERSION_INFO = $(CC) --version > + + BIGINT_LIB_DEFINE = USE_BIG_RTL_LIBRARY diff --git a/lang/seed7/files/patch-prg_chk_all.sd7 b/lang/seed7/files/patch-prg_chk_all.sd7 new file mode 100644 index 000000000000..1686e441a676 --- /dev/null +++ b/lang/seed7/files/patch-prg_chk_all.sd7 @@ -0,0 +1,92 @@ +--- ../prg/chk_all.sd7.orig 2013-01-21 17:05:47.000000000 +0100 ++++ ../prg/chk_all.sd7 2013-01-21 17:04:54.000000000 +0100 +@@ -30,6 +30,11 @@ + const string: OBJECT_FILE_EXTENSION is configValue("OBJECT_FILE_EXTENSION"); + const string: EXECUTABLE_FILE_EXTENSION is configValue("EXECUTABLE_FILE_EXTENSION"); + ++var string: interpretProgram is "./s7 -q "; ++var string: interpretCompiler is "./s7 s7c "; ++var string: executeCompiler is "./s7c "; ++var string: s7compiler is "./s7c" & EXECUTABLE_FILE_EXTENSION; ++ + const string: chkint_output is "\n\ + \Integer literals with exponent work correct.\n\ + \Based integer literals work correct.\n\ +@@ -234,7 +239,7 @@ + begin + write(progName); + flush(OUT); +- interpretedOutput := cmdOutput("./s7 -q " & progName); ++ interpretedOutput := cmdOutput(interpretProgram & progName); + if interpretedOutput <> referenceOutput then + writeln; + writeln(" *** The interpreted " <& progName <& " does not work okay:"); +@@ -244,7 +249,7 @@ + if fileType(progName & EXECUTABLE_FILE_EXTENSION) <> FILE_ABSENT then + removeFile(progName & EXECUTABLE_FILE_EXTENSION); + end if; +- compilerOutput := cmdOutput("./s7 s7c " & progName); ++ compilerOutput := cmdOutput(interpretCompiler & progName); + if fileType(progName & EXECUTABLE_FILE_EXTENSION) = FILE_REGULAR then + compiledOutput := cmdOutput("./" & progName); + if compiledOutput <> referenceOutput then +@@ -284,7 +289,7 @@ + end if; + okay := FALSE; + end if; +- if fileType("s7c" & EXECUTABLE_FILE_EXTENSION) = FILE_REGULAR then ++ if fileType(s7compiler) = FILE_REGULAR then + if fileType("tmp_" & progName & ".c") = FILE_REGULAR then + if fileType("tmp1_" & progName & ".c") = FILE_REGULAR then + removeFile("tmp1_" & progName & ".c"); +@@ -294,7 +299,7 @@ + if fileType(progName & EXECUTABLE_FILE_EXTENSION) <> FILE_ABSENT then + removeFile(progName & EXECUTABLE_FILE_EXTENSION); + end if; +- compilerOutput := cmdOutput("./s7c " & progName); ++ compilerOutput := cmdOutput(executeCompiler & progName); + if fileType(progName & EXECUTABLE_FILE_EXTENSION) = FILE_REGULAR then + if fileType("tmp1_" & progName & ".c") = FILE_REGULAR then + if not equalFiles("tmp_" & progName & ".c", "tmp1_" & progName & ".c") then +@@ -327,17 +332,31 @@ + + const proc: main is func + begin +- if fileType("s7c" & EXECUTABLE_FILE_EXTENSION) = FILE_REGULAR then +- removeFile("s7c" & EXECUTABLE_FILE_EXTENSION); +- end if; +- write("compiling the compiler"); +- flush(OUT); +- ignore(cmdOutput("./s7 s7c s7c")); +- if not fileType("s7c" & EXECUTABLE_FILE_EXTENSION) = FILE_REGULAR then +- writeln; +- writeln(" *** Failed to compile the compiler"); ++ if length(argv(PROGRAM)) = 1 and argv(PROGRAM)[1] = "build" then ++ interpretProgram := "../bin/s7 -l ../lib -q "; ++ interpretCompiler := "../bin/s7 -l ../lib s7c -l ../lib -b ../bin "; ++ executeCompiler := "../bin/s7c -l ../lib -b ../bin "; ++ s7compiler := "../bin/s7c" & EXECUTABLE_FILE_EXTENSION; ++ write("checking for presence of " <& s7compiler); ++ if not fileType(s7compiler) = FILE_REGULAR then ++ writeln; ++ writeln(" *** No Seed7 compiler executable found"); ++ else ++ writeln(" - okay"); ++ end if; + else +- writeln(" - okay"); ++ if fileType(s7compiler) = FILE_REGULAR then ++ removeFile(s7compiler); ++ end if; ++ write("compiling the compiler"); ++ flush(OUT); ++ ignore(cmdOutput(interpretCompiler & "s7c")); ++ if not fileType(s7compiler) = FILE_REGULAR then ++ writeln; ++ writeln(" *** Failed to compile the compiler"); ++ else ++ writeln(" - okay"); ++ end if; + end if; + check("chkint", chkint_output); + check("chkflt", chkflt_output); |