Advertisement
_dinsdale

Lua53 Makefile Mess

Jul 21st, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. # Created by: GreenDog <fiziologus@gmail.com>
  2. # $FreeBSD: head/lang/lua53/Makefile 392509 2015-07-19 14:38:43Z bapt $
  3.  
  4. PORTNAME= lua
  5. PORTVERSION= 5.3.3
  6. PORTREVISION= 2
  7. CATEGORIES= lang
  8. USE_GITHUB= yes
  9. GH_ACCOUNT= lua
  10.  
  11. MAINTAINER= russ.haley@gmail.com
  12. COMMENT= Small, compilable scripting language providing easy access to C code
  13.  
  14. LICENSE= MIT
  15.  
  16. USES= libedit
  17. LUA_VER= 5.3
  18. USE_LDCONFIG= yes
  19.  
  20. # Overriding __MAKE_CONF makes sure that we don't re-parse
  21. # /etc/make.conf during do-build, which would jeopardize the build
  22. # if, for instance, the user set CFLAGS=mumble
  23. # NOTE: /etc/make.conf is read BEFORE Makefile, so we already
  24. # have its settings when we get here.
  25. # See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt
  26. #MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
  27. # liblua.so requires libm, so make sure it has an explicit dependency
  28. # so that applications need not second-guess lua's dependencies.
  29. CPPFLAGS+= -I${LOCALBASE}/include
  30. LDFLAGS+= -lm -pthread
  31. BUILD_WRKSRC= ${WRKSRC}
  32. # 2016-07-21 - Russ Haley - commented out for testing
  33. #MAKE_ARGS+= MYCFLAGS="-fPIC ${CFLAGS} ${CPPFLAGS}" \
  34. MYLDFLAGS="${LDFLAGS}" \
  35. MYLIBS="-Wl,-E -L${LOCALBASE}/lib -ledit" \
  36. CC="${CC}"
  37. CONFIGURE_ARGS+= TARGET="freebsd"
  38. MAKE_ARGS+= target="freebsd" \
  39. CC="${CC}"
  40. # 2016-07-21 - Russ Haley - commented out for testing
  41. #LUA_T=lua53 \
  42. LUAC_T=luac53 \
  43. LUA_A=liblua-${LUA_VER}.a \
  44. LUA_SO=liblua-${LUA_VER}.so \
  45. LUA_SONAME=liblua-${LUA_VER}.so \
  46. TO_BIN="lua53 luac53" \
  47. #TO_LIB="liblua-${LUA_VER}.a liblua-${LUA_VER}.so" \
  48. INSTALL_TOP=${STAGEDIR}${PREFIX} \
  49. INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua53 \
  50. INSTALL_EXEC="${INSTALL_PROGRAM}"
  51. # 2016-07-21 - Russ Haley - There is no bsd.lua.mk file in /usr/share/mk.
  52. # Furthermore, the base Lua targets seem to handle all this stuff fine.
  53. #-----------------------------
  54. # Cope with the lack of support for Lua 5.2 in bsd.lua.mk. These
  55. # overrides, which are required below, should be removed once bsd.lua.mk
  56. # understands this lua version.
  57. #LUA_PREFIX?= ${PREFIX}
  58. #LUA_SUBDIR?= lua${PKGNAMESUFFIX}
  59. #LUA_INCDIR?= ${LUA_PREFIX}/include/${LUA_SUBDIR}
  60. #LUA_LIBDIR?= ${LUA_PREFIX}/lib
  61.  
  62. #SUB_FILES= lua-${LUA_VER}.pc
  63. #SUB_LIST= version=${PORTVERSION} \
  64. includedir=${LUA_INCDIR} \
  65. libdir=${LUA_LIBDIR} \
  66. soname=lua-${LUA_VER}
  67. # 2016-07-21 - Russ Haley - Added this to the base cflags as all
  68. # current or expected tier 1 platforms can use this flag
  69. #CFLAGS_aarch64= -fPIC
  70. #CFLAGS_amd64= -fPIC
  71. #CCLAGS_armv6= -fPIC
  72. #CFLAGS_powerpc= -fPIC
  73.  
  74.  
  75. # 2016-07-21 - Russ Haley - The base lua makefile takes care of all this.
  76. #Removed
  77. #post-install:
  78. #@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblua-${LUA_VER}.so
  79. #@${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
  80. ${STAGEDIR}${PREFIX}/man/man1/lua53.1
  81. #@${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
  82. ${STAGEDIR}${PREFIX}/man/man1/luac53.1
  83. #${INSTALL_DATA} ${WRKDIR}/lua-${LUA_VER}.pc \
  84. ${STAGEDIR}${PREFIX}/libdata/pkgconfig
  85.  
  86. .include <bsd.port.mk>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement