diff --git a/lang/Makefile b/lang/Makefile index 1cebf2597b27..622dc1c1ac58 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -1,374 +1,375 @@ COMMENT = Programming languages SUBDIR += J SUBDIR += abcl SUBDIR += alchemist.el SUBDIR += algol68g SUBDIR += angelscript SUBDIR += apache-commons-jelly SUBDIR += asn1c SUBDIR += atlast SUBDIR += awka SUBDIR += bas2tap SUBDIR += basic256 SUBDIR += bsh SUBDIR += bwbasic SUBDIR += c SUBDIR += cbmbasic SUBDIR += ccl SUBDIR += ceylon SUBDIR += cfortran SUBDIR += chaiscript SUBDIR += chez-scheme SUBDIR += chibi-scheme SUBDIR += chicken SUBDIR += cim SUBDIR += cjs SUBDIR += cling SUBDIR += clips SUBDIR += clisp SUBDIR += clojure SUBDIR += clojure-mode.el SUBDIR += clover SUBDIR += cocor SUBDIR += coffeescript SUBDIR += cparser SUBDIR += crystal SUBDIR += csharp-mode.el SUBDIR += cython SUBDIR += cython-devel SUBDIR += dhall SUBDIR += dlang-tools SUBDIR += dlv SUBDIR += duktape SUBDIR += duktape-lib SUBDIR += ecl SUBDIR += eisl SUBDIR += elixir SUBDIR += elixir-devel SUBDIR += elixir-mode.el SUBDIR += elk SUBDIR += elm SUBDIR += emacs-lisp-intro SUBDIR += erlang SUBDIR += erlang-doc SUBDIR += erlang-java SUBDIR += erlang-man SUBDIR += erlang-runtime21 SUBDIR += erlang-runtime22 SUBDIR += erlang-runtime23 SUBDIR += erlang-runtime24 SUBDIR += erlang-runtime25 SUBDIR += erlang-wx SUBDIR += execline SUBDIR += expect SUBDIR += f2c SUBDIR += fasm SUBDIR += fennel SUBDIR += ferite SUBDIR += ficl SUBDIR += fpc SUBDIR += fpc-base SUBDIR += fpc-docs SUBDIR += fpc-lua SUBDIR += fpc-pastojs SUBDIR += fpc-rexx SUBDIR += fpc-rtl-console SUBDIR += fpc-rtl-extra SUBDIR += fpc-rtl-generics SUBDIR += fpc-rtl-objpas SUBDIR += fpc-rtl-unicode SUBDIR += fpc-source SUBDIR += fpc-units SUBDIR += fpc-utils SUBDIR += fsharp SUBDIR += fth SUBDIR += gambit-c SUBDIR += gauche SUBDIR += gawk SUBDIR += gcc SUBDIR += gcc-ecj45 SUBDIR += gcc10 SUBDIR += gcc11 SUBDIR += gcc11-devel SUBDIR += gcc12 SUBDIR += gcc12-devel SUBDIR += gcc13-devel SUBDIR += gcc48 SUBDIR += gcc6-aux SUBDIR += gcc8 SUBDIR += gcc9 SUBDIR += gforth SUBDIR += ghc SUBDIR += ghc810 SUBDIR += gjs SUBDIR += gleam SUBDIR += gnatcross-binutils-aarch64 SUBDIR += gnatcross-sysroot-aarch64 SUBDIR += gnatdroid-binutils SUBDIR += gnatdroid-binutils-x86 SUBDIR += gnatdroid-sysroot SUBDIR += gnatdroid-sysroot-x86 SUBDIR += gnu-apl SUBDIR += gnu-cobol SUBDIR += gnustep-base SUBDIR += go SUBDIR += go-devel SUBDIR += go118 SUBDIR += go119 SUBDIR += gomacro SUBDIR += gprolog SUBDIR += gravity SUBDIR += groovy SUBDIR += gscheme SUBDIR += guile SUBDIR += guile1 SUBDIR += guile2 SUBDIR += halide SUBDIR += harec SUBDIR += haskell-mode.el SUBDIR += hermes SUBDIR += hla SUBDIR += hs-brainfuck SUBDIR += hs-unlambda SUBDIR += huc SUBDIR += icc SUBDIR += intel-compute-runtime SUBDIR += intercal SUBDIR += io SUBDIR += io-devel SUBDIR += itcl SUBDIR += itcl4 SUBDIR += janet SUBDIR += jimtcl SUBDIR += jpm SUBDIR += jruby SUBDIR += julia SUBDIR += jython SUBDIR += kawa SUBDIR += kf5-kross SUBDIR += kotlin SUBDIR += kross-interpreters SUBDIR += kturtle SUBDIR += lafontaine SUBDIR += lci SUBDIR += ldc SUBDIR += lfe + SUBDIR += lfortran SUBDIR += libhx SUBDIR += libobjc2 SUBDIR += librep SUBDIR += libstdc++_stldoc_4.2.2 SUBDIR += linux-c7-tcl85 SUBDIR += linux-dotnet-cli SUBDIR += linux-dotnet-runtime SUBDIR += linux-dotnet-sdk SUBDIR += linux-dotnet10-runtime SUBDIR += linux-dotnet11-runtime SUBDIR += linux-dotnet11-sdk SUBDIR += linux-j SUBDIR += lua51 SUBDIR += lua52 SUBDIR += lua53 SUBDIR += lua54 SUBDIR += luajit SUBDIR += luajit-devel SUBDIR += luajit-openresty SUBDIR += malbolge SUBDIR += maude SUBDIR += mawk SUBDIR += mdk SUBDIR += mecrisp-stellaris SUBDIR += micropython SUBDIR += mit-scheme SUBDIR += mixal SUBDIR += mlton SUBDIR += mmix SUBDIR += mono SUBDIR += mono-basic SUBDIR += mono5.10 SUBDIR += mono5.20 SUBDIR += mono6.8 SUBDIR += mosh SUBDIR += mosml SUBDIR += mtasc SUBDIR += mujs SUBDIR += munger SUBDIR += myrddin SUBDIR += nawk SUBDIR += nbfc SUBDIR += neko SUBDIR += nesasm SUBDIR += newlisp SUBDIR += nhc98 SUBDIR += nickle SUBDIR += nim SUBDIR += njs SUBDIR += nqc SUBDIR += nwcc SUBDIR += nx SUBDIR += nyan SUBDIR += ocaml SUBDIR += ocaml-autoconf SUBDIR += ocaml-camlidl SUBDIR += ocaml-nox11 SUBDIR += onyx SUBDIR += oo2c SUBDIR += opencoarrays SUBDIR += ott SUBDIR += owl-lisp SUBDIR += p5-Data-JavaScript SUBDIR += p5-Error SUBDIR += p5-Expect SUBDIR += p5-ExtUtils-F77 SUBDIR += p5-Interpolation SUBDIR += p5-JSAN SUBDIR += p5-JavaScript-Squish SUBDIR += p5-JavaScript-Value-Escape SUBDIR += p5-List-MoreUtils SUBDIR += p5-List-MoreUtils-XS SUBDIR += p5-Marpa SUBDIR += p5-Marpa-PP SUBDIR += p5-Marpa-XS SUBDIR += p5-Modern-Perl SUBDIR += p5-Perl6-Subs SUBDIR += p5-Promises SUBDIR += p5-Pugs-Compiler-Rule SUBDIR += p5-Quantum-Superpositions SUBDIR += p5-Scalar-List-Utils SUBDIR += p5-Switch SUBDIR += p5-Tcl SUBDIR += p5-Test-XPath SUBDIR += p5-Try-Catch SUBDIR += p5-Try-Tiny SUBDIR += p5-Try-Tiny-Retry SUBDIR += p5-TryCatch SUBDIR += p5-ePerl SUBDIR += p5-signatures SUBDIR += p5-v6 SUBDIR += parrot SUBDIR += pbasic SUBDIR += pcc SUBDIR += perl5-devel SUBDIR += perl5.32 SUBDIR += perl5.34 SUBDIR += perl5.36 SUBDIR += petite-chez SUBDIR += pfe SUBDIR += pharo SUBDIR += php-mode.el SUBDIR += php74 SUBDIR += php74-extensions SUBDIR += php80 SUBDIR += php80-extensions SUBDIR += php81 SUBDIR += php81-extensions SUBDIR += php82 SUBDIR += php82-extensions SUBDIR += picoc SUBDIR += plexil SUBDIR += pocl SUBDIR += polyml SUBDIR += ponyc SUBDIR += ptoc SUBDIR += purescript SUBDIR += py-hy SUBDIR += py-lupa SUBDIR += py-textX SUBDIR += python SUBDIR += python-doc-html SUBDIR += python-doc-pdf-a4 SUBDIR += python-doc-pdf-letter SUBDIR += python-doc-text SUBDIR += python-mode.el SUBDIR += python-tools SUBDIR += python2 SUBDIR += python27 SUBDIR += python3 SUBDIR += python310 SUBDIR += python311 SUBDIR += python37 SUBDIR += python38 SUBDIR += python39 SUBDIR += qmasm SUBDIR += qscheme SUBDIR += quickjs SUBDIR += quilc SUBDIR += racket SUBDIR += racket-minimal SUBDIR += ratfor SUBDIR += referenceassemblies-pcl SUBDIR += retro12 SUBDIR += rexx-imc SUBDIR += rexx-regina SUBDIR += rexx-regutil SUBDIR += rexx-wrapper SUBDIR += rhino SUBDIR += ruby27 SUBDIR += ruby30 SUBDIR += ruby31 SUBDIR += ruby32 SUBDIR += rubygem-ruby_language_server SUBDIR += runawk SUBDIR += rust SUBDIR += rust-bootstrap SUBDIR += rust-nightly SUBDIR += sagittarius-scheme SUBDIR += sather-specification SUBDIR += sather-tutorial SUBDIR += sbcl SUBDIR += scala SUBDIR += scheme48 SUBDIR += scm SUBDIR += sdcc SUBDIR += see SUBDIR += seed7 SUBDIR += silq SUBDIR += siod SUBDIR += sisc SUBDIR += sketchy SUBDIR += slib SUBDIR += slib-guile SUBDIR += slib-guile1 SUBDIR += slib-guile2 SUBDIR += slisp SUBDIR += smalltalk SUBDIR += smlnj SUBDIR += snobol4 SUBDIR += solidity SUBDIR += spidermonkey102 SUBDIR += spidermonkey78 SUBDIR += spidermonkey91 SUBDIR += spl SUBDIR += squeak SUBDIR += squirrel SUBDIR += swi-pl SUBDIR += tauthon SUBDIR += tcbasic SUBDIR += tcc SUBDIR += tcl-manual SUBDIR += tcl-wrapper SUBDIR += tcl85 SUBDIR += tcl86 SUBDIR += tcl87 SUBDIR += tclX SUBDIR += tolua SUBDIR += tolua++ SUBDIR += tuareg-mode.el SUBDIR += twelf SUBDIR += ucc SUBDIR += urweb SUBDIR += v SUBDIR += v8 SUBDIR += v8-beta SUBDIR += vala SUBDIR += visualworks SUBDIR += voc SUBDIR += yabasic SUBDIR += yap SUBDIR += yorick SUBDIR += ypsilon SUBDIR += zephir SUBDIR += zig SUBDIR += zig-devel .include diff --git a/lang/lfortran/Makefile b/lang/lfortran/Makefile new file mode 100644 index 000000000000..957ce30def53 --- /dev/null +++ b/lang/lfortran/Makefile @@ -0,0 +1,43 @@ +PORTNAME= lfortran +DISTVERSIONPREFIX= v +DISTVERSION= 0.18.0 +CATEGORIES= lang + +MAINTAINER= fortran@FreeBSD.org +COMMENT= Modern interactive Fortran compiler built on top of LLVM +WWW= https://lfortran.org/ + +LICENSE= BSD3CLAUSE + +BUILD_DEPENDS= bash:shells/bash \ + re2c>0:devel/re2c \ + dwarfdump:devel/dwarfdump \ + rapidjson>0:devel/rapidjson +LIB_DEPENDS= libfmt.so:devel/libfmt \ + libunwind.so:devel/libunwind \ + libLLVM-${LLVM_VERSION}.so:devel/llvm${LLVM_VERSION} +RUN_DEPENDS= dwarfdump:devel/dwarfdump + +USE_GITHUB= yes + +USES= bison cmake:testing compiler:c++17-lang python:build shebangfix +SHEBANG_FILES= *.sh +BINARY_ALIAS= python=${PYTHON_CMD} +CMAKE_ON= LFORTRAN_BUILD_ALL WITH_DWARFDUMP WITH_FMT WITH_JSON WITH_LINKH WITH_LLVM WITH_UNWIND + +LLVM_VERSION= 11 + +OPTIONS_DEFINE= DOCS + +# Xeus: version 2.4.1 is required +#LIB_DEPENDS+= libxeus.so:devel/xeus +#CMAKE_ON+= WITH_XEUS + +# BFD: /usr/local/include/bfd.h:2108:3: error: unknown type name 'ENUM_BITFIELD' +#USE_BINUTILS= yes +#CMAKE_ON+= WITH_BFD + +pre-configure: + ${ECHO_CMD} ${PORTVERSION} > ${WRKSRC}/version + +.include diff --git a/lang/lfortran/distinfo b/lang/lfortran/distinfo new file mode 100644 index 000000000000..d8da96995604 --- /dev/null +++ b/lang/lfortran/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1667243059 +SHA256 (lfortran-lfortran-v0.18.0_GH0.tar.gz) = 6ec636580cb7e49e1cd68003850bba77dc4372d2eda3e3591d4bff6dffa31e7c +SIZE (lfortran-lfortran-v0.18.0_GH0.tar.gz) = 1713018 diff --git a/lang/lfortran/files/patch-build0.sh b/lang/lfortran/files/patch-build0.sh new file mode 100644 index 000000000000..0f96d2b720b7 --- /dev/null +++ b/lang/lfortran/files/patch-build0.sh @@ -0,0 +1,20 @@ +--- build0.sh.orig 2022-11-01 11:12:16 UTC ++++ build0.sh +@@ -4,7 +4,7 @@ set -e + set -x + + # Generate the `version` file +-ci/version.sh ++#ci/version.sh + + # Generate a Fortran AST from AST.asdl (C++) + python src/libasr/asdl_cpp.py grammar/AST.asdl src/lfortran/ast.h +@@ -16,7 +16,7 @@ python src/libasr/wasm_instructions_visitor.py + # Generate the tokenizer and parser + (cd src/lfortran/parser && re2c -W -b tokenizer.re -o tokenizer.cpp) + (cd src/lfortran/parser && re2c -W -b preprocessor.re -o preprocessor.cpp) +-(cd src/lfortran/parser && bison -Wall -d -r all parser.yy) ++(cd src/lfortran/parser && bison -Wall -d -v -r all parser.yy) + + grep -n "'" src/lfortran/parser/parser.yy && echo "Single quote not allowed" && exit 1 + echo "OK" diff --git a/lang/lfortran/pkg-descr b/lang/lfortran/pkg-descr new file mode 100644 index 000000000000..77cd3da51f74 --- /dev/null +++ b/lang/lfortran/pkg-descr @@ -0,0 +1,9 @@ +LFortran is a modern open-source (BSD licensed) interactive Fortran compiler +built on top of LLVM. It can execute user's code interactively to allow +exploratory work (much like Python, MATLAB or Julia) as well as compile to +binaries with the goal to run user's code on modern architectures such as +multi-core CPUs and GPUs. + +Try online: https://dev.lfortran.org/ + +See also: https://github.com/lfortran/lfortran diff --git a/lang/lfortran/pkg-plist b/lang/lfortran/pkg-plist new file mode 100644 index 000000000000..d5f4b83e65de --- /dev/null +++ b/lang/lfortran/pkg-plist @@ -0,0 +1,17 @@ +bin/lfortran +%%DATADIR%%/lib/impure/lfortran_intrinsics.h +%%DATADIR%%/lib/lfortran_intrinsic_bit.mod +%%DATADIR%%/lib/lfortran_intrinsic_builtin.mod +%%DATADIR%%/lib/lfortran_intrinsic_ieee_arithmetic.mod +%%DATADIR%%/lib/lfortran_intrinsic_iso_c_binding.mod +%%DATADIR%%/lib/lfortran_intrinsic_iso_fortran_env.mod +%%DATADIR%%/lib/lfortran_intrinsic_kind.mod +%%DATADIR%%/lib/lfortran_intrinsic_math.mod +%%DATADIR%%/lib/lfortran_intrinsic_math2.mod +%%DATADIR%%/lib/lfortran_intrinsic_math3.mod +%%DATADIR%%/lib/lfortran_intrinsic_optimization.mod +%%DATADIR%%/lib/lfortran_intrinsic_sin.mod +%%DATADIR%%/lib/lfortran_intrinsic_string.mod +%%DATADIR%%/lib/lfortran_intrinsic_trig.mod +%%DATADIR%%/lib/liblfortran_runtime.so +%%DATADIR%%/lib/liblfortran_runtime_static.a