aboutsummaryrefslogtreecommitdiff
path: root/sysutils/busybox/Makefile
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2016-04-26 12:43:46 +0000
committerMathieu Arnold <mat@FreeBSD.org>2016-04-26 12:43:46 +0000
commit41f66abee667dff3cc4bc4dea9ebc65f0b41356e (patch)
treea269b2da0f80c15e0594d9b28314bc5963ad3265 /sysutils/busybox/Makefile
parent344191d1a911fb4c54f4098d9a5b90781e3fd592 (diff)
downloadports-41f66abee667dff3cc4bc4dea9ebc65f0b41356e.tar.gz
ports-41f66abee667dff3cc4bc4dea9ebc65f0b41356e.zip
Notes
Diffstat (limited to 'sysutils/busybox/Makefile')
-rw-r--r--sysutils/busybox/Makefile56
1 files changed, 29 insertions, 27 deletions
diff --git a/sysutils/busybox/Makefile b/sysutils/busybox/Makefile
index c0f7a510f8cf..155e2c2bd398 100644
--- a/sysutils/busybox/Makefile
+++ b/sysutils/busybox/Makefile
@@ -2,15 +2,18 @@
# $FreeBSD$
PORTNAME= busybox
-PORTVERSION= 1.24.1
+PORTVERSION= 1.24.2
CATEGORIES= sysutils misc shells
-MASTER_SITES= http://www.busybox.net/downloads/ LOCAL/mandree
+MASTER_SITES= https://busybox.net/downloads/
-PATCH_SITES= http://www.busybox.net/downloads/fixes-${PORTVERSION}/
+PATCH_SITES= https://busybox.net/downloads/fixes-${PORTVERSION}/
+PATCHFILES= ${PORTNAME}-${PORTVERSION}-CVE-2016-2147.patch \
+ ${PORTNAME}-${PORTVERSION}-CVE-2016-2148.patch \
+ ${PORTNAME}-${PORTVERSION}-ash-recursive-heredocs.patch
PATCH_DIST_STRIP= -p1
MAINTAINER= ports@FreeBSD.org
-COMMENT= Busybox for FreeBSD
+COMMENT= Set of common utilities built as single binary
LICENSE= GPLv2
@@ -21,41 +24,40 @@ CONFLICTS_INSTALL= busybox-unstable-*
PORTSCOUT= skipv:1.25.0
CFLAGS+= -fno-builtin-mempcpy # avoid -Wshadow warnings
-MAKE_ARGS+= SKIP_STRIP=y CC="${CC}" HOSTCC="${CC}" CXX="${CXX}" HOSTCXX="${CXX}"
-# findutils/find.c l. 752+, uses a GCC extension/invalid C code:
-USES= compiler:nestedfct cpe gmake tar:bzip2
+MAKE_ARGS= CC="${CC}" HOSTCC="${CC}" CXX="${CXX}" HOSTCXX="${CXX}" \
+ SKIP_STRIP=y V=1
+USES= cpe gmake perl5 tar:bzip2
+USE_PERL5= build
-PLIST_FILES= bin/busybox
+PLIST_FILES= bin/busybox man/man1/busybox.1.gz
OPTIONS_DEFINE= DOCS STATIC
STATIC_LDFLAGS= -static
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDOCS}
-USES+= perl5
-USE_PERL5= build
PORTDOCS= *
-.endif
post-patch:
- ${REINPLACE_CMD} -e 's/sed/gsed/' ${WRKSRC}/scripts/gen_build_files.sh
- ${REINPLACE_CMD} -e 's/<malloc.h>/<stdlib.h>/' \
- ${WRKSRC}/libbb/appletlib.c \
- ${WRKSRC}/shell/hush.c
- ${REINPLACE_CMD} -e 's/<alloca.h>/<stdlib.h>/' \
- ${WRKSRC}/scripts/basic/*.c
+ @${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>|'
do-configure:
- ${CP} ${FILESDIR}/data-.config ${WRKSRC}/.config
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} oldconfig
+ @${CP} ${FILESDIR}/data-.config ${WRKSRC}/.config
+ @(cd ${WRKSRC} && ${DO_MAKE_BUILD} oldconfig)
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-.if ${PORT_OPTIONS:MDOCS}
- cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
- ${RM} -f ${STAGEDIR}${DOCSDIR}/.gitignore
-.endif
+ (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>