blob: c78e21be7128c8741618af827d8a0fe0553c34d9 (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
PORTNAME= bash
PATCHLEVEL= 16
PORTVERSION= 5.1.${PATCHLEVEL:S/^0//g}
PORTREVISION?= 0
CATEGORIES= shells
MASTER_SITES= GNU
DISTNAME= ${PORTNAME}-${PORTVERSION:R}
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
PATCH_SITES= GNU/${PORTNAME}/${DISTNAME}-patches/
PATCHFILES!= /usr/bin/jot -s " " -w \
${PORTNAME}${PORTVERSION:R:S/.//g}-%03d \
${PATCHLEVEL} 1 ${PATCHLEVEL}
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= GNU Project's Bourne Again SHell
WWW= https://www.gnu.org/software/bash/
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
OPTIONS_DEFINE= FDESCFS PORTS_READLINE HELP NLS STATIC SYSBASHRC \
SYSLOG DOCS
FDESCFS_DESC= Enable use of /dev/fd
HELP_DESC= Enable builtin help
PORTS_READLINE_DESC= libreadline from ports instead of bundled one
SYSBASHRC_DESC= Enable system-wide rc files
OPTIONS_DEFAULT= HELP PORTS_READLINE
USES= bison cpe iconv makeinfo pathfix localbase
GNU_CONFIGURE= yes
OPTIONS_SUB= yes
CPE_VENDOR= gnu
FDESCFS_CONFIGURE_ENV_OFF= bash_cv_dev_fd=absent
FDESCFS_SUB_FILES= pkg-message
HELP_CONFIGURE_ENABLE= help-builtin
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext
PORTS_READLINE_CONFIGURE_WITH= installed-readline
PORTS_READLINE_USES= readline
INFO= bash
PORTDOCS= FAQ INTRO CHANGES COMPAT NEWS POSIX RBASH README \
bash.html bashref.html
CONFIGURE_ARGS+= --without-bash-malloc \
--disable-rpath \
--enable-disabled-builtins \
--with-libiconv-prefix=${ICONV_PREFIX}
MAKE_ARGS+= TERMCAP_LIB=-ltinfow
.if empty(PKGNAMESUFFIX)
CONFLICTS+= bash-static
.else
CONFLICTS+= bash
.endif
CONFLICTS+= bashc
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSTATIC} || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ${NOSHARED:tl} != "no")
CONFIGURE_ARGS+= --enable-static-link
LLD_UNSAFE= yes
.else
CONFIGURE_ARGS+= --disable-static-link
# Bash symbols must be exported in order to link runtime plugins, i.e.,
# "enable -f". (Plugins are not supported for bash-static.)
LDFLAGS+= -Wl,-export-dynamic
.endif
STANDARD_PATH= /sbin:/bin:/usr/sbin:/usr/bin
CPPFLAGS+= -DDEFAULT_PATH_VALUE='\"${STANDARD_PATH}:${LOCALBASE}/sbin:${LOCALBASE}/bin\"' \
-DSTANDARD_UTILS_PATH='\"${STANDARD_PATH}\"'
post-patch:
# Ensure y.tab.c is regenerated
${TOUCH} ${WRKSRC}/parse.y
${RM} ${WRKSRC}/y.tab.c
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
${WRKSRC}/doc/bash.1
.if ${PORT_OPTIONS:MSYSLOG}
@${REINPLACE_CMD} \
-e "s|/\*.*#define SYSLOG_HISTORY .*\*/|#define SYSLOG_HISTORY|g" \
-e "s|/\*.*#define SYSLOG_SHOPT .*\*/|#define SYSLOG_SHOPT 1|g" \
${WRKSRC}/config-top.h
.endif
@${REINPLACE_CMD} -e "s|\(/etc/profile\)|${LOCALBASE}\1|" \
${WRKSRC}/pathnames.h.in
@${REINPLACE_CMD} -e "s|/etc/[iI]nputrc|${LOCALBASE}/etc/inputrc|g" \
${WRKSRC}/doc/*.info ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.1 \
${WRKSRC}/lib/readline/rlconf.h
post-patch-SYSBASHRC-on:
@${REINPLACE_CMD} \
-e "s|.*\(#define SYS_BASH.*\)\(/etc/.*\"\).*|\1${PREFIX}\2|" \
${WRKSRC}/config-top.h
post-configure:
@${FIND} ${WRKSRC} -name Makefile -print0 | ${XARGS} -0 \
${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|"
pre-build:
@${ECHO_CMD} $$((${PORTREVISION}-1)) > ${WRKSRC}/.build
post-install:
${LN} -sf bash ${STAGEDIR}${PREFIX}/bin/rbash
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/FAQ \
${WRKSRC}/doc/INTRO ${STAGEDIR}${DOCSDIR}
for d in ${PORTDOCS:NFAQ:NINTRO:N*html}; do \
${INSTALL_DATA} ${WRKSRC}/$${d} ${STAGEDIR}${DOCSDIR}; \
done
regress: build
cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} test
ckp:
${MAKE} -DPATCH_DEBUG clean patch
# requires ftp/ncftp3
cklatest:
@${ECHO} -n "Currently at: "
@${MAKE} -V PATCHLEVEL
-ncftpls \
${PATCH_SITES:Mftp*:Ox:[1]} \
| fgrep -v .sig | ${SORT} | ${TAIL}
.include <bsd.port.mk>
|