mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-*: improve Fortran dependency detection
- remove ".for" from the Fortran suffixes - add ".f95" to the Fortran suffixes - search only files in the `src` directory
This commit is contained in:
parent
35b1a5919b
commit
660bbacbdf
1 changed files with 4 additions and 1 deletions
|
@ -317,8 +317,11 @@ def check_optdepends(pkg: Pkgbuild, desc: Description, cfg: CheckConfig):
|
|||
|
||||
def check_fortran(pkg: Pkgbuild, desc: Description, cfg: CheckConfig):
|
||||
fortran_files = False
|
||||
prefix = f"{pkg._pkgname}/src/"
|
||||
# accepted Fortran file suffixes are listed in `/etc/R/Makeconf`
|
||||
suffixes = (".f", ".f90", ".f95")
|
||||
for name in cfg.tar.getnames():
|
||||
if name.endswith(".f") or name.endswith(".f90") or name.endswith(".for"):
|
||||
if name.startswith(prefix) and name.endswith(suffixes):
|
||||
fortran_files = True
|
||||
break
|
||||
fortran_dep = "gcc-fortran" in pkg.makedepends
|
||||
|
|
Loading…
Add table
Reference in a new issue