Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 1 | SUMMARY = "Fortran Hello World" |
| 2 | LICENSE = "MIT" |
| 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
| 4 | |
| 5 | DEPENDS = "libgfortran" |
| 6 | |
| 7 | SRC_URI = "file://hello.f95" |
| 8 | |
| 9 | # These set flags that Fortran doesn't support |
| 10 | SECURITY_CFLAGS = "" |
| 11 | SECURITY_LDFLAGS = "" |
| 12 | |
| 13 | do_compile() { |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 14 | ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | do_install() { |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 18 | install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | python () { |
| 22 | if not d.getVar("FORTRAN"): |
| 23 | raise bb.parse.SkipRecipe("Fortran isn't enabled") |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 24 | } |