blob: 56c5d9c95102ad1891324de3c76b4f5b3122fd19 (
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
# New ports collection makefile for: w3m
# Date Created: 7 Oct 1999
# Whom: MANTANI Nobutaka <nobutaka@nobutaka.com>
#
# $FreeBSD$
#
PORTNAME= w3m
PORTVERSION= ${W3M_VERSION}
CATEGORIES+= www ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= w3m-${W3M_VERSION}
PATCH_SITES= http://www.alib.jp/files/
PATCHFILES= w3m-0.5-version-xhtml.patch
PATCH_DIST_STRIP= -p1
MAINTAINER?= nobutaka@FreeBSD.org
COMMENT?= A pager/text-based WWW browser
LIB_DEPENDS= gc.1:${PORTSDIR}/devel/boehm-gc
W3M_VERSION= 0.5.2
CONFLICTS?= ja-w3m-0.5.* ja-w3m-img-0.5.* w3m-m17n-0.5.* w3m-img-0.5.* w3m-m17n-img-0.5.*
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-gc=${LOCALBASE} --mandir=${PREFIX}/man
MAN1= w3m.1 w3mman.1
MANLANG= "" ja
DOCS= FAQ.html HISTORY MANUAL.html README \
README.dict README.func STORY.html keymap.default \
keymap.lynx menu.default menu.submenu
.if !defined(WITHOUT_SSL) && (exists(/usr/lib/libcrypto.so) || exists(${LOCALBASE}/lib/libcrypto.so))
USE_OPENSSL= yes
.else
CONFIGURE_ARGS+= --without-ssl --disable-digest-auth
.endif
.if defined(M17N)
CONFIGURE_ARGS+= --enable-m17n
PLIST_SUB+= M17N=""
.else
.if !defined(JAPANESE)
CONFIGURE_ARGS+= --disable-m17n
PLIST_SUB+= M17N="@comment "
.endif
.endif
.if defined(JAPANESE)
USE_GETTEXT= yes
CONFIGURE_ARGS+= --enable-m17n --enable-japanese=E --with-migemo=yes
DOCS_JP= ${DOCS} README.SSL README.cookie README.keymap README.mailcap \
README.menu README.migemo
PLIST_SUB+= JAPANESE="" M17N=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= JAPANESE="@comment "
.endif
.if defined(INLINE_IMAGE)
USE_GNOME= gtk20
CONFIGURE_ARGS+= --with-imagelib=gtk2
DOCS+= README.img
DOCS_JP+= README.img
PLIST_SUB+= INLINE_IMAGE=""
PKGMESSAGE= ${MASTERDIR}/pkg-message
.else
CONFIGURE_ARGS+= --enable-image=no
PLIST_SUB+= INLINE_IMAGE="@comment "
# Don't use pkg-message
PKGMESSAGE= ${NONEXISTENT}
.endif
.if defined(KEY_LYNX)
CONFIGURE_ARGS+= --enable-keymap=lynx
.endif
.include <bsd.port.pre.mk>
.if exists(${PORT_DBDIR}/boehm-gc/options)
.include "${PORT_DBDIR}/boehm-gc/options"
.endif
.if defined(WITH_THREADING)
.if ${OSVERSION} < 502102
CONFIGURE_ENV= DEFS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LIBS="${LIBS} ${PTHREAD_LIBS:C/-pthread/-lc_r/}"
.else
# Use -lpthread instead of ${PTHREAD_LIBS} to link libpthread
# and libc before libgc.
# This is necessary to avoid build error with boehm-gc with REDIRECT and
# THREADING options.
CONFIGURE_ENV= DEFS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LIBS="${LIBS} ${PTHREAD_LIBS:C/-pthread/-lpthread/} -lc"
.endif
.else
CONFIGURE_ENV= DEFS="-I${LOCALBASE}/include"
.endif
pre-everything::
@${ECHO_MSG} "===>"
@${ECHO_MSG} "===> You can enable some features by defining following variables."
@${ECHO_MSG} "===>"
.if defined(M17N)
@${ECHO_MSG} "===> M17N (multilingualization, enabled)"
.else
@${ECHO_MSG} "===> M17N (multilingualization)"
.endif
.if defined(JAPANESE)
@${ECHO_MSG} "===> JAPANESE (Japanese messages and migemo support, enabled)"
.else
@${ECHO_MSG} "===> JAPANESE (Japanese messages and migemo support)"
.endif
.if defined(INLINE_IMAGE)
@${ECHO_MSG} "===> INLINE_IMAGE (inline image support, enabled)"
.else
@${ECHO_MSG} "===> INLINE_IMAGE (inline image support)"
.endif
.if defined(KEY_LYNX)
@${ECHO_MSG} "===> KEY_LYNX (keymap like lynx browser, enabled)"
.else
@${ECHO_MSG} "===> KEY_LYNX (keymap like lynx browser)"
.endif
@${ECHO_MSG} "===>"
@${ECHO_MSG} "===> You can disable some features by defining following variables."
@${ECHO_MSG} "===>"
.if defined(WITHOUT_SSL)
@${ECHO_MSG} "===> WITHOUT_SSL (disabled)"
.else
@${ECHO_MSG} "===> WITHOUT_SSL"
.endif
@${ECHO_MSG} "===>"
post-patch:
@${REINPLACE_CMD} -e \
's|\`\(expr\) \(.*\) : \(.*\)`|`\1 \\( \2 : \3 \\)`|' \
${WRKSRC}/configure
post-install:
.if !defined(NOPORTDOCS)
.if defined(JAPANESE)
@${MKDIR} ${PREFIX}/share/doc/ja/w3m
@cd ${WRKSRC}/doc-jp; \
for i in ${DOCS_JP} ; do \
${INSTALL_DATA} $$i ${PREFIX}/share/doc/ja/w3m/ ; \
done
.endif
@cd ${WRKSRC}/doc; \
${MKDIR} ${PREFIX}/share/doc/w3m/; \
for i in ${DOCS} ; do \
${INSTALL_DATA} $$i ${PREFIX}/share/doc/w3m/ ; \
done
.if defined(M17N) || defined(JAPANESE)
@${INSTALL_DATA} ${WRKSRC}/doc/README.m17n ${PREFIX}/share/doc/w3m
.endif
.endif
@${INSTALL_MAN} ${WRKSRC}/scripts/w3mman/w3mman.1 ${PREFIX}/man/ja/man1
.if defined(INLINE_IMAGE)
@${CAT} ${PKGMESSAGE}
.endif
.include <bsd.port.post.mk>
|