aboutsummaryrefslogtreecommitdiff
path: root/editors/xvile/Makefile
blob: d8357c6dcb1b305d405bdfcb864072a9f6521675 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# New ports collection makefile for:    xvile
# Date created:         Wed Nov 26, 1996
# Whom:                 pgf
#
# $FreeBSD$
#

PORTNAME=	xvile
PORTVERSION=	9.3c
PORTREVISION=	1
CATEGORIES=	editors
MASTER_SITES=	ftp://ftp.phred.org/pub/vile/ \
		ftp://dickey.his.com/vile/
DISTNAME=	vile-9.3
EXTRACT_SUFX=	.tgz

PATCH_SITES=    ${MASTER_SITES:S,vile/,vile/patches/,g}
PATCHFILES=	vile-9.3a.patch.gz \
		vile-9.3b.patch.gz \
		vile-9.3c.patch.gz

MAINTAINER=	gj@FreeBSD.org

USE_XLIB=	yes
MAKEFILE=	makefile
HAS_CONFIGURE=	yes

CONFIGURE_ARGS=	--prefix=${PREFIX} \
		--with-libdir-path=${PREFIX}/lib/xvile \
		--datadir=${PREFIX}/share/xvile
MAN1=		xvile.1

.if defined(WITH_ALL)
WITH_FILTERS=1
WITH_MENUS=1
WITH_PERL=1
WITH_XAW3D=1
.endif

pre-configure:
.if ! defined(WITH_MENUS)
	@${ECHO_MSG} "To use xvile with menus, set the environment variable WITH_MENUS,"
	@${ECHO_MSG} "which will also turn on Xaw. If you have Xaw3d, you can use it"
	@${ECHO_MSG} "by also settting the environment variable WITH_XAW3D."
.endif

.if ! defined(WITH_PERL)
	@${ECHO_MSG} "To use xvile with PERL, set the environment variable WITH_PERL."
.endif

.if ! defined(WITH_FILTERS)
	@${ECHO_MSG} "Define WITH_FILTERS if you want to make an xvile which includes"
	@${ECHO_MSG} "all filters in the binary"
.endif

.if defined(WITH_MENUS)
CONFIGURE_ARGS+= --with-screen=Xaw
.if defined(WITH_XAW3D)
LIB_DEPENDS+=	Xaw3d.${XAWVER}:${PORTSDIR}/x11-toolkits/Xaw3d
CONFIGURE_ARGS+= --with-Xaw3d
.endif
.else
CONFIGURE_ARGS+= --with-screen=x11
.endif

.if defined(WITH_PERL)
CONFIGURE_ARGS+= --with-perl
PLIST=		${PKGDIR}/pkg-plist.perl
USE_PERL5=	yes
.endif

.if defined(WITH_FILTERS)
CONFIGURE_ARGS+= --with-builtin-filters=all
PLIST=		${PKGDIR}/pkg-plist.filt
.endif

.if defined(WITH_PERL) && defined(WITH_FILTERS)
PLIST=		${PKGDIR}/pkg-plist.perl+filt
.endif

post-install:
.if !defined(NOPORTDOCS)
	@if ! [ -d ${PREFIX}/share/doc/xvile ]; then ${MKDIR} ${PREFIX}/share/doc/xvile; fi
	${INSTALL_DATA} ${WRKSRC}/doc/*.doc ${PREFIX}/share/doc/xvile
.endif
	@if ! [ -d ${PREFIX}/share/xvile/macros ]; then ${MKDIR} ${PREFIX}/share/xvile/macros; fi
	${INSTALL_DATA} ${WRKSRC}/macros/*.rc ${PREFIX}/share/xvile/macros
	${INSTALL_SCRIPT} ${WRKSRC}/macros/vile-pager ${PREFIX}/share/xvile/macros
.if defined(WITH_PERL)
	${INSTALL_DATA} ${WRKSRC}/*.doc ${PREFIX}/share/doc/xvile
.endif
	@${ECHO_MSG} "Look in ${PREFIX}/share/doc/xvile for documentation."
	@${ECHO_MSG} "Look in ${PREFIX}/share/xvile/macros for macros."

.include <bsd.port.mk>