forked from Lainports/freebsd-ports
GCC 6.1 was released this week. The Ada Framework in FreeBSD ports has been based on GCC 5.3 GNAT although GCC 6.x has been supported for awhile via the ADA_DEFAULT option in make.conf. Now that GCC 6 has been officially released, switch to it by default. People can maintain the old foundation by putting "ADA_DEFAULT=5" in /etc/make.conf. Libraries built by one GNAT are unusable by another, so almost every Ada port has been bumped as a result. Noticable exceptions are dns/ironsides which fails to build on gcc6 (thus USES=ada:5 is set) and cad/ghdl which needs additional testing as it may require gcc5 on FreeBSD (DragonFly uses the LLVM backend only).
74 lines
2.1 KiB
Makefile
74 lines
2.1 KiB
Makefile
# Created by: John Marino <marino@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= lua-ada
|
|
PORTVERSION= 1.0 # made-up; no version info on GH
|
|
PORTREVISION= 1
|
|
CATEGORIES= lang
|
|
|
|
MAINTAINER= marino@FreeBSD.org
|
|
COMMENT= Ada binding for Lua
|
|
|
|
LICENSE= GPLv3 GPLv3RLE
|
|
LICENSE_COMB= multi
|
|
|
|
BUILD_DEPENDS= gprbuild:devel/gprbuild
|
|
|
|
USES= ada lua
|
|
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
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
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)
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
|
(cd ${WRKSRC}/examples/example1 && ${SETENV} ${MAKE_ENV} \
|
|
gprbuild -Pexample1 --create-missing-dirs)
|
|
(cd ${WRKSRC}/examples/example2 && ${SETENV} ${MAKE_ENV} \
|
|
gprbuild -Pexample2 --create-missing-dirs)
|
|
.endif
|
|
|
|
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
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
|
${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
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|