fortran-helloworld.bb 584 B

123456789101112131415161718192021222324252627
  1. SUMMARY = "Fortran Hello World"
  2. LICENSE = "MIT"
  3. LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
  4. DEPENDS = "libgfortran"
  5. SRC_URI = "file://hello.f95"
  6. S = "${WORKDIR}/sources"
  7. UNPACKDIR = "${S}"
  8. # These set flags that Fortran doesn't support
  9. SECURITY_CFLAGS = ""
  10. SECURITY_LDFLAGS = ""
  11. do_compile() {
  12. ${FC} ${LDFLAGS} hello.f95 -o ${B}/fortran-hello
  13. }
  14. do_install() {
  15. install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
  16. }
  17. python () {
  18. if not d.getVar("FORTRAN"):
  19. raise bb.parse.SkipRecipe("Fortran isn't enabled")
  20. }