2013-03-07 04:25:10 +01:00
|
|
|
# Created by: Alexander Leidinger <netchild@FreeBSD.org>
|
2003-10-11 21:36:13 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= cil
|
2013-08-31 18:07:19 +02:00
|
|
|
PORTVERSION= 1.7.3
|
2014-11-26 14:08:24 +01:00
|
|
|
PORTREVISION= 2
|
2003-10-11 21:36:13 +02:00
|
|
|
CATEGORIES= devel lang
|
2012-07-19 19:25:31 +02:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
|
2003-10-11 21:36:13 +02:00
|
|
|
|
2013-10-23 22:45:10 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2003-10-11 21:36:13 +02:00
|
|
|
COMMENT= Infrastructure for C Program Analysis and Transformation
|
|
|
|
|
2014-03-27 14:23:10 +01:00
|
|
|
LICENSE= BSD3CLAUSE
|
2012-07-19 19:25:31 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
2009-06-01 21:19:57 +02:00
|
|
|
CONFLICTS= ccured-[0-9]*
|
2003-10-20 17:02:18 +02:00
|
|
|
|
2006-08-05 15:00:16 +02:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
2013-08-31 18:07:19 +02:00
|
|
|
USES= gmake perl5
|
|
|
|
USE_OCAML= yes
|
|
|
|
USE_OCAML_FINDLIB= yes
|
2014-09-03 17:56:00 +02:00
|
|
|
OCAML_PKGDIRS=
|
2003-10-11 21:36:13 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2012-07-19 19:25:31 +02:00
|
|
|
MAKE_JOBS_UNSAFE=yes
|
|
|
|
|
|
|
|
PORTDOCS= *
|
2013-08-31 18:07:19 +02:00
|
|
|
PLIST_FILES= ${BINFILES:S,^,bin/,} \
|
|
|
|
%%SITE_PERL%%/CilConfig.pm \
|
|
|
|
${LIBFILES:S,^,%%SITE_PERL%%/CIL/,} \
|
|
|
|
${LIBBINS:S,^,%%SITE_PERL%%/CIL/,} \
|
|
|
|
${LIBAFILES:S,^,%%SITE_PERL%%/CIL/,}
|
|
|
|
BINFILES= cilly cilly.native
|
|
|
|
LIBAFILES= App/Cilly.pm
|
|
|
|
LIBFILES= App/Cilly/KeptFile.pm \
|
|
|
|
App/Cilly/OutputFile.pm \
|
|
|
|
App/Cilly/TempFile.pm
|
|
|
|
LIBBINS= patcher
|
2012-07-19 19:25:31 +02:00
|
|
|
|
2014-03-27 14:23:10 +01:00
|
|
|
OPTIONS_DEFINE= DOCS
|
2003-10-11 21:36:13 +02:00
|
|
|
|
|
|
|
post-patch:
|
2013-08-31 18:07:19 +02:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
'35 s|make|gmake|g' ${WRKSRC}/myocamlbuild.ml
|
2012-07-19 19:25:31 +02:00
|
|
|
@${REINPLACE_CMD} -e \
|
2014-12-23 03:22:19 +01:00
|
|
|
's|@CILHOME@/lib|${PREFIX}/${SITE_PERL_REL}/CIL|g ; \
|
2013-08-31 18:07:19 +02:00
|
|
|
s|\@CILHOME\@|${PREFIX}|g' \
|
|
|
|
${WRKSRC}/lib/App/Cilly/CilConfig.pm.in
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
'/^#!/s|/.*|${PERL}|' ${WRKSRC}/lib/patcher
|
2012-07-19 19:25:31 +02:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
'/^#!/s|/.*|${PERL}| ; \
|
|
|
|
s|$$::cilhome|${PREFIX}|g ; \
|
|
|
|
s|obj/$$::archos|libexec/cil|g ; \
|
|
|
|
s|^use Cilly;|use CIL::Cilly|' ${WRKSRC}/bin/cilly
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|^use KeptFile;|use CIL::KeptFile;| ; \
|
|
|
|
s|^use OutputFile;|use CIL::OutputFile;| ; \
|
2013-08-31 18:07:19 +02:00
|
|
|
s|^use TempFile;|use CIL::TempFile;|' \
|
|
|
|
${WRKSRC}/lib/App/Cilly.pm.in
|
2012-07-19 19:25:31 +02:00
|
|
|
@${REINPLACE_CMD} -e \
|
2013-08-31 18:07:19 +02:00
|
|
|
's|^use OutputFile;|use CIL::OutputFile;|' \
|
|
|
|
${WRKSRC}/lib/App/Cilly/KeptFile.pm
|
2012-07-19 19:25:31 +02:00
|
|
|
@${REINPLACE_CMD} -e \
|
2013-08-31 18:07:19 +02:00
|
|
|
's|^use OutputFile;|use CIL::OutputFile;|' \
|
|
|
|
${WRKSRC}/lib/App/Cilly/TempFile.pm
|
2014-03-27 14:23:10 +01:00
|
|
|
@${REINPLACE_CMD} '/MACHDEPCC/ s|gcc|${CC}|' ${WRKSRC}/Makefile.in
|
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@${STRIP_CMD} ${WRKSRC}/bin/cilly.native
|
2003-10-11 21:36:13 +02:00
|
|
|
|
|
|
|
do-install:
|
2014-03-27 14:23:10 +01:00
|
|
|
(cd ${WRKSRC}/bin && ${INSTALL_SCRIPT} ${BINFILES} \
|
|
|
|
${STAGEDIR}${PREFIX}/bin)
|
2014-11-26 14:08:24 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/CIL/App/Cilly
|
2014-03-27 14:23:10 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/lib/App/Cilly/CilConfig.pm \
|
2014-11-26 14:08:24 +01:00
|
|
|
${STAGEDIR}${PREFIX}/${SITE_PERL_REL}
|
2014-03-27 14:23:10 +01:00
|
|
|
(cd ${WRKSRC}/lib && ${INSTALL_DATA} ${LIBFILES} \
|
2014-11-26 14:08:24 +01:00
|
|
|
${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/CIL/App/Cilly)
|
2014-03-27 14:23:10 +01:00
|
|
|
(cd ${WRKSRC}/lib && ${INSTALL_DATA} ${LIBAFILES} \
|
2014-11-26 14:08:24 +01:00
|
|
|
${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/CIL/App)
|
2014-03-27 14:23:10 +01:00
|
|
|
(cd ${WRKSRC}/lib && ${INSTALL_DATA} ${LIBBINS} \
|
2014-11-26 14:08:24 +01:00
|
|
|
${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/CIL)
|
2016-06-25 11:05:21 +02:00
|
|
|
# Remove orphan dir created by bsd.ocaml.mk
|
|
|
|
-@${RMDIR} -p ${STAGEDIR}${OCAMLFIND_DESTDIR}
|
|
|
|
|
|
|
|
do-install-DOCS-on:
|
2014-03-27 14:23:10 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
2016-10-21 14:51:40 +02:00
|
|
|
@${RM} -r ${WRKSRC}/doc/cilcode.tmp
|
2014-03-27 14:23:10 +01:00
|
|
|
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
|
2014-09-03 17:56:00 +02:00
|
|
|
|
2014-03-27 14:23:10 +01:00
|
|
|
.include <bsd.port.mk>
|