From nobody Tue Nov 01 16:24:57 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N1wN93Mt6z4gjpR; Tue, 1 Nov 2022 16:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N1wN92t2Tz40mG; Tue, 1 Nov 2022 16:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667319897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0MFgr26RK0WJ3nEtUEu/lkgUG0A/5PqxLC22ETT+wU=; b=gyiK3CITn6Pk+Nr1RNc/I6/EgLzr3+s48y5FOd2nTXUkX0B2+BifagLsWKM14NpdU/dOeg ie+CMYvnYfyTbTpbE+L0fB/lkQz4wBHieZp5s/PVuO6JuiYoIyoxqSI9Jq1pknL7BDSRkz 1m8rVEwIJR0MOzCLmMPvg0yHx8RiQIUA/cjpVZdTgRi1Hf+yufbBUeAqcJC6dKqu/W85jY h8Gn/Ct0ARWx9OAKdlSbZbZZr4g00O8ueAiA5xFGt1OJia6QJrMAKQ8ey3jdapr8MGGQFF h/t1Yow5MEjfTPU0ypq6xQc5MexhQb84Me4azOZqyJcawBC+M4k9BO/oskaHYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N1wN91x6GzNDb; Tue, 1 Nov 2022 16:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2A1GOveF071974; Tue, 1 Nov 2022 16:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A1GOvNl071973; Tue, 1 Nov 2022 16:24:57 GMT (envelope-from git) Date: Tue, 1 Nov 2022 16:24:57 GMT Message-Id: <202211011624.2A1GOvNl071973@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Thierry Thomas Subject: git: c653021c5cb7 - main - lang/lfortran: adding LFortran, a modern Fortran compiler built on top of LLVM List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: thierry X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c653021c5cb7a1501d9491e96d4ae0e8e94e6c3f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667319897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0MFgr26RK0WJ3nEtUEu/lkgUG0A/5PqxLC22ETT+wU=; b=pX+46dgYrZCTYBfNKg0XKmThHlJTlxk+sVRRvoWzbUUOFgFvHqXUI+81ejIN9PTEjbd9ac qr+MpuXH9ETtI5tlk35qwm7i98Tf+WhDyalHmH1nTbp7/2sa3snZTTiqppOgTJZjDu3gJ6 s3v/lZ5DPsybAG88Wmo3fxXdikDLu0ScXD34CFBXG/Jtg1Yca2IiSBz9kW7AxxMWtJRX7N 1CKB6lvAE2GXYh/FZ6bjIsziBV5sQ7eFGF8Na5Gf9OHT92E/fPwfulShY/lsx8GxClW+tz d+yPYl/X6riYUzdn7FYgelT9FwCi+B+fEWKUV5gIj6YdIlaqvgclRYqmb1HUVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667319897; a=rsa-sha256; cv=none; b=OYWphsEmucL2xmDldRgkU8tW9e1UIlO/wmftfq0H5QncAtmR6k524ZHY5twYHMq/lXT3Kx AYGBZS6tg0Z4loROWDwft09KjK7BWMO83tY2BFviE6U6Dw9VMbBTY1bhMOOBob3WYZZOMW QBCX+cF3Th08O2dT+Nv+GK1Bn1SZP4FunpsvKEOOxKN5XF2pq5BoEm85U3+B6muG561Xl8 6zxjW7/TUywqsOAiRyuTO+sjOYMULPWegVpqy73ltAURj36YCK3aA43WTlorrbeeHI58eY ho/pBKU2iNrG8WQ8drqe7hYATdr/Yzrzf5EHqX5Ssd9XYBwX7tGZe2zjWI9kVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by thierry: URL: https://cgit.FreeBSD.org/ports/commit/?id=c653021c5cb7a1501d9491e96d4ae0e8e94e6c3f commit c653021c5cb7a1501d9491e96d4ae0e8e94e6c3f Author: Thierry Thomas AuthorDate: 2022-10-31 22:33:55 +0000 Commit: Thierry Thomas CommitDate: 2022-11-01 16:24:53 +0000 lang/lfortran: adding LFortran, a modern Fortran compiler built on top of LLVM /!\ This is an experimental prototype, not ready for end users. --- lang/Makefile | 1 + lang/lfortran/Makefile | 43 +++++++++++++++++++++++++++++++++++++ lang/lfortran/distinfo | 3 +++ lang/lfortran/files/patch-build0.sh | 20 +++++++++++++++++ lang/lfortran/pkg-descr | 9 ++++++++ lang/lfortran/pkg-plist | 17 +++++++++++++++ 6 files changed, 93 insertions(+) diff --git a/lang/Makefile b/lang/Makefile index 1cebf2597b27..622dc1c1ac58 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -154,6 +154,7 @@ SUBDIR += lci SUBDIR += ldc SUBDIR += lfe + SUBDIR += lfortran SUBDIR += libhx SUBDIR += libobjc2 SUBDIR += librep 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