Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # $OpenBSD: Makefile,v 1.23 2017/06/01 20:47:38 espie Exp $
  2. ONLY_FOR_ARCHS = powerpc i386 amd64
  3. # arm needs missing EABI symbols
  4. SHARED_LIBS += luajit-${MODLUA_VERSION} 1.0 # 2.0.5
  5. COMMENT = just-in-time compiler for Lua
  6. V = 2.0.5
  7. DISTNAME = LuaJIT-${V}
  8. PKGNAME = ${DISTNAME:L}
  9. CATEGORIES = lang
  10. HOMEPAGE = http://luajit.org/
  11. # MIT
  12. PERMIT_PACKAGE_CDROM = Yes
  13. WANTLIB = c m
  14. MASTER_SITES = ${HOMEPAGE}download/
  15. MODULES = lang/lua
  16. MODLUA_SA= Yes
  17. MODLUA_VERSION= 5.1
  18. MODULES += gcc4
  19. MODGCC4_ARCHS = powerpc
  20. MODGCC4_LANGS = c
  21. MAKE_FLAGS += \
  22. CC="${CC}" \
  23. CCOPT="${CFLAGS}" \
  24. CCOPT_x86="" \
  25. INSTALL_LJLIBD="${DESTDIR}${MODLUA_DATADIR}" \
  26. INSTALL_MAN="${DESTDIR}${PREFIX}/man/man1" \
  27. INSTALL_SONAME=libluajit-${MODLUA_VERSION}.so.${LIBluajit-${MODLUA_VERSION}_VERSION} \
  28. PREFIX="${PREFIX}"
  29. USE_GMAKE = Yes
  30. SUBST_VARS+= MODLUA_VERSION
  31. pre-configure:
  32. ${SUBST_CMD} ${WRKDIST}/Makefile \
  33. ${WRKDIST}/etc/luajit.pc \
  34. ${WRKDIST}/src/luaconf.h
  35. post-install:
  36. mv ${PREFIX}/bin/luajit-$V ${PREFIX}/bin/luajit${MODLUA_DEP_VERSION}
  37. do-test:
  38. ${WRKSRC}/src/luajit -e "print('hello world')" | grep "^hello world$$"
  39. .include <bsd.port.mk>
  40. .if ${PROPERTIES:Mclang}
  41. MAKE_FLAGS += TARGET_LDFLAGS='-lc++abi -lpthread'
  42. WANTLIB += c++abi pthread
  43. .endif