kill the ^VAR idiom in SUBST_VARS, prefer passing explicit options to

update-plist (this will allow me to remove some crazy duplicate code
in pkg_add and update-plist)
This commit is contained in:
espie 2018-05-27 10:56:33 +00:00
parent 0a4b93834f
commit 9732413348
4 changed files with 19 additions and 13 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.1405 2018/05/27 07:15:06 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.1406 2018/05/27 10:56:33 espie Exp $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
@ -1011,10 +1011,10 @@ _lt_libs += LIB${_n}_LTVERSION='-version-info ${_v:S/./:/}:0'
_lt_libs += lib${_n:S/+/_/g:S/-/_/g:S/./_/g}_ltversion=${_v}
.endfor
# Create the generic variable substitution list, from subst vars
SUBST_VARS += MACHINE_ARCH ARCH HOMEPAGE ^PREFIX ^SYSCONFDIR FLAVOR_EXT \
FULLPKGNAME MAINTAINER ^BASE_PKGPATH ^LOCALBASE ^X11BASE ^TRUEPREFIX \
^RCDIR ^LOCALSTATEDIR
# Create the generic variable substitution list
SUBST_VARS += ARCH BASE_PKGPATH FLAVOR_EXT FULLPKGNAME HOMEPAGE \
LOCALBASE LOCALSTATEDIR MACHINE_ARCH MAINTAINER \
PREFIX RCDIR SYSCONFDIR TRUEPREFIX X11BASE
_PKG_ADD_AUTO ?=
.if !empty(_DEPENDENCY_STACK)
@ -1862,6 +1862,8 @@ _update_plist = ${_cache_fragment}; \
${_UPDATE_PLIST_SETUP} ${_PERLSCRIPT}/update-plist \
-w ${PATCHORIG} -w ${DISTORIG} -w .beforesubst \
-u ${PORTSDIR}/infrastructure/db/user.list \
-s PREFIX -s SYSCONFDIR -s BASE_PKGPATH -s LOCALBASE \
-s X11BASE -s RCDIR -s LOCALSTATEDIR \
-X ${_FAKE_COOKIE} -X ${_INSTALL_PRE_COOKIE} -X ${WRKINST}/.saved_libs \
-P ${PKGDIR} ${UPDATE_PLIST_ARGS} ${UPDATE_PLIST_OPTS} --
.for i in ${BUILD_PACKAGES}

View File

@ -1,4 +1,4 @@
# $OpenBSD: ruby.port.mk,v 1.92 2018/01/15 23:59:33 jeremy Exp $
# $OpenBSD: ruby.port.mk,v 1.93 2018/05/27 10:56:33 espie Exp $
# ruby module
@ -146,7 +146,8 @@ MODRUBY_RELDOCDIR= share/doc/${MODRUBY_PKG_PREFIX}
MODRUBY_RELEXAMPLEDIR= share/examples/${MODRUBY_PKG_PREFIX}
MODRUBY_DOCDIR= ${PREFIX}/${MODRUBY_RELDOCDIR}
MODRUBY_EXAMPLEDIR= ${PREFIX}/${MODRUBY_RELEXAMPLEDIR}
SUBST_VARS += ^MODRUBY_RELDOCDIR ^MODRUBY_RELEXAMPLEDIR
SUBST_VARS += MODRUBY_RELDOCDIR MODRUBY_RELEXAMPLEDIR
UPDATE_PLIST_ARGS += -s MODRUBY_RELDOCDIR MODRUBY_RELEXAMPLEDIR
# Assume that we want to automatically add ruby to BUILD_DEPENDS
# and RUN_DEPENDS unless the port specifically requests not to.
@ -215,7 +216,8 @@ PKG_ARCH= *
# PLIST magic. Set variables so that the same PLIST will work for
# all ruby versions and implementations.
SUBST_VARS+= ^GEM_LIB ^GEM_BIN DISTNAME
SUBST_VARS+= GEM_LIB GEM_BIN DISTNAME
UPDATE_PLIST_ARGS += -s GEM_LIB -s GEM_BIN
. if ${MODRUBY_REV} == jruby
GEM= ${RUBY} -S gem
@ -299,8 +301,9 @@ do-install:
.endif
# These are mostly used by the non-gem ports.
SUBST_VARS+= ^MODRUBY_SITEARCHDIR ^MODRUBY_SITEDIR MODRUBY_LIBREV \
SUBST_VARS+= MODRUBY_SITEARCHDIR MODRUBY_SITEDIR MODRUBY_LIBREV \
MODRUBY_ARCH
UPDATE_PLIST_ARGS += -s MODRUBY_SITEARCHDIR -s MODRUBY_SITEDIR
# test stuff

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.39 2018/05/03 11:01:24 zhuk Exp $
# $OpenBSD: Makefile,v 1.40 2018/05/27 10:56:33 espie Exp $
COMMENT-main = daemon for controlling APC UPSes
COMMENT-cgi = CGI scripts for web monitoring
@ -33,7 +33,8 @@ NO_TEST = Yes
MAKE_FLAGS = VERBOSE=2
WEB_ROOT = ${VARBASE}/www
SUBST_VARS += WEB_ROOT ^BASESYSCONFDIR
SUBST_VARS += WEB_ROOT BASESYSCONFDIR
UPDATE_PLIST_ARGS += -s BASESYSCONFDIR
SYSCONFDIR = ${BASESYSCONFDIR}/apcupsd
CONFIGURE_ARGS = --mandir=${PREFIX}/man \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.2 2017/06/26 09:06:57 espie Exp $
# $OpenBSD: Makefile.inc,v 1.3 2018/05/27 10:56:33 espie Exp $
DIST_SUBDIR= terraform
@ -21,5 +21,5 @@ GH_ACCOUNT ?= terraform-providers
GH_PROJECT ?= terraform-provider-${PROVIDER}
PKGDIR ?= ${.CURDIR}/../pkg
RUN_DEPENDS += sysutils/terraform/terraform
SUBST_VARS += ^PROVIDER
SUBST_VARS += PROVIDER
.endif