aboutsummaryrefslogtreecommitdiff
path: root/editors/xvile/Makefile
blob: 1765780ab1faa340999af57f464448d35a6880ee (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Created by: pgf
# $FreeBSD$

PORTNAME=	xvile
PORTVERSION=	9.8j
CATEGORIES=	editors
MASTER_SITES=	ftp://dickey.his.com/vile/current/ \
		ftp://invisible-island.net/vile/current/
DISTNAME=	vile-${PORTVERSION}
EXTRACT_SUFX=	.tgz

PATCH_SITES=	${MASTER_SITES:S,vile/current/,vile/patches/,g}
PATCHFILES=	# none

MAINTAINER=	ports@FreeBSD.org
COMMENT=	VI Like Emacs -- X11 version

LICENSE=	GPLv2

OPTIONS_DEFINE=	FILTERS ICONV PERL DOCS
OPTIONS_RADIO=	MENUS
OPTIONS_RADIO_MENUS=	MOTIF XAW XAW3D
OPTIONS_DEFAULT=	ICONV
FILTERS_DESC=	Loadable filters
MENUS_DESC=	Support for menus
XAW_DESC=	X Athena Widgets
XAW3D_DESC=	X Athena Widgets with 3D effect

USES=		pkgconfig
USE_XORG=	x11 xext xpm
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-imake \
		--enable-fontset \
		--with-xpm \
		--with-pixmapdir=${PREFIX}/share/pixmaps
MAKEFILE=	makefile
MAKE_JOBS_SAFE=	yes

DATADIR=	${PREFIX}/share/vile

MAN1=		xvile.1

CONFLICTS_INSTALL=	vile-[0-9]*

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MFILTERS}
CONFIGURE_ARGS+=	--with-loadable-filters
PLIST_SUB+=	SO_EXT=".so"
.else
PLIST_SUB+=	SO_EXT=""
.endif

.if ${PORT_OPTIONS:MICONV}
USES+=		iconv
CONFIGURE_ARGS+=	--with-iconv --with-libiconv-prefix=${LOCALBASE}
PLIST_SUB+=	ICONV=""
.else
BROKEN=		Does not build if ICONV support is disabled
CONFIGURE_ARGS+=	--without-iconv --without-locale
PLIST_SUB+=	ICONV="@comment "
.endif

.if ${PORT_OPTIONS:MPERL}
USE_PERL5=	yes
CONFIGURE_ARGS+=	--with-perl
PLIST_SUB+=	PERL=""
.else
PLIST_SUB+=	PERL="@comment "
.endif

.if empty(PORT_OPTIONS:MMOTIF) && empty(PORT_OPTIONS:MXAW) && empty(PORT_OPTIONS:MXAW3D)
CONFIGURE_ARGS+=	--with-screen=x11
.endif

.if ${PORT_OPTIONS:MMOTIF}
USE_MOTIF=	yes
CONFIGURE_ARGS+=	--with-screen=motif
.endif

.if ${PORT_OPTIONS:MXAW}
USE_XORG+=	xaw
CONFIGURE_ARGS+=	--with-screen=athena
.endif

.if ${PORT_OPTIONS:MXAW3D}
LIB_DEPENDS+=	Xaw3d:${PORTSDIR}/x11-toolkits/Xaw3d
CONFIGURE_ARGS+=	--enable-colored-menus \
			--with-Xaw3d \
			--with-screen=xaw3d
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		's|^DOCDIR|#DOCDIR|' ${WRKSRC}/makefile.in
	@${REINPLACE_CMD} -e \
		's|^#!.*|#!${PERL}|' ${WRKSRC}/perl/vileget

post-install:
	@${MKDIR} ${DATADIR}/macros
	(cd ${WRKSRC}/macros && ${INSTALL_DATA} *.rc ${DATADIR}/macros)
	@${MKDIR} ${DESKTOPDIR}
	(cd ${WRKSRC}/macros && ${INSTALL_DATA} *.desktop ${DESKTOPDIR})
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
	(cd ${WRKSRC}/doc && ${INSTALL_DATA} *.doc ${DOCSDIR})
.endif

.include <bsd.port.mk>