summaryrefslogtreecommitdiffstats
path: root/chinese/libtabe/Makefile
blob: 2612e165cda8bacfee0a3033e6b264c8ee659c9b (plain)
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
# Created by: Jing-Tang Keith Jang <keith@FreeBSD.org>
# $FreeBSD$

PORTNAME=	libtabe
PORTVERSION=	0.2.6
PORTREVISION=	8
CATEGORIES=	chinese
MASTER_SITES=	DEBIAN/pool/main/libt/libtabe/
DISTNAME=	libtabe_${PORTVERSION}.orig

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Unified library for Chinese text processing

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/COPYING

USES=		gmake libtool
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
USE_BDB=	yes
OBSOLETE_BDB_VAR=	USE_DB2
DATADIR=	${PREFIX}/share/tabe
DOCSDIR=	${PREFIX}/share/doc/tabe
CONFIGURE_ARGS=	--includedir=${PREFIX}/include/tabe \
		--with-db-name=${BDB_LIB_NAME} \
		--with-db-inc=${BDB_INCLUDE_DIR} \
		--with-db-lib=${BDB_LIB_DIR} \
		--with-db-bin=${LOCALBASE}/bin
WRKSRC=		${WRKDIR}/${DISTNAME:S|_|-|}
MAKE_JOBS_UNSAFE=	yes

OPTIONS_DEFINE=		DOCS X11
OPTIONS_SUB=		X11
X11_USE=		XORG=x11
X11_CONFIGURE_WITH=	x

.include <bsd.port.options.mk>

pre-everything::
.if defined(WITH_BDB_VER)
pre-everything::
	@${ECHO_CMD} ""
	@${ECHO_CMD} "WARNING:"
	@${ECHO_CMD} "	You have defined WITH_BDB_VER. Make sure you use the same"
	@${ECHO_CMD} "	db version for all ports that use libtabe, such as xcin."
	@${ECHO_CMD} "	Otherwise, ports that use libtabe may not work correctly."
	@${ECHO_CMD} ""
.endif

post-patch-X11-off:
	${REINPLACE_CMD} -e '/all:/s/ bims//; /bims/d' \
		${WRKSRC}/src/Makefile.in

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtabe.so

post-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/tsi-src/README \
		${STAGEDIR}${DOCSDIR}/README.tsi
.if ${PORT_OPTIONS:MX11}
	${INSTALL_DATA} ${WRKSRC}/src/supports/bims/README \
		${STAGEDIR}${DOCSDIR}/README.bims
.endif
.for DOC in BoPoMoFo.shtml Changes Changes.pre-0.1 TODO ZuYinCode.txt \
		et26.txt libtabe.sgml
	${INSTALL_DATA} ${WRKSRC}/doc/${DOC} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>
OpenPOWER on IntegriCloud