From owner-svn-ports-head@freebsd.org Sun Apr 8 09:41:18 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC20F93841; Sun, 8 Apr 2018 09:41:18 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 406BF69C19; Sun, 8 Apr 2018 09:41:18 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22D056146; Sun, 8 Apr 2018 09:41:18 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w389fIjL084803; Sun, 8 Apr 2018 09:41:18 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w389fFGM084779; Sun, 8 Apr 2018 09:41:15 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201804080941.w389fFGM084779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Sun, 8 Apr 2018 09:41:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r466786 - in head/lang/J: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pi X-SVN-Commit-Paths: in head/lang/J: . files X-SVN-Commit-Revision: 466786 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Apr 2018 09:41:18 -0000 Author: pi Date: Sun Apr 8 09:41:15 2018 New Revision: 466786 URL: https://svnweb.freebsd.org/changeset/ports/466786 Log: New port: lang/J J (J language) is a high-level, general-purpose, high-performance programming language. J is portable and runs on 32/64-bit Windows/Linux/Mac as well as iOS, Android, and other platforms. WWW: http://www.jsoftware.com PR: 226186 Submitted by: Joao Neves Added: head/lang/J/ head/lang/J/Makefile (contents, props changed) head/lang/J/distinfo (contents, props changed) head/lang/J/files/ head/lang/J/files/jconsole.in (contents, props changed) head/lang/J/files/patch-Makefile (contents, props changed) head/lang/J/files/patch-jlibrary_system_config_base.cfg (contents, props changed) head/lang/J/files/patch-jlibrary_system_defs_hostdefs__freebsd__64.ijs (contents, props changed) head/lang/J/files/patch-jlibrary_system_defs_netdefs__freebsd__64.ijs (contents, props changed) head/lang/J/files/patch-jlibrary_system_main_regex.ijs (contents, props changed) head/lang/J/files/patch-jlibrary_system_main_stdlib.ijs (contents, props changed) head/lang/J/files/patch-jsrc_jeload.c (contents, props changed) head/lang/J/files/patch-jsrc_jversion.h (contents, props changed) head/lang/J/files/patch-make_build__jconsole.sh (contents, props changed) head/lang/J/files/patch-make_build__jdll.sh (contents, props changed) head/lang/J/files/patch-make_build__libj.sh (contents, props changed) head/lang/J/files/patch-make_build__tsdll.sh (contents, props changed) head/lang/J/files/patch-make_domake.sh (contents, props changed) head/lang/J/files/patch-make_install.sh (contents, props changed) head/lang/J/files/patch-make_jvars.sh (contents, props changed) head/lang/J/files/patch-make_makefile (contents, props changed) head/lang/J/files/patch-netdefs_netdefs.c (contents, props changed) head/lang/J/files/pkg-message.in (contents, props changed) head/lang/J/files/profile.ijs.in (contents, props changed) head/lang/J/pkg-descr (contents, props changed) head/lang/J/pkg-plist (contents, props changed) Added: head/lang/J/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/Makefile Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +PORTNAME= J +PORTVERSION= ${JVERSION:S/^j//:S/-release//} +CATEGORIES= lang math + +MAINTAINER= sevenjp@gmail.com +COMMENT= J programming language + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKDIR}/jsource-j806-release/license.txt + +ONLY_FOR_ARCHS= amd64 +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 \ + 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= j806-release + +BIN_FILES= jconsole +LIB_FILES= libj.so libtsdll.so libjavx.so + +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 Added: head/lang/J/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/distinfo Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,3 @@ +TIMESTAMP = 1519502511 +SHA256 (jsoftware-jsource-806-j806-release_GH0.tar.gz) = 033a787ad3180a8ead8f4a3880c016b8581ddf6a3081f86a88774575c7cc168f +SIZE (jsoftware-jsource-806-j806-release_GH0.tar.gz) = 2280551 Added: head/lang/J/files/jconsole.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/jconsole.in Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,5 @@ +#!/bin/sh + +# $FreeBSD$ + +exec %%LOCALBASE%%/lib/j/bin/jconsole -jprofile %%LOCALBASE%%/share/j/profile.ijs Added: head/lang/J/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/patch-Makefile Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,28 @@ +--- Makefile.orig 2018-02-24 19:49:42 UTC ++++ Makefile +@@ -0,0 +1,25 @@ ++.PHONY: all ++all: make-${ARCH} ++ ++.PHONY: make-amd64 ++make-amd64: build-j64 libj-avx ++ ++.PHONY: make-i386 ++make-i386: build-j32 ++ ++.PHONY: init ++init: ++ make/install.sh ++ ++.PHONY: libj-avx ++libj-avx: init ++ make/build_libj.sh j64avx ++ ++build-%: init ++ make/build_jconsole.sh $* ++ make/build_libj.sh $* ++ make/build_tsdll.sh $* ++ ++.PHONY: clean ++clean: ++ rm -rf ${jbld} Added: head/lang/J/files/patch-jlibrary_system_config_base.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/patch-jlibrary_system_config_base.cfg Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,21 @@ +--- jlibrary/system/config/base.cfg.orig 2018-02-22 18:45:28 UTC ++++ jlibrary/system/config/base.cfg +@@ -90,6 +90,18 @@ case. 'Linux' do. + XDiff=: '/usr/bin/meld' + Editor=: 'geany +%l %f' + Editor_nox=: 'vi -c%l %f' ++case. 'FreeBSD' do. ++ BoxForm=: 0 ++ Browser=: '' ++ Browser_nox=: '/usr/bin/w3m' ++ EPSReader=: '/usr/bin/evince' ++ ImageViewer=: '' ++ ImageViewer_nox=: '' ++ PDFReader=: '/usr/bin/evince' ++ PDFReader_nox=: '' ++ XDiff=: '/usr/bin/meld' ++ Editor=: 'geany +%l %f' ++ Editor_nox=: 'vi -c%l %f' + case. 'Win' do. + BoxForm=: 1 + Browser=: '' Added: head/lang/J/files/patch-jlibrary_system_defs_hostdefs__freebsd__64.ijs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/patch-jlibrary_system_defs_hostdefs__freebsd__64.ijs Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,128 @@ +--- jlibrary/system/defs/hostdefs_freebsd_64.ijs.orig 2018-02-22 19:12:35 UTC ++++ jlibrary/system/defs/hostdefs_freebsd_64.ijs +@@ -0,0 +1,125 @@ ++NB. do not edit -- created by sym2ijs ++ ++cocurrent <'jdefs' ++ ++F_OK=: 0 ++R_OK=: 4 ++W_OK=: 2 ++X_OK=: 1 ++STDIN_FILENO=: 0 ++STDOUT_FILENO=: 1 ++STDERR_FILENO=: 2 ++SEEK_CUR=: 1 ++SEEK_END=: 2 ++SEEK_SET=: 0 ++ ++O_APPEND=: 8 ++O_CREAT=: 512 ++O_EXCL=: 2048 ++O_RDONLY=: 0 ++O_RDWR=: 2 ++O_TRUNC=: 1024 ++O_WRONLY=: 1 ++ ++O_ACCMODE=: 3 ++O_NOCTTY=: 32768 ++O_NONBLOCK=: 4 ++FD_CLOEXEC=: 1 ++F_DUPFD=: 0 ++F_GETFD=: 1 ++F_SETFD=: 2 ++F_GETFL=: 3 ++F_SETFL=: 4 ++F_SETLK=: 12 ++F_SETLKW=: 13 ++F_GETLK=: 11 ++F_UNLCK=: 2 ++F_WRLCK=: 3 ++flock_sz=: 32 ++l_len_off=: 8 ++l_len_sz=: 8 ++l_pid_off=: 16 ++l_pid_sz=: 4 ++l_start_off=: 0 ++l_start_sz=: 8 ++l_type_off=: 20 ++l_type_sz=: 2 ++l_whence_off=: 22 ++l_whence_sz=: 2 ++ ++PROT_READ=: 1 ++PROT_WRITE=: 2 ++PROT_EXEC=: 4 ++PROT_NONE=: 0 ++MAP_SHARED=: 1 ++MAP_PRIVATE=: 2 ++MAP_FIXED=: 16 ++ ++REG_EXTENDED=: 1 ++REG_ICASE=: 2 ++REG_NOSUB=: 4 ++REG_NEWLINE=: 8 ++ ++regex_t_sz=: 32 ++re_nsub_off=: 8 ++re_nsub_sz=: 8 ++regmatch_t_sz=: 16 ++rm_so_off=: 0 ++rm_so_sz=: 8 ++rm_eo_off=: 8 ++rm_eo_sz=: 8 ++ ++ ++fd_set_sz=: 128 ++fds_bits_off=: 0 ++fds_bits_sz=: 128 ++FD_SETSIZE=: 1024 ++timeval_sz=: 16 ++tv_sec_off=: 0 ++tv_sec_sz=: 8 ++tv_usec_off=: 8 ++tv_usec_sz=: 8 ++ ++E2BIG=: 7 ++EFAULT=: 14 ++ENFILE=: 23 ++ENOTTY=: 25 ++EACCES=: 13 ++EFBIG=: 27 ++ENODEV=: 19 ++ENXIO=: 6 ++EAGAIN=: 35 ++ENOENT=: 2 ++EPERM=: 1 ++EBADF=: 9 ++EINTR=: 4 ++ENOEXEC=: 8 ++EPIPE=: 32 ++EINVAL=: 22 ++ENOLCK=: 77 ++ERANGE=: 34 ++EBUSY=: 16 ++EIO=: 5 ++ENOMEM=: 12 ++EROFS=: 30 ++EISDIR=: 21 ++ENOSPC=: 28 ++ESPIPE=: 29 ++ECHILD=: 10 ++EMFILE=: 24 ++ENOSYS=: 78 ++ESRCH=: 3 ++EDEADLK=: 11 ++EMLINK=: 31 ++ENOTDIR=: 20 ++EDOM=: 33 ++ENOTEMPTY=: 66 ++EXDEV=: 18 ++EEXIST=: 17 ++ENAMETOOLONG=: 63 ++ ++EINPROGRESS=: 36 ++ECANCELED=: 85 ++ETIMEDOUT=: 60 ++EMSGSIZE=: 40 ++ENOTSUP=: 45 Added: head/lang/J/files/patch-jlibrary_system_defs_netdefs__freebsd__64.ijs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/patch-jlibrary_system_defs_netdefs__freebsd__64.ijs Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,134 @@ +--- jlibrary/system/defs/netdefs_freebsd_64.ijs.orig 2018-02-22 19:12:35 UTC ++++ jlibrary/system/defs/netdefs_freebsd_64.ijs +@@ -0,0 +1,131 @@ ++NB. do not edit -- created by sym2ijs ++ ++cocurrent <'jdefs' ++ ++FIONBIO=: -2147195266 ++FIONREAD=: 1074030207 ++FD_SETSIZE=: 1024 ++ ++sockaddr_sz=: 16 ++sa_family_off=: 1 ++sa_family_sz=: 1 ++sa_data_off=: 2 ++sa_data_sz=: 14 ++ ++sockaddr_in_sz=: 16 ++sin_family_off=: 1 ++sin_family_sz=: 1 ++sin_port_off=: 2 ++sin_port_sz=: 2 ++sin_addr_off=: 4 ++sin_addr_sz=: 4 ++ ++in_addr_sz=: 4 ++s_addr_off=: 0 ++s_addr_sz=: 4 ++ ++hostent_sz=: 32 ++h_name_off=: 0 ++h_name_sz=: 8 ++h_aliases_off=: 8 ++h_aliases_sz=: 8 ++h_addrtype_off=: 16 ++h_addrtype_sz=: 4 ++h_length_off=: 20 ++h_length_sz=: 4 ++h_addr_list_off=: 24 ++h_addr_list_sz=: 8 ++ ++ ++SIOCATMARK=: 1074033415 ++ ++ ++IPPROTO_IP=: 0 ++IPPROTO_ICMP=: 1 ++IPPROTO_IGMP=: 2 ++IPPROTO_TCP=: 6 ++IPPROTO_PUP=: 12 ++IPPROTO_UDP=: 17 ++IPPROTO_IDP=: 22 ++IPPROTO_RAW=: 255 ++IPPROTO_MAX=: 256 ++ ++ ++INADDR_ANY=: 0 ++INADDR_LOOPBACK=: 2130706433 ++INADDR_BROADCAST=: 4294967295 ++INADDR_NONE=: 4294967295 ++ ++INADDR_UNSPEC_GROUP=: -536870912 ++INADDR_ALLHOSTS_GROUP=: -536870911 ++INADDR_MAX_LOCAL_GROUP=: -536870657 ++IN_LOOPBACKNET=: 127 ++ ++SOCK_STREAM=: 1 ++SOCK_DGRAM=: 2 ++SOCK_RAW=: 3 ++SOCK_RDM=: 4 ++SOCK_SEQPACKET=: 5 ++ ++SOL_SOCKET=: 65535 ++SO_DEBUG=: 1 ++SO_REUSEADDR=: 4 ++SO_KEEPALIVE=: 8 ++SO_DONTROUTE=: 16 ++SO_BROADCAST=: 32 ++SO_LINGER=: 128 ++SO_OOBINLINE=: 256 ++ ++SO_SNDBUF=: 4097 ++SO_RCVBUF=: 4098 ++SO_SNDLOWAT=: 4099 ++SO_RCVLOWAT=: 4100 ++SO_SNDTIMEO=: 4101 ++SO_RCVTIMEO=: 4102 ++SO_ERROR=: 4103 ++SO_TYPE=: 4104 ++ ++linger_sz=: 8 ++l_onoff_off=: 0 ++l_onoff_sz=: 4 ++l_linger_off=: 4 ++l_linger_sz=: 4 ++ ++AF_UNSPEC=: 0 ++AF_UNIX=: 1 ++AF_INET=: 2 ++AF_SNA=: 11 ++AF_DECnet=: 12 ++AF_APPLETALK=: 16 ++AF_IPX=: 23 ++AF_MAX=: 42 ++PF_UNSPEC=: 0 ++PF_UNIX=: 1 ++PF_INET=: 2 ++PF_SNA=: 11 ++PF_DECnet=: 12 ++PF_APPLETALK=: 16 ++PF_IPX=: 23 ++PF_MAX=: 42 ++ ++SOMAXCONN=: 128 ++MSG_OOB=: 1 ++MSG_PEEK=: 2 ++MSG_DONTROUTE=: 4 ++ ++msghdr_sz=: 48 ++msg_name_off=: 0 ++msg_name_sz=: 8 ++msg_namelen_off=: 8 ++msg_namelen_sz=: 4 ++msg_iov_off=: 16 ++msg_iov_sz=: 8 ++msg_iovlen_off=: 24 ++msg_iovlen_sz=: 4 ++msg_control_off=: 32 ++msg_control_sz=: 8 ++msg_controllen_off=: 40 ++msg_controllen_sz=: 4 ++msg_flags_off=: 44 ++msg_flags_sz=: 4 ++ Added: head/lang/J/files/patch-jlibrary_system_main_regex.ijs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/patch-jlibrary_system_main_regex.ijs Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,10 @@ +--- jlibrary/system/main/regex.ijs.orig 2018-02-22 18:45:28 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. NB. fall throught + if. 2 0-:('libpcreposix.so.3 dummyfunction n')&(15!:0) ::(15!:10) '' do. + rxdll=: 'libpcreposix.so.3' Added: head/lang/J/files/patch-jlibrary_system_main_stdlib.ijs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/patch-jlibrary_system_main_stdlib.ijs Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,55 @@ +--- jlibrary/system/main/stdlib.ijs.orig 2018-02-22 18:45:28 UTC ++++ jlibrary/system/main/stdlib.ijs +@@ -35,6 +35,7 @@ if. notdef 'UNAME' do. + end. + 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' +@@ -97,6 +98,7 @@ if. (<'home') -.@e. {."1 SystemFolders d + 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. +@@ -111,6 +113,7 @@ if. (<'temp') -.@e. {."1 SystemFolders d + elseif. 'Android'-:UNAME do. t=. '/sdcard' + elseif. 'Darwin'-:UNAME do. 1!:5 ::] 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=: " 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)); Added: head/lang/J/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/pkg-message.in Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,9 @@ +JE and jconsole have been installed in %%LOCALBASE%%/lib/j/bin. + +Addons are installed in %%LOCALBASE%%/share/j/addons and system files +in %%LOCALBASE%%/share/j/system. + +This port installs ONLY the base system. In order to install +additional addons, use the JAL, running jconsole as root: + +http://code.jsoftware.com/wiki/JAL/Package_Manager/jpkg Added: head/lang/J/files/profile.ijs.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/J/files/profile.ijs.in Sun Apr 8 09:41:15 2018 (r466786) @@ -0,0 +1,54 @@ +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 :: [