aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/ruby-xmlparser/Makefile
blob: 56dc13fb96b0f3985fa8128656dcec62f56595bf (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
# New ports collection makefile for:    Ruby-xmlparser
# Date created:     9 Aug 2000
# Whom:         Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

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

MAINTAINER= knu@FreeBSD.org

BUILD_DEPENDS=  ${PERL_ARCHLIB}/XML/Parser/Expat.pm:${PORTSDIR}/textproc/p5-XML-Parser
LIB_DEPENDS=    expat.2:${PORTSDIR}/textproc/expat2
RUN_DEPENDS=    ${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv \
        ${PERL_ARCHLIB}/XML/Parser/Expat.pm:${PORTSDIR}/textproc/p5-XML-Parser
# to utilize encoding maps included in p5-XML-Parser

USE_RUBY=   yes
USE_RUBY_EXTCONF=   yes

PERL_ARCHLIB=   ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}

WRKSRC=     ${WRKDIR}/${PORTNAME}
CONFIGURE_ARGS= --with-perl-enc-map=${PERL_ARCHLIB}/XML/Parser/Encodings
INSTALL_TARGET= site-install

post-extract:
    ${RM} -r ${WRKSRC}/samples/expat-1.2

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

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${RUBY_EXAMPLESDIR}/${PORTNAME}
    ${CP} -R ${WRKSRC}/samples/* ${RUBY_EXAMPLESDIR}/${PORTNAME}/
    ${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}/ja
    ${INSTALL_DATA} ${WRKSRC}/README ${RUBY_DOCDIR}/${PORTNAME}/
    ${INSTALL_DATA} ${WRKSRC}/README.ja ${RUBY_DOCDIR}/${PORTNAME}/ja/
.endif

.include <bsd.port.mk>