aboutsummaryrefslogtreecommitdiff
path: root/editors/wordgrinder/Makefile
blob: c5cab17aa2ddd8c748172b5966cb3af2af8541b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# New ports collection makefile for:	wordgrinder
# Date created:				15 August 2010
# Whom:					Vitaly Magerya <vmagerya@gmail.com>
#
# $FreeBSD$
#

PORTNAME=	wordgrinder
PORTVERSION=	0.3.3
CATEGORIES=	editors
MASTER_SITES=	SF

MAINTAINER=	vmagerya@gmail.com
COMMENT=	A simple Unicode-aware console-based word processor

RUN_DEPENDS=	${LUA_MODLIBDIR}/lfs.so:${PORTSDIR}/devel/luafilesystem

USE_LUA=	5.1+

USE_BZIP2=	yes

LICENSE=	MIT

MAN1=		wordgrinder.1

PLIST_DIRS=	share/doc/wordgrinder
PLIST_FILES=	bin/wordgrinder share/doc/wordgrinder/README.wg

post-patch:
	${REINPLACE_CMD} -e 's,^PREFIX =.*$$,PREFIX = "${PREFIX}",' \
		-e 's,/usr/include/lua5.1,${LUA_INCDIR},' \
		-e 's,command = "lua ,command = "${LUA_CMD} ,' \
		-e '/curses_exe =/s,$$,\
		CLINKFLAGS = {PARENT\, "-L${LUA_LIBDIR}"}\,,' \
		-e 's,lua5.1,lua,' \
		-e 's,install -D,install,' \
		${WRKSRC}/pmfile
	${REINPLACE_CMD} 's,^LUACOMPILER =.*$$,LUACOMPILER = "${LUAC_CMD}",' \
		${WRKSRC}/tools/lua.pm

do-build:
	(cd ${WRKSRC}; ./pm)

do-install:
	${MKDIR} ${PREFIX}/bin ${PREFIX}/man/man1
	${MKDIR} ${PREFIX}/share/doc/wordgrinder
	(cd ${WRKSRC}; ./pm install)
	${STRIP_CMD} ${PREFIX}/bin/wordgrinder

.include <bsd.port.mk>