16ce58292a
original idea from jsyn@, discussed and first tests at c2k3 Warning! - this commit is different from all patches sent around, please remove them before updating - due to a few bugs in systrace this is currently not ready for the casual porter and several ports will fail to build, you've been warned The idea of this patch is to help a porter when developing a new port. With systrace the configure, build and fake stages are not allowed to open network connections or write outside some well defined directories. This way misbehaving programs will be noticed due to logfile entries in /var/log/messages and the port can be fixed. There is generally no need for endusers to use this, as the checksum ensures that ports in the future will behave the same as they did when porting. :) To activate systrace'd port building, set USE_SYSTRACE=Yes (e.g. in /etc/mk.conf) tested by some people, ok espie@
37 lines
1.1 KiB
Makefile
37 lines
1.1 KiB
Makefile
#-*- mode: Fundamental; tab-width: 4; -*-
|
|
# ex:ts=4 sw=4 filetype=make:
|
|
# $OpenBSD: imake.port.mk,v 1.3 2003/07/28 17:17:05 sturm Exp $
|
|
# Based on bsd.port.mk, originally by Jordan K. Hubbard.
|
|
# This file is in the public domain.
|
|
|
|
.if empty(CONFIGURE_STYLE:L:Mnoman)
|
|
INSTALL_TARGET+= install.man
|
|
.endif
|
|
|
|
XMKMF?= xmkmf -a
|
|
XMKMF+= -DPorts
|
|
|
|
.if !exists(${X11BASE})
|
|
IGNORE="uses imake, but ${X11BASE} not found"
|
|
.endif
|
|
|
|
MODIMAKE_configure= \
|
|
if [ -e ${X11BASE}/lib/X11/config/ports.cf ] || \
|
|
fgrep >/dev/null 2>/dev/null Ports \
|
|
${X11BASE}/lib/X11/config/OpenBSD.cf; then \
|
|
cd ${WRKSRC} && ${_SYSTRACE_CMD} ${SETENV} ${MAKE_ENV} ${XMKMF}; \
|
|
else \
|
|
echo >&2 "Error: your X installation is not recent enough"; \
|
|
echo >&2 "Update to a more recent version, or use a ports tree"; \
|
|
echo >&2 "that predates March 18, 2000"; \
|
|
exit 1; \
|
|
fi
|
|
# Kludge
|
|
. if ${CONFIGURE_STYLE:Mimake}
|
|
MODIMAKE_pre_install= \
|
|
${SUDO} mkdir -p /usr/local/lib/X11; \
|
|
if [ ! -e /usr/local/lib/X11/app-defaults ]; then \
|
|
${SUDO} ln -sf /etc/X11/app-defaults /usr/local/lib/X11/app-defaults; \
|
|
fi
|
|
. endif
|