Index: head/lang/J/Makefile =================================================================== --- head/lang/J/Makefile (revision 500310) +++ head/lang/J/Makefile (revision 500311) @@ -1,45 +1,63 @@ # $FreeBSD$ PORTNAME= J -DISTVERSIONPREFIX= j -DISTVERSION= 808 -DISTVERSIONSUFFIX= -release +PORTVERSION= ${JVERSION:S/^j//:S/-release//} +PORTEPOCH= 1 CATEGORIES= lang math MAINTAINER= sevenjp@gmail.com COMMENT= J programming language LICENSE= GPLv3 -LICENSE_FILE= ${WRKSRC}/license.txt +LICENSE_FILE= ${WRKDIR}/jsource-${JVERSION}/license.txt -ONLY_FOR_ARCHS= amd64 -ONLY_FOR_ARCHS_REASON_i386= i386 needs hostdefs and netdefs files to be generated. +ONLY_FOR_ARCHS_REASON_amd64= Not built or tested for other archs. i386 needs hostdefs and netdefs files to be generated. BUILD_DEPENDS= bash:shells/bash -LIB_DEPENDS= libpcreposix.so:devel/pcre \ +LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \ libsqlite3.so:databases/sqlite3 USES+= libedit gmake shebangfix uidfix + SHEBANG_GLOB= *.sh SUB_FILES= jconsole profile.ijs USE_GITHUB= yes GH_ACCOUNT= jsoftware GH_PROJECT= jsource +GH_TAGNAME= ${JVERSION} +# J is released with ports-unfriendly versioning +JVERSION= j807-release + BIN_FILES= jconsole LIB_FILES= libj.so libtsdll.so + +OPTIONS_DEFINE= OPENMP + +OPENMP_DESC= Build with OpenMP support +OPENMP_USES= compiler:openmp +OPENMP_MAKE_ENV= USE_OPENMP=1 +OPENMP_LIB_DEPENDS= libgomp.so:lang/gcc7 + +# J wants to install jconsole, also provided by openjdk +CONFLICTS_INSTALL= openjdk6 \ + openjdk6-jre \ + openjdk7 \ + openjdk7-jre \ + openjdk8 \ + openjdk8-jre do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/j/bin ${MKDIR} ${STAGEDIR}${PREFIX}/share/j/system ${MKDIR} ${STAGEDIR}${PREFIX}/share/j/addons ${INSTALL_PROGRAM} ${BIN_FILES:C!^!${WRKDIR}/jbld/j64/bin/!} ${STAGEDIR}${PREFIX}/lib/j/bin/ ${INSTALL_LIB} ${LIB_FILES:C!^!${WRKDIR}/jbld/j64/bin/!} ${STAGEDIR}${PREFIX}/lib/j/bin # Required by the J runtime ${INSTALL_DATA} ${WRKDIR}/profile.ijs ${STAGEDIR}${PREFIX}/share/j/ ${INSTALL_SCRIPT} ${WRKDIR}/jconsole ${STAGEDIR}${PREFIX}/bin/ (cd ${WRKDIR}/jbld/j64/system && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/share/j/system) (cd ${WRKDIR}/jbld/j64/addons && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/share/j/addons) .include Index: head/lang/J/distinfo =================================================================== --- head/lang/J/distinfo (revision 500310) +++ head/lang/J/distinfo (revision 500311) @@ -1,3 +1,3 @@ -TIMESTAMP = 1528123249 -SHA256 (jsoftware-jsource-j808-release_GH0.tar.gz) = 1c7335e0d705bfc630da230ee8d196487627eed6f9374728bcac6b9ffbb1fd1d -SIZE (jsoftware-jsource-j808-release_GH0.tar.gz) = 2128876 +TIMESTAMP = 1546772563 +SHA256 (jsoftware-jsource-807-j807-release_GH0.tar.gz) = 324ff0b046c9f7f24f18a72fa8a4253ad54c99a48c397fd2c724392f5e097d7f +SIZE (jsoftware-jsource-807-j807-release_GH0.tar.gz) = 2398318 Index: head/lang/J/files/jconsole.in =================================================================== --- head/lang/J/files/jconsole.in (revision 500310) +++ head/lang/J/files/jconsole.in (revision 500311) @@ -1,5 +1,3 @@ #!/bin/sh -# $FreeBSD$ - exec %%LOCALBASE%%/lib/j/bin/jconsole -jprofile %%LOCALBASE%%/share/j/profile.ijs Property changes on: head/lang/J/files/jconsole.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Modified: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/lang/J/files/patch-Makefile =================================================================== --- head/lang/J/files/patch-Makefile (revision 500310) +++ head/lang/J/files/patch-Makefile (revision 500311) @@ -1,24 +1,21 @@ --- Makefile.orig 2018-04-09 18:07:38 UTC +++ Makefile -@@ -0,0 +1,21 @@ +@@ -0,0 +1,18 @@ +.PHONY: all +all: make-${ARCH} + +.PHONY: make-amd64 +make-amd64: build-j64 + +.PHONY: make-i386 +make-i386: build-j32 + -+.PHONY: init -+init: ++build-%: + make/install.sh -+ -+build-%: init + make/build_jconsole.sh $* + make/build_libj.sh $* + make/build_tsdll.sh $* + +.PHONY: clean +clean: + rm -rf ${jbld} Index: head/lang/J/files/patch-jlibrary_system_config_base.cfg =================================================================== --- head/lang/J/files/patch-jlibrary_system_config_base.cfg (revision 500310) +++ head/lang/J/files/patch-jlibrary_system_config_base.cfg (revision 500311) @@ -1,21 +1,21 @@ ---- jlibrary/system/config/base.cfg.orig 2016-11-25 19:04:24 UTC +--- jlibrary/system/config/base.cfg.orig 2019-01-06 11:06:00 UTC +++ jlibrary/system/config/base.cfg -@@ -93,6 +93,18 @@ case. 'Linux' do. - XDiff=: '/usr/bin/meld' - Editor=: 'geany +%l %f' - Editor_nox=: 'vi -c%l %f' +@@ -90,6 +90,18 @@ case. 'Linux' do. + XDiff=: '' + Editor=: '' + Editor_nox=: '' +case. 'FreeBSD' do. + BoxForm=: 0 + Browser=: '' -+ Browser_nox=: '/usr/bin/w3m' -+ EPSReader=: '/usr/bin/evince' ++ Browser_nox=: '' ++ EPSReader=: '' + ImageViewer=: '' + ImageViewer_nox=: '' -+ PDFReader=: '/usr/bin/evince' ++ PDFReader=: '' + PDFReader_nox=: '' -+ XDiff=: '/usr/bin/meld' -+ Editor=: 'geany +%l %f' -+ Editor_nox=: 'vi -c%l %f' ++ XDiff=: '' ++ Editor=: '' ++ Editor_nox=: '' case. 'Win' do. BoxForm=: 1 Browser=: '' Index: head/lang/J/files/patch-jlibrary_system_main_regex.ijs =================================================================== --- head/lang/J/files/patch-jlibrary_system_main_regex.ijs (revision 500310) +++ head/lang/J/files/patch-jlibrary_system_main_regex.ijs (revision 500311) @@ -1,10 +1,19 @@ ---- jlibrary/system/main/regex.ijs.orig 2018-03-07 18:59:01 UTC +--- jlibrary/system/main/regex.ijs.orig 2019-01-06 11:11:14 UTC +++ jlibrary/system/main/regex.ijs -@@ -101,6 +101,7 @@ NB. rxdll is in bin or tools/regex - select. UNAME - case. 'Win' do. t=. 'jpcre.dll' - case. 'Darwin' do. t=. 'libjpcre.dylib' -+case. 'FreeBSD' do. t=. 'libpcreposix.so' - fcase. 'Linux' do. - if. 2 0-:('libpcreposix.so.3 dummyfunction n')&(15!:0) ::(15!:10) '' do. - rxdll=: 'libpcreposix.so.3' +@@ -179,6 +179,7 @@ select. UNAME + case. 'Win' do. t=. 'jpcre2.dll' + case. 'Darwin' do. t=. 'libjpcre2.dylib' + case. 'Linux' do. t=. 'libjpcre2.so' ++case. 'FreeBSD' do. t=. 'libjpcre2.so' + case. 'Android' do. t=. 'libjpcre2.so' + end. + +@@ -191,6 +192,8 @@ NB. fall back one more time + if. ('Android'-:UNAME) *. 0 = 1!:4 :: 0: '/'e.LIBFILE) *. 0 = 1!:4 :: 0: '/'e.LIBFILE) *. 0 = 1!:4 :: 0: '/'e.LIBFILE + end. + 'libc.so.6 setlocale > x i *c'&(15!:0)^:(UNAME-:'Linux') 1;,'C' ++'libc.so.7 setlocale > x i *c'&(15!:0)^:(UNAME-:'FreeBSD') 1;,'C' + if. notdef 'IFRASPI' do. + if. UNAME -: 'Linux' do. + cpu=. 2!:0 'cat /proc/cpuinfo' +@@ -106,6 +107,7 @@ if. (<'home') -.@e. {."1 SystemFolders do. elseif. 'Android'-:UNAME do. t=. '/sdcard' elseif. 'Darwin'-:UNAME do. t=. (0-:t){::'';~t=. 2!:5'HOME' elseif. 'Linux'-:UNAME do. t=. (0-:t){::'';~t=. 2!:5'HOME' + elseif. 'FreeBSD'-:UNAME do. t=. (0-:t){::'';~t=. 2!:5'HOME' elseif. do. t=. '' end. if. (''-:t)+.((,'/')-:t)+.('/root'-:t)+.('/usr/'-:5{.t) do. -@@ -107,6 +108,7 @@ if. (<'temp') -.@e. {."1 SystemFolders d +@@ -120,6 +122,7 @@ if. (<'temp') -.@e. {."1 SystemFolders do. elseif. 'Android'-:UNAME do. t=. '/sdcard' elseif. 'Darwin'-:UNAME do. 1!:5 ::] = 7 | bc) ++if [ $OVER_GCC_VER7 -eq 1 ] ; then ++common="$common -Wno-implicit-fallthrough" ++fi ++OVER_GCC_VER8=$(echo `$CC -dumpversion | cut -f1 -d.` \>= 8 | bc) ++if [ $OVER_GCC_VER8 -eq 1 ] ; then ++common="$common -Wno-cast-function-type" ++fi ++fi ++ case $jplatform\_$1 in -@@ -33,6 +32,16 @@ TARGET=libtsdll.dylib + linux_j32) +@@ -35,6 +48,16 @@ darwin_j64) + TARGET=libtsdll.dylib COMPILE="$common " LINK=" -dynamiclib -o libtsdll.dylib " - ;; ++;; +freebsd_j32) +TARGET=libtsdll.so +COMPILE="$common -m32 " +LINK=" -shared -Wl,-soname,libtsdll.so -m32 -o libtsdll.so " +;; +freebsd_j64) +TARGET=libtsdll.so +COMPILE="$common " +LINK=" -shared -Wl,-soname,libtsdll.so -o libtsdll.so " -+;; + ;; *) echo no case for those parameters - exit Index: head/lang/J/files/patch-make_domake.sh =================================================================== --- head/lang/J/files/patch-make_domake.sh (revision 500310) +++ head/lang/J/files/patch-make_domake.sh (revision 500311) @@ -1,19 +1,11 @@ ---- make/domake.sh.orig 2018-04-09 18:08:56 UTC +--- make/domake.sh.orig 2019-01-06 11:36:39 UTC +++ make/domake.sh -@@ -3,8 +3,7 @@ - # run by build_jconsole and build_libj - # $1 is j32 or j64 +@@ -15,7 +15,7 @@ if [ $1 = "j64nonavx" ] ; then + avx=-nonavx + fi --cd ~ --. jvars.sh -+. make/jvars.sh - - echo $TARGET - echo $COMPILE -@@ -12,5 +11,5 @@ echo $LINK - mkdir -p $jbld/jout/$TARGET/$1 - cd $jbld/jout/$TARGET/$1 - --make -f $jmake/makefile +-echo "building $jbld/$targ/bin/$TARGET $avx" +gmake -f $jmake/makefile - cp $TARGET $jbld/$1/bin + echo "output in $jbld/$targ/bin/build_$TARGET$avx.txt" + make -f $jmake/makefile >$jbld/$targ/bin/build_$TARGET$avx.txt 2>&1 + echo `egrep -w 'warning|error|note' $jbld/$targ/bin/build_$TARGET$avx.txt` Index: head/lang/J/files/patch-make_jvars.sh =================================================================== --- head/lang/J/files/patch-make_jvars.sh (revision 500310) +++ head/lang/J/files/patch-make_jvars.sh (revision 500311) @@ -1,16 +1,25 @@ ---- make/jvars.sh.orig 2018-04-09 18:05:09 UTC +--- make/jvars.sh.orig 2019-03-10 15:55:44 UTC +++ make/jvars.sh -@@ -1,11 +1,11 @@ +@@ -2,7 +2,7 @@ # source shell script (read with . jvars.sh) so stuff is easy to find # edit following if your install is not standard --jgit=~/gitdev/jsource # git jsource folder -+jgit=~/jsource-j808-release # git jsource folder - jbld=~/jbld # test libraries and binaries will be put here +-jgit=~/git/jsource # git jsource folder ++jgit=~/jsource-j807-release # git jsource folder + jbld=~/jbld # test libraries and binaries will be put here - # edit platform to build - linux darwin raspberry --jplatform=linux -+jplatform=freebsd + # platform and shared library suffix +@@ -10,7 +10,12 @@ jplatform=`uname|tr '[:upper:]' '[:lower:]'` + jsuffix=so + if [ $jplatform = "darwin" ] ; then jsuffix=dylib ; fi +-CC=clang # compiler ++USE_OPENMP="${USE_OPENMP:=0}" ++if [ $USE_OPENMP -eq 1 ] ; then ++ CC=gcc8 ++else ++ CC=clang # compiler ++fi + # should not be necessary to edit after here - j32=$jbld/j32/bin/jconsole + tsu=$jgit/test/tsu.ijs Index: head/lang/J/files/patch-make_makefile =================================================================== --- head/lang/J/files/patch-make_makefile (revision 500310) +++ head/lang/J/files/patch-make_makefile (revision 500311) @@ -1,9 +1,11 @@ ---- make/makefile.orig 2016-11-25 19:04:24 UTC +--- make/makefile.orig 2018-10-02 13:24:06 UTC +++ make/makefile -@@ -1,5 +1,5 @@ - vpath % $(jgit)/jsrc +@@ -3,7 +3,7 @@ vpath % $(jgit)/jsrc + %.o: %.c + $(CC) -c $(CFLAGS) $(CFLAGS_FMA) -o$@ $^ -CFLAGS=$(COMPILE) +CFLAGS+=$(COMPILE) - $(TARGET) : $(OBJS) - $(CC) $(OBJS) $(LINK) + $(OBJS_FMA) : CFLAGS_FMA := -mfma + $(TARGET) : $(OBJS) $(OBJS_FMA) + $(CC) $(OBJS) $(OBJS_FMA) $(LINK) Index: head/lang/J/files/patch-netdefs_netdefs.c =================================================================== --- head/lang/J/files/patch-netdefs_netdefs.c (revision 500310) +++ head/lang/J/files/patch-netdefs_netdefs.c (revision 500311) @@ -1,11 +1,11 @@ ---- netdefs/netdefs.c.orig 2016-11-25 19:04:24 UTC +--- netdefs/netdefs.c.orig 2019-01-06 15:19:53 UTC +++ netdefs/netdefs.c -@@ -147,7 +147,7 @@ int main(){ - printf ("msg_iov_sz=: %d\n",sizeof(((struct msghdr*)0)->msg_iov)); - printf ("msg_iovlen_off=: %d\n",offset(struct msghdr,msg_iovlen)); - printf ("msg_iovlen_sz=: %d\n",sizeof(((struct msghdr*)0)->msg_iovlen)); +@@ -152,7 +152,7 @@ int main(){ + printf ("msg_iov_sz=: " FMTI "\n",sizeof(((struct msghdr*)0)->msg_iov)); + printf ("msg_iovlen_off=: " FMTI "\n",offset(struct msghdr,msg_iovlen)); + printf ("msg_iovlen_sz=: " FMTI "\n",sizeof(((struct msghdr*)0)->msg_iovlen)); -#if defined(linux) || defined(Darwin) +#if defined(linux) || defined(Darwin) || defined(__FreeBSD__) - printf ("msg_control_off=: %d\n",offset(struct msghdr,msg_control)); - printf ("msg_control_sz=: %d\n",sizeof(((struct msghdr*)0)->msg_control)); - printf ("msg_controllen_off=: %d\n",offset(struct msghdr,msg_controllen)); + printf ("msg_control_off=: " FMTI "\n",offset(struct msghdr,msg_control)); + printf ("msg_control_sz=: " FMTI "\n",sizeof(((struct msghdr*)0)->msg_control)); + printf ("msg_controllen_off=: " FMTI "\n",offset(struct msghdr,msg_controllen)); Index: head/lang/J/files/profile.ijs.in =================================================================== --- head/lang/J/files/profile.ijs.in (revision 500310) +++ head/lang/J/files/profile.ijs.in (revision 500311) @@ -1,54 +1,53 @@ NB. J profile NB. JFE sets BINPATH_z_ and ARGV_z_ NB. add your sentences in startup.ijs -NB. $FreeBSD$ systype=. 9!:12'' jpathsep_z_=: '/'&(('\' I.@:= ])}) BINPATH_z_=: jpathsep BINPATH_z_ NB. create SystemFolders bin=. BINPATH install=. (bin i: '/'){.bin fhs=. (FHS"_)^:(0=4!:0<'FHS')(5=systype)*.0=#1!:0(systype-5){(2!:5'HOME');2!:5'USERPROFILE' home=. >(0-:home){home;,'/' isroot=. (0=#1!:0'/data') *. ('root'-:2!:5'USER') +. (isroot{user;install,'/user' home=. >isroot{home;install break=. user,'/break' config=. user,'/config' snap=. user,'/snap' temp=. user,'/temp' temp=. >isroot{temp;(*#1!:0'/tmp'){::'/tmp';~(0-:2!:5'TMPDIR'){::(2!:5'TMPDIR');temp ids=. ;:'addons bin break config home install snap system tools temp user' 0!:0 :: ] <(({.~ i:&'/') jpathsep >{.4!:3''),'/profilex.ijs' NB. override 0!:0 :: ] ^:(0=#1!:0 (({.~ i:&'/') jpathsep >{.4!:3''),'/startup_android.ijs') (systype-5){'/.jprofile.ijs';'/_jprofile.ijs' NB. override per user except for standalone script SystemFolders_j_=: ids,.jpathsep@".&.>ids md=. 3 : 0 NB. recursive makedir a=. jpathsep y,'/' if. ('root'-:2!:5'USER') +. ('//'-:2{.a)+.('/root/'-:6{.a)+.('/var/root/'-:10{.a)+.('/usr/'-:5{.a)+.('/tmp'-:a) do. return. end. NB. installed under / /root /usr if. -.#1!:0 }:a do. for_n. I. a='/' do. 1!:5 :: [