Makefile 854 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # $OpenBSD: Makefile,v 1.4 2016/10/16 23:21:22 jca Exp $
  2. COMMENT= convert data to and from C structs
  3. DISTNAME= struct-0.2
  4. PKGNAME= lua${DISTNAME}
  5. CATEGORIES= converters
  6. HOMEPAGE= http://www.inf.puc-rio.br/~roberto/struct/
  7. # MIT
  8. PERMIT_PACKAGE_CDROM= Yes
  9. MASTER_SITES= ${HOMEPAGE}
  10. MODULES= lang/lua
  11. FLAVORS= lua52 lua53
  12. FLAVOR?=
  13. WRKDIST= ${WRKDIR}
  14. TEST_DEPENDS=${BUILD_PKGPATH}
  15. # Don't bother with patching Makefile, but do take the -DSTRUCT_INT from it
  16. do-build:
  17. cd ${WRKSRC} && ${CC} ${CFLAGS} -fPIC -I${MODLUA_INCL_DIR} -shared \
  18. -DSTRUCT_INT="long long" ${WRKSRC}/struct.c -o ${WRKSRC}/struct.so
  19. do-install:
  20. ${INSTALL_DATA_DIR} ${MODLUA_LIBDIR}
  21. ${INSTALL_DATA} ${WRKSRC}/struct.so ${MODLUA_LIBDIR}
  22. # known failure: teststruct.lua:170: assertion failed!
  23. do-test:
  24. cd ${WRKSRC} && ${MODLUA_BIN} teststruct.lua
  25. .include <bsd.port.mk>