blob: c78eb52830fdd41893f3d9ce1183e3f189cf46f3 (
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
|
# $NetBSD: Makefile,v 1.21 2021/11/19 11:13:27 micha Exp $
DISTNAME= schily-2021-09-18
PKGNAME= bosh-20210918
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=schilytools/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= micha@NetBSD.org
HOMEPAGE= https://sourceforge.net/projects/schilytools/
COMMENT= The Schily Bourne Shell
LICENSE= cddl-1.0
MAKE_JOBS_SAFE= no
.include "../../mk/bsd.prefs.mk"
TOOL_DEPENDS+= smake>=1.3nb11:../../devel/smake
SMAKE= MAKEFLAGS= smake
MAKE_FLAGS+= DESTDIR=${DESTDIR} INS_BASE=${PREFIX} DEFMANBASE=. MANDIR=${PKGMANDIR}
# Honor CPPFLAGS, CFLAGS and LDFLAGS
MAKE_FLAGS+= CPPOPTX=${CPPFLAGS:Q} COPTX=${CFLAGS:Q} LDOPTX=${LDFLAGS:Q}
PKG_SHELL= bin/bosh
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
# Only required for testsuite
# This is a temporary workaround for NetBSD. Next release will contain some
# test logic and this can be removed again
.if ${OPSYS} == "NetBSD"
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= pre-test
SUBST_MESSAGE.fix-paths= Fixing absolute paths for true and false.
SUBST_FILES.fix-paths= sh/tests/shelltests/trap/trap.sh
SUBST_SED.fix-paths= -e 's,/bin/true,/usr/bin/true,g'
SUBST_SED.fix-paths+= -e 's,/bin/false,/usr/bin/false,g'
.endif
# Shared platform specific code for schilytools (provided by smake package)
.include "../../devel/smake/Makefile.common"
do-configure:
cd ${WRKSRC}/inc && ${SMAKE} ${MAKE_FLAGS}
do-build:
cd ${WRKSRC} && for library in \
libschily libxtermcap libfind libgetopt libshedit; \
do \
cd ${WRKSRC}/$${library} && ${SMAKE} ${MAKE_FLAGS}; \
done
cd ${WRKSRC}/sh && ${SMAKE} ${MAKE_FLAGS}
# Process tables in manpage
post-build:
.if !empty(USE_TOOLS:Mtbl)
cd ${WRKSRC} && ${TBL} sh/sh.1 >sh/bosh.1.tmp; \
${MV} -f sh/bosh.1.tmp sh/bosh.1
.else
cd ${WRKSRC} && ${MV} -f sh/sh.1 sh/bosh.1
.endif
do-test:
cd ${WRKSRC}/sh && \
cd tests; ${SMAKE} ${MAKE_FLAGS} tests
do-install:
cd ${WRKSRC}/sh && \
${INSTALL_PROGRAM} ${WRKSRC}/sh/OBJ/*/sh \
${DESTDIR}${PREFIX}/bin/bosh; \
${INSTALL_MAN} ${WRKSRC}/sh/bosh.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.include "../../mk/bsd.pkg.mk"
|