From 13f14aa6a8ed4e4c36ba17b1d85c041eaabcdbd6 Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 4 May 2006 22:53:57 +0000 Subject: [PATCH] LuaGD, a binding of the GD library for Lua, prod and okay jolan@ --- graphics/luagd/Makefile | 53 ++++++++++++++++++++++++++++ graphics/luagd/distinfo | 4 +++ graphics/luagd/files/gd.lua | 2 ++ graphics/luagd/files/init.lua | 4 +++ graphics/luagd/patches/patch-luagd_c | 12 +++++++ graphics/luagd/pkg/DESCR | 8 +++++ graphics/luagd/pkg/PFRAG.shared | 2 ++ graphics/luagd/pkg/PLIST | 47 ++++++++++++++++++++++++ 8 files changed, 132 insertions(+) create mode 100644 graphics/luagd/Makefile create mode 100644 graphics/luagd/distinfo create mode 100644 graphics/luagd/files/gd.lua create mode 100644 graphics/luagd/files/init.lua create mode 100644 graphics/luagd/patches/patch-luagd_c create mode 100644 graphics/luagd/pkg/DESCR create mode 100644 graphics/luagd/pkg/PFRAG.shared create mode 100644 graphics/luagd/pkg/PLIST diff --git a/graphics/luagd/Makefile b/graphics/luagd/Makefile new file mode 100644 index 00000000000..2774d5ff49a --- /dev/null +++ b/graphics/luagd/Makefile @@ -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 + +# 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 diff --git a/graphics/luagd/distinfo b/graphics/luagd/distinfo new file mode 100644 index 00000000000..72cda9c8780 --- /dev/null +++ b/graphics/luagd/distinfo @@ -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 diff --git a/graphics/luagd/files/gd.lua b/graphics/luagd/files/gd.lua new file mode 100644 index 00000000000..b5503ba4dd8 --- /dev/null +++ b/graphics/luagd/files/gd.lua @@ -0,0 +1,2 @@ +-- $OpenBSD: gd.lua,v 1.1.1.1 2006/05/04 22:53:57 pedro Exp $ +require("gd.core") diff --git a/graphics/luagd/files/init.lua b/graphics/luagd/files/init.lua new file mode 100644 index 00000000000..5a6e7eb75a2 --- /dev/null +++ b/graphics/luagd/files/init.lua @@ -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@") diff --git a/graphics/luagd/patches/patch-luagd_c b/graphics/luagd/patches/patch-luagd_c new file mode 100644 index 00000000000..5af5892245e --- /dev/null +++ b/graphics/luagd/patches/patch-luagd_c @@ -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"); diff --git a/graphics/luagd/pkg/DESCR b/graphics/luagd/pkg/DESCR new file mode 100644 index 00000000000..d5a131d61ce --- /dev/null +++ b/graphics/luagd/pkg/DESCR @@ -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. diff --git a/graphics/luagd/pkg/PFRAG.shared b/graphics/luagd/pkg/PFRAG.shared new file mode 100644 index 00000000000..c465a80b924 --- /dev/null +++ b/graphics/luagd/pkg/PFRAG.shared @@ -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 diff --git a/graphics/luagd/pkg/PLIST b/graphics/luagd/pkg/PLIST new file mode 100644 index 00000000000..542297534cd --- /dev/null +++ b/graphics/luagd/pkg/PLIST @@ -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