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@
79 lines
2.3 KiB
Makefile
79 lines
2.3 KiB
Makefile
#-*- mode: Fundamental; tab-width: 4; -*-
|
|
# ex:ts=4 sw=4 filetype=make:
|
|
# $OpenBSD: gnu.port.mk,v 1.14 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.
|
|
|
|
AUTOCONF_NEW?= No
|
|
|
|
MODGNU_AUTOCONF_DEPENDS= ::devel/metaauto \
|
|
::devel/autoconf/${AUTOCONF_VERSION}
|
|
MODGNU_AUTOMAKE_DEPENDS= ::devel/automake
|
|
|
|
.if ${CONFIGURE_STYLE:L:Mautomake}
|
|
BUILD_DEPENDS+= ${MODGNU_AUTOMAKE_DEPENDS}
|
|
.endif
|
|
.if ${CONFIGURE_STYLE:L:Mautoupdate}
|
|
CONFIGURE_STYLE+=autoconf
|
|
.endif
|
|
|
|
.if ${CONFIGURE_STYLE:L:Mautoconf}
|
|
. if ${AUTOCONF_NEW:L} == "yes"
|
|
AUTOCONF_VERSION=2.52
|
|
. else
|
|
AUTOCONF_VERSION?=2.13
|
|
. endif
|
|
BUILD_DEPENDS+= ${MODGNU_AUTOCONF_DEPENDS}
|
|
AUTOCONF?= autoconf
|
|
AUTOUPDATE?= autoupdate
|
|
AUTOHEADER?= autoheader
|
|
AUTOCONF_DIR?=${WRKSRC}
|
|
# missing ?= not an oversight
|
|
AUTOCONF_ENV=PATH=${PORTPATH} AUTOCONF_VERSION=${AUTOCONF_VERSION}
|
|
MAKE_ENV+=AUTOCONF_VERSION=${AUTOCONF_VERSION}
|
|
.endif
|
|
|
|
MODGNU_CONFIG_GUESS_DIRS?=${WRKSRC}
|
|
|
|
MODGNU_configure =
|
|
.for _d in ${MODGNU_CONFIG_GUESS_DIRS}
|
|
MODGNU_configure += cp -f ${PORTSDIR}/infrastructure/db/config.guess ${_d};
|
|
MODGNU_configure += chmod a+rx ${_d}/config.guess;
|
|
MODGNU_configure += cp -f ${PORTSDIR}/infrastructure/db/config.sub ${_d};
|
|
MODGNU_configure += chmod a+rx ${_d}/config.sub;
|
|
.endfor
|
|
MODGNU_configure += ${MODSIMPLE_configure}
|
|
|
|
.if ${CONFIGURE_STYLE:L:Mgnu}
|
|
. if ${CONFIGURE_STYLE:L:Mdest}
|
|
CONFIGURE_ARGS+= --prefix='$${${DESTDIRNAME}}${PREFIX}'
|
|
. else
|
|
CONFIGURE_ARGS+= --prefix='${PREFIX}'
|
|
. endif
|
|
|
|
. if empty(CONFIGURE_STYLE:L:Mold)
|
|
. if ${CONFIGURE_STYLE:L:Mdest}
|
|
CONFIGURE_ARGS+= --sysconfdir='$${${DESTDIRNAME}}${SYSCONFDIR}'
|
|
. else
|
|
CONFIGURE_ARGS+= --sysconfdir='${SYSCONFDIR}'
|
|
. endif
|
|
. endif
|
|
.endif
|
|
|
|
REGRESS_TARGET?= check
|
|
|
|
PATCH_CHECK_ONLY?= No
|
|
.if ${PATCH_CHECK_ONLY:L} != "yes"
|
|
. if ${CONFIGURE_STYLE:L:Mautoupdate}
|
|
MODGNU_post-patch+= cd ${AUTOCONF_DIR} && ${_SYSTRACE_CMD} ${SETENV} ${AUTOCONF_ENV} ${AUTOUPDATE};
|
|
. endif
|
|
. if ${CONFIGURE_STYLE:L:Mautoconf}
|
|
MODGNU_post-patch+= cd ${AUTOCONF_DIR} && ${_SYSTRACE_CMD} ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF};
|
|
. endif
|
|
. if !${CONFIGURE_STYLE:L:Mautomake}
|
|
MODGNU_post-patch+= ln -s /usr/bin/false ${WRKDIR}/bin/automake;
|
|
MODGNU_post-patch+= ln -s /usr/bin/false ${WRKDIR}/bin/aclocal;
|
|
. endif
|
|
.endif
|
|
|