Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # $OpenBSD: Makefile,v 1.21 2016/09/01 10:53:27 jasper Exp $
  2. ONLY_FOR_ARCHS = amd64 i386 mips64 mips64el powerpc sparc64
  3. USE_WXNEEDED = Yes
  4. COMMENT = ANSI/200x Forth interpreter and compiler
  5. V = 0.7.3
  6. DISTNAME = gforth-${V}
  7. REVISION = 2
  8. CATEGORIES = lang
  9. HOMEPAGE = http://www.gnu.org/software/gforth/
  10. MAINTAINER = Jasper Lievisse Adriaanse <jasper@openbsd.org>
  11. # GPLv3
  12. PERMIT_PACKAGE_CDROM = Yes
  13. MASTER_SITES = ${MASTER_SITE_GNU:=gforth/}
  14. WANTLIB += avcall c callback ffi ltdl m pthread
  15. LIB_DEPENDS = devel/ffcall \
  16. devel/libffi>=3.2.1p0 \
  17. devel/libtool,-ltdl
  18. CONFIGURE_STYLE = gnu
  19. CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
  20. LDFLAGS="-L${LOCALBASE}/lib"
  21. CFLAGS += -Dunix
  22. FAKE_FLAGS+= DESTDIR="${WRKINST}"
  23. KERNEL = kernl${WORDSIZE}${ENDIAN}.fi
  24. SUBST_VARS += KERNEL V
  25. .include <bsd.port.arch.mk>
  26. # The filename of the gForth kernel is based on the wordsize
  27. # and the byte order of the system.
  28. .if ${PROPERTIES:Mlp64}
  29. WORDSIZE = 64
  30. .else
  31. WORDSIZE = 32
  32. .endif
  33. .if ${PROPERTIES:Mbe}
  34. ENDIAN = b
  35. .else
  36. ENDIAN = l
  37. .endif
  38. pre-configure:
  39. sed -i "s,@CC@,& -I${LOCALBASE}/include -L${LOCALBASE}/lib," \
  40. ${WRKSRC}/envos.fs.in
  41. # Remove a bunch of unused and unneeded directories
  42. post-install:
  43. find ${PREFIX}/share/gforth/arch/ -type d -empty | xargs rm -fr
  44. ${INSTALL_DATA_DIR} ${PREFIX}/share/emacs/site-lisp
  45. ${INSTALL_DATA} ${WRKSRC}/gforth.el ${PREFIX}/share/emacs/site-lisp
  46. .include <bsd.port.mk>