Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # $OpenBSD: Makefile,v 1.33 2017/02/06 12:23:14 sthen Exp $
  2. # not yet ported to other arches
  3. ONLY_FOR_ARCHS = amd64 i386 powerpc
  4. USE_WXNEEDED = Yes
  5. COMMENT= compiler and runtime system for ANSI Common Lisp
  6. V = 1.3.10
  7. REVISION= 1
  8. DISTNAME= sbcl-${V}-source
  9. PKGNAME= sbcl-${V}
  10. WRKDIST= ${WRKDIR}/sbcl-${V}
  11. EXTRACT_SUFX= .tar.bz2
  12. CATEGORIES= lang
  13. HOMEPAGE= http://www.sbcl.org/
  14. MAINTAINER = Joshua Elsasser <joshe@openbsd.org>
  15. # Public domain and BSD
  16. PERMIT_PACKAGE_CDROM= Yes
  17. MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sbcl/}
  18. MODULES= gcc4
  19. MODGCC4_ARCHS= i386
  20. MODGCC4_LANGS= c
  21. WANTLIB= c m util
  22. PSEUDO_FLAVORS= native_bootstrap
  23. FLAVORS= threads
  24. FLAVOR?=
  25. EXTRA_PARAMS=
  26. .if ${FLAVOR:Mthreads}
  27. ONLY_FOR_ARCHS = amd64
  28. EXTRA_PARAMS+= --with-sb-thread
  29. WANTLIB+= pthread
  30. .endif
  31. .if ${FLAVOR:Mnative_bootstrap}
  32. BUILD_DEPENDS+= lang/sbcl
  33. BOOTSTRAP_CMD= ${LOCALBASE}/bin/sbcl \
  34. --disable-debugger --no-sysinit --no-userinit
  35. .else
  36. BUILD_DEPENDS += lang/clisp
  37. BOOTSTRAP_CMD = ${LOCALBASE}/bin/clisp -q -norc
  38. .endif
  39. TEST_DEPENDS = devel/gmp
  40. USE_GMAKE= Yes
  41. PORTHOME= ${TMPDIR}
  42. MAKE_ENV= GNUMAKE=${GMAKE} INSTALL_ROOT=${PREFIX} \
  43. MAN_DIR=${PREFIX}/man INFO_DIR=${PREFIX}/info \
  44. PORTS_CFLAGS="${CFLAGS}"
  45. # Upstream asks that packagers append something like this to the
  46. # version to distinguish official tarballs from third-party packages.
  47. .if defined(REVISION) && !empty(REVISION)
  48. LOCAL_VERSION = openbsd.${REVISION}
  49. .else
  50. LOCAL_VERSION = openbsd
  51. .endif
  52. VERSION_FILE = ${WRKSRC}/version.lisp-expr
  53. pre-configure:
  54. sed 's/^"\([0-9.]*\)"$$/"\1.${LOCAL_VERSION}"/' \
  55. < ${VERSION_FILE} > ${VERSION_FILE}.new
  56. mv ${VERSION_FILE}.new ${VERSION_FILE}
  57. sed -i 's,egcc,${CC},g' ${WRKSRC}/src/runtime/Config.*-openbsd
  58. do-build:
  59. cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} /bin/sh make.sh \
  60. --prefix=${PREFIX} --xc-host="${BOOTSTRAP_CMD}" ${EXTRA_PARAMS}
  61. cd ${WRKSRC}/doc/manual && touch sbcl.texinfo && \
  62. ${SETENV} ${MAKE_ENV} ${GMAKE} asdf.info sbcl.info
  63. do-install:
  64. cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} /bin/sh install.sh
  65. post-install:
  66. chown -R 0:0 ${PREFIX}/lib/sbcl
  67. do-test:
  68. cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} DONT_CLEAN_SBCL_CONTRIB=1 \
  69. /bin/sh make-target-contrib.sh
  70. cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} /bin/sh run-tests.sh
  71. .include <bsd.port.mk>