From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C7C115838C for ; Sun, 21 Jan 2024 21:32:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4FA4CE2A01; Sun, 21 Jan 2024 21:32:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0CCAE2A01 for ; Sun, 21 Jan 2024 21:32:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E663234325F for ; Sun, 21 Jan 2024 21:31:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 51FF113AA for ; Sun, 21 Jan 2024 21:31:58 +0000 (UTC) From: "Sergey Torokhov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergey Torokhov" Message-ID: <1705872649.8df94ea20008a22fe45b1b1745d5a6d7e9a4f630.SergeyTorokhov@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-build/fpm/, dev-build/fpm/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-build/fpm/Manifest dev-build/fpm/files/fpm-0.10.0_fpm_toml.patch dev-build/fpm/fpm-0.10.0.ebuild X-VCS-Directories: dev-build/fpm/ dev-build/fpm/files/ X-VCS-Committer: SergeyTorokhov X-VCS-Committer-Name: Sergey Torokhov X-VCS-Revision: 8df94ea20008a22fe45b1b1745d5a6d7e9a4f630 X-VCS-Branch: dev Date: Sun, 21 Jan 2024 21:31:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 79b2943f-175c-425b-9e74-5a47a0b6c66f X-Archives-Hash: 900a83f65b4371e59ec50643dbedb201 commit: 8df94ea20008a22fe45b1b1745d5a6d7e9a4f630 Author: Sergey Torokhov yandex ru> AuthorDate: Sun Jan 21 21:30:49 2024 +0000 Commit: Sergey Torokhov yandex ru> CommitDate: Sun Jan 21 21:30:49 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8df94ea2 dev-build/fpm: 0.10.0 version bump Signed-off-by: Sergey Torokhov yandex.ru> dev-build/fpm/Manifest | 2 + dev-build/fpm/files/fpm-0.10.0_fpm_toml.patch | 23 +++++ dev-build/fpm/fpm-0.10.0.ebuild | 122 ++++++++++++++++++++++++++ 3 files changed, 147 insertions(+) diff --git a/dev-build/fpm/Manifest b/dev-build/fpm/Manifest index 1bb962f6b2..156e249e7f 100644 --- a/dev-build/fpm/Manifest +++ b/dev-build/fpm/Manifest @@ -1,2 +1,4 @@ DIST fpm-0.9.0.F90 1371069 BLAKE2B df3439ca50176f0a8e3b2f48d130dc232da343d7fe5451af73b5bfa72112cfc7e08bc5c0dbaced2c5b5c72f48fc91d059ca533b4b47df23d1e579ebd03690078 SHA512 62f17491a2540d3b5f68435a87916b5e88bbd903a87cb4ecdfaa25e3024357e070c27e51a1f5ccdf22fb05ac8054ed83bb83e8a13c8639a47be822ff1fda9060 DIST fpm-0.9.0.tar.gz 219603 BLAKE2B cb282913c1c6dd6440e6c7b982e7a5ffd76a2e8177b70da22ee36946feb62229919b8f40a4747a2f0cd8b2c589ee111f063cab50ee0f0bee295cd8cf8946b46a SHA512 b80141408a2192efdd3c0777eb2df01de95ee5740332468ac95f89f6e6199c88c2d4180934ce552403572cadfc755395eb669336fcc9d3d00cb8ee0607205397 +DIST fpm-0.10.0.F90 1413145 BLAKE2B 8b0121b2436cdc6d0d82783a0d083afedb8bf0eb5f8221f140e1a1bea0b03475516f9309b079bed10b85e442ebb8f71f2ddcaddc3647cd56e1d4f32fba27be23 SHA512 dcd97bbe39469040848efef915edc8c6f4af5a5f34713a021e6b58761a3f3ea6301fc8a7cbde7c93ca5446964e2f0bd4a9b9e915acf24bf230ea557ca74b23ef +DIST fpm-0.10.0.tar.gz 227016 BLAKE2B a6d9592fbfe3115ab43675cf28036dde69df0e2bcf3c7d3d98278566450328e6c3f21777efd8374177e615fcc123babce9a456f08ad1d03e790c16b95547edf2 SHA512 8b81e564ee2d3307472c1627e16b4cc9e13288c40c7ff3ea95f0c55cc4315da34d9319de5256aab9e602dd751c51be8f1fc27711f31fbf22580f58788822b69a diff --git a/dev-build/fpm/files/fpm-0.10.0_fpm_toml.patch b/dev-build/fpm/files/fpm-0.10.0_fpm_toml.patch new file mode 100644 index 0000000000..da03a4761e --- /dev/null +++ b/dev-build/fpm/files/fpm-0.10.0_fpm_toml.patch @@ -0,0 +1,23 @@ +diff -Naur a/fpm.toml b/fpm.toml +--- a/fpm.toml ++++ b/fpm.toml +@@ -10,16 +10,9 @@ + macros=["FPM_RELEASE_VERSION={version}"] + + [dependencies] +-toml-f.git = "https://github.com/toml-f/toml-f" +-toml-f.rev = "d7b892b1d074b7cfc5d75c3e0eb36ebc1f7958c1" +-M_CLI2.git = "https://github.com/urbanjost/M_CLI2.git" +-M_CLI2.rev = "7264878cdb1baff7323cc48596d829ccfe7751b8" +-fortran-regex.git = "https://github.com/perazz/fortran-regex" +-fortran-regex.tag = "1.1.2" +-jonquil.git = "https://github.com/toml-f/jonquil" +-jonquil.rev = "4fbd4cf34d577c0fd25e32667ee9e41bf231ece8" +-fortran-shlex.git = "https://github.com/perazz/fortran-shlex" +-fortran-shlex.tag = "1.0.1" ++[build] ++external-modules = ["tomlf","m_cli2","regex_module","shlex_module","jonquil"] ++link = ["toml-f","M_CLI2","fortran-regex","fortran-shlex","jonquil"] + + [[test]] + name = "cli-test" diff --git a/dev-build/fpm/fpm-0.10.0.ebuild b/dev-build/fpm/fpm-0.10.0.ebuild new file mode 100644 index 0000000000..98629239cc --- /dev/null +++ b/dev-build/fpm/fpm-0.10.0.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FORTRAN_STANDARD="2003" + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit fortran-2 python-any-r1 toolchain-funcs + +DESCRIPTION="Fortran Package Manager (fpm)" +HOMEPAGE="https://fpm.fortran-lang.org" +SRC_URI=" + https://github.com/fortran-lang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/fortran-lang/fpm/releases/download/v${PV}/${P}.F90 +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="openmp doc test" +RESTRICT="!test? ( test )" + +CDEPEND=" + dev-libs/fortran-regex + dev-libs/fortran-shlex + dev-libs/jonquil:0/2 + dev-libs/toml-f:0/4 + dev-libs/M_CLI2 +" + +RDEPEND=" + ${CDEPEND} + dev-vcs/git +" + +DEPEND=" + ${CDEPEND} + doc? ( + ${PYTHON_DEPS} + $(python_gen_any_dep ' + app-text/ford[${PYTHON_USEDEP}] + ') + ) +" + +DOCS=( LICENSE PACKAGING.md README.md ) + +PATCHES="${FILESDIR}/${P}_fpm_toml.patch" + +BSDIR="build/bootstrap" # Bootstrap directory path + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +set_build_flags() { + OMPFLAG="" + if use openmp ; then + case $(tc-getFC) in + *gfortran* ) + OMPFLAG="-fopenmp" ;; + * ) + die "Sorry, only GNU gfortran is currently supported in the ebuild" ;; + esac + fi + + BUILD_FLAGS=( --compiler "$(tc-getFC)" + --flag "${FCFLAGS} ${OMPFLAG} -I/usr/include/fortran-regex \ + -I/usr/include/fortran-shlex \ + -I/usr/include/jonquil/modules \ + -I/usr/include/M_CLI2 \ + -I/usr/include/toml-f/modules" + --c-compiler "$(tc-getCC)" --c-flag "${CFLAGS}" + --cxx-compiler "$(tc-getCXX)" --cxx-flag "${CXXFLAGS}" + --archiver "$(tc-getAR)" --link-flag "${LDFLAGS}" ) +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + fortran-2_pkg_setup + python-any-r1_pkg_setup + set_build_flags +} + +src_prepare() { + default + + mkdir -p "${BSDIR}" || die + cp "${DISTDIR}/${P}.F90" "${BSDIR}/" || die + + # Use favicon.png instead remote icon + sed -i -e 's#https://fortran-lang.org/assets/img/fortran_logo_512x512.png#favicon.png#' docs.md || die +} + +src_compile() { + default + + # Build a bootstrap binary from the single source version + "$(tc-getFC)" -J "${BSDIR}" -o "${BSDIR}"/fpm "${BSDIR}/${P}.F90" || die + + # Use the bootstrap binary to build the feature complete fpm version + "${BSDIR}"/fpm build --verbose "${BUILD_FLAGS[@]}" || die + + if use doc ; then + einfo "Build API documentation:" + ford docs.md || die + fi +} + +src_test() { + "${BSDIR}"/fpm test --verbose "${BUILD_FLAGS[@]}" || die +} + +src_install() { + # Set prefix and pass all used env flags to avoid recompiling with default values + "${BSDIR}"/fpm install --prefix "${ED}/usr" "${BUILD_FLAGS[@]}" || die + + use doc && HTML_DOCS=( "${S}"/fpm-doc/. ) + einstalldocs +}