Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # $OpenBSD: Makefile,v 1.40 2016/09/01 10:53:27 jasper Exp $
  2. # losely based on the FreeBSD port
  3. .for m in alpha powerpc sparc64
  4. BROKEN-$m = segfaults in longjump return while testing continuations
  5. .endfor
  6. COMMENT = scheme r5 interpreter
  7. REVISION = 1
  8. CATEGORIES = lang
  9. V = 5f1
  10. DISTNAME = scm-$V
  11. EXTRACT_SUFX = .zip
  12. HOMEPAGE = http://people.csail.mit.edu/jaffer/SCM
  13. MASTER_SITES = http://groups.csail.mit.edu/mac/ftpdir/scm/ \
  14. http://groups.csail.mit.edu/mac/ftpdir/scm/OLD/
  15. MAINTAINER = Marc Espie <espie@openbsd.org>
  16. WRKDIST = ${WRKDIR}/scm
  17. # LGPLv3
  18. PERMIT_PACKAGE_CDROM = Yes
  19. WANTLIB = c curses termcap m readline
  20. FLAVORS = no_x11
  21. FLAVOR ?=
  22. SUBST_VARS = V
  23. SCM_DATA = COPYING Idiffer.scm Iedline.scm Init${V}.scm Link.scm \
  24. Macexp.scm Macro.scm Transcen.scm Tscript.scm \
  25. build build.scm compile.scm hobbit.scm mkimpcat.scm \
  26. r4rstest.scm scmhob.scm \
  27. disarm.scm split.scm
  28. SCM_INFO = scm.info hobbit.info
  29. SCM_INCLUDES = scmflags.h scmfig.h patchlvl.h scmhob.h
  30. .if !${FLAVOR:Mno_x11}
  31. SCM_DATA += keysymdef.scm x11.scm xatoms.scm xevent.scm
  32. SCM_INFO += Xlibscm.info
  33. .endif
  34. FEATURES = arrays bignums cautious edit-line curses posix socket unix \
  35. dynamic-linking i/o-extensions inexact regex
  36. .if !${FLAVOR:Mno_x11}
  37. FEATURES += x
  38. OPTIONS += --compiler-options=-I${X11BASE}/include --compiler-options=-O2
  39. OPTIONS += --linker-options=-L${X11BASE}/lib
  40. SCM_DATA += x11.scm xevent.scm
  41. WANTLIB += X11
  42. .endif
  43. BUILD_DEPENDS = devel/slib
  44. RUN_DEPENDS = devel/slib
  45. FEATURE_LIST =
  46. .for f in ${FEATURES}
  47. FEATURE_LIST += -F $f
  48. .endfor
  49. pre-build:
  50. @echo "srcdir=${WRKSRC}" >${WRKSRC}/srcdir.mk
  51. post-build:
  52. cd ${WRKSRC} && ${MAKE_ENV} PATH=${WRKSRC}:${PORTPATH} /bin/sh ./build \
  53. ${FEATURE_LIST} \
  54. ${OPTIONS} \
  55. -h system \
  56. -o scm \
  57. -s "${PREFIX}/share/scm/"
  58. cd ${WRKSRC} && ${MAKE_ENV} PATH=${WRKSRC}:${PORTPATH} /bin/sh ./build \
  59. ${FEATURE_LIST} -F sicp \
  60. ${OPTIONS} \
  61. -h system \
  62. -o scm-sicp \
  63. -s "${PREFIX}/share/scm/"
  64. ALL_TARGET = scmlit
  65. #CFLAGS+= -Dunix
  66. MAKE_FLAGS = CFLAGS='${CFLAGS}' LD='${CC}'
  67. MAKE_ENV = SCHEME_LIBRARY_PATH=${LOCALBASE}/share/slib/
  68. CONFIGURE_STYLE = simple
  69. do-install:
  70. ${INSTALL_PROGRAM} ${WRKBUILD}/scm ${PREFIX}/bin
  71. ${INSTALL_PROGRAM} ${WRKBUILD}/scmlit ${PREFIX}/bin
  72. ${INSTALL_PROGRAM} ${WRKBUILD}/scm-sicp ${PREFIX}/bin
  73. ${INSTALL_MAN} ${WRKBUILD}/scm.1 ${PREFIX}/man/man1
  74. ${INSTALL_DATA_DIR} ${PREFIX}/share/scm
  75. ${INSTALL_DATA_DIR} ${PREFIX}/include/scm
  76. sed -e 's,@PREFIX@,${TRUEPREFIX},' \
  77. <${FILESDIR}/require.scm.in \
  78. >${PREFIX}/share/scm/require.scm
  79. .for file in ${SCM_INCLUDES}
  80. ${INSTALL_DATA} ${WRKBUILD}/${file} ${PREFIX}/include/scm
  81. .endfor
  82. .for file in ${SCM_DATA}
  83. ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/scm
  84. .endfor
  85. .for file in ${SCM_INFO}
  86. ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/info
  87. .endfor
  88. FAKE_FLAGS = exec_prefix=${WRKINST}${TRUEPREFIX}/
  89. TEST_TARGET = check
  90. .include <bsd.port.mk>