1 # Created by: Steven Kreuzer <steven@exit2shell.com>
4 PORTNAME= dtrace-toolkit
9 MAINTAINER= ports@FreeBSD.org
10 COMMENT= Collection of useful scripts for DTrace
13 LICENSE_FILE= ${WRKSRC}/Docs/cddl1.txt
15 USES= perl5 python shebangfix
17 GH_ACCOUNT= opendtrace
22 sh_OLD_CMD= /usr/bin/sh ./sh
24 perl_OLD_CMD= \\./perl
25 ruby_OLD_CMD= \\./ruby
26 SHEBANG_FILES= Apps/shellsnoop \
27 Code/Perl/func_abc.pl \
28 Code/Perl/func_malloc.pl \
29 Code/Perl/func_slow.pl \
31 Code/Perl/hello_strict.pl \
32 Code/Python/func_abc.py \
33 Code/Python/func_slow.py \
34 Code/Ruby/func_abc.rb \
35 Code/Ruby/func_slow.rb \
36 Code/Shell/func_abc.sh \
37 Code/Shell/func_slow.sh \
38 Code/Shell/func_waste.sh \
80 .include <bsd.port.options.mk>
82 .if ${OPSYS} == FreeBSD && ${OSVERSION} > 1200031
83 # lstat calls are no longer available on 12.0+
84 EXTRA_PATCHES= ${PATCHDIR}/extra-patch-dtruss
88 @${MKDIR} ${STAGEDIR}${DATADIR}
89 (cd ${WRKSRC} && ${TAR} --exclude '*.orig' -cf - . ) | \
90 (cd ${STAGEDIR}${DATADIR}/ && ${TAR} xvf -)
91 ${RLN} ${STAGEDIR}${DATADIR}/dtruss ${STAGEDIR}${PREFIX}/bin/dtruss
92 ${RLN} ${STAGEDIR}${DATADIR}/hotkernel ${STAGEDIR}${PREFIX}/bin/hotkernel
93 ${RLN} ${STAGEDIR}${DATADIR}/procsystime ${STAGEDIR}${PREFIX}/bin/procsystime
94 ${RLN} ${STAGEDIR}${DATADIR}/opensnoop ${STAGEDIR}${PREFIX}/bin/opensnoop
95 ${RLN} ${STAGEDIR}${DATADIR}/Apps/shellsnoop ${STAGEDIR}${PREFIX}/bin/shellsnoop
97 .for MANPAGE in dtruss hotkernel procsystime opensnoop shellsnoop
98 ${INSTALL_MAN} ${WRKSRC}/Man/man1m/${MANPAGE}.1m \
99 ${STAGEDIR}${MAN1PREFIX}/man/man1/${MANPAGE}.1
102 .include <bsd.port.mk>