blob: 0dc8b9fbb5abd9e3b2e7c0030faf3f1b40567ab9 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# $NetBSD: Makefile,v 1.6 2017/09/08 06:17:45 wiz Exp $
DISTNAME= libmicro-${LIBMICRO_VERSION}
CATEGORIES= benchmarks
#MASTER_SITES= http://hub.opensolaris.org/bin/download/Project+libmicro/Source+Archives/
MAINTAINER= pkgsrc-users@NetBSD.org
#HOMEPAGE= http://hub.opensolaris.org/bin/view/Project+libmicro/
COMMENT= Set of utilities to benchmark productivity of system calls
LICENSE= cddl-1.0
LIBMICRO_VERSION= 0.4.0
WRKSRC= ${WRKDIR}/libMicro-${LIBMICRO_VERSION}
USE_TOOLS+= gmake tee
BUILD_TARGET= default
INSTALLATION_DIRS= bin
INSTALLATION_DIRS+= libexec/${PKGBASE}
INSTALLATION_DIRS+= libexec/${PKGBASE}/bin
INSTALLATION_DIRS+= libexec/${PKGBASE}/bin-${MACHINE_ARCH}
LIBMICRO_BASE= ${PREFIX}/libexec/${PKGBASE}
SUBST_CLASSES+= fix-arch
SUBST_MESSAGE.fix-arch= Fix machine architecture path
SUBST_STAGE.fix-arch= pre-configure
SUBST_FILES.fix-arch= Makefile bench.sh wrapper.sh
SUBST_SED.fix-arch= -e 's|@@MACHINE_ARCH@@|${MACHINE_ARCH}|'
post-patch:
cd ${WRKSRC} && ${LN} -s Makefile.NetBSD Makefile.OpenBSD
cd ${WRKSRC} && ${LN} -s Makefile.NetBSD Makefile.Bitrig
cd ${WRKSRC} && ${LN} -s Makefile.DragonFly Makefile.FreeBSD
post-build:
${SED} -e 's|@@DESTDIR@@|${DESTDIR}|' \
-e 's|@@PREFIX@@|${PREFIX}|' \
-e 's|@@PKGBASE@@|${PKGBASE}|' \
${FILESDIR}/run-libmicro > ${WRKDIR}/run-libmicro
do-install:
set -e; cd ${WRKSRC}/bin; \
for f in *; do \
${INSTALL_PROGRAM} ${WRKSRC}/bin-${MACHINE_ARCH}/"$$f" \
${DESTDIR}${LIBMICRO_BASE}/bin-${MACHINE_ARCH}; \
done
set -e; \
cd ${DESTDIR}${LIBMICRO_BASE}/bin-${MACHINE_ARCH}; \
for f in *; do \
${LN} -s ../wrapper ../bin/"$$f"; \
done
${INSTALL_PROGRAM} ${WRKSRC}/bin-${MACHINE_ARCH}/exec_bin \
${DESTDIR}${LIBMICRO_BASE}/bin-${MACHINE_ARCH}
${INSTALL_SCRIPT} ${WRKSRC}/bench \
${DESTDIR}${LIBMICRO_BASE}
${INSTALL_SCRIPT} ${WRKSRC}/wrapper \
${DESTDIR}${LIBMICRO_BASE}
${INSTALL_SCRIPT} ${WRKSRC}/multiview \
${DESTDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKDIR}/run-libmicro \
${DESTDIR}${PREFIX}/bin
benchmark:
cd ${WRKSRC} && ./bench | ${TEE} libmicro.output
results:
${MKDIR} /tmp/benches/`domainname`
cd ${WRKSRC} && \
./multiview libmicro.output > /tmp/benches/`domainname`/libmicro.`uname`-`uname -m`-`uname -r`.`hostname`.html
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|