From 9eeb9a1c1bc050e2909251cea2bf1b46ec0a1a0c Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Sat, 28 Apr 2012 10:50:35 +0000 Subject: [PATCH] Set localstatedir (i.e. BASELOCALSTATEDIR) to /var by default if CONFIGURE_STYLE is gnu. Works the same way as SYSCONFDIR, one can append a subdirectory to change the default localstatedir by using the following construct in the port Makefile: LOCALSTATEDIR= ${BASELOCALSTATEDIR}/foobar Note that this variable in not substituted in PLIST. bulk tested by landry (on a previous diff) ok jasper@ sthen@ --- infrastructure/mk/bsd.port.mk | 7 ++++++- infrastructure/mk/gnu.port.mk | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/infrastructure/mk/bsd.port.mk b/infrastructure/mk/bsd.port.mk index c44ffe64aec..30aef3e9cfe 100644 --- a/infrastructure/mk/bsd.port.mk +++ b/infrastructure/mk/bsd.port.mk @@ -1,6 +1,6 @@ #-*- mode: Makefile; tab-width: 4; -*- # ex:ts=4 sw=4 filetype=make: -# $OpenBSD: bsd.port.mk,v 1.1164 2012/04/22 10:39:48 espie Exp $ +# $OpenBSD: bsd.port.mk,v 1.1165 2012/04/28 10:50:35 ajacoutot Exp $ # $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $ # $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $ # @@ -327,6 +327,11 @@ BASESYSCONFDIR ?= /etc # where configuration files should actually go SYSCONFDIR ?= ${BASESYSCONFDIR} +# User choice, consider read-only from a given port +BASELOCALSTATEDIR ?= /var +# Defaut localstatedir for gnu ports +LOCALSTATEDIR ?= ${BASELOCALSTATEDIR} + RCDIR ?= /etc/rc.d USE_GMAKE ?= No .if ${USE_GMAKE:L} == "yes" diff --git a/infrastructure/mk/gnu.port.mk b/infrastructure/mk/gnu.port.mk index 5d57b1f9ee3..b088cbc8919 100644 --- a/infrastructure/mk/gnu.port.mk +++ b/infrastructure/mk/gnu.port.mk @@ -1,6 +1,6 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 sw=4 filetype=make: -# $OpenBSD: gnu.port.mk,v 1.48 2011/12/12 10:33:33 jasper Exp $ +# $OpenBSD: gnu.port.mk,v 1.49 2012/04/28 10:50:35 ajacoutot Exp $ # Based on bsd.port.mk, originally by Jordan K. Hubbard. # This file is in the public domain. @@ -85,10 +85,12 @@ CONFIGURE_ARGS += --prefix='${PREFIX}' CONFIGURE_ARGS += --sysconfdir='$${${DESTDIRNAME}}${SYSCONFDIR}' CONFIGURE_ARGS += --mandir='$${${DESTDIRNAME}}${PREFIX}/man' CONFIGURE_ARGS += --infodir='$${${DESTDIRNAME}}${PREFIX}/info' +CONFIGURE_ARGS += --localstatedir='$${${DESTDIRNAME}}${LOCALSTATEDIR}' . else CONFIGURE_ARGS += --sysconfdir='${SYSCONFDIR}' CONFIGURE_ARGS += --mandir='${PREFIX}/man' CONFIGURE_ARGS += --infodir='${PREFIX}/info' +CONFIGURE_ARGS += --localstatedir='${LOCALSTATEDIR}' . endif . endif