mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 19:13:13 -04:00
Move {dev-util → dev-build}/fpm
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
2
dev-build/fpm/Manifest
Normal file
2
dev-build/fpm/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST fpm-0.9.0.F90 1371069 BLAKE2B df3439ca50176f0a8e3b2f48d130dc232da343d7fe5451af73b5bfa72112cfc7e08bc5c0dbaced2c5b5c72f48fc91d059ca533b4b47df23d1e579ebd03690078 SHA512 62f17491a2540d3b5f68435a87916b5e88bbd903a87cb4ecdfaa25e3024357e070c27e51a1f5ccdf22fb05ac8054ed83bb83e8a13c8639a47be822ff1fda9060
|
||||
DIST fpm-0.9.0.tar.gz 219603 BLAKE2B cb282913c1c6dd6440e6c7b982e7a5ffd76a2e8177b70da22ee36946feb62229919b8f40a4747a2f0cd8b2c589ee111f063cab50ee0f0bee295cd8cf8946b46a SHA512 b80141408a2192efdd3c0777eb2df01de95ee5740332468ac95f89f6e6199c88c2d4180934ce552403572cadfc755395eb669336fcc9d3d00cb8ee0607205397
|
||||
20
dev-build/fpm/files/fpm-0.8.1_fpm_toml.patch
Normal file
20
dev-build/fpm/files/fpm-0.8.1_fpm_toml.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff -Naur a/fpm.toml b/fpm.toml
|
||||
--- a/fpm.toml
|
||||
+++ b/fpm.toml
|
||||
@@ -5,13 +5,9 @@
|
||||
maintainer = ""
|
||||
copyright = "2020 fpm contributors"
|
||||
|
||||
-[dependencies]
|
||||
-toml-f.git = "https://github.com/toml-f/toml-f"
|
||||
-toml-f.rev = "54686e45993f3a9a1d05d5c7419f39e7d5a4eb3f"
|
||||
-M_CLI2.git = "https://github.com/urbanjost/M_CLI2.git"
|
||||
-M_CLI2.rev = "7264878cdb1baff7323cc48596d829ccfe7751b8"
|
||||
-jonquil.git = "https://github.com/toml-f/jonquil"
|
||||
-jonquil.rev = "05d30818bb12fb877226ce284b9a3a41b971a889"
|
||||
+[build]
|
||||
+external-modules = ["tomlf","jonquil","m_cli2"]
|
||||
+link = ["toml-f","jonquil","M_CLI2"]
|
||||
|
||||
[[test]]
|
||||
name = "cli-test"
|
||||
20
dev-build/fpm/files/fpm-0.8.2_fpm_toml.patch
Normal file
20
dev-build/fpm/files/fpm-0.8.2_fpm_toml.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff -Nuar a/fpm.toml b/fpm.toml
|
||||
--- a/fpm.toml
|
||||
+++ b/fpm.toml
|
||||
@@ -9,13 +9,9 @@
|
||||
[preprocess.cpp]
|
||||
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"
|
||||
-jonquil.git = "https://github.com/toml-f/jonquil"
|
||||
-jonquil.rev = "4c27c8c1e411fa8790dffcf8c3fa7a27b6322273"
|
||||
+[build]
|
||||
+external-modules = ["tomlf","jonquil","m_cli2"]
|
||||
+link = ["toml-f","jonquil","M_CLI2"]
|
||||
|
||||
[[test]]
|
||||
name = "cli-test"
|
||||
22
dev-build/fpm/files/fpm-0.9.0_fpm_toml.patch
Normal file
22
dev-build/fpm/files/fpm-0.9.0_fpm_toml.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff -Naur a/fpm.toml b/fpm.toml
|
||||
--- a/fpm.toml
|
||||
+++ b/fpm.toml
|
||||
@@ -9,15 +9,9 @@
|
||||
[preprocess.cpp]
|
||||
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 = "4c27c8c1e411fa8790dffcf8c3fa7a27b6322273"
|
||||
+[build]
|
||||
+external-modules = ["tomlf","m_cli2","regex_module","jonquil"]
|
||||
+link = ["toml-f","M_CLI2","fortran-regex","jonquil"]
|
||||
|
||||
[[test]]
|
||||
name = "cli-test"
|
||||
118
dev-build/fpm/fpm-0.9.0.ebuild
Normal file
118
dev-build/fpm/fpm-0.9.0.ebuild
Normal file
@@ -0,0 +1,118 @@
|
||||
# Copyright 1999-2023 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/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/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
|
||||
}
|
||||
14
dev-build/fpm/metadata.xml
Normal file
14
dev-build/fpm/metadata.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>torokhov-s-a@yandex.ru</email>
|
||||
<name>Sergey Torokhov</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="openmp">OpenMP support to build targets in parallel where possible</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">fortran-lang/fpm</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user