LuaGD, a binding of the GD library for Lua, prod and okay jolan@

This commit is contained in:
pedro 2006-05-04 22:53:57 +00:00
parent 91ecf6c19e
commit 13f14aa6a8
8 changed files with 132 additions and 0 deletions

53
graphics/luagd/Makefile Normal file
View File

@ -0,0 +1,53 @@
# $OpenBSD: Makefile,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $
COMMENT= "gd binding for the lua language"
V= 2.0.33r1
PKGNAME= luagd-$(V)
DISTNAME= lua-gd-$(V)
CATEGORIES= graphics
HOMEPAGE= http://lua-gd.luaforge.net/
MASTER_SITES= http://luaforge.net/frs/download.php/1015/
MAINTAINER= Pedro Martelletto <pedro@openbsd.org>
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= freetype fontconfig iconv m z
LIB_DEPENDS= lua.5,lualib.5::lang/lua jpeg.62::graphics/jpeg \
png.2::graphics/png gd.20.33::graphics/gd
NO_REGRESS= Yes
USE_X11= Yes
post-extract:
@sed -e "s:@gdpath@:${PREFIX}/lua/luagd/?.lua:g" \
-e "s:@gdcpath@:${PREFIX}/lua/luagd/?.so:g" \
${FILESDIR}/init.lua > ${WRKSRC}/init.lua
do-build:
$(CC) $(CFLAGS) -DGD_JPEG -DGD_FONTCONFIG -DGD_FREETYPE -DGD_PNG\
-DGD_GIF -fPIC -I$(LOCALBASE)/include -L$(LOCALBASE)/lib\
-L$(X11BASE)/lib -shared $(WRKDIST)/luagd.c -o ${WRKDIST}/core.so\
-llua -llualib -lm -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv\
-lgd
LUAGDDIR= $(PREFIX)/lua/luagd
do-install:
${INSTALL_DATA_DIR} ${LUAGDDIR}
${INSTALL_DATA_DIR} ${LUAGDDIR}/gd
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luagd
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/luagd
${INSTALL_DATA} ${FILESDIR}/gd.lua ${LUAGDDIR}
${INSTALL_DATA} ${WRKSRC}/core.so ${LUAGDDIR}/gd
${INSTALL_DATA} ${WRKSRC}/init.lua ${LUAGDDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/luagd
${INSTALL_DATA} ${WRKSRC}/demos/* ${PREFIX}/share/examples/luagd
.include <bsd.port.mk>

4
graphics/luagd/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (lua-gd-2.0.33r1.tar.gz) = db243165c7e43636f6b4fa94a06b453e
RMD160 (lua-gd-2.0.33r1.tar.gz) = 091b644bafe9fe52597007b01e9e642bc935fd22
SHA1 (lua-gd-2.0.33r1.tar.gz) = cf2c64756a635e0b7a13d98bbb44c9cf1b4fc465
SIZE (lua-gd-2.0.33r1.tar.gz) = 442074

View File

@ -0,0 +1,2 @@
-- $OpenBSD: gd.lua,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $
require("gd.core")

View File

@ -0,0 +1,4 @@
-- $OpenBSD: init.lua,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $
-- luagd's initialization steps
lua_addpath("@gdpath@")
lua_addcpath("@gdcpath@")

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-luagd_c,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $
--- luagd.c.orig Thu May 4 14:48:41 2006
+++ luagd.c Thu May 4 14:48:52 2006
@@ -2466,7 +2466,7 @@ static const luaL_reg LgdMetatable[] =
};
-int luaopen_gd(lua_State *L)
+int luaopen_gd_core(lua_State *L)
{
luaL_openlib(L, LIB_NAME, LgdFunctions, 0);
lua_pushliteral(L, "VERSION");

8
graphics/luagd/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
LuaGD is a set of Lua bindings to the Thomas Boutell's gd library that
allows your code to quickly draw complete images with lines, polygons,
arcs, text, multiple colors, cut and paste from other images, flood
fills, read in or write out images in the PNG or JPEG formats. It is not
a kitchen-sink graphics package, but it does include most frequently
requested features, including both truecolor and palette images,
resampling (smooth resizing of truecolor images) and so forth. It is
particularly useful in Web applications.

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $
lua/luagd/gd/core.so

47
graphics/luagd/pkg/PLIST Normal file
View File

@ -0,0 +1,47 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $
@unexec lua ${SYSCONFDIR}/lua/luapkg.lua del luagd
%%SHARED%%
lua/
lua/luagd/
lua/luagd/gd/
lua/luagd/gd.lua
lua/luagd/init.lua
share/doc/luagd/
share/doc/luagd/cat.png
share/doc/luagd/catdiff.png
share/doc/luagd/catmsg.png
share/doc/luagd/clock-example.png
share/doc/luagd/fontconfig-example.png
share/doc/luagd/gifanim.gif
share/doc/luagd/index.html
share/doc/luagd/lua-gd.png
share/doc/luagd/sierpinski.png
share/doc/luagd/stdfonts.png
share/examples/luagd/
@exec lua ${SYSCONFDIR}/lua/luapkg.lua add luagd ${PREFIX}/lua/luagd/init.lua
share/examples/luagd/Vera.ttf
share/examples/luagd/brush.lua
share/examples/luagd/bugs.jpg
share/examples/luagd/circle.lua
share/examples/luagd/clock.lua
share/examples/luagd/counter.lua
share/examples/luagd/counter.txt
share/examples/luagd/ellipse.lua
share/examples/luagd/fontconfig.lua
share/examples/luagd/fractal.lua
share/examples/luagd/gd.lua
share/examples/luagd/gifanim.lua
share/examples/luagd/gifanim2.lua
share/examples/luagd/gifanim3.lua
share/examples/luagd/grid.png
share/examples/luagd/lua-gd.png
share/examples/luagd/mkthumbs.lua
share/examples/luagd/one.lua
share/examples/luagd/paper.png
share/examples/luagd/poly.lua
share/examples/luagd/stdfont.lua
share/examples/luagd/steg.lua
share/examples/luagd/test.lua
share/examples/luagd/test2.lua
share/examples/luagd/ttftext.lua
share/examples/luagd/ttftextex.lua