aboutsummaryrefslogtreecommitdiff
path: root/editors/wordgrinder/Makefile
blob: 3cb07b56a4cca139b8411b54a65b9f75810d0872 (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
# Created by: Vitaly Magerya <vmagerya@gmail.com>
# $FreeBSD$

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

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

LICENSE=	MIT

BROKEN=		Fails to build

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

USES=		lua:51 tar:bzip2

MAN1=		wordgrinder.1

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

NO_STAGE=	yes
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
	${REINPLACE_CMD} "/CCOMPILER = /s,gcc,cc ," ${WRKSRC}/tools/c.pm
	${REINPLACE_CMD} "/CC=/s,gcc,cc ," ${WRKSRC}/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>