Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # $OpenBSD: Makefile,v 1.23 2016/08/25 08:56:43 jasper Exp $
  2. ONLY_FOR_ARCHS=i386 powerpc
  3. BROKEN-powerpc = /usr/obj/ports/smlnj-110.76//bin/.run/run.ppc-openbsd: undefined symbol ''
  4. # XXX: Doesn't get honored, see patch-base_runtime_objs_mk_{ppc,x86}-openbsd instead
  5. USE_WXNEEDED = Yes
  6. COMMENT= New Jersey Standard ML
  7. V= 110.76
  8. REVISION= 0
  9. PKGNAME= smlnj-$V
  10. CATEGORIES= lang
  11. HOMEPAGE= http://www.smlnj.org/
  12. # http://www.smlnj.org/license.html
  13. PERMIT_PACKAGE_CDROM= without fee
  14. PERMIT_PACKAGE_FTP= Yes
  15. WANTLIB= c m
  16. MASTER_SITES= http://smlnj.cs.uchicago.edu/dist/working/$V/
  17. DIST_SUBDIR= smlnj-$V
  18. .if ${MACHINE_ARCH} == "i386"
  19. _SMLNJ_ARCH= x86
  20. .elif ${MACHINE_ARCH} == "powerpc"
  21. _SMLNJ_ARCH= ppc
  22. .endif
  23. SUBST_VARS+= _SMLNJ_ARCH
  24. DISTFILES= MLRISC.tgz \
  25. boot.ppc-unix.tgz \
  26. boot.x86-unix.tgz \
  27. ckit.tgz cm.tgz cml.tgz \
  28. compiler.tgz config.tgz \
  29. eXene.tgz heap2asm.tgz \
  30. ml-burg.tgz ml-lex.tgz \
  31. ml-lpt.tgz ml-yacc.tgz \
  32. nlffi.tgz pgraph.tgz \
  33. runtime.tgz smlnj-c.tgz \
  34. smlnj-lib.tgz system.tgz \
  35. trace-debug-profile.tgz
  36. SML_BASE= ${PREFIX}/smlnj
  37. SML_LIBDIR= ${SML_BASE}/lib
  38. SML_BINDIR= ${SML_BASE}/bin
  39. SML_EXES= heap2exec ml-antlr ml-build \
  40. ml-burg ml-lex \
  41. ml-makedepend ml-nlffigen \
  42. ml-ulex ml-yacc sml
  43. USE_GMAKE= Yes
  44. NO_TEST= Yes
  45. post-extract:
  46. mkdir -p ${WRKDIR}/base
  47. cd ${WRKDIR} && \
  48. mv cm compiler runtime base
  49. do-build:
  50. cd ${WRKDIR} && unset PWD && \
  51. for file in "config/_*"; do \
  52. ${SUBST_CMD} ${WRKDIR}/$$file; \
  53. done; \
  54. FILESDIR="$(FILESDIR)" SMLNJ_HOME="${WRKSRC}" ./config/install.sh
  55. do-install:
  56. rm -rf ${SML_BASE}
  57. mkdir ${SML_BASE} ${SML_BINDIR} ${SML_LIBDIR}
  58. tar -C ${WRKDIR} -cf - bin | tar -C ${SML_BASE} -xf -
  59. tar -C ${WRKDIR} -cf - lib | tar -C ${SML_BASE} -xf -
  60. # Remove symlinks which may have been copied if ccache was used
  61. rm -f ${SML_BASE}/bin/{g,}cc ${SML_BASE}/bin/{g,c}++
  62. cd ${PREFIX}/bin && \
  63. for file in ${SML_EXES}; do \
  64. ln -s ../smlnj/bin/$$file .; \
  65. done
  66. .include <bsd.port.mk>