From 906d3f6c9511a4fdb532032f0639b90be8e808b7 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Fri, 24 Apr 2009 19:17:35 +0400 Subject: [PATCH] bsd.port.mk: pass TMPDIR from /etc/make.conf down to the tools Sometimes ports want to put executables to the $TMPDIR (/tmp by-default) during configure/build stages. Such ports will be broken when /tmp is mounted with 'noexec' flag. This patch addresses this problem and allows automated port builds (e.g. via portupgrade) with TMPDIR set from /etc/make.conf. The existing functionality for the KDE package building was integrated to the bsd.port.mk. Signed-off-by: Eygene Ryabinkin --- Mk/bsd.kde.mk | 5 ----- Mk/bsd.port.mk | 13 +++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Mk/bsd.kde.mk b/Mk/bsd.kde.mk index 8c2421e..51515ea 100644 --- a/Mk/bsd.kde.mk +++ b/Mk/bsd.kde.mk @@ -117,11 +117,6 @@ QTCPPFLAGS+= -I${LOCALBASE}/include -I${PREFIX}/include \ -I${QT_PREFIX}/include -D_GETOPT_H QTCFGLIBS+= -Wl,-export-dynamic -L${LOCALBASE}/lib -ljpeg \ -L${QT_PREFIX}/lib -.if defined(PACKAGE_BUILDING) -TMPDIR?= /tmp -MAKE_ENV+= TMPDIR="${TMPDIR}" -CONFIGURE_ENV+= TMPDIR="${TMPDIR}" -.endif .if !defined(QT_NONSTANDARD) CONFIGURE_ARGS+=--with-qt-includes=${QT_PREFIX}/include \ diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 324ed4a..1bec24b 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1292,6 +1292,19 @@ WITHOUT_${W}:= true DOS2UNIX_REGEX?= .* +# At least KDE needs TMPDIR for the package building, +# so we're setting it to the known default value. +.if defined(PACKAGE_BUILDING) +TMPDIR?= /tmp +.endif # defined(PACKAGE_BUILDING) + +# Respect TMPDIR passed via make.conf or similar and pass it down +# to configure and make. +.if defined(TMPDIR) +MAKE_ENV+= TMPDIR="${TMPDIR}" +CONFIGURE_ENV+= TMPDIR="${TMPDIR}" +.endif # defined(TMPDIR) + # Start of pre-makefile section. .if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) -- 1.6.2.4