summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.port.mk
blob: f38c79e209af6434c13cede1421ed12258f4fb07 (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
# $FreeBSD$

PORTSDIR?=	/usr/ports
BSDPORTMK?=	${PORTSDIR}/Mk/bsd.port.mk

# Needed to keep bsd.own.mk from reading in /etc/src.conf
# and setting MK_* variables when building ports.
_WITHOUT_SRCCONF=

# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
.endif

.include <bsd.own.mk>
.include "${BSDPORTMK}"

.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK)
# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x.
run-autotools-fixup:
	test -d ${WRKSRC} && find ${WRKSRC} -type f \( -name config.libpath -o \
		-name config.rpath -o -name configure -o -name libtool.m4 \) \
		-exec sed -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \
		-e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \
		-e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \
		-e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \
		-e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \
		{} + || /usr/bin/true

.ORDER: run-autotools run-autotools-fixup do-configure
do-configure: run-autotools-fixup
.endif
OpenPOWER on IntegriCloud