aboutsummaryrefslogtreecommitdiff
path: root/www/w3m/Makefile
blob: bb83d46fc30e439680bbbae5a17ac4cedda802c3 (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
PORTNAME=	w3m
PORTVERSION=	0.5.3.${SNAPDATE}
CATEGORIES+=	www

MAINTAINER?=	nobutaka@FreeBSD.org
COMMENT?=	Pager/text-based WWW browser
WWW=		https://w3m.sourceforge.net/

LICENSE=	w3m
LICENSE_NAME=	w3m
LICENSE_FILE=	${WRKSRC}/doc/README
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

BROKEN_mips64=		fails to build: qemu: uncaught target signal 11 (Segmentation fault) - core dumped

LIB_DEPENDS=	libgc.so:devel/boehm-gc

USES=		cpe iconv pkgconfig perl5 ssl
USE_GITHUB=	yes

CPE_VENDOR=	w3m_project

GH_ACCOUNT=	tats
GH_PROJECT=	w3m
GH_TAGNAME=	ee66aab

MAKE_JOBS_UNSAFE=	yes
SNAPDATE=	20230718

CONFLICTS?=	ja-w3m-0.5.* ja-w3m-img-0.5.* w3m-img-0.5.*
GNU_CONFIGURE=	yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
CONFIGURE_ARGS=	--with-gc=${LOCALBASE} \
		ac_cv_path_PERL=${PERL}
CONFIGURE_ENV=	DEFS="-I${LOCALBASE}/include"

DOCS_COMMON=	FAQ.html HISTORY MANUAL.html README README.cookie \
		README.cygwin README.dict README.func README.img \
		README.m17n README.mouse README.passwd README.pre_form \
		README.siteconf README.tab STORY.html \
		keymap.default keymap.lynx menu.default menu.submenu
DOCS_DE=	FAQ.html MANUAL.html README.func
DOCS_EN=	README.sixel
DOCS_JP=	${DOCS_COMMON} README.SSL README.keymap \
		README.mailcap README.menu README.migemo

OPTIONS_DEFINE=	INLINE_IMAGE JAPANESE KEY_LYNX DOCS NLS
INLINE_IMAGE_DESC=	Inline image support
JAPANESE_DESC=		Japanese messages and migemo support
KEY_LYNX_DESC=		Keymap like lynx browser
OPTIONS_SUB=	yes

INLINE_IMAGE_USES=	xorg
INLINE_IMAGE_USE=	xorg=x11
INLINE_IMAGE_LIB_DEPENDS=	libImlib2.so:graphics/imlib2
INLINE_IMAGE_CONFIGURE_ON=	--with-imagelib=imlib2 --enable-image=fb,x11
INLINE_IMAGE_CONFIGURE_OFF=	--enable-image=fb

JAPANESE_CONFIGURE_ON=	--enable-japanese=U --with-migemo=yes

KEY_LYNX_CONFIGURE_ON=	--with-keymap=lynx

NLS_USES=	gettext
NLS_CONFIGURE_ON=	--enable-nls
NLS_CONFIGURE_OFF=	--disable-nls

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MINLINE_IMAGE}
PKGMESSAGE=	${MASTERDIR}/pkg-message
CONFIGURE_ENV += LDFLAGS="-L${LOCALBASE}/lib" LIBS="-lX11"
.else
# Don't use pkg-message
PKGMESSAGE=	${NONEXISTENT}
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		's|`\(expr\) \(.*\) : \(.*\)`|`\1 \\( \2 : \3 \\)`|' \
		-e 's|/usr/local|${LOCALBASE}|g' \
		${WRKSRC}/configure
	@${FIND} ${WRKSRC}/doc* -type f \! -name HISTORY \
		-exec ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' {} +

post-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/ja/w3m
	@cd ${WRKSRC}/doc-jp; \
	for i in ${DOCS_JP} ; do \
		${INSTALL_DATA} $$i ${STAGEDIR}${PREFIX}/share/doc/ja/w3m/ ; \
	done
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/de/w3m
	@cd ${WRKSRC}/doc-de; \
	for i in ${DOCS_DE} ; do \
		${INSTALL_DATA} $$i ${STAGEDIR}${PREFIX}/share/doc/de/w3m/ ; \
	done
	@cd ${WRKSRC}/doc; \
	${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/w3m/; \
	for i in ${DOCS_COMMON} ${DOCS_EN} ; do \
		${INSTALL_DATA} $$i ${STAGEDIR}${PREFIX}/share/doc/w3m/ ; \
	done
	${MKDIR} ${STAGEDIR}${PREFIX}/share/man/ja/man1
	${INSTALL_MAN} ${WRKSRC}/scripts/w3mman/w3mman.1 ${STAGEDIR}${PREFIX}/share/man/ja/man1

.include <bsd.port.mk>