1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00
freebsd-ports/russian/p5-XML-Parser-encodings/Makefile
Adam Weinberger 10f22ecd6d Clean up the rest of the perl@ Makefiles a bit.
- Remove dependencies on modules distributed as part of perl core
- Remove references to FreeBSD < 8 and perl < 5.16
- Ensure that DOCS and EXAMPLES options exist for ports installing
  PORTDOCS or PORTEXAMPLES
- Reduce unnecessary inclusions of bsd.port.options.mk by using
  OPTIONS helpers and the like
- Fix some cases where dependencies were only assigned to BUILD_DEPENDS
- Fix a few of the cases where dependencies were only assigned to RUN_DEPENDS.
  This one happens in many, many ports. I only applied it in cases where
  it interfered with 'make test' but it should maybe be done more generally.
- Mute ${MKDIR} in installation
- Parethesize compound commands
- In www/p5-URI-Fetch, remove the ZLIB option that wasn't used
2015-03-13 17:29:58 +00:00

55 lines
1.5 KiB
Makefile

# Created by: Sergey Skvortsov <skv@protey.ru>
# $FreeBSD$
PORTNAME= XML-Parser-encodings
PORTVERSION= 1.03
PORTREVISION= 1
CATEGORIES= russian textproc perl5
DISTFILES=
MAINTAINER= perl@FreeBSD.org
COMMENT= Additional Russian encodings for XML::Parser
RUN_DEPENDS= p5-XML-Parser>=2.40:${PORTSDIR}/textproc/p5-XML-Parser
BUILD_DEPENDS:= ${RUN_DEPENDS} \
p5-XML-Encoding>=0:${PORTSDIR}/textproc/p5-XML-Encoding \
${NONEXISTENT}:${PORTSDIR}/converters/iconv:extract \
${NONEXISTENT}:${PORTSDIR}/converters/iconv-extra:extract
USES= perl5
NO_WRKSUBDIR= YES
RUSSIANENC= cp1251 cp866 mac-cyrillic
.include <bsd.port.pre.mk>
PKGNAMEPREFIX:= ${PKGNAMEPREFIX}p5-
post-extract:
.for ICONVPORT in iconv iconv-extra
@${LN} -sfh \
`cd ${PORTSDIR}/converters/${ICONVPORT} && ${MAKE} -V WRKSRC`/ccs \
${WRKSRC}/${ICONVPORT}
.endfor
do-configure:
@${CP} ${WRKSRC}/iconv/cp866.txt ${WRKDIR}
@${CP} ${WRKSRC}/iconv-extra/windows-1251.txt ${WRKDIR}/cp1251.txt
@${CP} ${WRKSRC}/iconv-extra/mac-cyrillic.txt ${WRKDIR}
@${PERL} -pi -e 's/\r/\n/gm;' ${WRKDIR}/mac-cyrillic.txt
do-build:
.for ENC in ${RUSSIANENC}
@${LOCALBASE}/bin/make_encmap ${ENC} ${WRKDIR}/${ENC}.txt | \
${PERL} -pi -e "s/(?<=^<encmap name='${ENC}')()(?=>)/ expat='yes'/;" \
>${WRKDIR}/${ENC}.xml
@${LOCALBASE}/bin/compile_encoding \
-o ${WRKDIR}/${ENC}.enc ${WRKDIR}/${ENC}.xml
.endfor
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/XML/Parser/Encodings
${INSTALL_DATA} ${WRKSRC}/*.enc \
${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/XML/Parser/Encodings
.include <bsd.port.post.mk>