summaryrefslogtreecommitdiff
path: root/www/emacs-w3m/Makefile
blob: 5bef86c58320966f3cd6202b4afab6f80ef77834 (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# New ports collection makefile for:   emacs-w3m
# Date Created:			24 Mar 2001
# Whom:				MANTANI Nobutaka <nobutaka@nobutaka.com>
#
# $FreeBSD$
#

PORTNAME=	emacs-w3m
PORTVERSION=	1.3.2
CATEGORIES=	www elisp
MASTER_SITES=	http://emacs-w3m.namazu.org/
PKGNAMESUFFIX=	-${EMACS_PORT_NAME}

MAINTAINER=	nobutaka@FreeBSD.org

EMACS_PORT_NAME?=	emacs21

CONFIGURE_ARGS?=	--with-emacs=${EMACS_CMD} \
			--with-lispdir=${PREFIX}/${LISPDIR} \
			--with-icondir=${PREFIX}/${ICONDIR}
LISPDIR?=	${EMACS_VERSION_SITE_LISPDIR}/w3m
ICONDIR?=	${EMACS_LIBDIR_WITH_VER}/etc/w3m/icons
ETCDIR?=	${EMACS_LIBDIR_WITH_VER}/etc/w3m
PKGINFODIR?=	"@comment "

USE_AUTOCONF=	yes
ALL_TARGET=	default

PLIST_SUB+=	EMACS_NAME=${EMACS_NAME} \
		XEMACS=${XEMACS} \
		EMACS20=${EMACS20} \
		EMACS21=${EMACS21} \
		EMACS=${EMACS} \
		LISPDIR=${LISPDIR} \
		ICONDIR=${ICONDIR} \
		ETCDIR=${ETCDIR} \
		PKGINFODIR=${PKGINFODIR} \
		ICONS=${ICONS} \
		ETC=${ETC} \
		SHIMBUN=${SHIMBUN}

DOCS=		FAQ README
DOCS_JA=	FAQ.ja README.ja README.namazu.ja README.shimbun.ja TIPS.ja

DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}
DOCSDIR_JA=	${PREFIX}/share/doc/ja/${PORTNAME}

.if (${EMACS_PORT_NAME} == "xemacs21-mule")
XEMACS=		""
EMACS=		"@comment "
EMACS20=	"@comment "
EMACS21=	"@comment "
ICONS=		""
ETC=		"@comment "
.else
.if (${EMACS_PORT_NAME} == "emacs20")
XEMACS=		"@comment "
EMACS=		""
EMACS20=	""
EMACS21=	"@comment "
ICONS=		"@comment "
ETC=		"@comment "
.else
XEMACS=		"@comment "
EMACS=		""
EMACS20=	"@comment "
EMACS21=	""
ICONS=		""
ETC=		""
INSTALL_TARGET=	install install-icons
.endif
.endif

.if defined(WITHOUT_SHIMBUN)
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-Makefile.in
SHIMBUN=	"@comment "
WITHOUT_OCTET_VIEWER=	yes
.else
SHIMBUN=	""
.endif

.if (${EMACS_PORT_NAME} == "emacs21")
FLIM_PORT=	${PORTSDIR}/editors/flim
SEMI_PORT=	${PORTSDIR}/editors/semi
MULE_UCS_PORT=	${PORTSDIR}/converters/mule-ucs
.endif

FLIM_TRUNK=	1.14
FLIM_COOKIE=	${LOCALBASE}/share/flim/flim-${EMACS_PORT_NAME}-${FLIM_TRUNK}.FreeBSD-packages
FLIM_PORT?=	${PORTSDIR}/editors/flim-${EMACS_PORT_NAME}

SEMI_TRUNK=	1.14
SEMI_COOKIE=	${LOCALBASE}/share/semi/semi-${EMACS_PORT_NAME}-${FLIM_TRUNK}.FreeBSD-packages
SEMI_PORT?=	${PORTSDIR}/editors/semi-${EMACS_PORT_NAME}

MULE_UCS_PORT?=	${PORTSDIR}/converters/mule-ucs-${EMACS_PORT_NAME}
MULE_UCS_ELISP_FILE=	${LOCALBASE}/${EMACS_VERSION_SITE_LISPDIR}/mule-ucs/un-define.el

BUILD_DEPENDS=	w3m:${PORTSDIR}/www/w3m-m17n
RUN_DEPENDS=	w3m:${PORTSDIR}/www/w3m-m17n
.if !defined(WITHOUT_SHIMBUN)
BUILD_DEPENDS+=	${FLIM_COOKIE}:${FLIM_PORT}
RUN_DEPENDS+=	${FLIM_COOKIE}:${FLIM_PORT}
.endif
.if !defined(WITHOUT_OCTET_VIEWER)
RUN_DEPENDS+=	${SEMI_COOKIE}:${SEMI_PORT} \
		wvHtml:${PORTSDIR}/textproc/wv \
		xlhtml:${PORTSDIR}/textproc/xlhtml \
		${MULE_UCS_ELISP_FILE}:${MULE_UCS_PORT}
.endif

pre-everything::
.if !defined(WITHOUT_SHIMBUN)
	@${ECHO_MSG} "===>"
	@${ECHO_MSG} "===>  If you don't use the shimbun modules, please define WITHOUT_SHIMBUN."
	@${ECHO_MSG} "===>"
.endif
.if !defined(WITHOUT_OCTET_VIEWER)
	@${ECHO_MSG} "===>"
	@${ECHO_MSG} "===>  If you don't use the octet stream viewer,"
	@${ECHO_MSG} "===>  please define WITHOUT_OCTET_VIEWER."
	@${ECHO_MSG} "===>"
.endif

post-extract:
.if defined(EMACS_PACKAGESDIR)
	@${CP} ${FILESDIR}/_pkg.el ${WRKSRC}
.endif

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${MKDIR} ${DOCSDIR_JA}
.for i in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.for i in ${DOCS_JA}
	${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR_JA}
.endfor
.endif
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>