openbsd-ports/infrastructure/mk/perl.port.mk
sturm 16ce58292a this makes our build infrastructure systrace aware
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@
2003-07-28 17:17:04 +00:00

29 lines
1.1 KiB
Makefile

#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: perl.port.mk,v 1.5 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.
REGRESS_TARGET ?= test
MODPERL_configure= \
arch=`/usr/bin/perl -e 'use Config; print $$Config{archname}, "\n";'`; \
cd ${WRKSRC}; ${_SYSTRACE_CMD} ${SETENV} ${CONFIGURE_ENV} \
/usr/bin/perl Makefile.PL \
PREFIX='$${${DESTDIRNAME}}${PREFIX}' \
INSTALLSITELIB='$${${DESTDIRNAME}}${PREFIX}/libdata/perl5/site_perl' \
INSTALLSITEARCH="\$${INSTALLSITELIB}/$$arch" \
INSTALLPRIVLIB='$${${DESTDIRNAME}}/usr/./libdata/perl5' \
INSTALLARCHLIB="\$${INSTALLPRIVLIB}/$$arch" \
INSTALLMAN1DIR='$${${DESTDIRNAME}}${PREFIX}/man/man1' \
INSTALLMAN3DIR='$${${DESTDIRNAME}}${PREFIX}/man/man3p' \
INSTALLBIN='$${PREFIX}/bin' \
INSTALLSCRIPT='$${INSTALLBIN}' ${CONFIGURE_ARGS}
MODPERL_pre_fake= \
${SUDO} mkdir -p ${WRKINST}`/usr/bin/perl -e 'use Config; print $$Config{installarchlib}, "\n";'`
P5SITE=libdata/perl5/site_perl
P5ARCH=${P5SITE}/${MACHINE_ARCH}-openbsd
SUBST_VARS+=P5ARCH P5SITE