mirror of
https://git.freebsd.org/ports.git
synced 2025-06-01 02:46:27 -04:00
graphics/lua-gd: the port had been updated and improved (+)
- Update the version 2.0.33r3 (it's not tagged yet, but that's what written inside their Makefile) and unrestrict from the particular version of Lua (now we need to set PKGNAMEPREFIX) - Simplify building: drop hand-rolled `do-build' target plus associated bits and use upstream routine, slightly adjusted - Development now happens at GitHub, update MASTER_SITES and the WWW line in the port description accordingly - Convert to option helpers and optimize some target recipes PR: 253811
This commit is contained in:
parent
eebc8b2126
commit
d608f8c716
5 changed files with 39 additions and 37 deletions
|
@ -1,10 +1,9 @@
|
|||
# Created by: Sergey V. Dyatko <sergey.dyatko@gmail.com>
|
||||
|
||||
PORTNAME= lua-gd
|
||||
PORTVERSION= 2.0.33r2
|
||||
PORTREVISION= 5
|
||||
PORTVERSION= 2.0.33r3
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://files.luaforge.net/releases/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}forLua5.1/
|
||||
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= sergey.dyatko@gmail.com
|
||||
COMMENT= GD bindings for the Lua programming language
|
||||
|
@ -13,42 +12,27 @@ LICENSE= MIT
|
|||
|
||||
LIB_DEPENDS= libgd.so:graphics/gd
|
||||
|
||||
OPTIONS_DEFINE= DOCS EXAMPLES
|
||||
|
||||
USES= lua:51,module
|
||||
CFLAGS+= -I${LUA_INCDIR} -I${LOCALBASE}/include
|
||||
LDFLAGS+= -shared -L${LOCALBASE}/lib -lgd -L${LUA_LIBDIR} -llua-${LUA_VER} -lm
|
||||
GDFEATURES= `gdlib-config --features |sed -e "s/GD_/-DGD_/g"`
|
||||
USES= lua:module pkgconfig
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ittner
|
||||
GH_TAGNAME= 2ce8e47
|
||||
MAKE_ARGS= LUABIN=${LUA_CMD} LUAPKG=lua-${LUA_VER}
|
||||
|
||||
DOCSDIR= ${LUA_DOCSDIR}
|
||||
EXAMPLESDIR= ${LUA_EXAMPLESDIR}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
CFLAGS_aarch64= -fPIC
|
||||
CFLAGS_amd64= -fPIC
|
||||
CFLAGS_armv7= -fPIC
|
||||
CFLAGS_i386= -fPIC
|
||||
CFLAGS_powerpc= -fPIC
|
||||
CFLAGS_riscv64= -fPIC
|
||||
|
||||
do-build:
|
||||
${CC} -o ${WRKSRC}/gd.so ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} ${GDFEATURES} ${WRKSRC}/luagd.c
|
||||
OPTIONS_DEFINE= DOCS EXAMPLES
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/gd.so ${STAGEDIR}${LUA_MODLIBDIR}
|
||||
${SETENV} LUA_CPATH=${STAGEDIR}${LUA_MODLIBDIR}/?.so ${LUA_CMD} ${WRKSRC}/test_features.lua
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC}/doc/ && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR}/
|
||||
@${ECHO_MSG} "===> Documentation installed in ${STAGEDIR}${DOCSDIR}"
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
do-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
do-install-EXAMPLES-on:
|
||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
cd ${WRKSRC}/demos && ${INSTALL_DATA} * ${STAGEDIR}${EXAMPLESDIR}
|
||||
@${ECHO_MSG} "===> Examples installed in ${STAGEDIR}${EXAMPLESDIR}"
|
||||
.endif
|
||||
${INSTALL_DATA} ${WRKSRC}/demos/* ${STAGEDIR}${EXAMPLESDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHA256 (lua-gd-2.0.33r2.tar.gz) = 235eceba9b55fd6b6cb6d88b0df676d6f94ff49155a0710363c21e2cc0987ec6
|
||||
SIZE (lua-gd-2.0.33r2.tar.gz) = 448606
|
||||
TIMESTAMP = 1582425200
|
||||
SHA256 (ittner-lua-gd-2.0.33r3-2ce8e47_GH0.tar.gz) = cc0b17efff44f0b715a17da3c0a3d8238f1354fb41315b4c231ed0f40f3de2b6
|
||||
SIZE (ittner-lua-gd-2.0.33r3-2ce8e47_GH0.tar.gz) = 436980
|
||||
|
|
18
graphics/lua-gd/files/patch-Makefile
Normal file
18
graphics/lua-gd/files/patch-Makefile
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- Makefile.orig 2020-02-23 02:33:20 UTC
|
||||
+++ Makefile
|
||||
@@ -44,12 +44,12 @@ OUTFILE=gd.so
|
||||
LUAPKG=lua5.1
|
||||
OUTFILE=gd.so
|
||||
|
||||
-CFLAGS=-O3 -Wall -fPIC $(OMITFP)
|
||||
-CFLAGS+=`pkg-config $(LUAPKG) --cflags`
|
||||
+CFLAGS+=-Wall -fPIC # $(OMITFP)
|
||||
+CFLAGS+=`pkg-config $(LUAPKG) gdlib --cflags`
|
||||
CFLAGS+=-DVERSION=\"$(VERSION)\"
|
||||
|
||||
GDFEATURES=-DGD_XPM -DGD_JPEG -DGD_FONTCONFIG -DGD_FREETYPE -DGD_PNG -DGD_GIF
|
||||
-LFLAGS=-shared `pkg-config $(LUAPKG) --libs` -lgd
|
||||
+LFLAGS=-shared `pkg-config $(LUAPKG) gdlib --libs`
|
||||
|
||||
INSTALL_PATH := `pkg-config $(LUAPKG) --variable=INSTALL_CMOD`
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
Lua-GD is a library that allows you to use the gd graphic library from
|
||||
programs written in the Lua programming language.
|
||||
|
||||
WWW: http://lua-gd.luaforge.net/
|
||||
WWW: https://www.ittner.com.br/lua-gd/
|
||||
|
|
|
@ -14,20 +14,20 @@
|
|||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bugs.jpg
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/circle.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clock.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/colortransparent.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/counter.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/counter.txt
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ellipse.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fontconfig.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fractal.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gd-open-any.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gifanim.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gifanim2.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gifanim3.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grid.png
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lua-gd.png
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lualogo.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lualogo.png
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paper.png
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/poly.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/setstyle.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/stdfont.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/steg.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test.lua
|
||||
|
@ -35,4 +35,3 @@
|
|||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ttftext.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ttftextex.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/utf-8.lua
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/utf-8.png
|
||||
|
|
Loading…
Add table
Reference in a new issue