tweak pre-fake and post-install modules, so that they're run in the

exact same way (e.g., with FAKE_SETUP done and with changed
identity already).

Adjust user modules accordingly.
This commit is contained in:
espie 2017-12-03 11:10:10 +00:00
parent 6c6d2cbf8f
commit adf97138bc
4 changed files with 19 additions and 17 deletions

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.1379 2017/11/28 10:26:00 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.1380 2017/12/03 11:10:10 espie Exp $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
@ -2764,14 +2764,20 @@ ${_TEST_COOKIE}: ${_BUILD_COOKIE}
.endif
@${_MAKE_COOKIE} $@
# XXX we don't care about the order
_post-install-modules:
.for _m in ${MODULES:T:U}
. if defined(MOD${_m}_post-install)
_hook-post-install::
@${MOD${_m}_post-install}
. endif
.endfor
_pre-fake-modules:
.for _m in ${MODULES:T:U}
. if defined(MOD${_m}_pre-fake)
@${MOD${_m}_pre-fake}
. endif
.endfor
${_FAKE_COOKIE}: ${_BUILD_COOKIE} ${_FAKESUDO_CHECK_COOKIE}
@${ECHO_MSG} "===> Faking installation for ${FULLPKGNAME}${_MASTER}"
@if [ x`umask 022;${_FAKESUDO} /bin/sh -c umask` != x022 ]; then \
@ -2791,11 +2797,7 @@ ${_FAKE_COOKIE}: ${_BUILD_COOKIE} ${_FAKESUDO_CHECK_COOKIE}
@ln -sf /bin/echo ${WRKDIR}/bin/chgrp
@install -C -m ${BINMODE} ${_INSTALL_WRAPPER} ${WRKDIR}/bin/install
.endif
.for _m in ${MODULES:T:U}
. if defined(MOD${_m}_pre-fake)
@${MOD${_m}_pre-fake}
. endif
.endfor
${_SUDOMAKESYS} _pre-fake-modules ${FAKE_SETUP}
.if target(pre-fake)
@${_SUDOMAKESYS} pre-fake ${FAKE_SETUP}
.endif
@ -2815,8 +2817,7 @@ ${_FAKE_COOKIE}: ${_BUILD_COOKIE} ${_FAKESUDO_CHECK_COOKIE}
.if target(post-install)
@${_SUDOMAKESYS} post-install ${FAKE_SETUP}
.endif
.if target(_hook-post-install)
@${_SUDOMAKESYS} _hook-post-install ${FAKE_SETUP}
@${_SUDOMAKESYS} _post-install-modules ${FAKE_SETUP}
.endif
@${_check_wrkdir} ${WRKDIR} ${_TS_COOKIE} ${WRKDIR_CHANGES_OKAY}
@${_FAKESUDO} ${_MAKE_COOKIE} $@
@ -3476,7 +3477,8 @@ _all_phony = ${_recursive_depends_targets} \
show-required-by subpackage uninstall _print-metadata \
run-depends-args lib-depends-args all-lib-depends-args wantlib-args \
port-wantlib-args fake-wantlib-args no-wantlib-args no-lib-depends-args \
_recurse-show-run-depends show-run-depends
_recurse-show-run-depends show-run-depends \
_post-install-modules _pre-fake-modules
.if defined(_DEBUG_TARGETS)
. for _t in ${_all_phony}

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: perl.port.mk,v 1.29 2016/04/26 10:56:59 sthen Exp $
# $OpenBSD: perl.port.mk,v 1.30 2017/12/03 11:10:10 espie Exp $
# Based on bsd.port.mk, originally by Jordan K. Hubbard.
# This file is in the public domain.
@ -73,7 +73,7 @@ _MODPERL_preconfig = :
.endif
MODPERL_pre-fake = \
${_FAKESUDO} mkdir -p ${WRKINST}`perl -e 'use Config; print $$Config{installarchlib}, "\n";'`
mkdir -p ${WRKINST}`perl -e 'use Config; print $$Config{installarchlib}, "\n";'`
.if ${CONFIGURE_STYLE:L:Mmodbuild}
. if ${CONFIGURE_STYLE:L:Mtiny}

View File

@ -1,4 +1,4 @@
# $OpenBSD: ocaml.port.mk,v 1.31 2017/09/01 17:04:22 jasper Exp $
# $OpenBSD: ocaml.port.mk,v 1.32 2017/12/03 11:10:10 espie Exp $
# regular file usage for bytecode:
# PLIST -- bytecode base files
@ -39,7 +39,7 @@ MAKE_ENV += OCAMLFIND_DESTDIR=${DESTDIR}${TRUEPREFIX}/lib/ocaml \
OCAMLFIND_COMMANDS="ocamldoc=${MODOCAML_OCAMLDOC}"
MODOCAML_pre-fake = \
${_FAKESUDO} ${INSTALL_DATA_DIR} ${WRKINST}${LOCALBASE}/lib/ocaml/stublibs
${INSTALL_DATA_DIR} ${WRKINST}${LOCALBASE}/lib/ocaml/stublibs
######################################################################

View File

@ -1,4 +1,4 @@
# $OpenBSD: kde4.port.mk,v 1.38 2017/11/16 23:20:40 naddy Exp $
# $OpenBSD: kde4.port.mk,v 1.39 2017/12/03 11:10:10 espie Exp $
# The version of KDE SC in x11/kde4
_MODKDE4_STABLE = 4.14.3
@ -318,7 +318,7 @@ MODKDE4_LIB_LINKS ?= No
# thing for MODULES rather than for ports. So play another game...
# Always create directory for headers, remove later if left empty
MODKDE4_pre-fake = ${_FAKESUDO} ${INSTALL_DATA_DIR} ${WRKINST}/${PREFIX}/include/kde4;
MODKDE4_pre-fake = ${INSTALL_DATA_DIR} ${WRKINST}/${PREFIX}/include/kde4
# 1. Remove includes directory created above, if empty.
# 2. Create links for shared libraries in ${PREFIX}/${KDE4LIB},