svn commit: r389905 - in head/lang: . lua-ada lua-ada/files
John Marino
marino at FreeBSD.org
Wed Jun 17 12:43:09 UTC 2015
Author: marino
Date: Wed Jun 17 11:16:53 2015
New Revision: 389905
URL: https://svnweb.freebsd.org/changeset/ports/389905
Log:
Add new port lang/lua-ada
These are bindings to a Lua library for Ada. The gpr file is written for
the version of Lua that is default on the system that builds the port.
(see Mk/bsd.default-versions.mk)
There is no documentation available, but two examples with sources are
built and installed for illustration.
Added:
head/lang/lua-ada/
head/lang/lua-ada/Makefile (contents, props changed)
head/lang/lua-ada/distinfo (contents, props changed)
head/lang/lua-ada/files/
head/lang/lua-ada/files/lua.gpr.in (contents, props changed)
head/lang/lua-ada/pkg-descr (contents, props changed)
head/lang/lua-ada/pkg-plist (contents, props changed)
Modified:
head/lang/Makefile
Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile Wed Jun 17 11:02:58 2015 (r389904)
+++ head/lang/Makefile Wed Jun 17 11:16:53 2015 (r389905)
@@ -141,6 +141,7 @@
SUBDIR += linux-f10-libg2c
SUBDIR += linux-f10-tcl85
SUBDIR += linux-j
+ SUBDIR += lua-ada
SUBDIR += lua-mode.el
SUBDIR += lua51
SUBDIR += lua52
Added: head/lang/lua-ada/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua-ada/Makefile Wed Jun 17 11:16:53 2015 (r389905)
@@ -0,0 +1,73 @@
+# Created by: John Marino <marino at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= lua-ada
+PORTVERSION= 1.0 # made-up; no version info on GH
+CATEGORIES= lang
+
+MAINTAINER= marino at FreeBSD.org
+COMMENT= Ada binding for Lua
+
+LICENSE= GPLv3 GPLv3RLE
+LICENSE_COMB= multi
+
+BUILD_DEPENDS= gprbuild:${PORTSDIR}/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>
Added: head/lang/lua-ada/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua-ada/distinfo Wed Jun 17 11:16:53 2015 (r389905)
@@ -0,0 +1,2 @@
+SHA256 (AdaCore-ada-lua-1.0-e008192_GH0.tar.gz) = e2a667748d2970dbe186bc8cd7573b5534be5e1fb6cdc70856ca95effe52dff5
+SIZE (AdaCore-ada-lua-1.0-e008192_GH0.tar.gz) = 25843
Added: head/lang/lua-ada/files/lua.gpr.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua-ada/files/lua.gpr.in Wed Jun 17 11:16:53 2015 (r389905)
@@ -0,0 +1,16 @@
+library project Lua is
+
+ for Languages use ("Ada");
+
+ for Source_Dirs use ("../../include/lua-ada");
+ for Library_Dir use "../../lib/lua-ada";
+ for Library_Name use "adalua";
+ for Library_Kind use "static";
+ for Externally_Built use "True";
+
+ package Linker is
+ for Linker_Options use ("-L%%PREFIX%%/lib", "-Wl,-R,%%PREFIX%%/lib",
+ "-llua-%%LUA_VER%%);
+ end Linker;
+
+end Lua;
Added: head/lang/lua-ada/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua-ada/pkg-descr Wed Jun 17 11:16:53 2015 (r389905)
@@ -0,0 +1,8 @@
+These are bindings to a Lua library for Ada. The gpr file is written for
+the version of Lua that is default on the system that builds the port.
+(see Mk/bsd.default-versions.mk)
+
+There is no documentation available, but two examples with sources are
+built and installed for illustration.
+
+WWW: http://github.com/AdaCore/ada-lua
Added: head/lang/lua-ada/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua-ada/pkg-plist Wed Jun 17 11:16:53 2015 (r389905)
@@ -0,0 +1,14 @@
+include/lua-ada/lua-ada_limited_types.adb
+include/lua-ada/lua-ada_limited_types.ads
+include/lua-ada/lua-ada_types.adb
+include/lua-ada/lua-ada_types.ads
+include/lua-ada/lua-utils.adb
+include/lua-ada/lua-utils.ads
+include/lua-ada/lua.adb
+include/lua-ada/lua.ads
+lib/lua-ada/libadalua.a
+lib/lua-ada/lua-ada_limited_types.ali
+lib/lua-ada/lua-ada_types.ali
+lib/lua-ada/lua-utils.ali
+lib/lua-ada/lua.ali
+lib/gnat/lua.gpr
More information about the svn-ports-head
mailing list