summaryrefslogtreecommitdiffstats
path: root/textproc/sablotron/Makefile
blob: 675a085c34f22063ab50287a0d6c44673b591fdd (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# New ports collection makefile for:	sablotron
# Date created:		13 Nov 2000
# Whom:			Sergey Skvortsov <skv@protey.ru>
#
# $FreeBSD$
#

PORTNAME=	Sablot
PORTVERSION=	1.0
CATEGORIES=	textproc
MASTER_SITES=	http://download-2.gingerall.cz/download/sablot/

MAINTAINER=	skv@FreeBSD.org
COMMENT=	XML toolkit implementing XSLT 1.0, XPath 1.0 and DOM Level2

LIB_DEPENDS=	iconv.3:${PORTSDIR}/converters/libiconv \
		expat.4:${PORTSDIR}/textproc/expat2

# If WITH_DISABLE_META is defined sablot will not output the META html tag
#WITH_DISABLE_META=	yes

# Define WITH_ICONV_TYPECAST to typecast the second parameter
# of iconv to char**
#WITH_ICONV_TYPECAST=	yes

INSTALLS_SHLIB=	yes

SHLIB_MAJOR=	70	# API changes counter
PLIST_SUB+=	SHLIB_MAJOR="${SHLIB_MAJOR}"

CONFIGURE_ENV=	CPPFLAGS=-I${LOCALBASE}/include LIBTOOL=${LIBTOOL} \
		LDFLAGS="-L${LOCALBASE}/lib -lstdc++"
USE_GMAKE=	yes
USE_LIBTOOL=	yes
USE_PERL5_BUILD=	yes

MAN1=	sabcmd.1

.include <bsd.port.pre.mk>

.if defined(WITHOUT_ADDING_META)
CONFIGURE_ARGS+=	--disable-adding-meta
.endif

.if defined(WITH_ICONV_TYPECAST)
CONFIGURE_ARGS+=	--enable-iconv-typecast
.endif

.if defined(WITHOUT_DOM)
CONFIGURE_ARGS+=	--disable-dom
.endif

.if defined(WITHOUT_DOCUMENT_ERRORS)
CONFIGURE_ARGS+=	--disable-document-errors
.endif

.if defined(WITH_CHECK_LEAKS)
CONFIGURE_ARGS+=	--enable-check-leaks
.endif

.if defined(WITH_DEBUGGER)
CONFIGURE_ARGS+=	--enable-debugger
.endif

.ifndef(NOPORTDOCS)
BUILD_DEPENDS+=		${SITE_PERL}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser
CONFIGURE_ARGS+=	--with-html-dir=${DOCSDIR}
.endif

DOCSLIST=	README README_JS RELEASE doc/misc/DEBUGGER doc/misc/NOTES

post-patch:
	@${PERL} -pi -e \
	's!(?<=libsablot_la_LDFLAGS = -version-info )(\d+):(\d+):\1!${SHLIB_MAJOR}:$$1:${SHLIB_MAJOR}!;' \
		${WRKSRC}/src/engine/Makefile.in
.if defined(NOPORTDOCS)
	@${PERL} -pi -e 's!(?<=SUBDIRS = )(.*)!man!' ${WRKSRC}/doc/Makefile.in
.endif

post-install:
.ifndef(NOPORTDOCS)
	@${ECHO_MSG} "===>   Installing additional documentation for ${PKGNAME}"
	@${INSTALL_DATA} ${DOCSLIST:S!^!${WRKSRC}/!}	${DOCSDIR}
.endif

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