fortran-helloworld.bb 550 B

123456789101112131415161718192021222324
  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. # These set flags that Fortran doesn't support
  7. SECURITY_CFLAGS = ""
  8. SECURITY_LDFLAGS = ""
  9. do_compile() {
  10. ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
  11. }
  12. do_install() {
  13. install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
  14. }
  15. python () {
  16. if not d.getVar("FORTRAN"):
  17. raise bb.parse.SkipRecipe("Fortran isn't enabled")
  18. }