summaryrefslogtreecommitdiffstats
path: root/textproc/ruby-xmlparser/Makefile
blob: 1a14f750c6c817df2cf0bf9e266c889b20e09a9a (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
# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
# $FreeBSD$

PORTNAME=	xmlparser
PORTVERSION=	0.7.3
PORTREVISION=	1
CATEGORIES=	textproc ruby
MASTER_SITES=	http://www.yoshidam.net/
PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
DIST_SUBDIR=	ruby

MAINTAINER=	ruby@FreeBSD.org
COMMENT=	Ruby module to access James Clark XML Parser ToolKit ("expat")

BUILD_DEPENDS=	p5-XML-Parser>=0:textproc/p5-XML-Parser
LIB_DEPENDS=	libexpat.so:textproc/expat2
RUN_DEPENDS=	${RUBY_SITEARCHLIBDIR}/uconv.so:japanese/ruby-uconv \
		p5-XML-Parser>=0:textproc/p5-XML-Parser
# to utilize encoding maps included in p5-XML-Parser

USES=		perl5
USE_RUBY=	yes
USE_RUBY_EXTCONF=	yes

WRKSRC=		${WRKDIR}/${PORTNAME}
CONFIGURE_ARGS=	--with-perl-enc-map=${SITE_ARCH}/XML/Parser/Encodings
INSTALL_TARGET=	site-install
MAKE_ARGS=	INSTALL_PROG="${INSTALL_PROGRAM}" \
		INSTALL_DATA="${INSTALL_DATA}"

OPTIONS_DEFINE=	DOCS

post-extract:
	${FIND} ${WRKSRC} -name CVS -type d -exec ${RM} -r {} ';' -prune

post-patch:
	${RUBY} -i -pe 'gsub /%%PREFIX%%/, "${PREFIX}"' ${WRKSRC}/lib/wget.rb

post-install:
	${MKDIR} ${STAGEDIR}${RUBY_MODDOCDIR}/ja/
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${RUBY_MODDOCDIR}/
	${INSTALL_DATA} ${WRKSRC}/README.ja ${STAGEDIR}${RUBY_MODDOCDIR}/ja/

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