diff --git a/lang/gforth/Makefile b/lang/gforth/Makefile index 2b2f188b06d8..360cbcf671da 100644 --- a/lang/gforth/Makefile +++ b/lang/gforth/Makefile @@ -1,83 +1,82 @@ # Created by: Cyrille Lefevre PORTNAME= gforth PORTVERSION= 0.7.3 PORTREVISION= 13 CATEGORIES= lang MASTER_SITES= http://www.complang.tuwien.ac.at/forth/gforth/ \ GNU MAINTAINER= danfe@FreeBSD.org COMMENT= Fast and portable Forth system -LICENSE= GPLv3 +LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_i386= Assertion failed: (pi->restlength >=0), function check_prims, file ./main.c, line 1049. BROKEN_powerpc64= fails to package: Unable to access file usr/local/share/gforth/0.7.3/kernl64l.fi:No such file or directory LIB_DEPENDS= libavcall.so:devel/libffcall \ libffi.so:devel/libffi \ libltdl.so:devel/libltdl USES= gmake libtool:build localbase makeinfo USE_GCC= yes USE_LDCONFIG= ${PREFIX}/lib/gforth/${PORTVERSION}/libcc-named GNU_CONFIGURE= yes CONFIGURE_ENV= GFORTHHIST=${WRKSRC} MAKE_ENV= GFORTHHIST=${WRKSRC} ALL_TARGET= kernel/version.fs more info MAKE_JOBS_UNSAFE=yes STRIP= #none PLIST_SUB= PORTVERSION=${PORTVERSION} \ WORDSIZE=${WORDSIZE} BYTEORDER=${BYTEORDER} PORTDOCS= AUTHORS BUGS Benchres COPYING COPYING.DOC \ INSTALL INSTALL.BINDIST NEWS README \ NEWS.vmgen README.vmgen ToDo INFO= gforth vmgen OPTIONS_DEFINE= DOCS .include -.if ${ARCH} == i386 || ${ARCH} == powerpc +.if ${ARCH} == i386 || ${ARCH} == powerpc || ${ARCH} == armv6 || ${ARCH} == armv7 WORDSIZE=32 .else WORDSIZE=64 .endif .if ${ARCH} == powerpc || ${ARCH} == sparc64 BYTEORDER=b .else BYTEORDER=l .endif post-patch: ${REINPLACE_CMD} 's:@CC@:& -I${LOCALBASE}/include -L${LOCALBASE}/lib:' \ ${WRKSRC}/envos.fs.in ${REINPLACE_CMD} '/ checkone/d' ${WRKSRC}/Makefile.in post-install: install-doc remove-empty-files remove-empty-dirs install-doc: .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} . for filename in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${filename} ${STAGEDIR}${DOCSDIR} . endfor .endif # Remove unused file remove-empty-files: @${RM} ${STAGEDIR}${DATADIR}/site-forth/siteinit.fs # Remove unused directories remove-empty-dirs: @${FIND} -d ${STAGEDIR}${DATADIR}/${PORTVERSION}/arch/ -type d -empty -delete .include diff --git a/lang/gforth/files/patch-engine_main.c b/lang/gforth/files/patch-engine_main.c new file mode 100644 index 000000000000..4767de3e2451 --- /dev/null +++ b/lang/gforth/files/patch-engine_main.c @@ -0,0 +1,29 @@ +--- engine/main.c.orig 2013-10-11 21:31:28 UTC ++++ engine/main.c +@@ -976,7 +976,8 @@ static void check_prims(Label symbols1[]) + goto_len = goto_p[1]-goto_p[0]; + debugp(stderr, "goto * %p %p len=%ld\n", + goto_p[0],symbols2[goto_p-symbols1],(long)goto_len); +- if (memcmp(goto_p[0],symbols2[goto_p-symbols1],goto_len)!=0) { /* unequal */ ++ if ((goto_len < 0) || ++ memcmp(goto_p[0],symbols2[goto_p-symbols1],goto_len)!=0) { /* unequal */ + no_dynamic=1; + debugp(stderr," not relocatable, disabling dynamic code generation\n"); + init_ss_cost(); +@@ -1045,8 +1046,14 @@ static void check_prims(Label symbols1[]) + nonrelocs++; + continue; + } +- assert(pi->length>=0); +- assert(pi->restlength >=0); ++ if((pi->length<0) || (pi->restlength<0)) { ++ pi->length = endlabel-symbols1[i]; ++ pi->restlength = 0; ++#ifndef BURG_FORMAT ++ debugp(stderr,"\n adjust restlen: len/restlen < 0, %d/%d", ++ pi->length, pi->restlength); ++#endif ++ }; + while (j<(pi->length+pi->restlength)) { + if (s1[j]==s3[j]) { + if (s1[j] != s2[j]) {