mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-16 07:58:04 +00:00
beb1c1fe19
Ports using USES=lua:module or lua:flavors will be flavored. A range of supported lua versions can be set using XX-YY (or XX-, or -YY, or simply ZZ) for ports not supporting all lua versions. USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of flavored lua ports, in a similar way as PHP or Python flavors. PR: 245038 Submitted by: andrew tao11 riddles org uk Reviewed by: mat, kevans, russ haley gmail com Approved by: mat (portmgr) Differential Revision: https://reviews.freebsd.org/D16494
74 lines
2.0 KiB
Makefile
74 lines
2.0 KiB
Makefile
# Created by: John Marino <marino@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= ada
|
|
PORTVERSION= 1.0 # made-up; no version info on GH
|
|
PORTREVISION= 2
|
|
CATEGORIES= lang
|
|
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Ada binding for Lua
|
|
|
|
LICENSE= GPLv3 GPLv3RLE
|
|
LICENSE_COMB= multi
|
|
|
|
BUILD_DEPENDS= gprbuild:devel/gprbuild
|
|
|
|
USES= ada lua:52
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= AdaCore
|
|
GH_PROJECT= ada-lua
|
|
GH_TAGNAME= e008192
|
|
|
|
SUB_FILES= lua.gpr
|
|
SUB_LIST= LUA_VER=${LUA_VER}
|
|
|
|
PORTEXAMPLES= example1 example2
|
|
EXDIRPREFIX= ${WRKSRC}/examples/example
|
|
REPLACEMENT= "-L${LOCALBASE}/lib", "-Wl,-R,${LOCALBASE}/lib",\
|
|
"-llua-${LUA_VER}"
|
|
|
|
OPTIONS_DEFINE= EXAMPLES
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's|with "Lua"|with "../../lua.gpr"|' \
|
|
-e 's|"-L../..", "-llua"|${REPLACEMENT}|' \
|
|
${EXDIRPREFIX}1/example1.gpr \
|
|
${EXDIRPREFIX}2/example2.gpr
|
|
|
|
do-build:
|
|
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
|
gprbuild -Plua --create-missing-dirs)
|
|
|
|
do-build-EXAMPLES-on:
|
|
(cd ${WRKSRC}/examples/example1 && ${SETENV} ${MAKE_ENV} \
|
|
gprbuild -Pexample1 --create-missing-dirs)
|
|
(cd ${WRKSRC}/examples/example2 && ${SETENV} ${MAKE_ENV} \
|
|
gprbuild -Pexample2 --create-missing-dirs)
|
|
|
|
do-install:
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/lib/lua-ada \
|
|
${STAGEDIR}${PREFIX}/lib/gnat \
|
|
${STAGEDIR}${PREFIX}/include/lua-ada
|
|
${INSTALL_DATA} ${WRKSRC}/lib/* ${STAGEDIR}${PREFIX}/lib/lua-ada
|
|
${INSTALL_DATA} ${WRKSRC}/lua.gpr ${STAGEDIR}${PREFIX}/lib/gnat
|
|
${INSTALL_DATA} ${WRKSRC}/src/*.ad[bs] \
|
|
${STAGEDIR}${PREFIX}/include/lua-ada
|
|
|
|
do-install-EXAMPLES-on:
|
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/example1/bin \
|
|
${STAGEDIR}${EXAMPLESDIR}/example2/bin
|
|
${INSTALL_DATA} ${EXDIRPREFIX}1/example1.lua \
|
|
${EXDIRPREFIX}1/src/main.adb \
|
|
${STAGEDIR}${EXAMPLESDIR}/example1
|
|
${INSTALL_PROGRAM} ${EXDIRPREFIX}1/obj/main \
|
|
${STAGEDIR}${EXAMPLESDIR}/example1/bin/hello-lua
|
|
${INSTALL_DATA} ${EXDIRPREFIX}2/example2.lua \
|
|
${EXDIRPREFIX}2/src/main.adb \
|
|
${STAGEDIR}${EXAMPLESDIR}/example2
|
|
${INSTALL_PROGRAM} ${EXDIRPREFIX}2/obj/main \
|
|
${STAGEDIR}${EXAMPLESDIR}/example2/bin/hello-function
|
|
|
|
.include <bsd.port.mk>
|