blob: d456a5e89acde0b37761f09992818d8b45e21d65 (
plain) (
blame)
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
|
# Created by: luigi@FreeBSD.org
# $FreeBSD$
PORTNAME= busybox
PORTVERSION= 1.30.1
PORTREVISION= 1
CATEGORIES= sysutils misc shells
MASTER_SITES= https://busybox.net/downloads/
MAINTAINER= samm@os2.kiev.ua
COMMENT= Set of common utilities built as single binary
LICENSE= GPLv2
BUILD_DEPENDS= gsed:textproc/gsed
USES= cpe gmake perl5 tar:bzip2
USE_PERL5= build
OPTIONS_DEFINE= DOCS STATIC
STATIC_LDFLAGS= -static
CONFLICTS_INSTALL= busybox-unstable-*
.include <bsd.port.options.mk>
# fix ash crash on arm, see shell/ash.c
.if ${ARCH} == "armv6"
CFLAGS+= -DBB_GLOBAL_CONST=''
.endif
.if ${ARCH} == "i386"
# clang doesn't swallow some inline assembly
USE_GCC= yes
.endif
MAKE_ARGS= CC="${CC}" HOSTCC="${CC}" CXX="${CXX}" HOSTCXX="${CXX}" \
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
SKIP_STRIP=y V=1
PLIST_FILES= bin/busybox man/man1/busybox.1.gz
PORTDOCS= *
post-patch:
@${REINPLACE_CMD} -e \
's|\([[:<:]]\)sed\([[:blank:]]-n\)|\1gsed\2|' \
${WRKSRC}/scripts/gen_build_files.sh
@${FIND} ${WRKSRC} -name "*.c" -print0 | ${XARGS} -0 \
${REINPLACE_CMD} -e \
's|<alloca.h>|<stdlib.h>| ; \
s|<malloc.h>|<stdlib.h>|'
@${FIND} ${WRKSRC} -name "*.[ch]" -print0 | ${XARGS} -0 \
${REINPLACE_CMD} -e \
's|"/proc|"/compat/linux/proc|'
do-configure:
@${CP} ${FILESDIR}/data-.config ${WRKSRC}/.config
@(cd ${WRKSRC} && ${DO_MAKE_BUILD} oldconfig)
do-install:
(cd ${WRKSRC} && ${INSTALL_PROGRAM} busybox \
${STAGEDIR}${PREFIX}/bin)
(cd ${WRKSRC}/docs && ${INSTALL_MAN} busybox.1 \
${STAGEDIR}${MANPREFIX}/man/man1)
post-install-DOCS-on:
@(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . \
${STAGEDIR}${DOCSDIR} "! -name busybox.1")
.include <bsd.port.mk>
|